Discussion:
need help with C
(too old to reply)
wolfgang kern
2024-01-16 11:21:01 UTC
Permalink
I started conversion of the whole UEFI-docs from C to RBIL-styled

this line was easy:
#define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249
efi_systab: [rdx+]
000 dq 54535953_20494249 ;signature:"IBI SYST"
008 q ;one of the below ???

but how would they look like in a dump view?
my first idea is:
#define EFI_2_100_SYSTEM_TABLE_REVISION ((2<<16) | (100))
008 q 00020064 ;is this correct ???
00C q 00000018 ;header size
010 q xxxxxxxx ;CRC32 of header
014 q 0 ;align pad
...
018 dq ConsoleInHandle
...

#define EFI_2_90_SYSTEM_TABLE_REVISION ((2<<16) | (90))
#define EFI_2_80_SYSTEM_TABLE_REVISION ((2<<16) | (80))
#define EFI_2_70_SYSTEM_TABLE_REVISION ((2<<16) | (70))
#define EFI_2_60_SYSTEM_TABLE_REVISION ((2<<16) | (60))
#define EFI_2_50_SYSTEM_TABLE_REVISION ((2<<16) | (50))
#define EFI_2_40_SYSTEM_TABLE_REVISION ((2<<16) | (40))
#define EFI_2_31_SYSTEM_TABLE_REVISION ((2<<16) | (31))
#define EFI_2_30_SYSTEM_TABLE_REVISION ((2<<16) | (30))
#define EFI_2_20_SYSTEM_TABLE_REVISION ((2<<16) | (20))
#define EFI_2_10_SYSTEM_TABLE_REVISION ((2<<16) | (10))
#define EFI_2_00_SYSTEM_TABLE_REVISION ((2<<16) | (00))
#define EFI_1_10_SYSTEM_TABLE_REVISION ((1<<16) | (10))
#define EFI_1_02_SYSTEM_TABLE_REVISION ((1<<16) | (02))
#define EFI_SPECIFICATION_VERSION EFI_SYSTEM_TABLE_REVISION
#define EFI_SYSTEM_TABLE_REVISION EFI_2_100_SYSTEM_TABLE_REVISION

TIA
__
wolfgang
wolfgang kern
2024-01-16 20:07:09 UTC
Permalink
On 16/01/2024 12:21, wolfgang kern wrote:
I started conversion of the whole UEFI-docs from C to RBIL-styled

this line was easy:
#define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249
efi_systab: [rdx+]
000  dq 54535953_20494249  ;signature:"IBI SYST"

my first idea about the second line was:
#define EFI_2_100_SYSTEM_TABLE_REVISION ((2<<16) | (100))
008  q 00020064  ;is this correct ???

NO it's not, specs say it is BCD limited to 0099
but I'd interpret this (100) as:
008 w 0100 ;revision minor
00A w 0002 ;revision major
__
wolfgang

Loading...