about summary refs log tree commit diff stats
path: root/boot.subx
Commit message (Collapse)AuthorAgeFilesLines
* .Kartik K. Agaram2021-03-221-3/+20
|
* .Kartik K. Agaram2021-03-221-4/+5
|
* .Kartik K. Agaram2021-03-221-12/+10
|
* .Kartik K. Agaram2021-03-221-1/+1
|
* shell: gracefully handle missing data diskKartik K. Agaram2021-03-221-9/+64
|
* shell: read initial expression from secondary diskKartik K. Agaram2021-03-211-9/+21
| | | | See shell/README.md for (extremely klunky) instructions.
* .Kartik K. Agaram2021-03-211-3/+3
|
* snapshot: reading secondary drive also worksKartik K. Agaram2021-03-211-3/+1
| | | | | | | | | | | | dd if=/dev/zero of=data.img count=20160 echo '(+ 1 1)' |dd of=data.img conv=notrunc ./translate ex2.mu && qemu-system-i386 -hda disk.img -hdb data.img Compare output with `xxd data.img |head`. This works because primary and secondary drives on the primary bus share the same ports. All we have to do is select the right drive by flipping a bit.
* snapshot: reading from disk without BIOS!!Kartik K. Agaram2021-03-211-0/+214
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both LBA and CHS coordinates are now working for the primary disk on the primary bus. Failure modes I ran into: - ATA ports are 16-bit values. Using instructions with 8-bit immediates will yield strange results. (I had to debug this twice because I missed poll-ata-primary-bus-primary-drive-regular-status-word the first time around.) Mu's toolchain has been found out here. bootstrap has good errors but doesn't support the instructions I need in boot.subx. The self-hosted phases support the instructions but provide no error-checking. Might be worth starting to add error-checking as I encounter the need. In this case, a vote for validating metadata sizes even if we don't validate that instructions pass in the right metadata sizes. - Can't poll readiness first thing. Maybe we need to always select the drive first. - Reading 8-bit values from a 16-bit port (data port 0x1f0) returns garbage. Reading 32-bit values however works totally fine; go figure. (Maybe it won't work on real hardware?) https://forum.osdev.org/viewtopic.php?t=36415 - Passing in a 0 segment will never return data.
* .Kartik K. Agaram2021-03-211-15/+15
|
* .Kartik K. Agaram2021-03-211-3/+3
|
* .Kartik K. Agaram2021-03-181-2/+2
|
* .Kartik Agaram2021-03-171-25/+25
|
* .Kartik K. Agaram2021-03-161-1/+1
|
* .Kartik K. Agaram2021-03-161-1/+4
|
* undo previous commitKartik K. Agaram2021-03-151-14/+0
| | | | It was just an experiment.
* snapshot: write to disk using BIOSKartik K. Agaram2021-03-151-0/+14
| | | | | | | | | | Requires the following commands: dd if=/dev/zero of=data.img count=20160 ./translate life.mu qemu-system-i386 -hda disk.img -hdb data.img Before running Qemu, data.img will contain all 0s. After quitting Qemu, data.img will contain the first 512 bytes of disk.img.
* boot.subx is now clean SubXKartik K. Agaram2021-03-151-13/+3
|
* reintroduce Entry labelKartik K. Agaram2021-03-151-7/+2
|
* clean up paddingKartik K. Agaram2021-03-151-26/+0
|
* clean up magic constantsKartik K. Agaram2021-03-151-58/+19
|
* first pass translating all of boot.subxKartik K. Agaram2021-03-151-16/+14
| | | | | | | There's still a few places to clean up surrounded in: == data ... == code
* .Kartik K. Agaram2021-03-151-27/+27
|
* get shell/ workingKartik K. Agaram2021-03-151-5/+5
| | | | This mutates the expected binary.
* .Kartik K. Agaram2021-03-151-84/+63
|
* .Kartik K. Agaram2021-03-151-8/+11
|
* .Kartik K. Agaram2021-03-151-11/+9
|
* manual labels remaining in boot.subx: keyboard + 1Kartik K. Agaram2021-03-151-3/+2
|
* .Kartik K. Agaram2021-03-151-9/+8
|
* clean up paddingKartik K. Agaram2021-03-151-139/+12
| | | | | I'm going to explicitly show all reserved data even if I don't use it. Segment headers are only for padding.
* first pass translating boot sectorKartik K. Agaram2021-03-151-19/+5
|
* .Kartik K. Agaram2021-03-151-15/+15
|
* .Kartik K. Agaram2021-03-151-21/+14
|
* .Kartik K. Agaram2021-03-141-17/+18
|
* .Kartik K. Agaram2021-03-141-6/+6
|
* first use of the padding segment selectorKartik K. Agaram2021-03-141-13/+18
|
* .Kartik K. Agaram2021-03-141-12/+8
|
* fix a few TODOs that mutate the expected binaryKartik K. Agaram2021-03-141-12/+6
|
* .Kartik K. Agaram2021-03-141-16/+14
|
* .Kartik K. Agaram2021-03-141-5/+16
|
* .Kartik K. Agaram2021-03-141-6/+8
|
* .Kartik K. Agaram2021-03-141-11/+15
|
* .Kartik K. Agaram2021-03-141-13/+15
|
* .Kartik K. Agaram2021-03-141-11/+12
|
* fix a benign bug so farKartik K. Agaram2021-03-141-16/+16
| | | | | | | | | I'd been assuming that the image would be identical if it worked, but I need to actually validate this at each step: ./translate life.mu && qemu-system-i386 disk.img && diff disk.img 0 The plan is to keep the binary identical until I finish translating boot.subx. Then I can remove obsolete padding.
* .Kartik K. Agaram2021-03-141-23/+24
|
* start converting boot.subx to real SubXKartik K. Agaram2021-03-141-35/+11
| | | | | | | | Just one instruction translated so far. The rest is treated as data. Currently programs only work because the toolchain treats boot.subx as all data. As we turn it into code we'll move the '== data' segment boundary further down.
* rename boot.hex to boot.subxKartik K. Agaram2021-03-141-0/+1176