Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc/stand/ofwboot Add compile time asserts to mak...
details: https://anonhg.NetBSD.org/src/rev/26b99d0b4279
branches: trunk
changeset: 340912:26b99d0b4279
user: martin <martin%NetBSD.org@localhost>
date: Sat Oct 10 06:50:25 2015 +0000
description:
Add compile time asserts to make sure we have properly picked up types
for a 64bit cpu and 64bit openfirmware.
diffstat:
sys/arch/sparc/stand/ofwboot/Locore.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diffs (25 lines):
diff -r 21c08ef992fe -r 26b99d0b4279 sys/arch/sparc/stand/ofwboot/Locore.c
--- a/sys/arch/sparc/stand/ofwboot/Locore.c Sat Oct 10 06:49:40 2015 +0000
+++ b/sys/arch/sparc/stand/ofwboot/Locore.c Sat Oct 10 06:50:25 2015 +0000
@@ -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 *);
Home |
Main Index |
Thread Index |
Old Index