self.realview = RealViewPBX()
elif machine_type == "RealView_EB":
self.realview = RealViewEB()
- elif machine_type == "VersatileExpress":
- self.realview = VExpress()
+ elif machine_type == "VExpress_ELT":
+ self.realview = VExpress_ELT()
else:
print "Unknown Machine Type"
sys.exit(1)
use_cf = True
self.cf0 = CowIdeDisk(driveID='master')
self.cf0.childImage(mdesc.disk())
- self.realview.cf_ctrl.disks = [self.cf0]
-
+ # default to an IDE controller rather than a CF one
+ # assuming we've got one
+ try:
+ self.realview.ide.disks = [self.cf0]
+ except:
+ self.realview.cf_ctrl.disks = [self.cf0]
if bare_metal:
# EOT character on UART will end the simulation
self.realview.uart.end_on_eot = True
self.physmem.port = self.membus.port
self.realview.attachOnChipIO(self.membus)
self.realview.attachIO(self.iobus)
-
self.intrctrl = IntrControl()
self.terminal = Terminal()
self.vncserver = VncServer()
from m5.params import *
from m5.proxy import *
from Device import BasicPioDevice, PioDevice, IsaFake, BadAddr, DmaDevice
+from Pci import PciConfigAll
+from Ethernet import NSGigE, IGbE_e1000, IGbE_igb
from Ide import *
from Platform import Platform
from Terminal import Terminal
class RealView(Platform):
type = 'RealView'
system = Param.System(Parent.any, "system")
+ pci_cfg_base = Param.Addr(0, "Base address of PCI Configuraiton Space")
# Reference for memory map and interrupt number
# RealView Platform Baseboard Explore for Cortex-A9 User Guide(ARM DUI 0440A)
kmi0 = Pl050(pio_addr=0x10006000, int_num=52)
kmi1 = Pl050(pio_addr=0x10007000, int_num=53, is_mouse=True)
a9scu = A9SCU(pio_addr=0x1f000000)
- cf_ctrl = IdeController(disks=[], pci_func=0, pci_dev=0, pci_bus=0,
+ cf_ctrl = IdeController(disks=[], pci_func=0, pci_dev=7, pci_bus=2,
io_shift = 1, ctrl_offset = 2, Command = 0x1,
BAR0 = 0x18000000, BAR0Size = '16B',
BAR1 = 0x18000100, BAR1Size = '1B',
self.flash_fake.pio = bus.port
self.smcreg_fake.pio = bus.port
-class VExpress(RealView):
+class VExpress_ELT(RealView):
+ pci_cfg_base = 0xD0000000
elba_uart = Pl011(pio_addr=0xE0009000, int_num=42)
uart = Pl011(pio_addr=0xFF009000, int_num=121)
realview_io = RealViewCtrl(proc_id0=0x0C000222, pio_addr=0xFF000000)
elba_kmi0 = Pl050(pio_addr=0xE0006000, int_num=52)
elba_kmi1 = Pl050(pio_addr=0xE0007000, int_num=53)
a9scu = A9SCU(pio_addr=0xE0200000)
- cf_ctrl = IdeController(disks=[], pci_func=0, pci_dev=0, pci_bus=0,
+ cf_ctrl = IdeController(disks=[], pci_func=0, pci_dev=0, pci_bus=2,
io_shift = 2, ctrl_offset = 2, Command = 0x1,
BAR0 = 0xFF01A000, BAR0Size = '256B',
BAR1 = 0xFF01A100, BAR1Size = '4096B',
BAR0LegacyIO = True, BAR1LegacyIO = True)
+ pciconfig = PciConfigAll()
+ ethernet = IGbE_e1000(pci_bus=0, pci_dev=0, pci_func=0,
+ InterruptLine=1, InterruptPin=1)
+
+ ide = IdeController(disks = [], pci_bus=0, pci_dev=1, pci_func=0,
+ InterruptLine=2, InterruptPin=2)
+
l2x0_fake = IsaFake(pio_addr=0xE0202000, pio_size=0xfff)
dmac_fake = AmbaFake(pio_addr=0xE0020000)
uart1_fake = AmbaFake(pio_addr=0xE000A000)
self.elba_kmi0.pio = bus.port
self.elba_kmi1.pio = bus.port
self.cf_ctrl.pio = bus.port
+ self.ide.pio = bus.port
+ self.ethernet.pio = bus.port
+ self.pciconfig.pio = bus.default
+ bus.use_default_range = True
+
self.l2x0_fake.pio = bus.port
self.dmac_fake.pio = bus.port
self.uart1_fake.pio = bus.port
#include "config/the_isa.hh"
#include "cpu/intr_control.hh"
+#include "dev/arm/gic.hh"
#include "dev/arm/realview.hh"
#include "dev/terminal.hh"
#include "sim/system.hh"
void
RealView::postPciInt(int line)
{
- panic("Need implementation\n");
+ gic->sendInt(line);
}
void
RealView::clearPciInt(int line)
{
- panic("Need implementation\n");
+ gic->clearInt(line);
}
Addr
RealView::pciToDma(Addr pciAddr) const
{
- panic("Need implementation\n");
- M5_DUMMY_RETURN
+ return pciAddr;
}
Addr
RealView::calcPciConfigAddr(int bus, int dev, int func)
{
- return ULL(-1);
+ if (bus != 0)
+ return ULL(-1);
+ return params()->pci_cfg_base | ((func & 7) << 16) | ((dev & 0x1f) << 19);
}
Addr
Addr
RealView::calcPciMemAddr(Addr addr)
{
- panic("Need implementation\n");
- M5_DUMMY_RETURN
+ return addr;
}
RealView *