diff options
author | Sven Schnelle <svens@stackframe.org> | 2019-03-05 17:01:37 +0100 |
---|---|---|
committer | Sven Schnelle <svens@stackframe.org> | 2019-03-10 14:07:45 +0100 |
commit | ea7cfa1b3b026fbed3a679d660a6e97d192f16bb (patch) | |
tree | 0c8f98154e25c38ba2fbe024a3e1cd2679e6c4b6 | |
parent | 697e8de0b4d17126c8a20c2e66d2871b8348d54e (diff) | |
download | seabios-hppa-ea7cfa1b3b026fbed3a679d660a6e97d192f16bb.zip seabios-hppa-ea7cfa1b3b026fbed3a679d660a6e97d192f16bb.tar.gz seabios-hppa-ea7cfa1b3b026fbed3a679d660a6e97d192f16bb.tar.bz2 |
parisc: move PDC_SOFT_POWER to its own function
Signed-off-by: Sven Schnelle <svens@stackframe.org>
-rw-r--r-- | src/parisc/parisc.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c index 6c887c7..0ee68ba 100644 --- a/src/parisc/parisc.c +++ b/src/parisc/parisc.c @@ -1100,6 +1100,20 @@ static int pdc_system_map(unsigned int *arg) return PDC_BAD_OPTION; } +static int pdc_soft_power(unsigned int *arg) +{ + unsigned long option = ARG1; + + switch (option) { + case PDC_SOFT_POWER_ENABLE: + if (ARG3 == 0) // put soft power button under hardware control. + hlt(); + return PDC_OK; + } + // dprintf(0, "\n\nSeaBIOS: PDC_SOFT_POWER called with ARG2=%x ARG3=%x ARG4=%x\n", ARG2, ARG3, ARG4); + return PDC_BAD_OPTION; +} + int __VISIBLE parisc_pdc_entry(unsigned int *arg FUNC_MANY_ARGS) { unsigned long proc = ARG0; @@ -1169,15 +1183,10 @@ int __VISIBLE parisc_pdc_entry(unsigned int *arg FUNC_MANY_ARGS) case PDC_SYSTEM_MAP: return pdc_system_map(arg); + case PDC_SOFT_POWER: // don't have a soft-power switch - switch (option) { - case PDC_SOFT_POWER_ENABLE: - if (ARG3 == 0) // put soft power button under hardware control. - hlt(); - return PDC_OK; - } - // dprintf(0, "\n\nSeaBIOS: PDC_SOFT_POWER called with ARG2=%x ARG3=%x ARG4=%x\n", ARG2, ARG3, ARG4); - return PDC_BAD_OPTION; + return pdc_soft_power(arg); + case PDC_CRASH_PREP: /* This should actually quiesce all I/O and prepare the System for crash dumping. Ignoring it for now, otherwise the BUG_ON below would quit qemu before we have |