Only override the time offset in rtcinfo[0] when setting the time; don't
authorkettenis <kettenis@openbsd.org>
Thu, 4 Jul 2024 20:11:46 +0000 (20:11 +0000)
committerkettenis <kettenis@openbsd.org>
Thu, 4 Jul 2024 20:11:46 +0000 (20:11 +0000)
touch rtcinfo[1] and rtcinfo[2].  This doesn't actually fix anything
but rtcinfo[1] on a new machine already contains the value we write into
it and we don't really know what the other bits are used for.

ok patrick@

sys/dev/fdt/qcscm.c

index 93ed4cd..50b9f9e 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: qcscm.c,v 1.6 2024/06/23 22:04:53 patrick Exp $ */
+/* $OpenBSD: qcscm.c,v 1.7 2024/07/04 20:11:46 kettenis Exp $ */
 /*
  * Copyright (c) 2022 Patrick Wildt <patrick@blueri.se>
  *
@@ -744,8 +744,6 @@ qcscm_uefi_rtc_set(uint32_t off)
                return 0;
 
        rtcinfo[0] = off;
-       rtcinfo[1] = 0x10000;
-       rtcinfo[2] = 0;
 
        if (qcscm_uefi_set_variable(sc, u"RTCInfo", sizeof(u"RTCInfo"),
            &qcscm_uefi_rtcinfo_guid, EFI_VARIABLE_NON_VOLATILE |