From 8bcbaa48c99a9e96f6126caa8ed3c35cc250b281 Mon Sep 17 00:00:00 2001 From: mintsuki Date: Wed, 10 Mar 2021 03:09:42 +0100 Subject: [PATCH] stivale: Exit boot services in the right spot --- stage23/protos/stivale.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stage23/protos/stivale.c b/stage23/protos/stivale.c index 4386235a..f2da8058 100644 --- a/stage23/protos/stivale.c +++ b/stage23/protos/stivale.c @@ -191,6 +191,10 @@ void stivale_load(char *config, char *cmdline) { stivale_struct.fb_blue_mask_shift = fbinfo.blue_mask_shift; } +#if defined (uefi) + efi_exit_boot_services(); +#endif + bool want_5lv = level5pg && (stivale_hdr.flags & (1 << 1)); pagemap_t pagemap = stivale_build_pagemap(want_5lv); @@ -200,10 +204,6 @@ void stivale_load(char *config, char *cmdline) { stivale_struct.memory_map_entries = (uint64_t)memmap_entries; stivale_struct.memory_map_addr = (uint64_t)(size_t)memmap; -#if defined (uefi) - efi_exit_boot_services(); -#endif - stivale_spinup(bits, want_5lv, &pagemap, entry_point, &stivale_struct, stivale_hdr.stack); }