Module Name: src
Committed By: martin
Date: Sat Oct 10 06:50:25 UTC 2015
Modified Files:
src/sys/arch/sparc/stand/ofwboot: Locore.c
Log Message:
Add compile time asserts to make sure we have properly picked up types
for a 64bit cpu and 64bit openfirmware.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/sparc/stand/ofwboot/Locore.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/sparc/stand/ofwboot/Locore.c
diff -u src/sys/arch/sparc/stand/ofwboot/Locore.c:1.14 src/sys/arch/sparc/stand/ofwboot/Locore.c:1.15
--- src/sys/arch/sparc/stand/ofwboot/Locore.c:1.14 Fri Mar 27 06:07:33 2015
+++ src/sys/arch/sparc/stand/ofwboot/Locore.c Sat Oct 10 06:50:25 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: Locore.c,v 1.14 2015/03/27 06:07:33 nakayama Exp $ */
+/* $NetBSD: Locore.c,v 1.15 2015/10/10 06:50:25 martin Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -36,6 +36,15 @@
#include <machine/cpu.h>
+/*
+ * We are trying to boot a sparc v9 cpu, so openfirmware has to be 64bit,
+ * and the kernel we load will be dealing with 64bits too (even if it is
+ * a 32bit kernel.
+ * Make sure we picked up the right defines:
+ */
+__CTASSERT(sizeof(cell_t)==8);
+__CTASSERT(sizeof(paddr_t)==8);
+
extern int openfirmware(void *);