aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHelge Deller <deller@gmx.de>2020-08-03 22:15:42 +0200
committerHelge Deller <deller@gmx.de>2020-08-04 10:00:06 +0200
commit4ff7639e2b86d5775fa7d5cd0dbfa4d3a385a701 (patch)
treeea7ccace8d43715dd8d4c100bc7ad8cec890f5e7
parent004258352cd89a30367ccc97f8a0a30f92e42717 (diff)
downloadseabios-hppa-parisc-qemu-5.1.zip
seabios-hppa-parisc-qemu-5.1.tar.gz
seabios-hppa-parisc-qemu-5.1.tar.bz2
parisc: Move power switch button to firmware areahppa-qemu-5.2-1parisc-qemu-5.1
This fixes boot of NetBSD-9. Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r--src/parisc/head.S4
-rw-r--r--src/parisc/parisc.c4
-rw-r--r--src/parisc/pdc.h1
3 files changed, 6 insertions, 3 deletions
diff --git a/src/parisc/head.S b/src/parisc/head.S
index 7e22572..4679f91 100644
--- a/src/parisc/head.S
+++ b/src/parisc/head.S
@@ -83,11 +83,15 @@ reset_entry:
.stringz "https://github.com/hdeller/seabios-hppa"
.stringz BUILD_VERSION
+ .align 0x80
+ENTRY(powersw_button) /* instead of 0xf0140000 on B160L */
+ .word 0
/*******************************************************
Firmware startup code
*******************************************************/
+ .align 0x80
ENTRY(startup)
/* Make sure space registers are set to zero */
mtsp %r0,%sr0
diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c
index be9546f..e9d5e0c 100644
--- a/src/parisc/parisc.c
+++ b/src/parisc/parisc.c
@@ -141,11 +141,11 @@ static unsigned long GoldenMemory = MIN_RAM_SIZE;
static unsigned int chassis_code = 0;
/*
- * For QEMU we emulate the power switch button flag in pad0[2] in PAGE0.
+ * Emulate the power switch button flag in head section of firmware.
* Bit 31 (the lowest bit) is the status of the power switch.
* This bit is "1" if the button is NOT pressed.
*/
-#define powersw_button PAGE0->pad0[2]
+extern int powersw_button; /* in head.S */
void __VISIBLE __noreturn hlt(void)
{
diff --git a/src/parisc/pdc.h b/src/parisc/pdc.h
index 23af5cc..50e88cf 100644
--- a/src/parisc/pdc.h
+++ b/src/parisc/pdc.h
@@ -402,7 +402,6 @@ struct zeropage {
/* [0x040] reserved processor dependent */
int pad0[112]; /* in QEMU pad0[0] holds "SeaBIOS\0" */
- /* and pad0[2] holds soft power button */
/* [0x200] reserved */
int pad1[84];