StupidOS/boot/efi/fs.inc

27 lines
614 B
PHP
Raw Normal View History

2024-09-08 10:01:20 +00:00
;; File: fs.inc
section '.text' code executable readable
efi_fs_init:
mov eax, [pEfiBootServices + EFI_BOOT_SERVICES.OpenProtocol]
2024-09-08 10:01:20 +00:00
; OpenProtocol(EFI_HANDLE Handle, EFI_GUID *proto, VOID **Interface, EFI_HANDLE AgentHandle, UINT32 Attrs)
EFI_CALL [fnOpenProtocol], [hEfiImage], aFSProtoGUID, pLoadedImage, [hEfiImage], 0, 2
2024-09-08 10:01:20 +00:00
or eax, eax
jnz .error
ret
.error:
2025-01-27 13:11:59 +00:00
mov eax, szErrTmp
2024-09-08 10:01:20 +00:00
call efi_log
ret
section '.data' data readable writeable
szErrTmp du "Can't OpenProtocol(Simple fs)", 0
aFSProtoGUID db EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID
pLoadedImage dd 0
hSimpleFSProtocol dd 0
fnOpenProtocol dd 0