diff options
author | Sven Schnelle <svens@stackframe.org> | 2019-03-05 16:30:20 +0100 |
---|---|---|
committer | Sven Schnelle <svens@stackframe.org> | 2019-03-10 14:07:45 +0100 |
commit | 3e8192724b0b7f4e80cd4199b69c2d0aa5d95906 (patch) | |
tree | e9e28e310d87d925e5e32ffccf5f6cd6b74bd145 | |
parent | 7fefb064d45f414da34b41056bb581fbee9d1eaa (diff) | |
download | seabios-hppa-3e8192724b0b7f4e80cd4199b69c2d0aa5d95906.zip seabios-hppa-3e8192724b0b7f4e80cd4199b69c2d0aa5d95906.tar.gz seabios-hppa-3e8192724b0b7f4e80cd4199b69c2d0aa5d95906.tar.bz2 |
parisc: move PDC_PIM to its own function
Signed-off-by: Sven Schnelle <svens@stackframe.org>
-rw-r--r-- | src/parisc/parisc.c | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c index 5f99b6a..052aa98 100644 --- a/src/parisc/parisc.c +++ b/src/parisc/parisc.c @@ -683,6 +683,27 @@ static int pdc_chassis(unsigned int *arg) return PDC_BAD_PROC; } +static int pdc_pim(unsigned int *arg) +{ + unsigned long option = ARG1; + unsigned long *result = (unsigned long *)ARG2; + + switch (option) { + case PDC_PIM_HPMC: + break; + case PDC_PIM_RETURN_SIZE: + *result = sizeof(struct pdc_hpmc_pim_11); // FIXME 64bit! + // B160 returns only "2". Why? + return PDC_OK; + case PDC_PIM_LPMC: + case PDC_PIM_SOFT_BOOT: + return PDC_BAD_OPTION; + case PDC_PIM_TOC: + break; + } + return PDC_BAD_PROC; +} + int __VISIBLE parisc_pdc_entry(unsigned int *arg FUNC_MANY_ARGS) { static unsigned long psw_defaults = PDC_PSW_ENDIAN_BIT; @@ -712,23 +733,13 @@ int __VISIBLE parisc_pdc_entry(unsigned int *arg FUNC_MANY_ARGS) switch (proc) { case PDC_POW_FAIL: break; + case PDC_CHASSIS: /* chassis functions */ return pdc_chassis(arg); + case PDC_PIM: - switch (option) { - case PDC_PIM_HPMC: - break; - case PDC_PIM_RETURN_SIZE: - *result = sizeof(struct pdc_hpmc_pim_11); // FIXME 64bit! - // B160 returns only "2". Why? - return PDC_OK; - case PDC_PIM_LPMC: - case PDC_PIM_SOFT_BOOT: - return PDC_BAD_OPTION; - case PDC_PIM_TOC: - break; - } - break; + return pdc_pim(arg); + case PDC_MODEL: /* model information */ switch (option) { case PDC_MODEL_INFO: |