On Tue, 10 Oct 2006 15:49:27 +0200, Franck Bui-Huu <vagabon.xyz@xxxxxxxxx> wrote: > heh ? I'm wondering if anybody is using 'CONFIG_BUILD_ELF64=n' config at > all... arch/mips/configs/bigsur_defconfig:# CONFIG_BUILD_ELF64 is not set arch/mips/configs/ip27_defconfig:# CONFIG_BUILD_ELF64 is not set arch/mips/configs/ip32_defconfig:# CONFIG_BUILD_ELF64 is not set arch/mips/configs/ocelot_c_defconfig:# CONFIG_BUILD_ELF64 is not set arch/mips/configs/ocelot_g_defconfig:# CONFIG_BUILD_ELF64 is not set arch/mips/configs/sb1250-swarm_defconfig:# CONFIG_BUILD_ELF64 is not set According to arch/mips/configs, nobody is using CONFIG_BUILD_ELF64=y :-) Also one might use gcc 3.x which ignore -msym32 option ... > Atsushi, do you have any idea on how address are translated with > 'CONFIG_BUILD_ELF64=n' config ? How such code is supposed to work ? > > code_resource.start = virt_to_phys(&_text); > code_resource.end = virt_to_phys(&_etext) - 1; > data_resource.start = virt_to_phys(&_etext); > data_resource.end = virt_to_phys(&_edata) - 1; > > Let's say that '&_text' is in KSEG0 and is equal to 0xffffffff80000000. > In this case virt_to_phys() returns 0x57ffffff80000000 > (with PAGE_OFFSET = 0xa800000000000000). Is this physical address > correct ? I think this peice of code is just broken, as you said. This is bogus but harmless since we have not checked these resources are successfully registered or not. --- Atsushi Nemoto