From owner-p4-projects@FreeBSD.ORG Sun Feb 20 21:25:05 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EB56B16A4D0; Sun, 20 Feb 2005 21:25:04 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AA85F16A4CE for ; Sun, 20 Feb 2005 21:25:04 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8037843D2D for ; Sun, 20 Feb 2005 21:25:04 +0000 (GMT) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j1KLP4b6064206 for ; Sun, 20 Feb 2005 21:25:04 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j1KLP4sR064203 for perforce@freebsd.org; Sun, 20 Feb 2005 21:25:04 GMT (envelope-from cognet@freebsd.org) Date: Sun, 20 Feb 2005 21:25:04 GMT Message-Id: <200502202125.j1KLP4sR064203@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Subject: PERFORCE change 71412 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Feb 2005 21:25:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=71412 Change 71412 by cognet@cognet on 2005/02/20 21:24:07 Bring back a more generic locore.S. Also fix the braindead attempt to get the pc to our virtual space. in ts7200_machdep.c, move the call to cninit() after the new page table is used, since the uart memio is not mapped anymore in locore.S Affected files ... .. //depot/projects/arm/src/sys/arm/arm/locore.S#4 edit .. //depot/projects/arm/src/sys/arm/ep93xx/ts7200_machdep.c#4 edit Differences ... ==== //depot/projects/arm/src/sys/arm/arm/locore.S#4 (text+ko) ==== @@ -1,6 +1,8 @@ +<<<<<<< locore.S +======= /* $NetBSD: locore.S,v 1.14 2003/04/20 16:21:40 thorpej Exp $ */ -/*- +/* * Copyright (C) 1994-1997 Mark Brinicombe * Copyright (C) 1994 Brini * All rights reserved. @@ -37,7 +39,7 @@ #include #include #include -__FBSDID("$FreeBSD: src/sys/arm/arm/locore.S,v 1.8 2005/01/23 22:08:31 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/locore.S,v 1.4 2004/09/28 14:37:08 cognet Exp $"); /* What size should this really be ? It is only used by init_arm() */ #define INIT_ARM_STACK_SIZE 2048 @@ -129,10 +131,7 @@ 3: ldmia r4!, {r1,r2,r3} /* # of sections, PA|attr, VA */ cmp r1, #0 - adrne r5, 2b - bicne r5, r5, #0xff000000 - orrne r5, r5, #PHYSADDR - movne pc, r5 + bne 2b mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ @@ -160,20 +159,6 @@ subs r2, r2, #4 bgt .L1 - /* fix up the pc to be at KERNVIRTADDR */ - ldr r4, =KERNVIRTADDR - cmp pc, r4 -#if KERNVIRTADDR > KERNPHYSADDR - ldr r4, =KERNVIRTADDR - ldr r5, =KERNPHYSADDR - sub r4, r4, r5 - add pc, pc, r4 -#else - ldrgt r4, =KERNPHYSADDR - ldrgt r5, =KERNVIRTADDR - subgt r4, r4, r5 - sublt pc, pc, r4 -#endif ldr fp, =KERNVIRTADDR /* trace back starts here */ bl _C_LABEL(initarm) /* Off we go */ @@ -195,11 +180,12 @@ .word STARTUP_PAGETABLE_ADDR mmu_init_table: /* fill all table VA==PA */ + MMU_INIT(0x00000000, 0x00000000, 1<<(32-L1_S_SHIFT), L1_TYPE_S|L1_S_AP(AP_KRW)) /* map SDRAM VA==PA, WT cacheable */ MMU_INIT(PHYSADDR, PHYSADDR , 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) /* map VA 0xc0000000..0xc3ffffff to PA */ MMU_INIT(KERNBASE, PHYSADDR, 64, L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) - MMU_INIT(0xf0100000, 0x80800000, 1<<(32-L1_S_SHIFT), L1_TYPE_S|L1_S_AP(AP_KRW)) + MMU_INIT(0xfe800000, 0xfe800000, 1<<(32-L1_S_SHIFT), L1_TYPE_S|L1_S_AP(AP_KRW)) .word 0 /* end of table */ #endif @@ -314,23 +300,18 @@ mov pc, r7 #endif -ENTRY(asm_putc) - ldr r1, =0xf01c0000 - strb r0, [r1] - mov pc, lr - /* * setjump + longjmp */ ENTRY(setjmp) stmia r0, {r4-r14} mov r0, #0x00000000 - RET + mov pc, lr ENTRY(longjmp) ldmia r0, {r4-r14} mov r0, #0x00000001 - RET + mov pc, lr .data .global _C_LABEL(esym) @@ -357,3 +338,4 @@ szsigcode: .long esigcode-sigcode /* End of locore.S */ +>>>>>>> 1.4 ==== //depot/projects/arm/src/sys/arm/ep93xx/ts7200_machdep.c#4 (text+ko) ==== @@ -221,7 +221,6 @@ boothowto |= RB_VERBOSE | RB_SINGLE; i = 0; set_cpufuncs(); - cninit(); fake_preload[i++] = MODINFO_NAME; fake_preload[i++] = strlen("elf kernel") + 1; @@ -395,6 +394,7 @@ cpu_tlb_flushID(); cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)); + cninit(); /* * Pages were allocated during the secondary bootstrap for the