From 5f9962a98fc05d6f8cf9a8666d61b6afd317651d Mon Sep 17 00:00:00 2001 From: jsg Date: Sun, 28 Jan 2018 12:48:20 +0000 Subject: [PATCH] Store PSCI function ids as uint32_t not int in the softc. Avoids unwanted sign extension on arm64 that resulted in qemu not recognising the function ids and matches the specification. Problem reported by semarie@ ok kettenis@ --- sys/dev/fdt/psci.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/fdt/psci.c b/sys/dev/fdt/psci.c index 69d20dddea9..0dec743dc81 100644 --- a/sys/dev/fdt/psci.c +++ b/sys/dev/fdt/psci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: psci.c,v 1.4 2018/01/17 10:17:33 kettenis Exp $ */ +/* $OpenBSD: psci.c,v 1.5 2018/01/28 12:48:20 jsg Exp $ */ /* * Copyright (c) 2016 Jonathan Gray @@ -45,10 +45,10 @@ struct psci_softc { struct device sc_dev; register_t (*sc_callfn)(register_t, register_t, register_t, register_t); - int sc_psci_version; - int sc_system_off; - int sc_system_reset; - int sc_cpu_on; + uint32_t sc_psci_version; + uint32_t sc_system_off; + uint32_t sc_system_reset; + uint32_t sc_cpu_on; }; struct psci_softc *psci_sc; -- 2.20.1