Skip to content

Commit

Permalink
Fix linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
ergo720 committed Aug 6, 2024
1 parent 6e00143 commit 1bbaf52
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 37 deletions.
6 changes: 2 additions & 4 deletions src/hw/video/gpu/pbus.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ class pbus {

machine *const m_machine;
void *m_pci_conf;
struct {
// Contains the ram type, among other unknown info about the ram modules
uint32_t fbio_ram;
};
// registers
uint32_t fbio_ram; // Contains the ram type, among other unknown info about the ram modules
};
11 changes: 5 additions & 6 deletions src/hw/video/gpu/pcrtc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ class pcrtc {

friend class pmc;
machine *const m_machine;
struct {
std::atomic_uint32_t int_status; // accessed from pfifo::worker with pmc::update_irq()
std::atomic_uint32_t int_enabled; // accessed from pfifo::worker with pmc::update_irq()
uint32_t fb_addr;
uint32_t unknown[1];
};
// registers
std::atomic_uint32_t int_status; // accessed from pfifo::worker with pmc::update_irq()
std::atomic_uint32_t int_enabled; // accessed from pfifo::worker with pmc::update_irq()
uint32_t fb_addr;
uint32_t unknown[1];
};
9 changes: 4 additions & 5 deletions src/hw/video/gpu/pfb.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@ class pfb {

friend class pramin;
machine *const m_machine;
struct {
uint32_t cfg0, cfg1;
uint32_t nvm;
std::atomic_uint32_t cstatus; // accessed from pfifo::worker with nv2a::get_dma_obj()
};
// registers
uint32_t cfg0, cfg1;
uint32_t nvm;
std::atomic_uint32_t cstatus; // accessed from pfifo::worker with nv2a::get_dma_obj()
};
5 changes: 2 additions & 3 deletions src/hw/video/gpu/pfifo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ class pfifo {
std::atomic_uint32_t signal;
machine *const m_machine;
uint8_t *m_ram;
struct {
std::atomic_uint32_t regs[NV_PFIFO_SIZE / 4];
};
// registers
std::atomic_uint32_t regs[NV_PFIFO_SIZE / 4];
};

static_assert(sizeof(std::atomic_uint32_t) == 4);
11 changes: 5 additions & 6 deletions src/hw/video/gpu/pmc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,9 @@ class pmc {
friend class pramin;
friend class user;
machine *const m_machine;
struct {
uint32_t endianness;
std::atomic_uint32_t int_status; // accessed from pfifo::worker with pmc::update_irq()
std::atomic_uint32_t int_enabled; // accessed from pfifo::worker with pmc::update_irq()
uint32_t engine_enabled;
};
// registers
uint32_t endianness;
std::atomic_uint32_t int_status; // accessed from pfifo::worker with pmc::update_irq()
std::atomic_uint32_t int_enabled; // accessed from pfifo::worker with pmc::update_irq()
uint32_t engine_enabled;
};
5 changes: 2 additions & 3 deletions src/hw/video/gpu/pramdac.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class pramdac {
friend class ptimer;
machine *const m_machine;
uint64_t core_freq; // gpu frequency
struct {
uint32_t nvpll_coeff, mpll_coeff, vpll_coeff;
};
// registers
uint32_t nvpll_coeff, mpll_coeff, vpll_coeff;
};
11 changes: 5 additions & 6 deletions src/hw/video/gpu/ptimer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,9 @@ class ptimer {
uint64_t counter_offset;
// Counter value when it was stopped
uint64_t counter_when_stopped;
struct {
std::atomic_uint32_t int_status; // accessed from pfifo::worker with pmc::update_irq()
std::atomic_uint32_t int_enabled; // accessed from pfifo::worker with pmc::update_irq()
uint32_t multiplier, divider;
uint32_t alarm;
};
// registers
std::atomic_uint32_t int_status; // accessed from pfifo::worker with pmc::update_irq()
std::atomic_uint32_t int_enabled; // accessed from pfifo::worker with pmc::update_irq()
uint32_t multiplier, divider;
uint32_t alarm;
};
7 changes: 3 additions & 4 deletions src/hw/video/gpu/pvideo.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ class pvideo {
auto get_io_func(bool log, bool enabled, bool is_be);

machine *const m_machine;
struct {
uint32_t debug[11];
uint32_t regs[24];
};
// registers
uint32_t debug[11];
uint32_t regs[24];
};

0 comments on commit 1bbaf52

Please sign in to comment.