about summary refs log tree commit diff stats
path: root/baremetal/boot.hex
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-02-11 00:12:08 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-02-11 00:12:08 -0800
commit64a1c141981fbf50167621e3605f0d3344d69ca5 (patch)
tree816f07b5c975a1a8b741505a33cbc64434251e83 /baremetal/boot.hex
parent4d08e78ed4821037cd1c95b2a978f5c5b03f64fa (diff)
downloadmu-64a1c141981fbf50167621e3605f0d3344d69ca5.tar.gz
7717 - baremetal: enable FPU (I think)
Diffstat (limited to 'baremetal/boot.hex')
-rw-r--r--baremetal/boot.hex19
1 files changed, 14 insertions, 5 deletions
diff --git a/baremetal/boot.hex b/baremetal/boot.hex
index 4e4222b0..7b29e49f 100644
--- a/baremetal/boot.hex
+++ b/baremetal/boot.hex
@@ -257,13 +257,22 @@ e9 fd ff  # loop forever
   e6 21  # port 0x21 <- al
 
 # 11e:
-  # initialization is done; enable interrupts
-  fb
-  e9 dc 16 00 00  # jump to 0x9400 [label]
+  fb  # enable interrupts
+  db e3  # initialize FPU
+  # eax <- cr4
+  0f 20  # copy cr4 to rm32
+    e0  # 11/mod/direct 100/r32/CR4 000/rm32/eax
+  # eax <- or bit 9
+  0f ba
+    e8  # 11/mod/direct 101/subop/bit-test-and-set 000/rm32/eax
+    09  # imm8
+  # cr4 <- eax
+  0f 22  # copy rm32 to cr4
+    e0  # 11/mod/direct 100/r32/CR4 000/rm32/eax
+  e9 d0 16 00 00  # jump to 0x9400 [label]
 
 # padding
-# 124:
-            00 00 00 00 00 00 00 00 00 00 00 00
+# 130:
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00