Skip to content

Commit 03d0f36

Browse files
committedJun 12, 2023
SkuSiPolicy payload - at the moment this is only for testing
Signed-off-by: Jan Setje-Eilers <[email protected]>
1 parent e6fe55f commit 03d0f36

5 files changed

+25
-6
lines changed
 

‎Makefile

+25-6
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,19 @@ endef
5151

5252
define add-vendor-sbat
5353
$(OBJCOPY) --add-section ".$(patsubst %.csv,%,$(1))=$(1)" $(2)
54+
endef
5455

56+
define add-skusi
57+
$(OBJCOPY) --add-section ".$(patsubst %.bin,%,$(1))=$(1)" $(2)
5558
endef
5659

5760
SBATPATH = $(TOPDIR)/data/sbat.csv
5861
SBATLEVELLATESTPATH = $(TOPDIR)/data/sbat_level_latest.csv
5962
SBATLEVELPREVIOUSPATH = $(TOPDIR)/data/sbat_level_previous.csv
63+
SSPVLATESTPATH = $(TOPDIR)/data/SkuSiPolicy_latest.bin
64+
SSPSLATESTPATH = $(TOPDIR)/data/SkuSiPolicy_Version_latest.bin
65+
SSPVPREVIOUSPATH = $(TOPDIR)/data/SkuSiPolicy_previous.bin
66+
SSPSPREVIOUSPATH = $(TOPDIR)/data/SkuSiPolicy_Version_previous.bin
6067
VENDOR_SBATS := $(sort $(foreach x,$(wildcard $(TOPDIR)/data/sbat.*.csv data/sbat.*.csv),$(notdir $(x))))
6168

6269
OBJFLAGS =
@@ -88,19 +95,19 @@ endif
8895

8996
all : certmule.efi revocations.efi
9097

91-
certmule.so : sbat_data.o certmule.o
98+
certmule.so : revocation_data.o certmule.o
9299
certmule.so : SOLIBS=
93100
certmule.so : SOFLAGS=
94101
certmule.so : BUILDFLAGS+=-DVENDOR_DB
95102
certmule.efi : OBJFLAGS = --strip-unneeded $(call VENDOR_DB, $<)
96103
certmule.efi : SECTIONS=.text .reloc .db .sbat
97104
certmule.efi : VENDOR_DB_FILE?=db.esl
98105

99-
revocations.so : sbat_data.o revocations.o
106+
revocations.so : revocation_data.o revocations.o
100107
revocations.so : SOLIBS=
101108
revocations.so : SOFLAGS=
102-
revocations.efi : OBJFLAGS = --strip-unneeded
103-
revocations.efi : SECTIONS=.text .reloc .sbat .sbatl .sbatp
109+
revocations.efi : OBJFLAGS = --strip-unneeded
110+
revocations.efi : SECTIONS=.text .reloc .sbat .sbatl .sbatp .sspvp .sspsp .sspvl .sspsl
104111

105112
revocations.o : certmule.o
106113
cp certmule.o revocations.o
@@ -114,8 +121,8 @@ endif
114121
$(OBJFLAGS) \
115122
$(FORMAT) $^ $@
116123

117-
sbat_data.o : | $(SBATPATH) $(VENDOR_SBATS)
118-
sbat_data.o : /dev/null
124+
revocation_data.o : | $(SBATPATH) $(VENDOR_SBATS)
125+
revocation_data.o : /dev/null
119126
$(CC) $(BUILDFLAGS) -x c -c -o $@ $<
120127
$(OBJCOPY) --add-section .sbat=$(SBATPATH) \
121128
--set-section-flags .sbat=contents,alloc,load,readonly,data \
@@ -126,6 +133,18 @@ sbat_data.o : /dev/null
126133
$(OBJCOPY) --add-section .sbatp=$(SBATLEVELPREVIOUSPATH) \
127134
--set-section-flags .sbatp=contents,alloc,load,readonly,data \
128135
$@
136+
$(OBJCOPY) --add-section .sspvl=$(SSPVLATESTPATH) \
137+
--set-section-flags .sspvl=contents,alloc,load,readonly,data \
138+
$@
139+
$(OBJCOPY) --add-section .sspsl=$(SSPSLATESTPATH) \
140+
--set-section-flags .sspsl=contents,alloc,load,readonly,data \
141+
$@
142+
$(OBJCOPY) --add-section .sspvp=$(SSPVPREVIOUSPATH) \
143+
--set-section-flags .sspvp=contents,alloc,load,readonly,data \
144+
$@
145+
$(OBJCOPY) --add-section .sspsp=$(SSPSPREVIOUSPATH) \
146+
--set-section-flags .sspsp=contents,alloc,load,readonly,data \
147+
$@
129148
$(foreach vs,$(VENDOR_SBATS),$(call add-vendor-sbat,$(vs),$@))
130149

131150
%.so : %.o

‎data/SkuSiPolicy_Version_latest.bin

8 Bytes
Binary file not shown.

‎data/SkuSiPolicy_Version_previous.bin

8 Bytes
Binary file not shown.

‎data/SkuSiPolicy_latest.bin

131 Bytes
Binary file not shown.

‎data/SkuSiPolicy_previous.bin

131 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)