RealView.py (7950:1120b07dd4b0) | RealView.py (8212:134bd699967a) |
---|---|
1# Copyright (c) 2009 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 29 unchanged lines hidden (view full) --- 38# 39# Authors: Ali Saidi 40# Gabe Black 41# William Wang 42 43from m5.params import * 44from m5.proxy import * 45from Device import BasicPioDevice, PioDevice, IsaFake, BadAddr, DmaDevice | 1# Copyright (c) 2009 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 29 unchanged lines hidden (view full) --- 38# 39# Authors: Ali Saidi 40# Gabe Black 41# William Wang 42 43from m5.params import * 44from m5.proxy import * 45from Device import BasicPioDevice, PioDevice, IsaFake, BadAddr, DmaDevice |
46from Ide import * |
|
46from Platform import Platform 47from Terminal import Terminal 48from Uart import Uart 49 50class AmbaDevice(BasicPioDevice): 51 type = 'AmbaDevice' 52 abstract = True 53 amba_id = Param.UInt32("ID of AMBA device for kernel detection") --- 72 unchanged lines hidden (view full) --- 126 uart = Pl011(pio_addr=0x10009000, int_num=44) 127 realview_io = RealViewCtrl(pio_addr=0x10000000) 128 gic = Gic() 129 timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000) 130 timer1 = Sp804(int_num0=37, int_num1=37, pio_addr=0x10012000) 131 clcd = Pl111(pio_addr=0x10020000, int_num=55) 132 kmi0 = Pl050(pio_addr=0x10006000, int_num=52) 133 kmi1 = Pl050(pio_addr=0x10007000, int_num=53, is_mouse=True) | 47from Platform import Platform 48from Terminal import Terminal 49from Uart import Uart 50 51class AmbaDevice(BasicPioDevice): 52 type = 'AmbaDevice' 53 abstract = True 54 amba_id = Param.UInt32("ID of AMBA device for kernel detection") --- 72 unchanged lines hidden (view full) --- 127 uart = Pl011(pio_addr=0x10009000, int_num=44) 128 realview_io = RealViewCtrl(pio_addr=0x10000000) 129 gic = Gic() 130 timer0 = Sp804(int_num0=36, int_num1=36, pio_addr=0x10011000) 131 timer1 = Sp804(int_num0=37, int_num1=37, pio_addr=0x10012000) 132 clcd = Pl111(pio_addr=0x10020000, int_num=55) 133 kmi0 = Pl050(pio_addr=0x10006000, int_num=52) 134 kmi1 = Pl050(pio_addr=0x10007000, int_num=53, is_mouse=True) |
135 cf_ctrl = IdeController(disks=[], pci_func=0, pci_dev=0, pci_bus=0, 136 io_shift = 1, ctrl_offset = 2, Command = 0x1, 137 BAR0 = 0x18000000, BAR0Size = '16B', 138 BAR1 = 0x18000100, BAR1Size = '1B', 139 BAR0LegacyIO = True, BAR1LegacyIO = True) |
|
134 | 140 |
141 |
|
135 l2x0_fake = IsaFake(pio_addr=0x1f002000, pio_size=0xfff) 136 flash_fake = IsaFake(pio_addr=0x40000000, pio_size=0x4000000) 137 dmac_fake = AmbaFake(pio_addr=0x10030000) 138 uart1_fake = AmbaFake(pio_addr=0x1000a000) 139 uart2_fake = AmbaFake(pio_addr=0x1000b000) 140 uart3_fake = AmbaFake(pio_addr=0x1000c000) 141 smc_fake = AmbaFake(pio_addr=0x100e1000) 142 sp810_fake = AmbaFake(pio_addr=0x10001000, ignore_access=True) 143 watchdog_fake = AmbaFake(pio_addr=0x10010000) 144 gpio0_fake = AmbaFake(pio_addr=0x10013000) 145 gpio1_fake = AmbaFake(pio_addr=0x10014000) 146 gpio2_fake = AmbaFake(pio_addr=0x10015000) 147 ssp_fake = AmbaFake(pio_addr=0x1000d000) 148 sci_fake = AmbaFake(pio_addr=0x1000e000) 149 aaci_fake = AmbaFake(pio_addr=0x10004000) 150 mmc_fake = AmbaFake(pio_addr=0x10005000) 151 rtc_fake = AmbaFake(pio_addr=0x10017000, amba_id=0x41031) | 142 l2x0_fake = IsaFake(pio_addr=0x1f002000, pio_size=0xfff) 143 flash_fake = IsaFake(pio_addr=0x40000000, pio_size=0x4000000) 144 dmac_fake = AmbaFake(pio_addr=0x10030000) 145 uart1_fake = AmbaFake(pio_addr=0x1000a000) 146 uart2_fake = AmbaFake(pio_addr=0x1000b000) 147 uart3_fake = AmbaFake(pio_addr=0x1000c000) 148 smc_fake = AmbaFake(pio_addr=0x100e1000) 149 sp810_fake = AmbaFake(pio_addr=0x10001000, ignore_access=True) 150 watchdog_fake = AmbaFake(pio_addr=0x10010000) 151 gpio0_fake = AmbaFake(pio_addr=0x10013000) 152 gpio1_fake = AmbaFake(pio_addr=0x10014000) 153 gpio2_fake = AmbaFake(pio_addr=0x10015000) 154 ssp_fake = AmbaFake(pio_addr=0x1000d000) 155 sci_fake = AmbaFake(pio_addr=0x1000e000) 156 aaci_fake = AmbaFake(pio_addr=0x10004000) 157 mmc_fake = AmbaFake(pio_addr=0x10005000) 158 rtc_fake = AmbaFake(pio_addr=0x10017000, amba_id=0x41031) |
152 cf0_fake = IsaFake(pio_addr=0x18000000, pio_size=0xfff) | |
153 154 155 # Attach I/O devices that are on chip 156 def attachOnChipIO(self, bus): 157 self.gic.pio = bus.port 158 self.l2x0_fake.pio = bus.port 159 160 # Attach I/O devices to specified bus object. Can't do this 161 # earlier, since the bus object itself is typically defined at the 162 # System level. 163 def attachIO(self, bus): 164 self.uart.pio = bus.port 165 self.realview_io.pio = bus.port 166 self.timer0.pio = bus.port 167 self.timer1.pio = bus.port 168 self.clcd.pio = bus.port 169 self.kmi0.pio = bus.port 170 self.kmi1.pio = bus.port | 159 160 161 # Attach I/O devices that are on chip 162 def attachOnChipIO(self, bus): 163 self.gic.pio = bus.port 164 self.l2x0_fake.pio = bus.port 165 166 # Attach I/O devices to specified bus object. Can't do this 167 # earlier, since the bus object itself is typically defined at the 168 # System level. 169 def attachIO(self, bus): 170 self.uart.pio = bus.port 171 self.realview_io.pio = bus.port 172 self.timer0.pio = bus.port 173 self.timer1.pio = bus.port 174 self.clcd.pio = bus.port 175 self.kmi0.pio = bus.port 176 self.kmi1.pio = bus.port |
177 self.cf_ctrl.pio = bus.port |
|
171 self.dmac_fake.pio = bus.port 172 self.uart1_fake.pio = bus.port 173 self.uart2_fake.pio = bus.port 174 self.uart3_fake.pio = bus.port 175 self.smc_fake.pio = bus.port 176 self.sp810_fake.pio = bus.port 177 self.watchdog_fake.pio = bus.port 178 self.gpio0_fake.pio = bus.port 179 self.gpio1_fake.pio = bus.port 180 self.gpio2_fake.pio = bus.port 181 self.ssp_fake.pio = bus.port 182 self.sci_fake.pio = bus.port 183 self.aaci_fake.pio = bus.port 184 self.mmc_fake.pio = bus.port 185 self.rtc_fake.pio = bus.port 186 self.flash_fake.pio = bus.port | 178 self.dmac_fake.pio = bus.port 179 self.uart1_fake.pio = bus.port 180 self.uart2_fake.pio = bus.port 181 self.uart3_fake.pio = bus.port 182 self.smc_fake.pio = bus.port 183 self.sp810_fake.pio = bus.port 184 self.watchdog_fake.pio = bus.port 185 self.gpio0_fake.pio = bus.port 186 self.gpio1_fake.pio = bus.port 187 self.gpio2_fake.pio = bus.port 188 self.ssp_fake.pio = bus.port 189 self.sci_fake.pio = bus.port 190 self.aaci_fake.pio = bus.port 191 self.mmc_fake.pio = bus.port 192 self.rtc_fake.pio = bus.port 193 self.flash_fake.pio = bus.port |
187 self.cf0_fake.pio = bus.port | |
188 189# Reference for memory map and interrupt number 190# RealView Emulation Baseboard User Guide (ARM DUI 0143B) 191# Chapter 4: Programmer's Reference 192class RealViewEB(RealView): 193 uart = Pl011(pio_addr=0x10009000, int_num=44) 194 realview_io = RealViewCtrl(pio_addr=0x10000000) 195 gic = Gic(dist_addr=0x10041000, cpu_addr=0x10040000) --- 57 unchanged lines hidden --- | 194 195# Reference for memory map and interrupt number 196# RealView Emulation Baseboard User Guide (ARM DUI 0143B) 197# Chapter 4: Programmer's Reference 198class RealViewEB(RealView): 199 uart = Pl011(pio_addr=0x10009000, int_num=44) 200 realview_io = RealViewCtrl(pio_addr=0x10000000) 201 gic = Gic(dist_addr=0x10041000, cpu_addr=0x10040000) --- 57 unchanged lines hidden --- |