SE/FS: Put platform pointers in fewer objects.
Not all objects need a platform pointer, and having one creates a dependence on their being a platform object. This change removes the platform pointer to from the base device object and moves it into subclasses that actually need it.
This commit is contained in:
@@ -83,6 +83,7 @@ class RealViewCtrl(BasicPioDevice):
|
||||
|
||||
class Gic(PioDevice):
|
||||
type = 'Gic'
|
||||
platform = Param.Platform(Parent.any, "Platform this device is part of.")
|
||||
dist_addr = Param.Addr(0x1f001000, "Address for distributor")
|
||||
cpu_addr = Param.Addr(0x1f000100, "Address for cpu")
|
||||
dist_pio_delay = Param.Latency('10ns', "Delay for PIO r/w to distributor")
|
||||
|
||||
@@ -53,9 +53,10 @@
|
||||
#include "mem/packet_access.hh"
|
||||
|
||||
Gic::Gic(const Params *p)
|
||||
: PioDevice(p),distAddr(p->dist_addr), cpuAddr(p->cpu_addr),
|
||||
distPioDelay(p->dist_pio_delay), cpuPioDelay(p->cpu_pio_delay),
|
||||
intLatency(p->int_latency), enabled(false), itLines(p->it_lines)
|
||||
: PioDevice(p), platform(p->platform), distAddr(p->dist_addr),
|
||||
cpuAddr(p->cpu_addr), distPioDelay(p->dist_pio_delay),
|
||||
cpuPioDelay(p->cpu_pio_delay), intLatency(p->int_latency),
|
||||
enabled(false), itLines(p->it_lines)
|
||||
{
|
||||
itLinesLog2 = ceilLog2(itLines);
|
||||
|
||||
|
||||
@@ -124,6 +124,8 @@ class Gic : public PioDevice
|
||||
Bitfield<12,10> cpu_id;
|
||||
EndBitUnion(IAR)
|
||||
|
||||
Platform *platform;
|
||||
|
||||
/** Distributor address GIC listens at */
|
||||
Addr distAddr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user