about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--boot.subx9
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