aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2019-03-13 21:22:27 +0100
committerHelge Deller <deller@gmx.de>2019-03-13 21:22:27 +0100
commit7d3e970c4ef3b53f1af1d4e60c1751b150a5fe52 (patch)
treeefd4a2346fdd036bbe5294e06cba60539310cd3f
parent890043f2ee3560c36c7d1454b60bd2be58190070 (diff)
downloadseabios-hppa-7d3e970c4ef3b53f1af1d4e60c1751b150a5fe52.zip
seabios-hppa-7d3e970c4ef3b53f1af1d4e60c1751b150a5fe52.tar.gz
seabios-hppa-7d3e970c4ef3b53f1af1d4e60c1751b150a5fe52.tar.bz2
Add IODC ENTRY_INIT_DEV test, finally fixes ODE IOTEST.
-rw-r--r--src/parisc/parisc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c
index 3891eb5..b0053c7 100644
--- a/src/parisc/parisc.c
+++ b/src/parisc/parisc.c
@@ -457,10 +457,17 @@ int __VISIBLE parisc_iodc_ENTRY_INIT(unsigned int *arg FUNC_MANY_ARGS)
unsigned long hpa = ARG0;
unsigned long option = ARG1;
unsigned long *result = (unsigned long *)ARG4;
+ int hpa_index;
iodc_log_call(arg, __FUNCTION__);
+
+ hpa_index = find_hpa_index(hpa);
+ if (hpa_index < 0 && hpa != IDE_HPA)
+ return PDC_INVALID_ARG;
+
switch (option) {
case ENTRY_INIT_MOD_DEV: /* 4: Init & test mod & dev */
+ case ENTRY_INIT_DEV: /* 5: Init & test dev */
result[0] = 0; /* module IO_STATUS */
result[1] = HPA_is_serial_device(hpa) ? CL_DUPLEX:
HPA_is_storage_device(hpa) ? CL_RANDOM : 0;
@@ -495,7 +502,7 @@ int __VISIBLE parisc_iodc_ENTRY_TEST(unsigned int *arg FUNC_MANY_ARGS)
iodc_log_call(arg, __FUNCTION__);
hpa_index = find_hpa_index(hpa);
- if (hpa_index < 0)
+ if (hpa_index < 0 && hpa != IDE_HPA)
return PDC_INVALID_ARG;
/* The options ARG1=0 and ARG1=1 are required. Others are optional. */