Module Name: src
Committed By: tsutsui
Date: Sat Jan 20 19:33:53 UTC 2018
Modified Files:
src/sys/arch/atari/dev: nvram.c
Log Message:
Skip NVRAM checksum check and re-initialization on Milan.
Milan's firmware seems to use different check method.
To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/atari/dev/nvram.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/atari/dev/nvram.c
diff -u src/sys/arch/atari/dev/nvram.c:1.20 src/sys/arch/atari/dev/nvram.c:1.21
--- src/sys/arch/atari/dev/nvram.c:1.20 Fri Mar 6 12:41:05 2015
+++ src/sys/arch/atari/dev/nvram.c Sat Jan 20 19:33:53 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: nvram.c,v 1.20 2015/03/06 12:41:05 christos Exp $ */
+/* $NetBSD: nvram.c,v 1.21 2018/01/20 19:33:53 tsutsui Exp $ */
/*
* Copyright (c) 1995 Leo Weppelman.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvram.c,v 1.20 2015/03/06 12:41:05 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvram.c,v 1.21 2018/01/20 19:33:53 tsutsui Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -92,11 +92,15 @@ nvr_attach(device_t parent, device_t sel
/*
* Check the validity of the NVram contents
*/
- if (!nvram_csum_valid(nvram_csum())) {
- printf(": Invalid checksum - re-initialized");
- for (nreg = MC_NVRAM_START; nreg < MC_NVRAM_CSUM; nreg++)
- mc146818_write(RTC, nreg, 0);
- nvram_set_csum(nvram_csum());
+ /* XXX: Milan's firmware seems to use different check method */
+ if ((machineid & ATARI_MILAN) == 0) {
+ if (!nvram_csum_valid(nvram_csum())) {
+ printf(": Invalid checksum - re-initialized");
+ for (nreg = MC_NVRAM_START; nreg < MC_NVRAM_CSUM;
+ nreg++)
+ mc146818_write(RTC, nreg, 0);
+ nvram_set_csum(nvram_csum());
+ }
}
sc = device_private(self);
sc->sc_dev = self;