diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-03-22 23:26:24 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-03-22 23:29:42 -0700 |
commit | 3749f99d24d448bc4acee3a01e000ee0c34cb80b (patch) | |
tree | 0e044b5ad637cf8f83313ca015c6e31ac9542719 | |
parent | c0607ecca838360b8ba1133993601330f199c043 (diff) | |
download | mu-3749f99d24d448bc4acee3a01e000ee0c34cb80b.tar.gz |
.
-rw-r--r-- | boot.subx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/boot.subx b/boot.subx index 4258b206..438829cf 100644 --- a/boot.subx +++ b/boot.subx @@ -943,7 +943,7 @@ load-first-sector-from-primary-bus-secondary-drive: # out: (addr stream byte) (ata-lba 0 0 0) # lower 24 bits of LBA, all 0 (ata-command 0x20) # read sectors with retries # poll for results - (poll-ata-primary-bus-primary-drive-regular-status-word) + (poll-ata-regular-status-word) # emit results ba/copy-to-edx 0x1f0/imm32 b9/copy-to-ecx 0x200/imm32 # 512 bytes per sector @@ -1173,19 +1173,20 @@ $ata-command:end: 5d/pop-to-ebp c3/return -poll-ata-primary-bus-primary-drive-regular-status-word: +poll-ata-regular-status-word: # . save registers 50/push-eax 52/push-edx + # + ba/copy-to-edx 0x1f7/imm32 { - ba/copy-to-edx 0x1f7/imm32 ec/read-port-dx-into-al a8/test-bits-in-al 0x80/imm8/bsy # set zf if bit 7 (most significant) is not set 75/jump-if-zf-not-set-and-bit-7-set loop/disp8 a8/test-bits-in-al 8/imm8/drq # set zf if bit 3 is not set 74/jump-if-zf-set-and-bit-3-not-set loop/disp8 } -$poll-ata-primary-bus-primary-drive-regular-status-word:end: +$poll-ata-regular-status-word:end: # . restore registers 5a/pop-to-edx 58/pop-to-eax |