mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-27 12:15:19 +01:00
use RT instead of RS
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
parent
d836611308
commit
60b6eb5c33
@ -352,7 +352,7 @@ BdsLibVariableToOption (
|
||||
|
||||
@retval EFI_SUCCESS The boot#### or driver#### have been successfully
|
||||
registered.
|
||||
@retval EFI_STATUS Return the status of gRS->SetVariable ().
|
||||
@retval EFI_STATUS Return the status of gRT->SetVariable ().
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
|
@ -199,7 +199,7 @@ SetVariablesForOSX(LOADER_ENTRY *Entry)
|
||||
// firmware Variables
|
||||
//
|
||||
if (RtVariablesNum > 0) {
|
||||
OvrRuntimeServices(gRS);
|
||||
OvrRuntimeServices(gRT);
|
||||
}
|
||||
|
||||
// As found on a real Mac, the system-id variable solely has the BS flag
|
||||
|
@ -701,7 +701,7 @@ EFI_STATUS bootPBRtest(REFIT_VOLUME* volume)
|
||||
Facs = (EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE*)(UINTN)(FadtPointer->FirmwareCtrl);
|
||||
Facs->FirmwareWakingVector = 0x7F00;
|
||||
|
||||
gRS->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, NULL);
|
||||
gRT->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, NULL);
|
||||
|
||||
|
||||
/*
|
||||
@ -731,7 +731,7 @@ if (FadtPointer == NULL) {
|
||||
Facs = (EFI_ACPI_4_0_FIRMWARE_ACPI_CONTROL_STRUCTURE*)(UINTN)(FadtPointer->FirmwareCtrl);
|
||||
Facs->FirmwareWakingVector = 0x7F00;
|
||||
|
||||
gRS->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, NULL);
|
||||
gRT->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, NULL);
|
||||
*/
|
||||
|
||||
#define EFI_CPU_EFLAGS_IF 0x200
|
||||
|
@ -1063,7 +1063,7 @@ PutNvramPlistToRtVars ()
|
||||
}
|
||||
|
||||
// set RT var: all vars visible in nvram.plist are gEfiAppleBootGuid
|
||||
/* Status = gRS->SetVariable (
|
||||
/* Status = gRT->SetVariable (
|
||||
KeyBuf,
|
||||
VendorGuid,
|
||||
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
|
||||
|
@ -230,7 +230,7 @@ VOID UpdatePointer()
|
||||
INTN ScreenRelX;
|
||||
INTN ScreenRelY;
|
||||
|
||||
// Now = gRS->GetTime(&Now, NULL);
|
||||
// Now = gRT->GetTime(&Now, NULL);
|
||||
Now = AsmReadTsc();
|
||||
Status = gPointer.SimplePointerProtocol->GetState(gPointer.SimplePointerProtocol, &tmpState);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
|
@ -76,7 +76,7 @@
|
||||
extern EFI_HANDLE gImageHandle;
|
||||
extern EFI_SYSTEM_TABLE* gST;
|
||||
extern EFI_BOOT_SERVICES* gBS;
|
||||
extern EFI_RUNTIME_SERVICES* gRS;
|
||||
extern EFI_RUNTIME_SERVICES* gRT;
|
||||
|
||||
#define TAG_ABOUT (1)
|
||||
#define TAG_RESET (2)
|
||||
|
@ -86,7 +86,7 @@ BOOLEAN APFSSupport = FALSE;
|
||||
//extern EFI_SYSTEM_TABLE* gST;
|
||||
//extern EFI_BOOT_SERVICES* gBS;
|
||||
//extern EFI_DXE_SERVICES* gDS;
|
||||
EFI_RUNTIME_SERVICES* gRS;
|
||||
//EFI_RUNTIME_SERVICES* gRS;
|
||||
|
||||
DRIVERS_FLAGS gDriversFlags; //the initializer is not needed for global variables
|
||||
|
||||
@ -121,7 +121,9 @@ extern HDA_OUTPUTS AudioList[20];
|
||||
extern CHAR8 *AudioOutputNames[];
|
||||
extern EFI_AUDIO_IO_PROTOCOL *AudioIo;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
static EFI_STATUS LoadEFIImageList(IN EFI_DEVICE_PATH **DevicePaths,
|
||||
IN CHAR16 *ImageTitle,
|
||||
@ -1774,9 +1776,9 @@ VOID ResetNvram ()
|
||||
}
|
||||
|
||||
// Attempt warm reboot
|
||||
// gRS->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, NULL);
|
||||
// gRT->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, NULL);
|
||||
// Warm reboot may not be supported attempt cold reboot
|
||||
// gRS->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL);
|
||||
// gRT->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL);
|
||||
// Terminate the screen and just exit
|
||||
// TerminateScreen();
|
||||
}
|
||||
@ -2071,13 +2073,13 @@ RefitMain (IN EFI_HANDLE ImageHandle,
|
||||
gST = SystemTable;
|
||||
gImageHandle = ImageHandle;
|
||||
gBS = SystemTable->BootServices;
|
||||
gRS = SystemTable->RuntimeServices;
|
||||
gRT = SystemTable->RuntimeServices;
|
||||
/*Status = */EfiGetSystemConfigurationTable (&gEfiDxeServicesTableGuid, (VOID **) &gDS);
|
||||
|
||||
ConsoleInHandle = SystemTable->ConsoleInHandle;
|
||||
|
||||
|
||||
gRS->GetTime(&Now, NULL);
|
||||
gRT->GetTime(&Now, NULL);
|
||||
|
||||
// firmware detection
|
||||
gFirmwareClover = StrCmp(gST->FirmwareVendor, L"CLOVER") == 0;
|
||||
@ -2782,9 +2784,9 @@ destruct_globals_objects(NULL); // That should be done just before quitting clov
|
||||
// }
|
||||
}
|
||||
// Attempt warm reboot
|
||||
gRS->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, NULL);
|
||||
gRT->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, NULL);
|
||||
// Warm reboot may not be supported attempt cold reboot
|
||||
gRS->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL);
|
||||
gRT->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL);
|
||||
// Terminate the screen and just exit
|
||||
TerminateScreen();
|
||||
MainLoopRunning = FALSE;
|
||||
@ -2794,7 +2796,7 @@ destruct_globals_objects(NULL); // That should be done just before quitting clov
|
||||
|
||||
case TAG_SHUTDOWN: // It is not Shut Down, it is Exit from Clover
|
||||
TerminateScreen();
|
||||
// gRS->ResetSystem(EfiResetShutdown, EFI_SUCCESS, 0, NULL);
|
||||
// gRT->ResetSystem(EfiResetShutdown, EFI_SUCCESS, 0, NULL);
|
||||
MainLoopRunning = FALSE; // just in case we get this far
|
||||
ReinitDesktop = FALSE;
|
||||
AfterTool = TRUE;
|
||||
@ -2983,7 +2985,7 @@ destruct_globals_objects(NULL); // That should be done just before quitting clov
|
||||
// If we end up here, things have gone wrong. Try to reboot, and if that
|
||||
// fails, go into an endless loop.
|
||||
//Slice - NO!!! Return to EFI GUI
|
||||
// gRS->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL);
|
||||
// gRT->ResetSystem(EfiResetCold, EFI_SUCCESS, 0, NULL);
|
||||
// EndlessIdleLoop();
|
||||
|
||||
#ifdef ENABLE_SECURE_BOOT
|
||||
@ -2997,3 +2999,5 @@ destruct_globals_objects(NULL); // That should be done just before quitting clov
|
||||
}
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
@ -37,6 +37,16 @@
|
||||
//#include "Platform.h"
|
||||
#include "libegint.h" //this includes platform.h
|
||||
//#include "../include/scroll_images.h"
|
||||
|
||||
//#include "../Platform/Platform.h"
|
||||
#include "../cpp_util/XStringW.h"
|
||||
#include "../cpp_util/globals_ctor.h"
|
||||
#include "../cpp_util/globals_dtor.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "Version.h"
|
||||
//#include "colors.h"
|
||||
|
||||
@ -5704,3 +5714,8 @@ UINTN RunMainMenu(IN REFIT_MENU_SCREEN *Screen, IN INTN DefaultSelection, OUT RE
|
||||
}
|
||||
return MenuExit;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -39,7 +39,7 @@
|
||||
refit/icns.c
|
||||
refit/lib.c
|
||||
refit/lib.h
|
||||
refit/menu.c
|
||||
refit/menu.cpp
|
||||
refit/screen.c
|
||||
refit/IO.c
|
||||
refit/IO.h
|
||||
|
Loading…
Reference in New Issue
Block a user