about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2020-12-27 22:38:07 -0800
committerKartik Agaram <vc@akkartik.com>2020-12-27 22:38:07 -0800
commit4ffe861a452924b468d0b74ed5e29b7cc374555d (patch)
tree91bada252684485829bbbbbc0d2f168b5561ba14
parent74529e2e62727ea25964c89c79367075dbc2b9c7 (diff)
downloadmu-4ffe861a452924b468d0b74ed5e29b7cc374555d.tar.gz
7432
Bugfix: 32-bit code in 16-bit mode.
Seems like it was benign, maybe.
-rw-r--r--baremetal/boot.hex10
1 files changed, 5 insertions, 5 deletions
diff --git a/baremetal/boot.hex b/baremetal/boot.hex
index 441b59eb..ff7a305a 100644
--- a/baremetal/boot.hex
+++ b/baremetal/boot.hex
@@ -106,11 +106,11 @@
   # mostly just for the address to the linear frame buffer
   b4 4f  # ah <- 4f (VBE)
   b0 01  # al <- 01 (get video mode)
-  b9 07 01 00 00  # ecx <- 0x0107 (mode we requested)
-  bf 40 7d 00 00  # edi <- 0x7d40 (video mode info)
+  b9 07 01  # cx <- 0x0107 (mode we requested)
+  bf 40 7d  # di <- 0x7d40 (video mode info)
   cd 10
 
-# 53:
+# 4f:
   # switch to 32-bit mode
   0f 01 16  # lgdt 00/mod/indirect 010/subop 110/rm/use-disp16
     a0 7c  # *gdt_descriptor
@@ -120,8 +120,8 @@
   ea e0 7c 08 00  # far jump to initialize_32bit_mode after setting cs to the record at offset 8 in the gdt (gdt_code)
 
 # padding
-# 67:
-                     00 00 00 00 00 00 00 00 00
+# 63:
+         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
 
 ## GDT: 3 records of 8 bytes each
'alt'>
84a22ae0 ^
d1a1173d ^






84a22ae0 ^
d1a1173d ^



























18223912 ^
d1a1173d ^











9cce9fab ^


76791a70 ^
b3d031a9 ^
d1a1173d ^
9cce9fab ^
d1a1173d ^
b3d031a9 ^


ea87d005 ^
d1a1173d ^

ea87d005 ^
d1a1173d ^

9cce9fab ^
d1a1173d ^







ea87d005 ^
9cce9fab ^

76791a70 ^
d1a1173d ^



84a22ae0 ^
d1a1173d ^




















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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148