Sorry for the mistake in previous reply.
The reason of invalid address error in 2.6.28.4 kernel was CPUID
LongModeAddressSize(eax:0x80000008) not implement in gem5.
linux-2.8.28.4/arch/x86/mm/ioremap.c
27 static inline int phys_addr_valid(unsigned long addr) 28 { 29
return addr < (1UL << boot_cpu_data.x86_phys_bits); 30 }...191 static void
__iomem *__ioremap_caller(resource_size_t phys_addr,192
unsigned long size, unsigned long prot_val, void *caller)...209 if
(!phys_addr_valid(phys_addr)) { <- ioremap invalid
address error here210 printk(KERN_WARNING "ioremap: invalid
physical address %llx\n",211 (unsigned long
long)phys_addr);212 WARN_ON_ONCE(1); 213 return
NULL;214 }
linux-2.6.28.4/arch/x86/kernel/cpu/common.c
475 #ifdef CONFIG_X86_64476 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; <- x86_phys_bits initialized here, using CPUID
LongModeAddressSize481 }482 #endif
The attached two patch should fix this problem, one for LongModeAddressSize,
and the other for x86-ethernet config.cpuid patch return 0x0000ffff for
LongModeAddressSize, I'm not sure whether it was right, but it works for me.
Jiuyue Ma
To: [email protected]
Date: Fri, 13 Jun 2014 08:33:29 +0800
Subject: Re: [gem5-users] how to enable Ethernet device for x86 full system
From: [email protected]
Try to connect "x86_sys.membus.default" port to "x86_sys.bridge.slave" instead
of badaddr_responder (configs/common/FSConfig.py:53-55,334-340), this should
solve the invalid address error.You may also need change ethernet device's
default InterruptLine (0x1e) to a smaller value (e.g. less than 0x10),
otherwise X86 I/O APIC may not work properly.
Jiuyue Ma
Date: Thu, 12 Jun 2014 08:00:34 -0700
To: [email protected]; [email protected]
Subject: Re: [gem5-users] how to enable Ethernet device for x86 full system
From: [email protected]
I encountered the same issue. I think this should be a supported feature.
-Pete
On Thu, Jun 12, 2014 at 6:55 AM, Veydan Wu via gem5-users <[email protected]>
wrote:
HI, All,
I want to enable an Ethernet device to x86 full system simulation. After
searching the mail archive, I followed the ARM way, added the device in
dev/x86/Pc.py just like Arm Realview, and added code to attachIO(). The
config.ini file showed the device is there and connected on iobus.
But when booting the kernel (2.6.28.4) using atomic CPU, there was a ioremap
invalid address error. And after boot, the system can't see the device
(ifconfig eth0 shows nothing).
Has anyone successfully made this work? I am not familiar with the x86 IO
configuration. Any hints would be really helpful. Thanks a lot.
--
Regards,
Veydan
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
gem5-x86-eth.patch
Description: Binary data
cpuid_LongModeAddressSize.patch
Description: Binary data
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
