Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm32 slop wasn't sloppy enough in the kernel_s...
details: https://anonhg.NetBSD.org/src/rev/6434c20921b6
branches: trunk
changeset: 782160:6434c20921b6
user: skrll <skrll%NetBSD.org@localhost>
date: Fri Oct 19 09:56:32 2012 +0000
description:
slop wasn't sloppy enough in the kernel_size calculation. Add in the L2
page tables required as well.
Should fix the dockstar boot problem reported by Andy Ruhl on port-arm.
http://mail-index.netbsd.org/port-arm/2012/09/20/msg001471.html
diffstat:
sys/arch/arm/arm32/arm32_kvminit.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r 90aa4f290509 -r 6434c20921b6 sys/arch/arm/arm32/arm32_kvminit.c
--- a/sys/arch/arm/arm32/arm32_kvminit.c Fri Oct 19 09:50:30 2012 +0000
+++ b/sys/arch/arm/arm32/arm32_kvminit.c Fri Oct 19 09:56:32 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arm32_kvminit.c,v 1.10 2012/10/19 09:50:30 skrll Exp $ */
+/* $NetBSD: arm32_kvminit.c,v 1.11 2012/10/19 09:56:32 skrll Exp $ */
/*
* Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved.
@@ -122,7 +122,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: arm32_kvminit.c,v 1.10 2012/10/19 09:50:30 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm32_kvminit.c,v 1.11 2012/10/19 09:56:32 skrll Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -368,15 +368,17 @@
/*
* Calculate the number of L2 pages needed for mapping the
- * kernel + data + stuff
+ * kernel + data + stuff. Assume 2 L2 pages for kernel, 1 for vectors,
+ * and 1 for IO
*/
size_t kernel_size = bmi->bmi_kernelend;
kernel_size -= (bmi->bmi_kernelstart & -L2_S_SEGSIZE);
kernel_size += L1_TABLE_SIZE;
- kernel_size += round_page(MSGBUFSIZE);
+ kernel_size += L2_TABLE_SIZE * (2 + 1 + KERNEL_L2PT_VMDATA_NUM + 1);
kernel_size +=
cpu_num * (ABT_STACK_SIZE + FIQ_STACK_SIZE + IRQ_STACK_SIZE
+ UND_STACK_SIZE + UPAGES) * PAGE_SIZE;
+ kernel_size += round_page(MSGBUFSIZE);
kernel_size += 0x10000; /* slop */
kernel_size += (kernel_size + L2_S_SEGSIZE - 1) / L2_S_SEGSIZE;
kernel_size = round_page(kernel_size);
Home |
Main Index |
Thread Index |
Old Index