aboutsummaryrefslogtreecommitdiff
path: root/src/block.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2015-07-27 10:41:41 -0400
committerKevin O'Connor <kevin@koconnor.net>2015-08-17 11:38:48 -0400
commit8aad64e22a133101617d9a4f78ebc61199680361 (patch)
tree5917c7959afa2562d5bafa46f3f75daf56eb3507 /src/block.c
parenteeca36c7e9aec2340102d943e9d5e31ddc4abd2f (diff)
downloadseabios-hppa-8aad64e22a133101617d9a4f78ebc61199680361.zip
seabios-hppa-8aad64e22a133101617d9a4f78ebc61199680361.tar.gz
seabios-hppa-8aad64e22a133101617d9a4f78ebc61199680361.tar.bz2
edd: Pass the segment/offset from int 1348 calls using a 'struct segoff_s'
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/block.c')
-rw-r--r--src/block.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/block.c b/src/block.c
index a1054ac..cd732c1 100644
--- a/src/block.c
+++ b/src/block.c
@@ -288,10 +288,12 @@ map_floppy_drive(struct drive_s *drive)
****************************************************************/
static int
-fill_generic_edd(u16 seg, struct int13dpt_s *param_far, struct drive_s *drive_gf
+fill_generic_edd(struct segoff_s edd, struct drive_s *drive_gf
, u32 dpte_so, char *iface_type
, int bdf, u8 channel, u16 iobase, u64 device_path)
{
+ u16 seg = edd.seg;
+ struct int13dpt_s *param_far = (void*)(edd.offset+0);
u16 size = GET_FARVAR(seg, param_far->size);
u16 t13 = size == 74;
@@ -394,7 +396,7 @@ fill_generic_edd(u16 seg, struct int13dpt_s *param_far, struct drive_s *drive_gf
struct dpte_s DefaultDPTE VARLOW;
static int
-fill_ata_edd(u16 seg, struct int13dpt_s *param_far, struct drive_s *drive_gf)
+fill_ata_edd(struct segoff_s edd, struct drive_s *drive_gf)
{
if (!CONFIG_ATA)
return DISK_RET_EPARAM;
@@ -446,24 +448,24 @@ fill_ata_edd(u16 seg, struct int13dpt_s *param_far, struct drive_s *drive_gf)
SET_LOW(DefaultDPTE.checksum, -sum);
return fill_generic_edd(
- seg, param_far, drive_gf, SEGOFF(SEG_LOW, (u32)&DefaultDPTE).segoff
+ edd, drive_gf, SEGOFF(SEG_LOW, (u32)&DefaultDPTE).segoff
, "ATA ", bdf, channel, iobase1, slave);
}
int noinline
-fill_edd(u16 seg, struct int13dpt_s *param_far, struct drive_s *drive_gf)
+fill_edd(struct segoff_s edd, struct drive_s *drive_gf)
{
switch (GET_GLOBALFLAT(drive_gf->type)) {
case DTYPE_ATA:
case DTYPE_ATA_ATAPI:
- return fill_ata_edd(seg, param_far, drive_gf);
+ return fill_ata_edd(edd, drive_gf);
case DTYPE_VIRTIO_BLK:
case DTYPE_VIRTIO_SCSI:
return fill_generic_edd(
- seg, param_far, drive_gf, 0xffffffff
+ edd, drive_gf, 0xffffffff
, "SCSI ", GET_GLOBALFLAT(drive_gf->cntl_id), 0, 0, 0);
default:
- return fill_generic_edd(seg, param_far, drive_gf, 0, NULL, 0, 0, 0, 0);
+ return fill_generic_edd(edd, drive_gf, 0, NULL, 0, 0, 0, 0);
}
}