From owner-p4-projects@FreeBSD.ORG Sun Dec 11 06:22:02 2005 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D9A3516A422; Sun, 11 Dec 2005 06:22:01 +0000 (GMT) X-Original-To: perforce@freebsd.org 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 B37CC16A41F for ; Sun, 11 Dec 2005 06:22:01 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6108B43D5C for ; Sun, 11 Dec 2005 06:22:01 +0000 (GMT) (envelope-from imp@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 jBB6M1RK083821 for ; Sun, 11 Dec 2005 06:22:01 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jBB6M1bq083813 for perforce@freebsd.org; Sun, 11 Dec 2005 06:22:01 GMT (envelope-from imp@freebsd.org) Date: Sun, 11 Dec 2005 06:22:01 GMT Message-Id: <200512110622.jBB6M1bq083813@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 88024 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Dec 2005 06:22:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=88024 Change 88024 by imp@imp_plunger on 2005/12/11 06:21:10 Remove some debug LED wiggling. Hopefully, properly implement the following bit if C code to determine if we need to adjust the pc from PA to VA: #if KERNVIRTADDR > KERNPHYSADDR if (pc < KERNVIRTADDR) pc += KERNVIRTADDR - KERNPHYSADDR; #else if (pc > KERNPHYSADDR) pc -= KERNVIRTADDR - KERNPHYSADDR; #endif If va > pa, then we need to test to see if the pc is already > va (since we know it will already be > pa). If pa > va, then we check to see if it is below pa, in which case we know it is already adjusted. This eliminates the need for the va == pa hack in initarm, and we get all the way to the mountroot> prompt. Of course, we have a lot of work to do before that will work... Affected files ... .. //depot/projects/arm/src/sys/arm/arm/locore.S#11 edit Differences ... ==== //depot/projects/arm/src/sys/arm/arm/locore.S#11 (text+ko) ==== @@ -155,7 +155,6 @@ Lunmapped: R7SYS - LED1ON #ifdef STARTUP_PAGETABLE_ADDR /* build page table from scratch */ ldr r0, Lstartup_pagetable @@ -202,16 +201,17 @@ subs r2, r2, #4 bgt .L1 - ldr r4, =KERNVIRTADDR - cmp pc, r4 #if KERNVIRTADDR > KERNPHYSADDR - bgt virt_done ldr r4, =KERNVIRTADDR + cmp r4, pc + bgt virt_done /* if pc is > KERNVIRTADDR, no adj */ ldr r5, =KERNPHYSADDR sub r4, r4, r5 add pc, pc, r4 #else - blt virt_done + ldr r4, =KERNPHYSADDR + cmp r4, pc + blt virt_done /* if pc is < KERNPHYSADDR, no adj */ ldr r4, =KERNPHYSADDR ldr r5, =KERNVIRTADDR sub r4, r4, r5 @@ -219,14 +219,12 @@ #endif virt_done: nop - LED2ON mov fp, #0 /* trace back starts here */ bl _C_LABEL(initarm) /* Off we go */ /* init arm will return the new stack pointer. */ mov sp, r0 - LED3ON bl _C_LABEL(mi_startup) /* call mi_startup()! */ adr r0, .Lmainreturned