From 2f6d85f32d41c9a7b9a7ccccb7d4ac9d747a05f2 Mon Sep 17 00:00:00 2001 From: nakayama Date: Tue, 31 Jan 2006 20:18:40 +0000 Subject: [PATCH] Fix the new ofwboot boot problem with kernels where .text segment is smaller than 4MB. Unless this fix, boot failed with the message as below. | panic: pmap_kextract: Address 0x1400000 is not from kernel space. | Data segment is too small? --- sys/arch/sparc64/sparc64/pmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c index ddbe64e7b5ae..c9d9b694576c 100644 --- a/sys/arch/sparc64/sparc64/pmap.c +++ b/sys/arch/sparc64/sparc64/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.168 2006/01/27 18:37:50 cdi Exp $ */ +/* $NetBSD: pmap.c,v 1.169 2006/01/31 20:18:40 nakayama Exp $ */ /* * * Copyright (C) 1996-1999 Eduardo Horvath. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.168 2006/01/27 18:37:50 cdi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.169 2006/01/31 20:18:40 nakayama Exp $"); #undef NO_VCACHE /* Don't forget the locked TLB in dostart */ #define HWREF @@ -607,7 +607,7 @@ pmap_bootstrap(kernelstart, kernelend) ktext = kernelstart; ktextp = pmap_kextract(ktext); ektext = roundup((vaddr_t)&etext, PAGE_SIZE_4M); - ektextp = pmap_kextract(ektext); + ektextp = roundup(pmap_kextract((vaddr_t)&etext), PAGE_SIZE_4M); kdata = (vaddr_t)data_start; kdatap = pmap_kextract(kdata);