aboutsummaryrefslogtreecommitdiff
path: root/mubios/services
diff options
context:
space:
mode:
authorRichard Qin <richard.qin.x@gmail.com>2026-11-08 07:49:23 +0800
committerRichard Qin <richard.qin.x@gmail.com>2026-11-08 07:49:23 +0800
commitbb20921d00c770cb30bb85a300423d9062a94d91 (patch)
tree047e61340edaa3c3d4bf0e9d01ba7786bfda5368 /mubios/services
parent9bfc57c3684f7aebba0f6865a1ea248f576b947f (diff)
downloadrcc-project-bb20921d00c770cb30bb85a300423d9062a94d91.tar.gz
rcc-project-bb20921d00c770cb30bb85a300423d9062a94d91.tar.xz
[mubios] Multi-sector INT 13h AH=42h
Signed-off-by: Richard Qin <richard.qin.x@gmail.com>
Diffstat (limited to 'mubios/services')
-rw-r--r--mubios/services/int13.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mubios/services/int13.c b/mubios/services/int13.c
index 078fa03..e5cef43 100644
--- a/mubios/services/int13.c
+++ b/mubios/services/int13.c
@@ -79,8 +79,9 @@ int13_service (struct bios_regs *regs)
{
packet = get_edd_packet (regs);
- if (packet->size != 0x10u || packet->count != 1u
- || packet->lba_high != 0u || packet->lba_low > 0x0FFFFFFFu)
+ if (packet->size != 0x10u || packet->count == 0u || packet->count > 127u
+ || packet->lba_high != 0u
+ || packet->lba_low > 0x10000000u - (u32)packet->count)
{
int13_fail (regs);
return;
@@ -89,7 +90,9 @@ int13_service (struct bios_regs *regs)
buffer_address
= ((u32)packet->buffer_segment << 4) + packet->buffer_offset;
- if (ata_read_sector28 (packet->lba_low, (u16 *)buffer_address) != 0)
+ if (ata_read_sectors28 (packet->lba_low, (u16 *)buffer_address,
+ packet->count)
+ != 0)
{
int13_fail (regs);
return;