Saturday 20 January 2024

UEFI解決篇

kernel load して

Status = uefi_call_wrapper(SystemTable->BootServices->ExitBootServices, 2, ImageHandle, MemoryMap.MapKey);

して、kernel entry にいけばいいだけなんだが、なんか Exception はく。最初は EL0 とか EL1 なのかと思ってたんですが、


- Status = uefi_call_wrapper(BS->AllocatePages, 4, AllocateAddress, EfiLoaderData, *FilePageSize, FileAddr);
+ Status = uefi_call_wrapper(BS->AllocatePages, 4, AllocateAddress, EfiBootServicesCode, *FilePageSize, FileAddr);

の問題だった。

なんか、ldd で COFF吐けば、ImageLoad でいけるとかあるんですけど、そうなんですか?

No comments: