Commit Graph

6 Commits

Author SHA1 Message Date
Kartik K. Agaram 69e477b12b load debug info into code disk 2021-05-14 12:56:58 -07:00
Kartik K. Agaram f774677854 . 2021-04-16 20:26:56 -07:00
Kartik K. Agaram 49a9938333 mouse support that requires polling 2021-03-23 21:14:49 -07:00
Kartik K. Agaram 480daf408c . 2021-03-22 22:30:41 -07:00
Kartik K. Agaram fba2146593 snapshot: reading from disk without BIOS!!
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.
2021-03-21 22:29:24 -07:00
Kartik K. Agaram 2998866b88 . 2021-03-15 21:59:08 -07:00