Module Name: src Committed By: skrll Date: Sun Sep 16 14:14:56 UTC 2012
Modified Files: src/sys/arch/evbarm/rpi: rpi_start.S Log Message: Don't depend on any memory split for initial L1 table. Size kernel mapping according to actual size. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbarm/rpi/rpi_start.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/evbarm/rpi/rpi_start.S diff -u src/sys/arch/evbarm/rpi/rpi_start.S:1.5 src/sys/arch/evbarm/rpi/rpi_start.S:1.6 --- src/sys/arch/evbarm/rpi/rpi_start.S:1.5 Wed Aug 22 12:36:35 2012 +++ src/sys/arch/evbarm/rpi/rpi_start.S Sun Sep 16 14:14:56 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: rpi_start.S,v 1.5 2012/08/22 12:36:35 jakllsch Exp $ */ +/* $NetBSD: rpi_start.S,v 1.6 2012/09/16 14:14:56 skrll Exp $ */ /* * Copyright (c) 2002, 2003 Genetec Corporation. All rights reserved. @@ -87,11 +87,7 @@ #include <arm/armreg.h> #include "assym.h" -RCSID("$NetBSD: rpi_start.S,v 1.5 2012/08/22 12:36:35 jakllsch Exp $") - -/* Location (in MiB) to put temporary MMU tables just below. */ -/* Raspberry Pi start.elf will give us anywhere between 128MiB and 240MiB */ -#define MINSPLIT 128 +RCSID("$NetBSD: rpi_start.S,v 1.6 2012/09/16 14:14:56 skrll Exp $") /* * Workaround Erratum 411920 @@ -177,6 +173,7 @@ _C_LABEL(rpi_start): bhi 2b 3: ldmia itable!, {va,pa,n_sec,attr} + mov n_sec, n_sec, lsr #L1_S_SHIFT /* Convert va to l1 offset: va = 4 * (va >> L1_S_SHIFT) */ mov va, va, LSR #L1_S_SHIFT mov va, va, LSL #2 @@ -259,8 +256,8 @@ Ll1_s_frame: .word L1_S_FRAME Ltemp_l1_table: - /* Put the temporary L1 translation table at the end of SDRAM. */ - .word 0x00000000 + MINSPLIT * 0x100000 - L1_TABLE_SIZE + /* Put the temporary L1 translation table just below the kernel. */ + .word 0x4000 Lstart: .word start @@ -310,17 +307,17 @@ Lctl_ID_dis: mmu_init_table: /* Add 1MB of VA==PA at 0x00000000 so we can keep the kernel going */ - MMU_INIT(0x00000000, 0x00000000, - (MINSPLIT * L1_S_SIZE + L1_S_SIZE - 1) / L1_S_SIZE, + MMU_INIT(0x0, 0x0, + (_end - KERNEL_BASE + L1_S_SIZE - 1), L1_S_PROTO | L1_S_AP_KRW) MMU_INIT(KERNEL_BASE, 0x0, - (MINSPLIT * L1_S_SIZE + L1_S_SIZE - 1) / L1_S_SIZE, + (_end - KERNEL_BASE + L1_S_SIZE - 1), L1_S_PROTO | L1_S_AP_KRW | L1_S_B | L1_S_C) /* Map the 16MB of peripherals */ MMU_INIT(RPI_KERNEL_IO_VBASE, RPI_KERNEL_IO_PBASE, - (RPI_KERNEL_IO_VSIZE + L1_S_SIZE - 1) / L1_S_SIZE, + (RPI_KERNEL_IO_VSIZE + L1_S_SIZE - 1), L1_S_PROTO | L1_S_AP_KRW) /* end of table */