Hi Amadeo,
On 16.1.2012 23:37, Amadeo Casas Cuadrado wrote:
> ######> Kernel panic on cpu0 due to a bad memory access while loading
> from address 0x3ee99000. <######
>
> cs =0x8 eip=0x801295e9 efl=0x210292 err=0x0
> ds =0x10 es =0x10 fs =0x10 gs =0x10
> eax=0x1 ebx=0x3ee99000 ecx=0x1 edx=0x1
> esi=0x8000303c edi=0x80b1de68 ebp=0x80b1ddd4 esp=0x80b1dd7c
>
> 0x80b1dc48: generic/src/debug/stacktrace.o:stack_trace()+0x00000013
> 0x80b1dc78: generic/src/debug/panic.o:panic_common()+0x000000d3
> 0x80b1dcb8: arch/ia32/src/mm/page.o:page_arch_init()
> 0x80b1dd28: generic/src/interrupt/interrupt.o:exc_dispatch()+0x000000fb
> 0x80b1dd54: arch/ia32/src/asm.o:int_14()+0x00000062
> 0x80b1ddd4: generic/src/lib/elf.o:elf_load()+0x00000011
> 0x80b1de24:
> generic/src/proc/program.o:program_create_from_image()+0x0000003a
> 0x80b1df94: generic/src/main/kinit.o:kinit()+0x00000196
> 0x80b1dff4: generic/src/proc/thread.o:cushion()+0x00000059
> generic/src/lib/func.o:halt()+0x0000005a->generic/src/console/kconsole.o:kconsole_check_poll()
>
> generic/src/lib/func.o:halt()+0x0000005a<-generic/src/console/kconsole.o:kconsole_check_poll()
>
> cpu0:halted
The kernel crashed during an attempt to load an ELF image. The address
of the ELF header appears wrong (0x3ee99000) as it is not a kernel
address. The corresponding assembly code (the absolute addresses are
from my kernel, but offset 0x11 corresponds to the cmpl instruction):
8012d570 <elf_load>:
8012d570: push %ebp
8012d571: mov %esp,%ebp
8012d573: push %edi
8012d574: push %esi
8012d575: push %ebx
8012d576: sub $0x4c,%esp
8012d579: mov 0x8(%ebp),%ebx <= read first arg
8012d57c: mov $0x1,%eax
8012d581: cmpl $0x464c457f,(%ebx) <= dereference first arg
Just for sure:
- what version/revision of HelenOS is this?
- how much memory is there installed on this system?
- in your netboot config, do you, in any way, manipulate the module
description data?
The most probable explanation is that simply some or all
init.tasks[i].addr is miscomputed. I can imagine that for example the
loader put the modules to some physical address above 2G and later in
multiboot_modules() we did:
init.tasks[init.cnt].addr = PA2KA(mods[i].start);
which simply adds 0x80000000 to mod[i].start. Of course, it only works
if the physical address is <2G. I wonder if we can add some assertions /
early debugging printfs here.
Jakub
_______________________________________________
HelenOS-devel mailing list
[email protected]
http://lists.modry.cz/cgi-bin/listinfo/helenos-devel