On 1/13/24 10:15, Helge Deller wrote:
On 1/13/24 00:11, Richard Henderson wrote:
On 1/13/24 09:44, Helge Deller wrote:
I think it would be better to pass this as a parameter to create_fw_cfg, or
to drop the translated FW_CFG_IO_BASE parameter and merely pass in translate
itself.
Like this?
The various operating systems (e.g. Linux, NetBSD) have issues
mapping the power button when it's stored in page zero.
NetBSD even crashes, because it fails to map that page and then
accesses unmapped memory.
Since we now have a consistent memory mapping of PDC in 32-bit
and 64-bit address space (the lower 32-bits of the address are in
sync) the power button can be moved back to PDC space.
This patch fixes the power button on Linux, NetBSD and HP-UX.
Signed-off-by: Helge Deller <del...@gmx.de>
Tested-by: Bruno Haible <br...@clisp.org>
diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 54ca2fd91a..da85050f60 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -36,8 +36,8 @@
#define MIN_SEABIOS_HPPA_VERSION 12 /* require at least this fw version */
-/* Power button address at &PAGE0->pad[4] */
-#define HPA_POWER_BUTTON (0x40 + 4 * sizeof(uint32_t))
+#define HPA_POWER_BUTTON (FIRMWARE_END - 0x10)
+static hwaddr soft_power_reg;
You've forgotten to remove the global.
No... I did not forgot it.
This is still needed by other functions (e.g. hppa_powerdown_req())
in the same file.
Ah, I missed that. In which case,
Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
to the original.
r~