Hi,
On Fri, 26 Mar 2021 09:30:43 +0100
Jan Klemkow <[email protected]> wrote:
> If you want to boot OpenBSD on an HP EliteBook 830 G7/G8, the bootloader
> will hang while loading the kernel. Because, the UEFI loads the
> bootloader on the same place in memory, where the bootloader will copy
> the kernel. We are unable to load the kernel on arbitrary memory.
> Thus, the following diff will help you, to get OpenBSD running on these
> machines. It moves the hardcoded Kernel address to a free place.
The openbsd efiboot copies the kernel to that place after
ExitBootServices().
sys/arch/amd64/stand/efiboot/exec_i386.c
152 /*
153 * Move the loaded kernel image to the usual place after calling
154 * ExitBootServices().
155 */
156 #ifdef __amd64__
157 protect_writeable(marks[MARK_START] + delta,
158 marks[MARK_END] - marks[MARK_START]);
159 #endif
160 memmove((void *)marks[MARK_START] + delta, (void
*)marks[MARK_START],
161 marks[MARK_END] - marks[MARK_START]);
162 for (i = 0; i < MARK_MAX; i++)
163 marks[i] += delta;
164
165 #ifdef __amd64__
166 (*run_i386)((u_long)run_i386, entry, howto, bootdev,
BOOTARG_APIVER,
167 marks[MARK_END], extmem, cnvmem, ac, (intptr_t)av);
I think it should work without the ld.script change..