Store PSCI function ids as uint32_t not int in the softc.
authorjsg <jsg@openbsd.org>
Sun, 28 Jan 2018 12:48:20 +0000 (12:48 +0000)
committerjsg <jsg@openbsd.org>
Sun, 28 Jan 2018 12:48:20 +0000 (12:48 +0000)
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

index 69d20dd..0dec743 100644 (file)
@@ -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 <jsg@openbsd.org>
@@ -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;