summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-09 08:55:56 +0100
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-09 08:55:56 +0100
commit6f3b9a6359c387766beb5c3be147a9f4f744cbd7 (patch)
tree4c68d3667eba68e0c47f160c0cef98ea6f641b9f
parentacfebdfb9aec89a3c0914be8e9b0439a10120d5c (diff)
HCoreLdr: Implement EnableCursor for EFI.
- Replace InitQT with InitGOP.
-rw-r--r--Private/FirmwareKit/EFI/API.hxx1
-rw-r--r--Private/FirmwareKit/EFI/EFI.hxx4
-rw-r--r--Private/NewBoot/BootKit/BootKit.hxx4
-rw-r--r--Private/NewBoot/Source/BootMain.cxx2
4 files changed, 7 insertions, 4 deletions
diff --git a/Private/FirmwareKit/EFI/API.hxx b/Private/FirmwareKit/EFI/API.hxx
index dcbb35cf..ffbb1eaa 100644
--- a/Private/FirmwareKit/EFI/API.hxx
+++ b/Private/FirmwareKit/EFI/API.hxx
@@ -79,6 +79,7 @@ inline void InitEFI(EfiSystemTable *SystemTable) noexcept {
ST->ConOut->SetAttribute(SystemTable->ConOut, kEFIYellow);
ST->BootServices->SetWatchdogTimer(0, 0, 0, nullptr);
+ ST->ConOut->EnableCursor(ST->ConOut, false);
}
#ifdef __BOOTLOADER__
diff --git a/Private/FirmwareKit/EFI/EFI.hxx b/Private/FirmwareKit/EFI/EFI.hxx
index aeadfc01..e9dd3ac8 100644
--- a/Private/FirmwareKit/EFI/EFI.hxx
+++ b/Private/FirmwareKit/EFI/EFI.hxx
@@ -469,6 +469,8 @@ typedef UInt64(EFI_API *EfiOpenProtocol)(EfiHandlePtr Handle, EfiGUID *Guid,
EfiHandlePtr ControllerHandle,
UInt32 Attributes);
+typedef UInt64(EFI_API *EfiEnableCursor)(EfiSimpleTextOutputProtocol* This, Boolean Visible);
+
/**
@name EfiBootServices
@brief UEFI Boot Services record, it contains functions necessary to a
@@ -538,7 +540,7 @@ typedef struct EfiSimpleTextOutputProtocol {
EfiTextAttrib SetAttribute;
EfiTextClear ClearScreen;
VoidPtr SetCursorPosition;
- VoidPtr EnableCursor;
+ EfiEnableCursor EnableCursor;
VoidPtr Mode;
} EfiSimpleTextOutputProtocol;
diff --git a/Private/NewBoot/BootKit/BootKit.hxx b/Private/NewBoot/BootKit/BootKit.hxx
index 25a29ea1..164bc48c 100644
--- a/Private/NewBoot/BootKit/BootKit.hxx
+++ b/Private/NewBoot/BootKit/BootKit.hxx
@@ -177,9 +177,9 @@ inline UInt16 kStride;
inline EfiGUID kGopGuid;
/**
-@brief Init the QuickTemplate GUI framework.
+@brief Inits the QuickTemplate GUI framework.
*/
-inline Void InitQT() noexcept {
+inline Void InitGOP() noexcept {
kGopGuid = EfiGUID(EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID);
kGop = nullptr;
diff --git a/Private/NewBoot/Source/BootMain.cxx b/Private/NewBoot/Source/BootMain.cxx
index fb516293..f60853bd 100644
--- a/Private/NewBoot/Source/BootMain.cxx
+++ b/Private/NewBoot/Source/BootMain.cxx
@@ -32,7 +32,7 @@ typedef void (*bt_main_type)(HEL::HandoverInformationHeader* HIH);
EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle,
EfiSystemTable* SystemTable) {
InitEFI(SystemTable); // Init the efi library.
- InitQT(); // Quick Toolkit for UI
+ InitGOP(); // Quick Toolkit for UI
BTextWriter writer;