aboutsummaryrefslogtreecommitdiff
path: root/slof
diff options
context:
space:
mode:
Diffstat (limited to 'slof')
-rw-r--r--slof/fs/packages/disk-label.fs9
-rw-r--r--slof/fs/start-up.fs5
2 files changed, 14 insertions, 0 deletions
diff --git a/slof/fs/packages/disk-label.fs b/slof/fs/packages/disk-label.fs
index 790d433..969eb00 100644
--- a/slof/fs/packages/disk-label.fs
+++ b/slof/fs/packages/disk-label.fs
@@ -338,6 +338,14 @@ CONSTANT /gpt-part-entry
dup c@ eb = swap 2+ c@ 90 = and
;
+: measure-mbr ( addr length -- )
+ s" /ibm,vtpm" find-node ?dup IF
+ s" measure-hdd-mbr" rot $call-static
+ ELSE
+ 2drop
+ THEN
+;
+
\ NOTE: block-size is always 512 bytes for DOS partition tables.
: load-from-dos-boot-partition ( addr -- size )
@@ -361,6 +369,7 @@ CONSTANT /gpt-part-entry
block-size * to part-offset
0 0 seek drop ( addr offset )
block-size * read ( size )
+ block block-size measure-mbr
UNLOOP EXIT
ELSE
2drop ( addr )
diff --git a/slof/fs/start-up.fs b/slof/fs/start-up.fs
index 7020f5c..c1f931a 100644
--- a/slof/fs/start-up.fs
+++ b/slof/fs/start-up.fs
@@ -56,6 +56,11 @@
;
: (boot?) ( -- )
+ \ last step before we boot we give up physical presence on the TPM
+ s" /ibm,vtpm" find-node ?dup IF
+ s" leave-firmware" rot $call-static
+ THEN
+
of-prompt? not auto-boot? and IF
(boot)
THEN