diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-03-31 14:20:30 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-03-31 14:33:20 -0400 |
commit | 193632b63fda830694ffa47df21308c1d0c36acd (patch) | |
tree | bf269a02d3e9b64ae25d8063801879f09a1c0fc1 /src/block.c | |
parent | 6b76e69332719c4c2fb5c47e04cc629ad5dd9b71 (diff) | |
download | seabios-193632b63fda830694ffa47df21308c1d0c36acd.tar.gz |
block: Move send_disk_op() from block.c to disk.c
The send_disk_op() function is only called from the 16bit handlers
found in disk.c.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/block.c')
-rw-r--r-- | src/block.c | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/src/block.c b/src/block.c index d9de29f1..a3835747 100644 --- a/src/block.c +++ b/src/block.c @@ -22,7 +22,7 @@ #include "hw/virtio-scsi.h" // virtio_scsi_process_op #include "malloc.h" // malloc_low #include "output.h" // dprintf -#include "stacks.h" // stack_hop +#include "stacks.h" // call32 #include "std/disk.h" // struct dpte_s #include "string.h" // checksum #include "util.h" // process_floppy_op @@ -613,35 +613,3 @@ process_op(struct disk_op_s *op) op->count = 0; return ret; } - -// Execute a "disk_op_s" request - this runs on the extra stack. -static int -__send_disk_op(struct disk_op_s *op_far, u16 op_seg) -{ - struct disk_op_s dop; - memcpy_far(GET_SEG(SS), &dop - , op_seg, op_far - , sizeof(dop)); - - dprintf(DEBUG_HDL_13, "disk_op d=%p lba=%d buf=%p count=%d cmd=%d\n" - , dop.drive_gf, (u32)dop.lba, dop.buf_fl - , dop.count, dop.command); - - int status = process_op(&dop); - - // Update count with total sectors transferred. - SET_FARVAR(op_seg, op_far->count, dop.count); - - return status; -} - -// Execute a "disk_op_s" request by jumping to the extra 16bit stack. -int -send_disk_op(struct disk_op_s *op) -{ - ASSERT16(); - if (! CONFIG_DRIVES) - return -1; - - return stack_hop(__send_disk_op, op, GET_SEG(SS)); -} |