Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbarm/bcm53xx Hack workaround to deal with KERN_VT...
details: https://anonhg.NetBSD.org/src/rev/1b7f9c055009
branches: trunk
changeset: 365181:1b7f9c055009
user: kre <kre%NetBSD.org@localhost>
date: Sat Aug 04 13:27:03 2018 +0000
description:
Hack workaround to deal with KERN_VTOPHYS and KERN_PHYSTOV now
being defined in arm/arm32/machdep.h ... attempt to fix (some) earm
builds. Even if builds succeed, resulting kernel might not boot,
and if it boots, could crash. Someone with a clue, please use it!
diffstat:
sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (34 lines):
diff -r 53a9a7a64565 -r 1b7f9c055009 sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c
--- a/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c Sat Aug 04 10:22:09 2018 +0000
+++ b/sys/arch/evbarm/bcm53xx/bcm53xx_machdep.c Sat Aug 04 13:27:03 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm53xx_machdep.c,v 1.11 2018/07/31 06:46:26 skrll Exp $ */
+/* $NetBSD: bcm53xx_machdep.c,v 1.12 2018/08/04 13:27:03 kre Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
#define IDM_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm53xx_machdep.c,v 1.11 2018/07/31 06:46:26 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm53xx_machdep.c,v 1.12 2018/08/04 13:27:03 kre Exp $");
#include "opt_arm_debug.h"
#include "opt_evbarm_boardtype.h"
@@ -93,9 +93,15 @@
* Macros to translate between physical and virtual for a subset of the
* kernel address space. *Not* for general use.
*/
+#if !defined(KERN_VTOPHYS) || !defined(KERN_PHYSTOV)
#define KERN_VTOPDIFF ((vaddr_t)KERNEL_BASE_phys - (vaddr_t)KERNEL_BASE_virt)
+#endif
+#ifndef KERN_VTOPHYS
#define KERN_VTOPHYS(va) ((paddr_t)((vaddr_t)va + KERN_VTOPDIFF))
+#endif
+#ifndef KERN_PHYSTOV
#define KERN_PHYSTOV(pa) ((vaddr_t)((paddr_t)pa - KERN_VTOPDIFF))
+#endif
#ifndef CONADDR
#define CONADDR (BCM53XX_IOREG_PBASE + CCA_UART0_BASE)
Home |
Main Index |
Thread Index |
Old Index