Fix thinko in kern_vtopdiff calculation

This commit is contained in:
skrll 2020-11-28 14:02:30 +00:00
parent 4fa5b01b8d
commit d6edc716b0
3 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: gemini_machdep.c,v 1.32 2020/11/26 12:56:34 skrll Exp $ */
/* $NetBSD: gemini_machdep.c,v 1.33 2020/11/28 14:02:30 skrll Exp $ */
/* adapted from:
* NetBSD: sdp24xx_machdep.c,v 1.4 2008/08/27 11:03:10 matt Exp
@ -129,7 +129,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: gemini_machdep.c,v 1.32 2020/11/26 12:56:34 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: gemini_machdep.c,v 1.33 2020/11/28 14:02:30 skrll Exp $");
#include "opt_arm_debug.h"
#include "opt_console.h"
@ -630,7 +630,7 @@ initarm(void *arg)
bootconfig.dram[0].address = physical_start;
bootconfig.dram[0].pages = physmem;
kern_vtopdiff = KERNEL_BASE + GEMINI_DRAM_BASE;
kern_vtopdiff = KERNEL_BASE - GEMINI_DRAM_BASE;
/*
* Our kernel is at the beginning of memory, so set our free space to

View File

@ -1,4 +1,4 @@
/* $Id: imx23_olinuxino_machdep.c,v 1.10 2020/11/26 12:56:34 skrll Exp $ */
/* $Id: imx23_olinuxino_machdep.c,v 1.11 2020/11/28 14:02:30 skrll Exp $ */
/*
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@ -138,7 +138,7 @@ initarm(void *arg)
if (set_cpufuncs())
panic("set_cpufuncs failed");
kern_vtopdiff = KERNEL_BASE + KERNEL_BASE_PHYS;
kern_vtopdiff = KERNEL_BASE - KERNEL_BASE_PHYS;
pmap_devmap_register(devmap);
consinit();

View File

@ -1,4 +1,4 @@
/* $NetBSD: sdp24xx_machdep.c,v 1.25 2019/07/16 14:41:48 skrll Exp $ */
/* $NetBSD: sdp24xx_machdep.c,v 1.26 2020/11/28 14:02:30 skrll Exp $ */
/*
* Machine dependent functions for kernel setup for TI OSK5912 board.
@ -125,7 +125,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sdp24xx_machdep.c,v 1.25 2019/07/16 14:41:48 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: sdp24xx_machdep.c,v 1.26 2020/11/28 14:02:30 skrll Exp $");
#include "opt_arm_debug.h"
#include "opt_console.h"
@ -213,7 +213,7 @@ pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
#define KERNEL_BASE_PHYS ((paddr_t)&KERNEL_BASE_phys)
#if 0
u_long kern_vtopdiff = KERNEL_BASE + KERNEL_BASE_PHYS;
u_long kern_vtopdiff = KERNEL_BASE - KERNEL_BASE_PHYS;
#else
u_long kern_vtopdiff = 0;
#endif