System.py revision 3584
1from m5.SimObject import SimObject 2from m5.params import * 3from m5.proxy import * 4from m5 import build_env 5from PhysicalMemory import * 6 7class MemoryMode(Enum): vals = ['invalid', 'atomic', 'timing'] 8 9class System(SimObject): 10 type = 'System' 11 physmem = Param.PhysicalMemory(Parent.any, "phsyical memory") 12 mem_mode = Param.MemoryMode('atomic', "The mode the memory system is in") 13 if build_env['FULL_SYSTEM']: 14 boot_cpu_frequency = Param.Frequency(Self.cpu[0].clock.frequency, 15 "boot processor frequency") 16 init_param = Param.UInt64(0, "numerical value to pass into simulator") 17 boot_osflags = Param.String("a", "boot flags to pass to the kernel") 18 kernel = Param.String("file that contains the kernel code") 19 readfile = Param.String("", "file to read startup script from") 20 symbolfile = Param.String("", "file to get the symbols from") 21 22class AlphaSystem(System): 23 type = 'AlphaSystem' 24 console = Param.String("file that contains the console code") 25 pal = Param.String("file that contains palcode") 26 system_type = Param.UInt64("Type of system we are emulating") 27 system_rev = Param.UInt64("Revision of system we are emulating") 28 29class SparcSystem(System): 30 type = 'SparcSystem' 31 _rom_base = 0xfff0000000 32 # ROM for OBP/Reset/Hypervisor 33 rom = Param.PhysicalMemory(PhysicalMemory(range = AddrRange(_rom_base, size = '8MB')), 34 "Memory to hold the ROM data") 35 36 reset_addr = Param.Addr(_rom_base, "Address to load ROM at") 37 hypervisor_addr = Param.Addr(Addr('64kB') + _rom_base, 38 "Address to load hypervisor at") 39 openboot_addr = Param.Addr(Addr('512kB') + _rom_base, 40 "Address to load openboot at") 41 42 reset_bin = Param.String("file that contains the reset code") 43 hypervisor_bin = Param.String("file that contains the hypervisor code") 44 openboot_bin = Param.String("file that contains the openboot code") 45 46