mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-30 15:05:16 -04:00
Add Apple SysF/Diag parser
This commit is contained in:
parent
2d6eaa917f
commit
4e600eb986
17 changed files with 597 additions and 154 deletions
60
common/ksy/apple_fsys.ksy
Normal file
60
common/ksy/apple_fsys.ksy
Normal file
|
@ -0,0 +1,60 @@
|
|||
meta:
|
||||
id: apple_sysf
|
||||
title: Apple system variable store
|
||||
application: Apple MacEFI-based UEFI firmware
|
||||
file-extension: sysf
|
||||
tags:
|
||||
- firmware
|
||||
license: CC0-1.0
|
||||
ks-version: 0.9
|
||||
endian: le
|
||||
|
||||
seq:
|
||||
- id: signature
|
||||
type: u4
|
||||
valid:
|
||||
expr: _ == 0x73797346 or _ == 0x64696147 # Fsys/Gaid
|
||||
- id: unknown
|
||||
type: u1
|
||||
- id: unknown1
|
||||
type: u4
|
||||
- id: sysf_size
|
||||
type: u2
|
||||
- id: body
|
||||
type: sysf_store_body
|
||||
size: sysf_size - len_sysf_store_header - sizeof<u4>
|
||||
- id: crc
|
||||
type: u4
|
||||
|
||||
instances:
|
||||
len_sysf_store_header:
|
||||
value: 11
|
||||
|
||||
types:
|
||||
sysf_store_body:
|
||||
seq:
|
||||
- id: variables
|
||||
type: sysf_variable
|
||||
repeat: until
|
||||
repeat-until: (_.len_name == 3 and _.name == "EOF") or _io.eof
|
||||
- id: zeroes
|
||||
type: u1
|
||||
repeat: eos
|
||||
|
||||
sysf_variable:
|
||||
seq:
|
||||
- id: len_name
|
||||
type: b7le
|
||||
- id: invalid_flag
|
||||
type: b1le
|
||||
- id: name
|
||||
type: strz
|
||||
encoding: ascii
|
||||
size: len_name
|
||||
- id: len_data
|
||||
type: u2
|
||||
if: name != "EOF"
|
||||
- id: data
|
||||
size: len_data
|
||||
if: name != "EOF"
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue