Page 1 of 1

GNU-EFI Reset System

Posted: Sat Nov 07, 2020 3:18 pm
by Moldu
Hi! I use GNU-EFI to create an OS. I need to reboot the system. I found that I can use EFI_RESET_SYSTEM but idk how to call it. Can somebody help me?

Re: GNU-EFI Reset System

Posted: Thu Nov 12, 2020 7:19 pm
by Octocontrabass

Code: Select all

uefi_call_wrapper( ST->RuntimeServices->ResetSystem, 4, EfiResetWarm, EFI_SUCCESS, 0, NULL );
(Note: I haven't tested this, so it may not be correct.)

Re: GNU-EFI Reset System

Posted: Thu Nov 12, 2020 8:14 pm
by kzinti
I believe the above is correct. To reboot the system, I use this (no GNU-EFI):

Code: Select all

m_runtimeServices->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, nullptr);