gem5/src/arch
Jiuyue Ma 9fb8b8515b x86: add LongModeAddressSize function to cpuid
LongModeAddressSize was used by kernel 2.6.28.4 for physical address
validation, if not properly implemented, PCI resource allocation may
failed because of ioremap failed:

- linux-2.6.28.4/arch/x86/mm/ioremap.c:27-30
  27 static inline int phys_addr_valid(unsigned long addr)
  28 {
  29     return addr < (1UL << boot_cpu_data.x86_phys_bits);
  30 }

- linux-2.6.28.4/arch/x86/kernel/cpu/common.c:475-482
 475 #ifdef CONFIG_X86_64
 476         if (c->extended_cpuid_level >= 0x80000008) {
 477                 u32 eax = cpuid_eax(0x80000008);
 478
 479                 c->x86_virt_bits = (eax >> 8) & 0xff;
 480                 c->x86_phys_bits = eax & 0xff;
 481         }
 482 #endif

- linux-2.6.28.4/arch/x86/mm/ioremap.c:209-214
 209 if (!phys_addr_valid(phys_addr)) {
 210     printk(KERN_WARNING "ioremap: invalid physical address %llx\n",
 211            (unsigned long long)phys_addr);
 212     WARN_ON_ONCE(1);
 213     return NULL;
 214 }

This patch return 0x0000ffff for LongModeAddressSize, which guarantee phys_addr_valid never failed.

Committed by: Nilay Vaish <nilay@cs.wisc.edu>
2014-06-13 16:48:47 +08:00
..
alpha arch: Use const StaticInstPtr references where possible 2014-09-27 09:08:36 -04:00
arm arm: Use MiscRegIndex rather than int when flattening 2014-10-01 08:05:52 -04:00
generic arch: Use const StaticInstPtr references where possible 2014-09-27 09:08:36 -04:00
mips arch: Use const StaticInstPtr references where possible 2014-09-27 09:08:36 -04:00
null arch: Cleanup unused ISA traits constants 2014-09-03 07:42:21 -04:00
power arch: Use const StaticInstPtr references where possible 2014-09-27 09:08:36 -04:00
sparc arch: Use const StaticInstPtr references where possible 2014-09-27 09:08:36 -04:00
x86 x86: add LongModeAddressSize function to cpuid 2014-06-13 16:48:47 +08:00
isa_parser.py scons: Address issues related to gcc 4.9.1 2014-09-27 09:08:34 -04:00
micro_asm.py scons: add slicc and ply to sys.path and PYTHONPATH so everyone has access 2009-09-22 15:24:16 -07:00
micro_asm_test.py Add a second section to make sure the ROM is extended properly. 2007-05-31 22:21:21 +00:00
SConscript arch, cpu: Factor out the ExecContext into a proper base class 2014-09-03 07:42:22 -04:00