flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
I 12 Jul 2022, 05:13
Is this worth having or not?
|
|||
![]() |
|
sinsi 12 Jul 2022, 05:22
UEFI has lots of protocols, each with a GUID, so yes, they come in handy.
|
|||
![]() |
|
I 12 Jul 2022, 06:24
I was thinking along the lines of a macro
Code: struc GUID def { match d1-d2-d3-d4-d5, def \{ .Data1 dd 0x\#d1 .Data2 dw 0x\#d2 .Data3 dw 0x\#d3 .Data4 db 0x\#d4 shr 8,0x\#d4 and 0FFh .Data5 db 0x\#d5 shr 40,0x\#d5 shr 32 and 0FFh,0x\#d5 shr 24 and 0FFh,0x\#d5 shr 16 and 0FFh,0x\#d5 shr 8 and 0FFh,0x\#d5 and 0FFh \} } Code: EFI_MPS_TABLE_GUID equ eb9d2d2f-2d88-11d3-9a16-0090273fc14d EFI_MP_SERVICES_PROTOCOL_GUID equ 3fdda605-a76e-4f46-ad29-12f4531b3d08 ... and so on Code: mov [SysTable],rdx mov rax,[rdx+EFI_SYSTEM_TABLE.BootServices] ; EFI_BOOT_SERVICES mov [EBS],rax ... lea r8,[MPProtocol] xor edx,edx lea rcx,[_EFI_MP_SERVICES_PROTOCOL_GUID] mov rax,[EBS] call [rax+EFI_BOOT_SERVICES_TABLE.LocateProtocol] ... section '.data' data readable writeable _EFI_MP_SERVICES_PROTOCOL_GUID GUID EFI_MP_SERVICES_PROTOCOL_GUID ... Macro can also be used for non-EFI GUID's too. Seems some names have different GUID's such as the EDK service one above vs AMI one so separate inc files I think. Attached EDK GUID's sample. Not sure what's a good way so suggestions welcome. Edit: As there's no discussion off the bat I'll attach the other incs. Probably EDK one will be most used.
|
|||||||||||||||||||||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.