This repository has been archived by the owner on Oct 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
bios.h
64 lines (55 loc) · 3.13 KB
/
bios.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef BIOS_H
#define BIOS_H
#include <stdint.h>
/* AMI Aptio extended capsule header */
typedef struct _APTIO_CAPSULE_HEADER {
uint8_t CapsuleGuid[16];
uint32_t HeaderSize;
uint32_t Flags;
uint32_t CapsuleImageSize;
uint16_t RomImageOffset; /* offset in bytes from the beginning of the capsule header to the start of
the capsule volume */
} APTIO_CAPSULE_HEADER;
const uint8_t APTIO_CAPSULE_GUID[] = { 0x8B, 0xA6, 0x3C, 0x4A, 0x23, 0x77, 0xFB, 0x48, 0x80, 0x3D, 0x57,
0x8C, 0xC1, 0xFE, 0xC4, 0x4D};
/* BOOTEFI */
const uint8_t BOOTEFI_HEADER[] = {'$','B','O','O','T','E','F','I','$'};
#define BOOTEFI_MOTHERBOARD_NAME_OFFSET 14
#define BOOTEFI_MOTHERBOARD_NAME_LENGTH 60
/* GbE */
const uint8_t GBE_HEADER[] = {0xFF, 0xFF, 0xFF, 0xFF, 0xC3, 0x10};
#define GBE_MAC_OFFSET (-16)
#define GBE_MAC_LENGTH 6
static const uint8_t GBE_MAC_STUB[] = {0x88, 0x88, 0x88, 0x88, 0x87, 0x88};
/* SLIC */
const uint8_t EFI_VOLUME_HEADER[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xE5, 0x8C, 0x8C, 0x3D, 0x8A,
0x1C, 0x4F, 0x99, 0x35, 0x89, 0x61, 0x85, 0xC3, 0x2D, 0xD3 };
const uint8_t DUMMY_MSOA_MODULE_HEADER[] = {0x70, 0x8C, 0x49, 0xDE, 0xDA, 0x1E, 0x6B, 0x46, 0xAB, 0xCF, 0xDD, 0x3A,
0xBC, 0x3D, 0x24, 0xB4};
const uint8_t MSOA_MODULE_HEADER[] = {0xB9, 0x2A, 0x90, 0xA1, 0x94, 0x53, 0xF2, 0x45, 0x85, 0x7A, 0x12,
0x82, 0x42, 0x13, 0xEE, 0xFB};
const uint8_t SLIC_PUBKEY_HEADER[] = {0xFB, 0xEB, 0xFF, 0xCD, 0xDC, 0x17, 0xBC, 0x46, 0x9B, 0x75, 0x59,
0xB8, 0x61, 0x92, 0x09, 0x13};
const uint8_t SLIC_PUBKEY_PART1[] = {0x78, 0x02, 0x02, 0x40, 0x6E, 0x01, 0x00, 0xF8, 0x56, 0x01, 0x00,
0x19};
#define SLIC_PUBKEY_LENGTH 366
const uint8_t SLIC_MARKER_HEADER[] = {0x58, 0x44, 0x63, 0x15, 0xA4, 0xE8, 0x6D, 0x43, 0xAC, 0x2F, 0x57,
0xE3, 0x3E, 0x53, 0x4C, 0xCF};
const uint8_t SLIC_MARKER_PART1[] = {0x75, 0x4E, 0x02, 0x40, 0x38, 0x00, 0x00, 0xF8, 0x20, 0x00, 0x00,
0x19};
#define SLIC_MARKER_LENGTH 56
#define MODULE_DATA_CHECKSUM_OFFSET 17
#define MODULE_DATA_CHECKSUM_START 24
/* FD44 */
const uint8_t FD44_MODULE_HEADER[] = {0x0B, 0x82, 0x44, 0xFD, 0xAB, 0xF1, 0xC0, 0x41, 0xAE, 0x4E, 0x0C,
0x55, 0x55, 0x6E, 0xB9, 0xBD};
#define FD44_MODULE_HEADER_BSA_OFFSET 28
const uint8_t FD44_MODULE_HEADER_BSA[] = {'B', 'S', 'A', '_'};
#define FD44_MODULE_HEADER_LENGTH 36
#define FD44_MODULE_SIZE_OFFSET 20
/* ASUSBKP */
const uint8_t ASUSBKP_HEADER[] = {'A','S','U','S','B','K','P','$'};
const uint8_t ASUSBKP_PUBKEY_HEADER[] = {'S','2','L','P','R', 0x01, 0x00, 0x00};
const uint8_t ASUSBKP_MARKER_HEADER[] = {'K','E','Y','S', 0x1C, 0x00, 0x00, 0x00};
#endif /* BIOS_H */