Thanks for all the digging into this issue.  Are there bugs/changes in gem5
that can be fixed to address this, e.g., changing what's reported by CPUID,
or changing some of the parameters in the system configuration?  If so,
please let us know so that we can update the code.

Thanks,

Steve



On Fri, Jun 13, 2014 at 7:42 AM, Veydan Wu via gem5-users <
gem5-users@gem5.org> wrote:

> Hi, Jiuyue,
>
> Thanks again for the help. When I executed "ifconfig", it still has errors
> like
>
> *modprobe: FATAL: Could not load /lib/modules/2.6.28.4/modules.dep
> <http://2.6.28.4/modules.dep>: No such file or directory*
>
> I searched for a while, this error typically is because the kernel can't
> find the ethernet device. But from the kernel boot log, It seems the kernel
> already initialized the ethernet device correctly.
>
>
>
> *e1000 0000:00:02.0: enabling device (0000 -> 0002)e1000: 0000:00:02.0:
> e1000_probe: (PCI:33MHz:32-bit) 00:90:00:00:00:01e1000: eth0: e1000_probe:
> Intel(R) PRO/1000 Network Connection*
>
> Have you encountered similar problem before? Thanks.
>
>
>
>
> On Fri, Jun 13, 2014 at 4:41 AM, 马久跃 via gem5-users <gem5-users@gem5.org>
> wrote:
>
>> 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 here*
>> 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         }
>>
>>
>>
>> *linux-2.6.28.4/arch/x86/kernel/cpu/common.c*
>>
>> 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;
>> * <-  x86_phys_bits** initialized **here, using **CPUID
>> LongModeAddressSize*
>> 481         }
>> 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: gem5-users@gem5.org
>> Date: Fri, 13 Jun 2014 08:33:29 +0800
>>
>> Subject: Re: [gem5-users] how to enable Ethernet device for x86 full
>> system
>> From: gem5-users@gem5.org
>>
>> 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: veyda...@gmail.com; gem5-users@gem5.org
>> Subject: Re: [gem5-users] how to enable Ethernet device for x86 full
>> system
>> From: gem5-users@gem5.org
>>
>> 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 <
>> gem5-users@gem5.org> 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
>> gem5-users@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>>
>>
>> _______________________________________________ gem5-users mailing list
>> gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>> _______________________________________________ gem5-users mailing list
>> gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>> _______________________________________________
>> gem5-users mailing list
>> gem5-users@gem5.org
>> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>>
>
>
>
> --
> Regards,
>
> Veydan
>
> _______________________________________________
> gem5-users mailing list
> gem5-users@gem5.org
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
>
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to