You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
diff --git a/MikanLoaderPkg/Main.c b/MikanLoaderPkg/Main.c
index f7f50be..226af7c 100644
--- a/MikanLoaderPkg/Main.c+++ b/MikanLoaderPkg/Main.c@@ -153,13 +153,16 @@ EFI_STATUS EFIAPI UefiMain(
// #@@range_begin(exit_bs)
EFI_STATUS status;
+ Print(L"Run First ExitBootServices\n");
status = gBS->ExitBootServices(image_handle, memmap.map_key);
if (EFI_ERROR(status)) {
+ Print(L"EFI_ERROR(%d) Run GetMemoryMap\n", status);
status = GetMemoryMap(&memmap);
if (EFI_ERROR(status)) {
Print(L"failed to get memory map: %r\n", status);
while (1);
}
+ Print(L"Run Second ExitBootServices\n");
status = gBS->ExitBootServices(image_handle, memmap.map_key);
if (EFI_ERROR(status)) {
Print(L"Could not exit boot service: %r\n", status);
QEMU起動後の様子:
The text was updated successfully, but these errors were encountered:
day03a以降、カーネルへ処理を移していると思いますが、この章から先が全て動いておらず、何かご助言いただけないでしょうか。
ソースコード: uchan-nos/mikanos, branch: osbook_day03a
edk2: https://github.com/tianocore/edk2/tree/4ac02962017c77bf38b462f970c884c2dc7931cf (gcc12で動くようこのパッチを当てています)
clang: 14.0.6
カーネルビルドコマンド:
QEMU起動コマンド:
$ ./devenv/run_qemu.sh edk2/Build/MikanLoaderX64/DEBUG_CLANG38/X64/Loader.efi kernel/kernel.elf
QEMU起動後の様子:

レジスタの値を確認してみると、以下のようになっています(RIPはkernelまで到達できていなそうでした):
試しに、以下のようにPrint文を仕込んでみると、先ほどとは変わってエラーメッセージが出力されるようになります:
QEMU起動後の様子:

The text was updated successfully, but these errors were encountered: