From owner-freebsd-ppc@FreeBSD.ORG Sun Sep 28 18:06:13 2008 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A3D41065690; Sun, 28 Sep 2008 18:06:13 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout017.mac.com (asmtpout017.mac.com [17.148.16.92]) by mx1.freebsd.org (Postfix) with ESMTP id 7044B8FC12; Sun, 28 Sep 2008 18:06:13 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Received: from [192.168.1.95] (209-128-86-226.BAYAREA.NET [209.128.86.226]) by asmtp017.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0K7X00HYK3MC4000@asmtp017.mac.com>; Sun, 28 Sep 2008 11:06:13 -0700 (PDT) Message-id: From: Marcel Moolenaar To: grehan@freebsd.org In-reply-to: <48DF26F2.1000209@freebsd.org> Date: Sun, 28 Sep 2008 11:06:11 -0700 References: <48DD91A4.2060306@freebsd.org> <263AF44F-FC15-4700-B93B-B0DE07A17B40@mac.com> <11FEA924-DB76-46E1-BF79-A26206F796C0@mac.com> <48DF26F2.1000209@freebsd.org> X-Mailer: Apple Mail (2.929.2) Cc: freebsd-ppc@freebsd.org Subject: Re: 8.0-current 200809 snapshot CD boot problem X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2008 18:06:13 -0000 On Sep 27, 2008, at 11:40 PM, Peter Grehan wrote: > Hi Marcel, > >> o I-cache coherency > > The culprit could be the code fragment in sys/boot/ofw/libofw/ > elf_freebsd.c:__elfN(ofw_loadfile), > > if (!strcmp((*result)->f_type, "elf kernel")) > __syncicache((void *) (*result)->f_addr, (*result)- > >f_size); > > If f_addr isn't the start of the text segment i.e. if the initial > page wasn't included, then that is what is blowing up. It looks like f_addr is the correct (virtual) load address. I think the problem relates to whether the starting address falls withing the first page, given that: o We bcopy the first page to avoid reading twice, o We need to flush the D-cache before we can sync the I-cache. We do dcbst before we icbi, but I'm wondering if there isn't a bug there. What if we need to sync after every dcbst? -- Marcel Moolenaar xcllnt@mac.com