tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kernel goes dark on boot



On Fri, Apr 07, 2023 at 03:18:21PM +0200, Martin Husemann wrote:
> Just to be sure: you did rebuild and update bootx64.efi afterwards?
> (Not accidently only the kernel)

Yes, and I am certain I run the updated bootloader since I added
many printf in it.

> This change (at least in my minimal understanding of that code) would
> make the bootloader reserve more address space for allocations, so the
> kernel would not overflow that area.

SUre, but the default limit is already at 1 GB, and there is many space
available below. The problem here is not space to load the kernel, it
loads fine. The problem is to run it. 

bootx64.efi loads the kernel where space is available, but given 
kernel's start routine assumes it is loaded at 0x200000,  bootx64.efi 
must relocate the kernel to 0x200000 before running it. This is done 
in startprog64(), and it crashes there because an UEFI memory allocation
already exists in the middle of the kernel at 0x1000000.

I tested that rebuilding a kernel with higher load address at 0x2200000
works. As suggested by riastradh I will test if I can get success with
a smaller kernel that starts at 0x200000 but fits in 0x200000 - 0x1000000

-- 
Emmanuel Dreyfus
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index