l4ka / pistachio

L4Ka::Pistachio micro-kernel
http://l4ka.org/projects/pistachio
271 stars 54 forks source link

Conflict with multiboot for x86_64. #11

Open luckboy opened 10 years ago

luckboy commented 10 years ago

I ran this kernel for x86_64 and kickstart displayed message about conflict with multiboot 0 (0x00600000-0x401084a8) module. Used tools to compilation and launching: gcc 4.6.3 and 4.4.7 binutils 2.22 qemu 1.0

jkehne commented 10 years ago

I cannot reproduce this issue. Could you paste the full output up until the error message? From the info you have given, it is hard to tell what conflicts with what.

luckboy commented 10 years ago

Full output: KickStart 0.12.56 Detected multiboot compliant loader kernel (0x0011c000-0x00140559) => 0x40101000 (0x0011c1a0-0x0012a680) -> 0x00600000-0x0060e4e0 (0x0012a680-0x0012af83) -> 0x00800000-0x00800903 (0x0012b000-0x0012d194) -> 0x00a00000-0x00a02194 (0x0012e000-0x00133cb0) -> 0x00c00000-0x00c05cb0 (0x00134000-0x0013b4a8) -> 0x40101000-0x401084a8 sigma0 (0x00141000-0x0015f31c) => 0x00f00000 (0x001410c0-0x00147200) -> 0x00f00000-0x00f06140 Conflict with module 0 (0x00600000-0x401084a8) Please choose a different link base PANIC: FAIL in line 162

Configuration of kernel: pentium2 processor type disabled debugging mode

jkehne commented 10 years ago

OK, I see what's going on. Kickstart's conflict detection is very simple: It treats every grub module as a contiguous memory region ranging from the first to the last address used by the file. That's why it thinks that your kernel image (0x00600000-0x401084a8) and sigma0 (starting at 0x00f00000) overlap, even though the kernel does not load anything at 0x00f00000. The correct way of doing conflict detection would be to check for overlaps against every ELF section loaded so far instead of against entire files. I don't know when I'll get around to implementing this. Besides, there shouldn't be any kernel sections at 0x40101000. That section (.init I believe) should be at 0x00d10000. I don't know why that is -- like I wrote above, I could not reproduce the issue.

luckboy commented 10 years ago

Did you disable the debuging mode at the configuration of the kernel?

jkehne commented 10 years ago

Yes. Whether debugging mode is on or off doesn't make a difference for me.