forked from rhboot/shim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cert.S
54 lines (51 loc) · 1.77 KB
/
cert.S
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
// SPDX-License-Identifier: BSD-2-Clause-Patent
#if defined(VENDOR_DB_FILE) && defined(VENDOR_CERT_FILE)
# error both VENDOR_DB_FILE and VENDOR_CERT_FILE have been configured
#elif defined(VENDOR_DB_FILE)
# define vendor_authorized vendor_db
# define vendor_authorized_end vendor_db_end
# define vendor_authorized_size vendor_db_size
# define vendor_authorized_size_end vendor_db_size_end
#elif defined(VENDOR_CERT_FILE)
# define vendor_authorized vendor_cert
# define vendor_authorized_end vendor_cert_end
# define vendor_authorized_size vendor_cert_size
# define vendor_authorized_size_end vendor_cert_size_end
#endif
#if defined(VENDOR_DBX_FILE)
# define vendor_deauthorized vendor_dbx
# define vendor_deauthorized_end vendor_dbx_end
# define vendor_deauthorized_size vendor_dbx_size
# define vendor_deauthorized_size_end vendor_dbx_size_end
#endif
.globl cert_table
.type cert_table, %object
.size cert_table, .Lcert_table_end - cert_table
.section .vendor_cert, "a", %progbits
.balignl 4, 0
cert_table:
.4byte .Lvendor_authorized_end - vendor_authorized
.4byte .Lvendor_deauthorized_end - vendor_deauthorized
.4byte vendor_authorized - cert_table
.4byte vendor_deauthorized - cert_table
.balign 1, 0
.type vendor_authorized, %object
.size vendor_authorized, .Lvendor_authorized_end - vendor_authorized
.section .vendor_cert, "a", %progbits
vendor_authorized:
#if defined(VENDOR_DB_FILE)
.incbin VENDOR_DB_FILE
#elif defined(VENDOR_CERT_FILE)
.incbin VENDOR_CERT_FILE
#endif
.Lvendor_authorized_end:
.balign 1, 0
.type vendor_deauthorized, %object
.size vendor_deauthorized, .Lvendor_deauthorized_end - vendor_deauthorized
.section .vendor_cert, "a", %progbits
vendor_deauthorized:
#if defined(VENDOR_DBX_FILE)
.incbin VENDOR_DBX_FILE
#endif
.Lvendor_deauthorized_end:
.Lcert_table_end: