aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2021-02-11 17:08:22 +0100
committerHelge Deller <deller@gmx.de>2021-09-24 11:10:17 +0200
commit9a9c177f4b5391dcdf170c2b66ec28ee6540fd12 (patch)
tree810988e47ad4535487a5b8640280d4905377cb9e
parentdb5d7e962b88a5de91b6c9c404360b5c1cbd22b5 (diff)
downloadseabios-hppa-9a9c177f4b5391dcdf170c2b66ec28ee6540fd12.zip
seabios-hppa-9a9c177f4b5391dcdf170c2b66ec28ee6540fd12.tar.gz
seabios-hppa-9a9c177f4b5391dcdf170c2b66ec28ee6540fd12.tar.bz2
block.c: Allow PA-RISC to boot from ATA drives
Boot directly from ATA drive without going through the process_op_32() function. Additionally PA-RISC can read/write chunks from disk which are bigger than 64kb, so don't abort when this is tried. Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r--src/block.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/block.c b/src/block.c
index ec02d76..1b85154 100644
--- a/src/block.c
+++ b/src/block.c
@@ -544,6 +544,10 @@ static int
process_op_both(struct disk_op_s *op)
{
switch (GET_FLATPTR(op->drive_fl->type)) {
+#if CONFIG_PARISC
+ case DTYPE_ATA:
+ return ata_process_op(op);
+#endif
case DTYPE_ATA_ATAPI:
return ata_atapi_process_op(op);
case DTYPE_USB:
@@ -624,7 +628,9 @@ process_op(struct disk_op_s *op)
, op->count, op->command);
int ret, origcount = op->count;
- if (origcount * GET_FLATPTR(op->drive_fl->blksize) > 64*1024) {
+ /* Only x86 arch has problems with large reads/writes greater than 64kb */
+ if (CONFIG_X86 &&
+ (origcount * GET_FLATPTR(op->drive_fl->blksize) > 64*1024)) {
op->count = 0;
return DISK_RET_EBOUNDARY;
}