UEFI: Add support for UEFI time and UEFI events; fix STOP \n -> \r\n conversion (#5549)

* add support for UEFI time and UEFI events; fix STOP \n -> \r\n conversion

* apply EFI timezone offset
This commit is contained in:
Matthew Hiles
2026-07-24 13:29:42 -04:00
committed by GitHub
parent 528476f2b3
commit 259842dc2e
5 changed files with 151 additions and 4 deletions
+8
View File
@@ -20,6 +20,10 @@ type EFI_RUNTIME_SERVICES struct {
queryVariableInfo uintptr
}
func (p *EFI_RUNTIME_SERVICES) GetTime(time *EFI_TIME, capabilities *EFI_TIME_CAPABILITIES) EFI_STATUS {
return UefiCall2(p.getTime, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(capabilities)))
}
type EFI_BOOT_SERVICES struct {
Hdr EFI_TABLE_HEADER
raiseTPL uintptr
@@ -82,6 +86,10 @@ func (p *EFI_BOOT_SERVICES) WaitForEvent(numberOfEvents UINTN, event *EFI_EVENT,
return UefiCall3(p.waitForEvent, uintptr(numberOfEvents), uintptr(unsafe.Pointer(event)), uintptr(unsafe.Pointer(index)))
}
func (p *EFI_BOOT_SERVICES) SignalEvent(event EFI_EVENT) EFI_STATUS {
return UefiCall1(p.signalEvent, uintptr(event))
}
func (p *EFI_BOOT_SERVICES) CloseEvent(event EFI_EVENT) EFI_STATUS {
return UefiCall1(p.closeEvent, uintptr(event))
}