about summary refs log tree commit diff stats
path: root/apps
Commit message (Collapse)AuthorAgeFilesLines
* 7559 - reorganize sectors built in raw hexKartik Agaram2021-01-242-17/+17
| | | | | | | | | | | | | | | | | This was tedious for three reasons beyond the usual one of having to track and update offsets several time while I debug: - The Bochs troubles of the previous commit kept polluting my brain even though they were irrelevant. - I had to keep some changes locally to allow myself to use Bochs, which polluted my working directory. - I had to travel the long way to the realization that I'm not actually initializing the stack anywhere. BIOS was starting my stack off at 0x10000, which was promptly clobbered by my second read from disk. The good news: while I'm here I grow the interrupt descriptor table. So I don't have to go through this exercise when I get back to supporting the mouse.
* 7526Kartik Agaram2021-01-1615-0/+0
|
* 7490 - baremetal: draw a grapheme to screenKartik Agaram2021-01-091-0/+2
|
* 7489 - include GNU UnifontKartik Agaram2021-01-092-17/+17
| | | | | | | https://en.wikipedia.org/wiki/GNU_Unifont#The_.hex_font_format http://unifoundry.com/unifont/index.html Since GNU Unifont is covered under the GPL v2, so I believe is this repo.
* 7462 - SubX version of baremetal/ex2.subxKartik Agaram2020-12-292-1/+1
|
* 7460 - baremetal backend for SubXKartik Agaram2020-12-292-2178/+214
|
* 7459Kartik Agaram2020-12-292-102/+199
| | | | Bring baremetal variant up to date with recent changes.
* 7458Kartik Agaram2020-12-292-90/+184
| | | | Switch survey_elf to the new approach.
* 7457Kartik Agaram2020-12-282-10/+14
|
* 7456Kartik Agaram2020-12-281-2/+1
|
* 7454Kartik Agaram2020-12-284-338/+119
| | | | Go back to commit 7448.
* 7453Kartik Agaram2020-12-281-74/+23
| | | | | Snapshot: this approach of disambiguating /disp32 based on metadata doesn't work. The `survey` phase runs after `pack`, which gets rid of most metadata.
* 7452Kartik Agaram2020-12-284-24/+286
|
* 7451Kartik Agaram2020-12-284-20/+28
|
* 7450Kartik Agaram2020-12-282-2/+2
|
* 7447Kartik Agaram2020-12-282-2/+2
|
* 7446Kartik Agaram2020-12-282-185/+0
|
* 7445Kartik Agaram2020-12-282-185/+0
|
* 7444Kartik Agaram2020-12-281-1/+1
|
* 7443Kartik Agaram2020-12-282-0/+4772
| | | | | A new phase for baremetal compilations. Doesn't work yet, but it passes all its tests, so we can add it to CI.
* 7442Kartik Agaram2020-12-281-0/+0
|
* 7441Kartik Agaram2020-12-2816-16/+16
|
* 7439 - start translating Mu programs to baremetalKartik Agaram2020-12-283-6/+6
|
* 7403 - baremetal/ for apps without a kernelKartik Agaram2020-12-2610-905/+0
|
* 7402Kartik Agaram2020-12-261-3/+3
|
* 7399Kartik Agaram2020-12-241-3/+3
|
* 7398Kartik Agaram2020-12-231-2/+2
|
* 7395 - boot.hex: recognize '1' press on keyboardKartik Agaram2020-12-231-5/+9
| | | | | https://stackoverflow.com/questions/37618111/keyboard-irq-within-an-x86-kernel is right, no need to mess with the status port at the start.
* 7394Kartik Agaram2020-12-231-1/+1
| | | | | | I think https://stackoverflow.com/questions/37618111/keyboard-irq-within-an-x86-kernel has more insight to provide. Among other things the comment about grub may answer the distinction between entry 0x21 and entry 9.
* 7393Kartik Agaram2020-12-231-9/+46
| | | | | | | | | | | | | | Snapshot. Keyboard interrupt being triggered. This was hard to debug until https://stackoverflow.com/questions/37618111/keyboard-irq-within-an-x86-kernel reminded me that I'd forgotten to enable IRQ1 on port 0x21. For a while I was confused by never hitting a breakpoint at the start of the keyboard handler. Then I found https://sourceforge.net/p/bochs/discussion/39592/thread/5e397455 and started skipping one instruction in my breakpoint. I still don't understand the discrepancy between some people installing the handler at entry 9, and others installing at entry 0x21 = 33.
* 7392Kartik Agaram2020-12-231-2/+2
|
* 7391Kartik Agaram2020-12-231-62/+9
| | | | | | | | Turns out we just need a null handler at offset 8 rather than offset 9. If the keyboard handler is indeed at offset 9 as https://alex.dzyoba.com/blog/os-interrupts says (I don't understand why), then the clock handler's at offset 8, which makes sense.
* 7390 - null interrupt tablesKartik Agaram2020-12-231-11/+69
| | | | | Looks like the reset loops stop if we create null handlers for the first 10 indexes in the IDT.
* 7389 - snapshotKartik Agaram2020-12-231-6/+6
| | | | | | | | | | | | | Ok, we're back at the reset loop. Let's keep going; maybe having a decent keyboard handler will fix it. The bug I fixed here was caused by misunderstanding what m16&32 mean in the Intel manual. It's still a regular regmem operand that uses all of the ModR/M byte (which can be interpreted in 16-bit mode, adding to the complication). It's just constrained to not allow direct addressing (mod 00). I needed to better internalize the format of the instruction set references at the start of Volume 2, Chapter 3.
* 7388 - snapshot initializing interrupt tableKartik Agaram2020-12-231-24/+69
| | | | | | | | | | | | | | | | | | | | | | | | | I'm now back at the state of commit 7382 (including 7376). The existing print to screen surprisingly seems to work without reset-looping, but when I step through I notice that the lidt isn't doing what I expect. Desired: at address 0x7cce, the processor executes: 0f 01 1e 00 7f # lidt ds:*idt_descriptor Observed: at address 0x7cce, the processor executes: 0f 01 1e # lidt ds:*esi As a result the next instruction is: 00 7f fb So the `fb` isn't interpreted to enable interrupts. So the problem of commit 7376 is latent. Past this point the instruction stream is lined up again, and everything occurs as it should. Purely by chance. I fully expect all hell to break loose again, like it did in commit 7376, once I debug the lidt encoding. There's still something I don't understand about enabling interrupts. Perhaps I need to fill in more entries in the table.
* 7387Kartik Agaram2020-12-231-3/+4
| | | | | | Redo commit 7381. There was a bug. Current state: commit 7381 excluding 7376.
* 7386Kartik Agaram2020-12-231-2/+3
| | | | Commit 7380 excluding 7376.
* 7385Kartik Agaram2020-12-231-6/+6
| | | | Commit 7379 excluding 7376.
* 7384Kartik Agaram2020-12-231-4/+23
| | | | | Currently at commit 7378 (reset the A20 address line) except without 7376 (enabling interrupts).
* 7383Kartik Agaram2020-12-231-101/+36
| | | | | Currently at commit 7377 except without 7376 (enabling interrupts). Works as advertised.
* 7382 - snapshotKartik Agaram2020-12-231-21/+62
| | | | | Turns out I've been "testing" with a stale file since commit 7373. We need to go over everything since then.
* 7381Kartik Agaram2020-12-231-3/+3
|
* 7380Kartik Agaram2020-12-231-2/+3
|
* 7379Kartik Agaram2020-12-231-6/+6
|
* 7378Kartik Agaram2020-12-231-4/+23
| | | | | | | | Turns out we only had access to 50% of RAM so far. Closing my nose and moving right along.. Though this _does_ give me practice interacting with ports. That'll be handy for the keyboard.
* 7377Kartik Agaram2020-12-231-5/+5
| | | | | | | Ooh, look at that, the device number comes conveniently initialized in the right register. No need to hardcode it. https://wiki.osdev.org/MBR_(x86)
* 7376Kartik Agaram2020-12-231-3/+7
|
* 7375Kartik Agaram2020-12-231-9/+20
| | | | A little more robustness after reading https://stackoverflow.com/questions/43786251/int-13h-42h-doesnt-load-anything-in-bochs/43787939#43787939
* 7373Kartik Agaram2020-12-211-1/+1
| | | | | apps/boot.hex doesn't need much by way of syntax highlighting. Have it work even for people who haven't installed subx.vim
* 7372 - successful read from disk using BIOSKartik Agaram2020-12-211-13/+48
|
2016-04-16 08:12:30 -0700 2840' href='/akkartik/mu/commit/072channel.mu?h=hlt&id=fd484d9ced515893263ba9440d273fd9230460a1'>fd484d9c ^
f8e6e864 ^

4038d416 ^

359586f0 ^
760f683f ^
77d5b5d6 ^
4a48bedc ^
ebea4c3f ^
dd660682 ^
760f683f ^
f8e6e864 ^


4038d416 ^
f8e6e864 ^


17622b5a ^
502d2ea5 ^
f8e6e864 ^



05fe4be5 ^
5b1219ca ^
f8e6e864 ^

4038d416 ^
05fe4be5 ^
d31d70b6 ^
7a84094a ^
a0331a9b ^
d31d70b6 ^
5b22547b ^
760f683f ^
5b22547b ^
5d293761 ^
d31d70b6 ^
4038d416 ^

7a84094a ^
17622b5a ^
502d2ea5 ^
d31d70b6 ^
4038d416 ^
d31d70b6 ^
fd484d9c ^
f8e6e864 ^

4038d416 ^

8bd3f99f ^


4038d416 ^

ad8161f3 ^
760f683f ^

7a84094a ^

4038d416 ^
22b30692 ^
ad8161f3 ^

4038d416 ^



6f65d591 ^

4038d416 ^
ad8161f3 ^
760f683f ^
7a84094a ^

4038d416 ^
22b30692 ^
ad8161f3 ^

4038d416 ^



6f65d591 ^


4038d416 ^
ad8161f3 ^
760f683f ^
7a84094a ^

4038d416 ^
22b30692 ^
ad8161f3 ^

4038d416 ^



6f65d591 ^






4038d416 ^
4038d416 ^
7a84094a ^

4038d416 ^
ad8161f3 ^
7a84094a ^
4038d416 ^
ad8161f3 ^
7a84094a ^
4038d416 ^
22b30692 ^
ad8161f3 ^



4038d416 ^


4038d416 ^

ad8161f3 ^
760f683f ^

17622b5a ^

4038d416 ^
22b30692 ^
ad8161f3 ^

4038d416 ^



6f65d591 ^


4038d416 ^
ad8161f3 ^
17622b5a ^

4038d416 ^
22b30692 ^
ad8161f3 ^

4038d416 ^



6f65d591 ^


4038d416 ^
ad8161f3 ^
17622b5a ^

4038d416 ^
22b30692 ^
ad8161f3 ^

4038d416 ^



6f65d591 ^



4038d416 ^
ad8161f3 ^
17622b5a ^

4038d416 ^
22b30692 ^
ad8161f3 ^

4038d416 ^

a6cdf15c ^
359586f0 ^
















130596f0 ^

4a48bedc ^
130596f0 ^








5b1219ca ^



b1ddb414 ^
17622b5a ^
5b1219ca ^


6b43e208 ^
760f683f ^
5b1219ca ^
4a48bedc ^
760f683f ^
dd660682 ^
5b1219ca ^
760f683f ^
5b1219ca ^
4a48bedc ^
760f683f ^
dd660682 ^
5b1219ca ^







b6155734 ^
59085fca ^
e765f9e7 ^
b6155734 ^
b6155734 ^
59085fca ^
5b22547b ^

760f683f ^
05fe4be5 ^
dd660682 ^
5b22547b ^
b6155734 ^
5b1219ca ^
9109a916 ^

359586f0 ^
760f683f ^
9109a916 ^
4a48bedc ^
9109a916 ^
7a84094a ^

9109a916 ^


359586f0 ^

760f683f ^
9109a916 ^
4a48bedc ^
9109a916 ^
7a84094a ^
9109a916 ^


7a84094a ^
17622b5a ^
9109a916 ^



7a84094a ^
9109a916 ^


760f683f ^
9109a916 ^
4a48bedc ^
a0331a9b ^
9109a916 ^


433a7c7b ^

760f683f ^
77d5b5d6 ^
4a48bedc ^
a6cdf15c ^
dd660682 ^
a6cdf15c ^
d6ae0078 ^
a6cdf15c ^

dc1323e9 ^
17622b5a ^
5b22547b ^
dc1323e9 ^


17622b5a ^
502d2ea5 ^
dc1323e9 ^
dc1323e9 ^
7a84094a ^
17622b5a ^
502d2ea5 ^
d31d70b6 ^
fd484d9c ^
dc1323e9 ^
dc1323e9 ^
ada5eb55 ^
dc1323e9 ^

c0f43700 ^
17622b5a ^
502d2ea5 ^
a6cdf15c ^

3ac52339 ^
7a84094a ^
ea19d0dc ^
7a84094a ^
a6cdf15c ^
17622b5a ^
502d2ea5 ^
08f4628e ^
3ac52339 ^
502d2ea5 ^
a6cdf15c ^

5b1219ca ^


e765f9e7 ^
5b1219ca ^
a6cdf15c ^

a6cdf15c ^



ad8161f3 ^
760f683f ^


17622b5a ^
ad8161f3 ^
a6cdf15c ^

7a84094a ^
029a3bdf ^
ad8161f3 ^
17622b5a ^
a6cdf15c ^

ad8161f3 ^

029a3bdf ^
ad8161f3 ^
17622b5a ^
a6cdf15c ^

ad8161f3 ^

029a3bdf ^
ad8161f3 ^
17622b5a ^
a6cdf15c ^

ad8161f3 ^

029a3bdf ^
ad8161f3 ^
17622b5a ^
ad8161f3 ^
a6cdf15c ^
65b3db5d ^
a6cdf15c ^




433a7c7b ^


4a48bedc ^
d6ae0078 ^
433a7c7b ^







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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510