From: jsg Date: Sun, 28 Jan 2018 12:48:20 +0000 (+0000) Subject: Store PSCI function ids as uint32_t not int in the softc. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5f9962a98fc05d6f8cf9a8666d61b6afd317651d;p=openbsd 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@ --- 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;