From owner-freebsd-ppc@FreeBSD.ORG Sun Dec 17 21:58:24 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8956B16A66B for ; Sun, 17 Dec 2006 21:58:24 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fep01.xtra.co.nz (fep01.xtra.co.nz [210.54.141.245]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70B9743FB7 for ; Sun, 17 Dec 2006 21:48:52 +0000 (GMT) (envelope-from andrew@fubar.geek.nz) Received: from serv.int.fubar.geek.nz ([222.155.167.159]) by fep01.xtra.co.nz with ESMTP id <20061217214842.NNKO19965.fep01.xtra.co.nz@serv.int.fubar.geek.nz> for ; Mon, 18 Dec 2006 10:48:42 +1300 Date: Mon, 18 Dec 2006 10:48:41 +1300 From: Andrew Turner To: freebsd-ppc@freebsd.org Message-ID: <20061218104841.72ba51ea@hermies.int.fubar.geek.nz> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.6; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: FreeBSD on an Efika 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, 17 Dec 2006 21:58:24 -0000 I have been sent an Efika[1] board from Genesi. When booting FreeBSD on it I found it would stop before the printing copyright notice. The problem seems to be similar to http://lists.freebsd.org/pipermail/freebsd-ppc/2006-June/001692.html (I have had the same output before) After some investigation I found the kernel was stopping when it reached sys/kern/subr_msgbuf.c line 125 [2]. The msgbuf struct appears to point to an invalid address. The address of the struct comes from virtual_addr[3]. This indicates the virtual_addr points to an invalid area of memory on this device. By commenting out sys/kern/subr_prf.c line 924 [4] and using the ofw console I managed to get past the copyright notice. It now stopped later attempting to read from memory in the virtual_addr range. Has any one got any suggestions how I could fix this? Andrew [1] http://www.powerdeveloper.org/efika.php [2] http://fxr.watson.org/fxr/source/kern/subr_msgbuf.c#L125 [3] http://fxr.watson.org/fxr/source/powerpc/powerpc/mmu_oea.c#L899 [4] http://fxr.watson.org/fxr/source/kern/subr_prf.c#L924 From owner-freebsd-ppc@FreeBSD.ORG Sun Dec 17 22:31:54 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C283E16A49E for ; Sun, 17 Dec 2006 22:31:54 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from mta06.xtra.co.nz (mta06.xtra.co.nz [210.54.141.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id C8A9F43E6D for ; Sun, 17 Dec 2006 22:27:19 +0000 (GMT) (envelope-from andrew@fubar.geek.nz) Received: from serv.int.fubar.geek.nz ([222.155.167.159]) by fep02.xtra.co.nz with ESMTP id <20061217101035.JTVV16919.fep02.xtra.co.nz@serv.int.fubar.geek.nz> for ; Sun, 17 Dec 2006 23:10:35 +1300 Received: from hermies.int.fubar.geek.nz (hermies [192.168.1.10]) by serv.int.fubar.geek.nz (Postfix) with ESMTP id D9FB46128 for ; Sun, 17 Dec 2006 23:10:34 +1300 (NZDT) Date: Sun, 17 Dec 2006 23:10:34 +1300 From: Andrew Turner To: freebsd-ppc@freebsd.org Message-ID: <20061217231034.4caaf631@hermies.int.fubar.geek.nz> X-Mailer: Sylpheed-Claws 2.5.2 (GTK+ 2.10.6; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: FreeBSD on an Efika 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, 17 Dec 2006 22:31:55 -0000 I have been sent an Efika[1] board from Genesi. When booting FreeBSD on it I found it would stop before the printing copyright notice. The problem seems to be similar to http://lists.freebsd.org/pipermail/freebsd-ppc/2006-June/001692.html (I have had the same output before) After some investigation I found the kernel was stopping when it reached sys/kern/subr_msgbuf.c line 125 [2]. The msgbuf struct appears to point to an invalid address. The address of the struct comes from virtual_addr[3]. This indicates the virtual_addr points to an invalid area of memory on this device. By commenting out sys/kern/subr_prf.c line 924 [4] and using the ofw console I managed to get past the copyright notice. It now stopped later attempting to read from memory in the virtual_addr range. Has any one got any suggestions how I could fix this? Andrew [1] http://www.powerdeveloper.org/efika.php [2] http://fxr.watson.org/fxr/source/kern/subr_msgbuf.c#L125 [3] http://fxr.watson.org/fxr/source/powerpc/powerpc/mmu_oea.c#L899 [4] http://fxr.watson.org/fxr/source/kern/subr_prf.c#L924 From owner-freebsd-ppc@FreeBSD.ORG Sun Dec 17 23:05:52 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 76B6E16A403 for ; Sun, 17 Dec 2006 23:05:52 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id A74DA43CBD for ; Sun, 17 Dec 2006 23:05:46 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [192.168.0.13] (dsl-63-249-90-35.cruzio.com [63.249.90.35]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CKI36536 (AUTH peterg@ptree32.com.au); Mon, 18 Dec 2006 09:05:37 +1000 (EST) Message-ID: <4585CCC1.7050005@freebsd.org> Date: Sun, 17 Dec 2006 15:03:29 -0800 From: Peter Grehan User-Agent: Thunderbird 1.5.0.8 (Macintosh/20061025) MIME-Version: 1.0 To: Andrew Turner References: <20061218104841.72ba51ea@hermies.int.fubar.geek.nz> In-Reply-To: <20061218104841.72ba51ea@hermies.int.fubar.geek.nz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org Subject: Re: FreeBSD on an Efika X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: grehan@freebsd.org List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Dec 2006 23:05:52 -0000 Hi Andrew, > I have been sent an Efika[1] board from Genesi. Good one ! > Has any one got any suggestions how I could fix this? The physical pages for the message buffer are stolen from what the system thinks the actual physical pagemap is. You may want to check this and see if it's OK: it is obtained from OpenFirmware in the mem_regions function: http://fxr.watson.org/fxr/source/powerpc/powerpc/ofw_machdep.c#L137 later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Mon Dec 18 07:04:23 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A3B6D16A407 for ; Mon, 18 Dec 2006 07:04:23 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx0.rink.nu (thunderstone.rink.nu [80.112.228.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2050343CB2 for ; Mon, 18 Dec 2006 07:04:17 +0000 (GMT) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx0.rink.nu (Postfix) with ESMTP id 9BC1D17091; Mon, 18 Dec 2006 07:41:10 +0100 (CET) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx0.rink.nu ([127.0.0.1]) by localhost (thunderstone.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id larkS+ezhwnP; Mon, 18 Dec 2006 07:41:01 +0100 (CET) Received: by mx0.rink.nu (Postfix, from userid 1000) id 71B961704A; Mon, 18 Dec 2006 07:41:01 +0100 (CET) Date: Mon, 18 Dec 2006 07:41:01 +0100 From: Rink Springer To: Andrew Turner Message-ID: <20061218064101.GA14935@rink.nu> References: <20061218104841.72ba51ea@hermies.int.fubar.geek.nz> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/x-pkcs7-signature"; micalg=sha1; boundary="envbJBWh7q8WU6mo" Content-Disposition: inline In-Reply-To: <20061218104841.72ba51ea@hermies.int.fubar.geek.nz> User-Agent: Mutt/1.5.13 (2006-08-11) Cc: freebsd-ppc@freebsd.org Subject: Re: FreeBSD on an Efika 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: Mon, 18 Dec 2006 07:04:23 -0000 --envbJBWh7q8WU6mo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Andrew, On Mon, Dec 18, 2006 at 10:48:41AM +1300, Andrew Turner wrote: > I have been sent an Efika[1] board from Genesi. >=20 > When booting FreeBSD on it I found it would stop before the > printing copyright notice. The problem seems to be similar to > http://lists.freebsd.org/pipermail/freebsd-ppc/2006-June/001692.html (I > have had the same output before) >=20 > After some investigation I found the kernel was stopping when it > reached sys/kern/subr_msgbuf.c line 125 [2]. The msgbuf struct appears > to point to an invalid address. The address of the struct comes from > virtual_addr[3]. This indicates the virtual_addr points to an invalid > area of memory on this device. >=20 > By commenting out sys/kern/subr_prf.c line 924 [4] and using the ofw > console I managed to get past the copyright notice. It now stopped > later attempting to read from memory in the virtual_addr range. >=20 > Has any one got any suggestions how I could fix this? >=20 > Andrew >=20 > [1] http://www.powerdeveloper.org/efika.php > [2] http://fxr.watson.org/fxr/source/kern/subr_msgbuf.c#L125 > [3] http://fxr.watson.org/fxr/source/powerpc/powerpc/mmu_oea.c#L899 > [4] http://fxr.watson.org/fxr/source/kern/subr_prf.c#L924 Just FYI, it appears that Suleiman Souhlal (ssouhlal@FreeBSD.org) is already working on a port, judging from http://projects.powerdeveloper.org/projects.php?project=3D239 Have you tried talking to him ? Regards, --=20 Rink P.W. Springer - http://rink.nu "It's you isn't it? THE BASTARD OPERATOR FROM HELL!" "In the flesh, on the phone and in your account..." - BOFH #3 --envbJBWh7q8WU6mo Content-Type: application/x-pkcs7-signature Content-Disposition: attachment; filename="smime.p7s" Content-Transfer-Encoding: base64 MIIJawYJKoZIhvcNAQcCoIIJXDCCCVgCAQExCzAJBgUrDgMCGgUAMAsGCSqGSIb3DQEHAaCC BuIwggObMIIDBKADAgECAhAiuN7bs9pg6t3I0n6G5OOTMA0GCSqGSIb3DQEBBQUAMGIxCzAJ BgNVBAYTAlpBMSUwIwYDVQQKExxUaGF3dGUgQ29uc3VsdGluZyAoUHR5KSBMdGQuMSwwKgYD VQQDEyNUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwgSXNzdWluZyBDQTAeFw0wNjExMDgwOTI2 NTNaFw0wNzExMDgwOTI2NTNaMIHSMREwDwYDVQQEEwhTcHJpbmdlcjEaMBgGA1UEKhMRUmlu ayBQZXRlciBXeWNoZXIxIzAhBgNVBAMTGlJpbmsgUGV0ZXIgV3ljaGVyIFNwcmluZ2VyMRsw GQYJKoZIhvcNAQkBFgxtYWlsQHJpbmsubnUxHzAdBgkqhkiG9w0BCQEWEHJpbmtAZnJlZWJz ZC5vcmcxIDAeBgkqhkiG9w0BCQEWEXJpbmtAaWwuZm9udHlzLm5sMRwwGgYJKoZIhvcNAQkB Fg1yaW5rQHN0YWNrLm5sMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxryGDfel YzzENX7wodkbVY1NALfaiPfNEG10YjD8ZWdK9zkN26Tc878Shbqapq0KYFD8TACGfEhKoMvo qbf0PHAS/gNYr81Arqa9FRPUfzvtDE/cMbhvI+p7ufBITyYnPJp9MUD72iT+DohRR2ISVi3i NAEgDuSbYYNxctnvXqU6O6EPy3mzoFPDoiOQwBfVtFrjxBbND9BUK2bjtUyGt4x8I/Vulzrt qLPTokva+b97DHRgbCA/aLLYIrU6QoqOFJ8GrAbro/FZLYh4m1oJk3FEHVQOKkk7xzIaFmmP QGJRL8m6nrIZFTrQ+X2wmzfLD55K/UiqbekOuMiWbY9EbwIDAQABo10wWzBLBgNVHREERDBC gQxtYWlsQHJpbmsubnWBEHJpbmtAZnJlZWJzZC5vcmeBEXJpbmtAaWwuZm9udHlzLm5sgQ1y aW5rQHN0YWNrLm5sMAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQEFBQADgYEAIfIcieRjePBA wjZqvOdGpyPcNDnK/ubeQSTV5Y4AHWxm1sXhQxB/XrQ3RVdz1qDnBRL1AjkEBAl8e9+am4s6 D6TaSlmJeNXn6ZPJTQecisz3M+AKiMckShM3oAeUi0ktn1yNYR+hz5aQN612XT5OZRYznJVZ kPf1DiA2RVVyz+MwggM/MIICqKADAgECAgENMA0GCSqGSIb3DQEBBQUAMIHRMQswCQYDVQQG EwJaQTEVMBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xGjAYBgNV BAoTEVRoYXd0ZSBDb25zdWx0aW5nMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNlcnZpY2Vz IERpdmlzaW9uMSQwIgYDVQQDExtUaGF3dGUgUGVyc29uYWwgRnJlZW1haWwgQ0ExKzApBgkq hkiG9w0BCQEWHHBlcnNvbmFsLWZyZWVtYWlsQHRoYXd0ZS5jb20wHhcNMDMwNzE3MDAwMDAw WhcNMTMwNzE2MjM1OTU5WjBiMQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1 bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElz c3VpbmcgQ0EwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMSmPFVzVftOucqZWh5owHUE cJ3f6f+jHuy9zfVb8hp2vX8MOmHyv1HOAdTlUAow1wJjWiyJFXCO3cnwK4Vaqj9xVsuvPAsH 5/EfkTYkKhPPK9Xzgnc9A74r/rsYPge/QIACZNenprufZdHFKlSFD0gEf6e20TxhBEAeZBly YLf7AgMBAAGjgZQwgZEwEgYDVR0TAQH/BAgwBgEB/wIBADBDBgNVHR8EPDA6MDigNqA0hjJo dHRwOi8vY3JsLnRoYXd0ZS5jb20vVGhhd3RlUGVyc29uYWxGcmVlbWFpbENBLmNybDALBgNV HQ8EBAMCAQYwKQYDVR0RBCIwIKQeMBwxGjAYBgNVBAMTEVByaXZhdGVMYWJlbDItMTM4MA0G CSqGSIb3DQEBBQUAA4GBAEiM0VCD6gsuzA2jZqxnD3+vrL7CF6FDlpSdf0whuPg2H6otnzYv wPQcUCCTcDz9reFhYsPZOhl+hLGZGwDFGguCdJ4lUJRix9sncVcljd2pnDmOjCBPZV+V2vf3 h9bGCE6u9uo05RAaWzVNd+NWIXiC3CEZNd4ksdMdRv9dX2VPMYICUTCCAk0CAQEwdjBiMQsw CQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoG A1UEAxMjVGhhd3RlIFBlcnNvbmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECECK43tuz2mDq3cjS fobk45MwCQYFKw4DAhoFAKCBsTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3 DQEJBTEPFw0wNjEyMTgwNjQxMDFaMCMGCSqGSIb3DQEJBDEWBBRf8Ns2D9c8bK6aB/4hdVaO YgZtDzBSBgkqhkiG9w0BCQ8xRTBDMAoGCCqGSIb3DQMHMA4GCCqGSIb3DQMCAgIAgDANBggq hkiG9w0DAgIBQDAHBgUrDgMCBzANBggqhkiG9w0DAgIBKDANBgkqhkiG9w0BAQEFAASCAQB8 JdoJLYjg5kIAJJ2RVVl/QfTi4YayBO0vbs/28CQg612y5pYofwkKGyebEpyOpZdhIXoNZAcQ pyxJV0waU4rpz8OiCMRGI20kcFHaui87aNEVl5gZAR1mvjB/a8GwdadU8tiLzs+egtkhE1zz iFd3TY/nG3CyOM+hS5+LN+2n+Zm2QQzenbAb9xFFLhR+C8AjyLLLtrre0WSb9W2M6H2aPXRT tlGG4u+a63lRkcJsyAjI7ehLQLCsHovmCVnOu/XrCsNoWtM49A7eOOu/2bDLN0ZJ2aCxFZxE c67dX6NqeRW0kVIzlvAhRjVL0aujZmSt6dXsuGiI5RFc1/1nBw3e --envbJBWh7q8WU6mo-- From owner-freebsd-ppc@FreeBSD.ORG Mon Dec 18 09:57:27 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 03CB516A403; Mon, 18 Dec 2006 09:57:27 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fep02.xtra.co.nz (fep02.xtra.co.nz [210.54.141.244]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2380543CA2; Mon, 18 Dec 2006 09:57:25 +0000 (GMT) (envelope-from andrew@fubar.geek.nz) Received: from serv.int.fubar.geek.nz ([222.155.167.159]) by fep03.xtra.co.nz with ESMTP id <20061218092330.QMVQ16699.fep03.xtra.co.nz@serv.int.fubar.geek.nz>; Mon, 18 Dec 2006 22:23:30 +1300 Date: Mon, 18 Dec 2006 22:23:27 +1300 From: Andrew Turner To: grehan@freebsd.org Message-ID: <20061218222327.308dca53@hermies.int.fubar.geek.nz> In-Reply-To: <4585CCC1.7050005@freebsd.org> References: <20061218104841.72ba51ea@hermies.int.fubar.geek.nz> <4585CCC1.7050005@freebsd.org> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.6; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org Subject: Re: FreeBSD on an Efika 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: Mon, 18 Dec 2006 09:57:27 -0000 On Sun, 17 Dec 2006 15:03:29 -0800 Peter Grehan wrote: > The physical pages for the message buffer are stolen from what the > system thinks the actual physical pagemap is. You may want to check > this and see if it's OK: it is obtained from OpenFirmware in the > mem_regions function: > > http://fxr.watson.org/fxr/source/powerpc/powerpc/ofw_machdep.c#L137 I'm getting correct values from mem_regions. I can read from the physical address. It is reading from msgbufp where it stop working. Andrew From owner-freebsd-ppc@FreeBSD.ORG Mon Dec 18 11:08:56 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C45AB16A5CD for ; Mon, 18 Dec 2006 11:08:56 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.FreeBSD.org (Postfix) with ESMTP id B69A743CBB for ; Mon, 18 Dec 2006 11:08:48 +0000 (GMT) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id kBIB8bCI090007 for ; Mon, 18 Dec 2006 11:08:37 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id kBIB8a9U090003 for freebsd-ppc@FreeBSD.org; Mon, 18 Dec 2006 11:08:36 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 18 Dec 2006 11:08:36 GMT Message-Id: <200612181108.kBIB8a9U090003@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: linimon set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-ppc@FreeBSD.org Cc: Subject: Current problem reports assigned to you 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: Mon, 18 Dec 2006 11:08:56 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o power/93203 ppc FreeBSD PPC Can't Write to Partitions. 1 problem total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o power/95367 ppc docs for ppc release. 1 problem total. From owner-freebsd-ppc@FreeBSD.ORG Mon Dec 18 17:22:42 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A02AF16A403 for ; Mon, 18 Dec 2006 17:22:42 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29E5343CA8 for ; Mon, 18 Dec 2006 17:22:38 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [192.168.0.13] (dsl-63-249-90-35.cruzio.com [63.249.90.35]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CKJ33338 (AUTH peterg@ptree32.com.au); Tue, 19 Dec 2006 03:06:58 +1000 (EST) Message-ID: <4586CA29.10803@freebsd.org> Date: Mon, 18 Dec 2006 09:04:41 -0800 From: Peter Grehan User-Agent: Thunderbird 1.5.0.8 (Macintosh/20061025) MIME-Version: 1.0 To: Andrew Turner References: <20061218104841.72ba51ea@hermies.int.fubar.geek.nz> <4585CCC1.7050005@freebsd.org> <20061218222327.308dca53@hermies.int.fubar.geek.nz> In-Reply-To: <20061218222327.308dca53@hermies.int.fubar.geek.nz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org Subject: Re: FreeBSD on an Efika X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: grehan@freebsd.org List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Dec 2006 17:22:42 -0000 Hi Andrew, > I'm getting correct values from mem_regions. I can read from the > physical address. What values are you getting back ? Does it look like what the system should have ? Did you read as well as write the physical value ? > It is reading from msgbufp where it stop working. What're the virtual/physical values used when creating the msgbuf mapping with pmap_kenter() in machdep.c:powerpc_init() ? After that mapping has been created, can you read/write to the buffer in that routine ? Do you end up in the trap handler if you touch msgbuf ? pmap_kenter() is fundamental to the operation of the system and probably OK, so something else must be afoot. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Mon Dec 18 18:47:01 2006 Return-Path: X-Original-To: ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1B5FE16A415 for ; Mon, 18 Dec 2006 18:47:01 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id C21D943CBE for ; Mon, 18 Dec 2006 18:46:55 +0000 (GMT) (envelope-from xcllnt@mac.com) Received: from mac.com (smtpin01-en2 [10.13.10.146]) by smtpout.mac.com (Xserve/8.12.11/smtpout08/MantshX 4.0) with ESMTP id kBIIXmLT021438 for ; Mon, 18 Dec 2006 10:33:48 -0800 (PST) Received: from [66.129.237.56] ([66.129.237.56]) (authenticated bits=0) by mac.com (Xserve/smtpin01/MantshX 4.0) with ESMTP id kBIIXjjs002812 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Mon, 18 Dec 2006 10:33:46 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: ppc@FreeBSD.org From: Marcel Moolenaar Date: Mon, 18 Dec 2006 10:33:01 -0800 X-Mailer: Apple Mail (2.752.3) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes X-Proofpoint-Virus-Version: vendor=fsecure engine=4.65.5446:2.3.11, 1.2.37, 4.0.164 definitions=2006-12-18_02:2006-12-18, 2006-12-18, 2006-12-18 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=3.1.0-0612050001 definitions=main-0612180027 Cc: Subject: Adding new PowerPC platforms to the build 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: Mon, 18 Dec 2006 18:47:01 -0000 All, There has been some mention of activity here about porting FreeBSD to hardware other than Macintosh. I'm in fact collaborating with Rafal to add support for e500 (mpc85xx). In this thread I don't necessarily want to dig deep into the porting effort, as much as I want to find closure on how we should utilize the build variables to support differing platforms easily as well as discuss the mechanics of configuring the kernel. The most obvious variables we can and/or need to use are MACHINE and CPUTYPE. For all of the PowerPC ports I expect MACHINE_ARCH to be fixed. What is important is that CPUTYPE has more relation to the compiler than it has to the kernel. MACHINE has more relation to the kernel than anything else. In particular changing MACHINE does not change CPUTYPE and vice versa. There's another variable: MACHINE_CPU. It is defined as the oldest CPU that is supported for a particular architecture. This variable is not currently used on PowerPC. I don't think it's unreasonable to use this variable to indicate the kind of features we expect to find on the target CPU and as such to be able to use it to distinguish between, say, a PowerPC 7455 and a Book-E? At this time there's nothing that checks and/or sets CPUTYPE for PowerPC. As I said, MACHINE_CPU is not used at all. The big question is: can we make it so that we can use existing variables to build realeases for 1) Apple hardware, having a Book III-S ISA processor and 2) embedded hardware with varying drivers and using a Book III-E ISA processor? In particular I'd like to see the tinderbox and make release work without any additional kluging. Would that be possible? Thoughts? -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-ppc@FreeBSD.ORG Mon Dec 18 18:48:42 2006 Return-Path: X-Original-To: ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4D4B016A412 for ; Mon, 18 Dec 2006 18:48:42 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id DDB0543CB1 for ; Mon, 18 Dec 2006 18:48:41 +0000 (GMT) (envelope-from xcllnt@mac.com) Received: from mac.com (smtpin01-en2 [10.13.10.146]) by smtpout.mac.com (Xserve/8.12.11/smtpout08/MantshX 4.0) with ESMTP id kBIImYWB002166 for ; Mon, 18 Dec 2006 10:48:34 -0800 (PST) Received: from [66.129.237.56] ([66.129.237.56]) (authenticated bits=0) by mac.com (Xserve/smtpin01/MantshX 4.0) with ESMTP id kBIImVTf008569 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Mon, 18 Dec 2006 10:48:33 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: <38D687BE-F674-4954-B6D3-8D25A8E9B9B5@mac.com> Content-Type: text/plain; charset=US-ASCII; format=flowed To: ppc@FreeBSD.org From: Marcel Moolenaar Date: Mon, 18 Dec 2006 10:47:50 -0800 X-Mailer: Apple Mail (2.752.3) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes X-Proofpoint-Virus-Version: vendor=fsecure engine=4.65.5446:2.3.11, 1.2.37, 4.0.164 definitions=2006-12-18_02:2006-12-18, 2006-12-18, 2006-12-18 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=3.1.0-0612050001 definitions=main-0612180028 Cc: Subject: HFS+ 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: Mon, 18 Dec 2006 18:48:42 -0000 All, I now have two PowerPC machines and for both machines I got sufficiently annoyed that I can't install FreeBSD easily. In fact I either take a detour though CD or over the NET. Once the FreeBSD boot loader has been started it will grab the kernel from the UFS root file system. One big factor in this is that we don't support HFS+ and as such I've been looking at that. If someone knows of BSD licensed implementations (or parts thereof), let me know. I don't want to reinvent the wheel... -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-ppc@FreeBSD.ORG Mon Dec 18 18:54:54 2006 Return-Path: X-Original-To: ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B160916A506 for ; Mon, 18 Dec 2006 18:54:54 +0000 (UTC) (envelope-from nathanw@uchicago.edu) Received: from vms046pub.verizon.net (vms046pub.verizon.net [206.46.252.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id 183E543CAD for ; Mon, 18 Dec 2006 18:54:48 +0000 (GMT) (envelope-from nathanw@uchicago.edu) Received: from [192.168.0.100] ([68.160.30.63]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JAH00J3NGI670G0@vms046.mailsrvcs.net> for ppc@FreeBSD.org; Mon, 18 Dec 2006 12:54:07 -0600 (CST) Date: Mon, 18 Dec 2006 13:54:06 -0500 From: Nathan Whitehorn In-reply-to: <38D687BE-F674-4954-B6D3-8D25A8E9B9B5@mac.com> To: Marcel Moolenaar Message-id: <1938EB35-048F-461D-8176-80E2CF647C9B@uchicago.edu> MIME-version: 1.0 (Apple Message framework v752.2) X-Mailer: Apple Mail (2.752.2) Content-type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-transfer-encoding: 7bit References: <38D687BE-F674-4954-B6D3-8D25A8E9B9B5@mac.com> Cc: ppc@FreeBSD.org Subject: Re: HFS+ 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: Mon, 18 Dec 2006 18:54:54 -0000 There was a port of the Darwin HFS+ code to FreeBSD 5.3 (http:// people.freebsd.org/~yar/hfs/). It worked quite well -- full read/ write, etc. After 5.4, it stopped building. It is licensed under the APSL, not the BSD one, but does integrate nicely into the FreeBSD kernel. -Nathan On Dec 18, 2006, at 1:47 PM, Marcel Moolenaar wrote: > All, > > I now have two PowerPC machines and for both machines I got > sufficiently annoyed that I can't install FreeBSD easily. > In fact I either take a detour though CD or over the NET. > Once the FreeBSD boot loader has been started it will grab > the kernel from the UFS root file system. > > One big factor in this is that we don't support HFS+ and as > such I've been looking at that. If someone knows of BSD > licensed implementations (or parts thereof), let me know. > I don't want to reinvent the wheel... > > -- > Marcel Moolenaar > xcllnt@mac.com > > > _______________________________________________ > freebsd-ppc@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ppc > To unsubscribe, send any mail to "freebsd-ppc-unsubscribe@freebsd.org" From owner-freebsd-ppc@FreeBSD.ORG Mon Dec 18 20:27:28 2006 Return-Path: X-Original-To: ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E7D1A16A403 for ; Mon, 18 Dec 2006 20:27:28 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28C3F43CB0 for ; Mon, 18 Dec 2006 20:27:27 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CKJ55383 (AUTH peterg@ptree32.com.au); Tue, 19 Dec 2006 06:13:37 +1000 (EST) Message-ID: <4586F685.1090403@freebsd.org> Date: Mon, 18 Dec 2006 12:13:57 -0800 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Marcel Moolenaar References: <38D687BE-F674-4954-B6D3-8D25A8E9B9B5@mac.com> In-Reply-To: <38D687BE-F674-4954-B6D3-8D25A8E9B9B5@mac.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ppc@FreeBSD.org Subject: Re: HFS+ 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: Mon, 18 Dec 2006 20:27:29 -0000 Hi Marcel, >In fact I either take a detour though CD or over the NET. >Once the FreeBSD boot loader has been started it will grab >the kernel from the UFS root file system. I usually copy the loader to the root directory on the boot HFS filesystem and use the parameter to specify the root FreeBSD UFS partition e.g. 0 > boot hd:loader hd:7 though it would be very nice to do 0 > boot hd:loader > One big factor in this is that we don't support HFS+ and as > such I've been looking at that. If someone knows of BSD > licensed implementations (or parts thereof), let me know. > I don't want to reinvent the wheel... There was a NetBSD SoC project to do just that: http://netbsd-soc.sourceforge.net/projects/hfs/ One of the issues is that I think HFS is now journalled by default unless you explictily disable it. Another path to take is to make FreeBSD's UFS understand Apple's version. That code is in NetBSD. I started writing a libstand module so the loader would be able to read it's parameters from a HFS filesystem. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Mon Dec 18 22:33:03 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D0DC416A407; Mon, 18 Dec 2006 22:33:03 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fep04.xtra.co.nz (fep04.xtra.co.nz [210.54.141.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1831243CA3; Mon, 18 Dec 2006 22:33:02 +0000 (GMT) (envelope-from andrew@fubar.geek.nz) Received: from serv.int.fubar.geek.nz ([222.155.167.159]) by fep04.xtra.co.nz with ESMTP id <20061218223232.LLAV22675.fep04.xtra.co.nz@serv.int.fubar.geek.nz>; Tue, 19 Dec 2006 11:32:32 +1300 Date: Tue, 19 Dec 2006 11:32:30 +1300 From: Andrew Turner To: grehan@freebsd.org Message-ID: <20061219113230.34182787@hermies.int.fubar.geek.nz> In-Reply-To: <4586CA29.10803@freebsd.org> References: <20061218104841.72ba51ea@hermies.int.fubar.geek.nz> <4585CCC1.7050005@freebsd.org> <20061218222327.308dca53@hermies.int.fubar.geek.nz> <4586CA29.10803@freebsd.org> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.6; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org Subject: Re: FreeBSD on an Efika 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: Mon, 18 Dec 2006 22:33:03 -0000 On Mon, 18 Dec 2006 09:04:41 -0800 Peter Grehan wrote: > Hi Andrew, > > > I'm getting correct values from mem_regions. I can read from the > > physical address. > > What values are you getting back ? Does it look like what the > system should have ? For reg I'm getting the range 0x0 - 0x8000000. For available I'm getting the ranges 0x19111e4 - 0x02000000 and 0x24ff000 - 0x08000000. These are consistent with the values retrieved from the open firmware prompt. > Did you read as well as write the physical value ? Yes I can read and write to the physical address. > > > It is reading from msgbufp where it stop working. > > What're the virtual/physical values used when creating the msgbuf > mapping with pmap_kenter() in machdep.c:powerpc_init() ? The physical address is 0x1922000, the virtual address is 0xd0005000. > After that > mapping has been created, can you read/write to the buffer in that > routine ? Attempting to read or write to the value causes the kernel to stop. > Do you end up in the trap handler if you touch msgbuf ? Not as far as I can tell. > > pmap_kenter() is fundamental to the operation of the system and > probably OK, so something else must be afoot. > > later, > > Peter. > > From owner-freebsd-ppc@FreeBSD.ORG Tue Dec 19 00:25:04 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3A41B16A403 for ; Tue, 19 Dec 2006 00:25:04 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 61DB743C9F for ; Tue, 19 Dec 2006 00:25:03 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CKK09247 (AUTH peterg@ptree32.com.au); Tue, 19 Dec 2006 10:24:47 +1000 (EST) Message-ID: <4587316C.1070500@freebsd.org> Date: Mon, 18 Dec 2006 16:25:16 -0800 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Andrew Turner References: <20061218104841.72ba51ea@hermies.int.fubar.geek.nz> <4585CCC1.7050005@freebsd.org> <20061218222327.308dca53@hermies.int.fubar.geek.nz> <4586CA29.10803@freebsd.org> <20061219113230.34182787@hermies.int.fubar.geek.nz> In-Reply-To: <20061219113230.34182787@hermies.int.fubar.geek.nz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: grehan@freebsd.org, freebsd-ppc@freebsd.org Subject: Re: FreeBSD on an Efika 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: Tue, 19 Dec 2006 00:25:04 -0000 Hi Andrew, >>Do you end up in the trap handler if you touch msgbuf ? > > Not as far as I can tell. .. >> pmap_kenter() is fundamental to the operation of the system and >>probably OK, so something else must be afoot. A quick re-read of the G2 core manual gives the answer. I was under the impression that the G2 was similar to the G3/G4 in that it did a hardware table walk on TLB miss, but, that's not right. It's up to software to handle a miss, using the itlb/dtlb-load/dtlb-store exception vectors. See 6.5.2.1 of the G2 Core ref manual: http://www.freescale.com/files/32bit/doc/ref_manual/G2CORERM.pdf Since the relevant trap vectors aren't initialised, they will be either 0 or whatever OpenFirmware left in there, most likely resulting in an endless loop of unhandled exceptions. The path I'd suggest is a) Put in exception handlers at 0x1000, 0x1100 and 0x1200 to catch the TLB miss e.g. bcopy(&trapcode, (void *)0x1000, (size_t)&trapsize); As you can see in , the existing vector definition don't match these, or are incorrect for the G2 core. b) In powerpc/trap.c, panic if those vectors are hit to verify that touching a virtual address will cause one of these exceptions. Do it for both data read and write. c) Manually install a TLB to cover the first page of the message buffer to see if this allows a read/write without a trap occuring. d) Now the fun part: for those exceptions, change the handler to point to code that will walk the PTEG table and insert a TLB if found. If not found, fake a DSI or ISI trap. This can be done in C, though you will have to be careful to use a pre-allocated stack and not touch any virtual addresses while doing this, since it could result in another fault. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Tue Dec 19 01:02:15 2006 Return-Path: X-Original-To: ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AAB7816A403 for ; Tue, 19 Dec 2006 01:02:15 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6410743CA4 for ; Tue, 19 Dec 2006 01:02:14 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CKK15186 (AUTH peterg@ptree32.com.au); Tue, 19 Dec 2006 11:01:57 +1000 (EST) Message-ID: <45873A21.8020304@freebsd.org> Date: Mon, 18 Dec 2006 17:02:25 -0800 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Marcel Moolenaar References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ppc@FreeBSD.org Subject: Re: Adding new PowerPC platforms to the build 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: Tue, 19 Dec 2006 01:02:15 -0000 Hi Marcel, > There has been some mention of activity here about porting FreeBSD to > hardware other than Macintosh. I'm in fact collaborating with Rafal to > add support for e500 (mpc85xx). Very happy that this is being done. Long overdue :) > There's another variable: MACHINE_CPU. It is defined as the oldest CPU > that is supported for a particular architecture. This variable is not > currently used on PowerPC. I don't think it's unreasonable to use this > variable to indicate the kind of features we expect to find on the > target CPU and as such to be able to use it to distinguish between, > say, a PowerPC 7455 and a Book-E? See below, I wouldn't want to have a compile-time option for this unless it's absolutely necessary. Put all the CPU-model-specific code in it's own source file, glue them together with linker sets, and pick one at boot-time. If you only want one, then create a custom config that only includes the one of interest. GENERIC can have all of them, within reason. > At this time there's nothing that checks and/or sets CPUTYPE for > PowerPC. As I said, MACHINE_CPU is not used at all. > > The big question is: can we make it so that we can use existing > variables to build realeases for 1) Apple hardware, having a Book > III-S ISA processor and 2) embedded hardware with varying drivers and > using a Book III-E ISA processor? As I mentioned in the long reply to Rafal a while back, the ideal world is where GENERIC can run-time select between all boot-loaders and CPU architectures. That isn't possible for a small subset, for instance if there is conflicting SPR usage or locking issues. What I want to avoid is a separate kernel config per-CPU variant and per-platform, and one reason is the tinderbox coverage. If it's all in GENERIC then it will be constantly tested. > In particular I'd like to see the tinderbox and make release work > without any additional kluging. Would that be possible? > > Thoughts? I hope it's possible. The easy way out is zillions of configs and conditional compilation: let's try and avoid that path. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Tue Dec 19 01:36:45 2006 Return-Path: X-Original-To: ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 462A716A415 for ; Tue, 19 Dec 2006 01:36:45 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id D7E9943CA6 for ; Tue, 19 Dec 2006 01:36:44 +0000 (GMT) (envelope-from xcllnt@mac.com) Received: from mac.com (smtpin08-en2 [10.13.10.153]) by smtpout.mac.com (Xserve/8.12.11/smtpout12/MantshX 4.0) with ESMTP id kBJ1YdfO008888; Mon, 18 Dec 2006 17:34:39 -0800 (PST) Received: from [172.24.92.150] (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mac.com (Xserve/smtpin08/MantshX 4.0) with ESMTP id kBJ1YXXR028783 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 18 Dec 2006 17:34:37 -0800 (PST) In-Reply-To: <45873A21.8020304@freebsd.org> References: <45873A21.8020304@freebsd.org> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Mon, 18 Dec 2006 17:33:51 -0800 To: Peter Grehan X-Mailer: Apple Mail (2.752.3) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: ppc@FreeBSD.org Subject: Re: Adding new PowerPC platforms to the build 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: Tue, 19 Dec 2006 01:36:45 -0000 On Dec 18, 2006, at 5:02 PM, Peter Grehan wrote: > See below, I wouldn't want to have a compile-time option for this > unless it's absolutely necessary. Put all the CPU-model-specific > code in it's own source file, glue them together with linker sets, > and pick one at boot-time. If you only want one, then create a > custom config that only includes the one of interest. GENERIC can > have all of them, within reason. There's at least 1 gotcha: I think the ABI for embedded space is different from server space (Book III-E vs Book III-S). Think floating-point. MI code that is intended to run on a Book III-S ISA processor should use hardware FP. MI code that is intended to run on a Book III-E ISA processor cannot. This seems to indicate that we have more than 1 distinct PowerPC worlds and that it would not be beneficial to try to combine these into a single release or build. So, if we can use (say) MACHINE to indicate the ABI variant (either III-S or III-E, but maybe even VLE) then we at least separate these worlds and use dynamic linking, loading, KOBJ-ification et al for runtime selection of features and code blobs. In other words: what is the absolute minimum separation we need to introduce that yields reasonable generic behavior per class (if at all) and how do we implement that separation in the source tree. As you say, custom kernels and run-time tuning should allow us to handle variations within a single class. For example, the following seems quite user-friendly and intuitive: make release TARGET_ARCH=powerpc TARGET=server or make release TARGET_ARCH=powerpc TARGET=embedded and it does solve the biggest problem we're facing. Would this be so bad? Also, I don't want to assume that whatever we do should be done in the same way as pc98 and sun4u has been done. I think they have set a bad example. I pretty much assume that TARGET=foo would imply a directory foo under the TARGET_ARCH directory. In any case, I don't want to tie myself down to what's there. I want to explore what we like to be able to do and then fix FreeBSD to allow us to do it. -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-ppc@FreeBSD.ORG Tue Dec 19 01:48:45 2006 Return-Path: X-Original-To: ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9AFF16A40F for ; Tue, 19 Dec 2006 01:48:45 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 78E5A43CA2 for ; Tue, 19 Dec 2006 01:48:43 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CKK21395 (AUTH peterg@ptree32.com.au); Tue, 19 Dec 2006 11:47:36 +1000 (EST) Message-ID: <458744D4.3060007@freebsd.org> Date: Mon, 18 Dec 2006 17:48:04 -0800 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Marcel Moolenaar References: <45873A21.8020304@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ppc@FreeBSD.org Subject: Re: Adding new PowerPC platforms to the build 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: Tue, 19 Dec 2006 01:48:45 -0000 > There's at least 1 gotcha: I think the ABI for embedded space is > different from server space (Book III-E vs Book III-S). Think > floating-point. MI code that is intended to run on a Book III-S > ISA processor should use hardware FP. MI code that is intended > to run on a Book III-E ISA processor cannot. Sure. > For example, the following seems quite user-friendly and intuitive: > make release TARGET_ARCH=powerpc TARGET=server > or > make release TARGET_ARCH=powerpc TARGET=embedded > > and it does solve the biggest problem we're facing. Would this be > so bad? Perhaps a better distinction is a default value of 'server', and an override of TARGET=softfp since there are a large class of embedded PPC cpus that can do floating point. > Also, I don't want to assume that whatever we do should be done in > the same way as pc98 and sun4u has been done. I think they have set > a bad example. Agreed 100%. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Tue Dec 19 01:53:22 2006 Return-Path: X-Original-To: ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DFB9E16A40F for ; Tue, 19 Dec 2006 01:53:22 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id 974ED43CA4 for ; Tue, 19 Dec 2006 01:53:22 +0000 (GMT) (envelope-from xcllnt@mac.com) Received: from mac.com (smtpin08-en2 [10.13.10.153]) by smtpout.mac.com (Xserve/8.12.11/smtpout01/MantshX 4.0) with ESMTP id kBJ1pu2B025463; Mon, 18 Dec 2006 17:51:56 -0800 (PST) Received: from [172.24.92.150] (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mac.com (Xserve/smtpin08/MantshX 4.0) with ESMTP id kBJ1poXC004582 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 18 Dec 2006 17:51:54 -0800 (PST) In-Reply-To: <1938EB35-048F-461D-8176-80E2CF647C9B@uchicago.edu> References: <38D687BE-F674-4954-B6D3-8D25A8E9B9B5@mac.com> <1938EB35-048F-461D-8176-80E2CF647C9B@uchicago.edu> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <302F3A97-5034-4CB9-9918-5C23A4346B4D@mac.com> Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Mon, 18 Dec 2006 17:51:08 -0800 To: Nathan Whitehorn X-Mailer: Apple Mail (2.752.3) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: ppc@FreeBSD.org Subject: Re: HFS+ 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: Tue, 19 Dec 2006 01:53:23 -0000 On Dec 18, 2006, at 10:54 AM, Nathan Whitehorn wrote: > There was a port of the Darwin HFS+ code to FreeBSD 5.3 (http:// > people.freebsd.org/~yar/hfs/). It worked quite well -- full read/ > write, etc. After 5.4, it stopped building. It is licensed under > the APSL, not the BSD one, but does integrate nicely into the > FreeBSD kernel. Thanks for the pointer! I've contacted Yar and may take over maintainership. If we can import this code in the FreeBSD tree, I will probably do that (after porting it to -CURRENT). It's a shame to leave usable code unused... -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-ppc@FreeBSD.ORG Tue Dec 19 02:06:22 2006 Return-Path: X-Original-To: ppc@freebsd.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6ED6B16A417; Tue, 19 Dec 2006 02:06:22 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id D151243C9F; Tue, 19 Dec 2006 02:06:21 +0000 (GMT) (envelope-from xcllnt@mac.com) Received: from mac.com (smtpin08-en2 [10.13.10.153]) by smtpout.mac.com (Xserve/8.12.11/smtpout15/MantshX 4.0) with ESMTP id kBJ26EXr018100; Mon, 18 Dec 2006 18:06:14 -0800 (PST) Received: from [172.24.92.150] (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mac.com (Xserve/smtpin08/MantshX 4.0) with ESMTP id kBJ26B7B009282 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 18 Dec 2006 18:06:12 -0800 (PST) In-Reply-To: <4586F685.1090403@freebsd.org> References: <38D687BE-F674-4954-B6D3-8D25A8E9B9B5@mac.com> <4586F685.1090403@freebsd.org> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <4EAA1052-7F09-44C4-ADC8-017A38E757B7@mac.com> Content-Transfer-Encoding: 7bit From: Marcel Moolenaar Date: Mon, 18 Dec 2006 18:05:29 -0800 To: Peter Grehan X-Mailer: Apple Mail (2.752.3) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: ppc@freebsd.org Subject: Re: HFS+ 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: Tue, 19 Dec 2006 02:06:22 -0000 On Dec 18, 2006, at 12:13 PM, Peter Grehan wrote: > Hi Marcel, > > >In fact I either take a detour though CD or over the NET. > >Once the FreeBSD boot loader has been started it will grab > >the kernel from the UFS root file system. > > I usually copy the loader to the root directory on the boot HFS > filesystem and use the parameter to specify the root FreeBSD UFS > partition e.g. > > 0 > boot hd:loader hd:7 > > though it would be very nice to do > > 0 > boot hd:loader I typically don't have Mac OS X on the disk when I use the machine for FreeBSD :-) >> One big factor in this is that we don't support HFS+ and as >> such I've been looking at that. If someone knows of BSD >> licensed implementations (or parts thereof), let me know. >> I don't want to reinvent the wheel... > > There was a NetBSD SoC project to do just that: > > http://netbsd-soc.sourceforge.net/projects/hfs/ I noticed it, but I didn't see anything in the NetBSD repo. I'm not sure it actually got committed... > One of the issues is that I think HFS is now journalled by default > unless you explictily disable it. Well, as long as the journal is empty when we mount the FS we can pretty much ignore that fact. It's not ideal, but it does allow us to mount in all cases Mac OS X didn't crash, which I think should hardly be a limitation :-) > Another path to take is to make FreeBSD's UFS understand Apple's > version. That code is in NetBSD. Yeah. I formatted my UFS root file system using Mac OS X only to have the FreeBSD kernel panic when I tried to mount the file system. If anything I'd like us to not panic, but supporting their variant would be even nicer... > I started writing a libstand module so the loader would be able to > read it's parameters from a HFS filesystem. It would be really cool to have that. I'm looking onto Apple's open source HFS+ code. Maybe there's levarage... -- Marcel Moolenaar xcllnt@mac.com From owner-freebsd-ppc@FreeBSD.ORG Tue Dec 19 02:22:03 2006 Return-Path: X-Original-To: ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F3F3316A407 for ; Tue, 19 Dec 2006 02:22:02 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BC5443C9F for ; Tue, 19 Dec 2006 02:20:56 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CKK26803 (AUTH peterg@ptree32.com.au); Tue, 19 Dec 2006 12:20:28 +1000 (EST) Message-ID: <45874C8A.6090805@freebsd.org> Date: Mon, 18 Dec 2006 18:20:58 -0800 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Marcel Moolenaar References: <38D687BE-F674-4954-B6D3-8D25A8E9B9B5@mac.com> <1938EB35-048F-461D-8176-80E2CF647C9B@uchicago.edu> <302F3A97-5034-4CB9-9918-5C23A4346B4D@mac.com> In-Reply-To: <302F3A97-5034-4CB9-9918-5C23A4346B4D@mac.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ppc@FreeBSD.org Subject: Re: HFS+ 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: Tue, 19 Dec 2006 02:22:03 -0000 > Thanks for the pointer! I've contacted Yar and may take over > maintainership. If we can import this code in the FreeBSD tree, > I will probably do that (after porting it to -CURRENT). It's > a shame to leave usable code unused... From memory the VFS mods put into FreeBSD in the 6.x timeframe prevented the Apple code from coming across almost unchanged as in the original port. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Tue Dec 19 15:14:45 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A4C0B16A403 for ; Tue, 19 Dec 2006 15:14:45 +0000 (UTC) (envelope-from jefflad@yahoo.ca) Received: from web36201.mail.mud.yahoo.com (web36201.mail.mud.yahoo.com [209.191.68.227]) by mx1.FreeBSD.org (Postfix) with SMTP id E12CB43CA9 for ; Tue, 19 Dec 2006 15:14:44 +0000 (GMT) (envelope-from jefflad@yahoo.ca) Received: (qmail 638 invoked by uid 60001); 19 Dec 2006 14:47:56 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.ca; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=YW3WhB5wbxfwS3NVTBabE38DNdo6CkmjfeC70/DDgJnoQir98rUS1JFBc4u2lcRJKP9zLUCpx4531IxosLqNKPtulsyGT2CjNPUaIovlrb092440fdH3HURvkzPMcVnbBlW9vJu6nPG0kSZkhc5t93bf5da+LMfvD0utnyA0AnE=; X-YMail-OSG: f1lJ5I4VM1lOpAhS3_qJIcKRZ8rmBR.BaCGjR0Cbgg3b5oBEGwGf5I6k0BCk0Qe3IH_s.WcCUD7Bjjiacx4sxXMzBQUSN7oSxOTSNHxcXidryhR9B_WTS5PtRqVn6XTS5U5kYPf9E8L00aE- Received: from [192.88.165.35] by web36201.mail.mud.yahoo.com via HTTP; Tue, 19 Dec 2006 09:47:55 EST Date: Tue, 19 Dec 2006 09:47:55 -0500 (EST) From: Ladouceur Jeffrey To: freebsd-ppc@freebsd.org In-Reply-To: <20061214185408.48103.qmail@web36210.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <76941.99583.qm@web36201.mail.mud.yahoo.com> Subject: Re: MPC8548 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: Tue, 19 Dec 2006 15:14:45 -0000 I'd be interested in findout out Rafal's trial and tribulation in porting to this platform ? jeff __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From owner-freebsd-ppc@FreeBSD.ORG Tue Dec 19 15:36:37 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3112D16A416 for ; Tue, 19 Dec 2006 15:36:37 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [62.233.211.107]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A41243CBB for ; Tue, 19 Dec 2006 15:36:36 +0000 (GMT) (envelope-from raj@semihalf.com) Received: from localhost (localhost [127.0.0.1]) by mail.semihalf.com (Postfix) with ESMTP id C6DFB1432C; Tue, 19 Dec 2006 16:19:22 +0100 (CET) Received: from mail.semihalf.com ([127.0.0.1]) by localhost (mail.semihalf.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 05256-07; Tue, 19 Dec 2006 16:19:21 +0100 (CET) Message-ID: <458802F8.7010702@semihalf.com> Date: Tue, 19 Dec 2006 16:19:20 +0100 From: Rafal Jaworowski MIME-Version: 1.0 To: Ladouceur Jeffrey References: <76941.99583.qm@web36201.mail.mud.yahoo.com> In-Reply-To: <76941.99583.qm@web36201.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at semihalf.com Cc: freebsd-ppc@freebsd.org Subject: Re: MPC8548 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: Tue, 19 Dec 2006 15:36:37 -0000 Ladouceur Jeffrey wrote: > I'd be interested in findout out Rafal's trial and > tribulation in porting to this platform ? > Hi Jeff, The e500 is coming, please stay tuned. Rafal From owner-freebsd-ppc@FreeBSD.ORG Wed Dec 20 01:03:09 2006 Return-Path: X-Original-To: ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BB71816A415 for ; Wed, 20 Dec 2006 01:03:09 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [62.233.211.107]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57A1F43CB9 for ; Wed, 20 Dec 2006 01:03:09 +0000 (GMT) (envelope-from raj@semihalf.com) Received: from localhost (localhost [127.0.0.1]) by mail.semihalf.com (Postfix) with ESMTP id D092514398 for ; Wed, 20 Dec 2006 01:31:47 +0100 (CET) Received: from mail.semihalf.com ([127.0.0.1]) by localhost (mail.semihalf.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 23231-09 for ; Wed, 20 Dec 2006 01:31:45 +0100 (CET) Message-ID: <4588846D.3040709@semihalf.com> Date: Wed, 20 Dec 2006 01:31:41 +0100 From: Rafal Jaworowski MIME-Version: 1.0 To: ppc@FreeBSD.org References: <38D687BE-F674-4954-B6D3-8D25A8E9B9B5@mac.com> In-Reply-To: <38D687BE-F674-4954-B6D3-8D25A8E9B9B5@mac.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at semihalf.com Cc: Subject: Re: HFS+ 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: Wed, 20 Dec 2006 01:03:09 -0000 Marcel Moolenaar wrote: > > One big factor in this is that we don't support HFS+ and as > such I've been looking at that. If someone knows of BSD > licensed implementations (or parts thereof), let me know. > I don't want to reinvent the wheel... > On a somewhat fs-related note: is anyone aware of efforts towards support for cross-endian UFS? It would be nice to create and populate an MFS image on LE host. I looked at this briefly, but it didn't seem like the quickest task and maybe someone is already working on it. Rafal From owner-freebsd-ppc@FreeBSD.ORG Wed Dec 20 01:14:10 2006 Return-Path: X-Original-To: ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 33F7116A403 for ; Wed, 20 Dec 2006 01:14:10 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5CB6A43CA3 for ; Wed, 20 Dec 2006 01:14:05 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CKL80228 (AUTH peterg@ptree32.com.au); Wed, 20 Dec 2006 11:13:58 +1000 (EST) Message-ID: <45888E72.6050406@freebsd.org> Date: Tue, 19 Dec 2006 17:14:26 -0800 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Rafal Jaworowski References: <38D687BE-F674-4954-B6D3-8D25A8E9B9B5@mac.com> <4588846D.3040709@semihalf.com> In-Reply-To: <4588846D.3040709@semihalf.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ppc@FreeBSD.org Subject: Re: HFS+ 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: Wed, 20 Dec 2006 01:14:10 -0000 Hi Rafal, > On a somewhat fs-related note: is anyone aware of efforts towards > support for cross-endian UFS? It would be nice to create and populate an > MFS image on LE host. I looked at this briefly, but it didn't seem like > the quickest task and maybe someone is already working on it. This has come up a few times with various folk (Kip Macy ?) saying that it didn't take long to pull across the NetBSD changes that do this. I believe the sysutils/makefs port can handle cross-endian builds. If you can get away with a read-only root, mkisofs can do the job and FreeBSD can deal with an isofs root mount. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Wed Dec 20 06:26:26 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 50D1B16A403; Wed, 20 Dec 2006 06:26:26 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fep05.xtra.co.nz (fep05.xtra.co.nz [210.54.141.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75BEF43C9F; Wed, 20 Dec 2006 06:26:25 +0000 (GMT) (envelope-from andrew@fubar.geek.nz) Received: from serv.int.fubar.geek.nz ([125.237.119.17]) by fep05.xtra.co.nz with ESMTP id <20061220062620.CGNS7885.fep05.xtra.co.nz@serv.int.fubar.geek.nz>; Wed, 20 Dec 2006 19:26:20 +1300 Date: Wed, 20 Dec 2006 19:26:14 +1300 From: Andrew Turner To: Peter Grehan Message-ID: <20061220192614.04c53dbf@hermies.int.fubar.geek.nz> In-Reply-To: <4587316C.1070500@freebsd.org> References: <20061218104841.72ba51ea@hermies.int.fubar.geek.nz> <4585CCC1.7050005@freebsd.org> <20061218222327.308dca53@hermies.int.fubar.geek.nz> <4586CA29.10803@freebsd.org> <20061219113230.34182787@hermies.int.fubar.geek.nz> <4587316C.1070500@freebsd.org> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.6; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=MP_UpkjTp9EV.oiE3bclM4Ix92 Cc: grehan@freebsd.org, freebsd-ppc@freebsd.org Subject: Re: FreeBSD on an Efika 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: Wed, 20 Dec 2006 06:26:26 -0000 --MP_UpkjTp9EV.oiE3bclM4Ix92 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Mon, 18 Dec 2006 16:25:16 -0800 Peter Grehan wrote: > a) Put in exception handlers at 0x1000, 0x1100 and 0x1200 to catch > the TLB miss e.g. > > bcopy(&trapcode, (void *)0x1000, (size_t)&trapsize); > > As you can see in , the existing vector definition > don't match these, or are incorrect for the G2 core. There is EXC_IMISS, EXC_DLMISS and EXC_DSMISS. > d) Now the fun part: for those exceptions, change the handler to > point to code that will walk the PTEG table and insert a TLB if > found. If not found, fake a DSI or ISI trap. This can be done in C, > though you will have to be careful to use a pre-allocated stack and > not touch any virtual addresses while doing this, since it could > result in another fault. The attached patch adds the NetBSD handlers. There is a bug in the patch where I can read data once but on the next read or write the kernel crashes. Andrew --MP_UpkjTp9EV.oiE3bclM4Ix92 Content-Type: text/x-patch; name=efika-1.diff Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=efika-1.diff Index: sys/powerpc/include/psl.h =================================================================== RCS file: /cvsroot/src/sys/powerpc/include/psl.h,v retrieving revision 1.4 diff -u -r1.4 psl.h --- sys/powerpc/include/psl.h 7 Jan 2005 02:29:19 -0000 1.4 +++ sys/powerpc/include/psl.h 19 Dec 2006 11:44:10 -0000 @@ -46,6 +46,7 @@ */ #define PSL_VEC 0x02000000 /* AltiVec vector unit available */ #define PSL_POW 0x00040000 /* power management */ +#define PSL_TGPR 0x00020000 /* temp. gpr remapping (mpc603e) */ #define PSL_ILE 0x00010000 /* interrupt endian mode (1 == le) */ #define PSL_EE 0x00008000 /* external interrupt enable */ #define PSL_PR 0x00004000 /* privilege mode (1 == user) */ Index: sys/powerpc/powerpc/locore.S =================================================================== RCS file: /cvsroot/src/sys/powerpc/powerpc/locore.S,v retrieving revision 1.22 diff -u -r1.22 locore.S --- sys/powerpc/powerpc/locore.S 30 Oct 2005 21:29:59 -0000 1.22 +++ sys/powerpc/powerpc/locore.S 19 Dec 2006 11:44:18 -0000 @@ -66,6 +66,7 @@ #include #include #include +#include /* Locate the per-CPU data structure */ #define GET_CPUINFO(r) \ Index: sys/powerpc/powerpc/machdep.c =================================================================== RCS file: /cvsroot/src/sys/powerpc/powerpc/machdep.c,v retrieving revision 1.98 diff -u -r1.98 machdep.c --- sys/powerpc/powerpc/machdep.c 6 Dec 2006 06:34:56 -0000 1.98 +++ sys/powerpc/powerpc/machdep.c 20 Dec 2006 00:27:47 -0000 @@ -256,6 +256,9 @@ extern void *extint, *extsize; extern void *dblow, *dbsize; extern void *vectrap, *vectrapsize; +extern void *tlbimiss, *tlbimsize; +extern void *tlbdlmiss, *tlbdlmsize; +extern void *tlbdsmiss, *tlbdsmsize; void powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp) @@ -350,6 +353,9 @@ bcopy(&trapcode, (void *)EXC_VECAST, (size_t)&trapsize); bcopy(&trapcode, (void *)EXC_THRM, (size_t)&trapsize); bcopy(&trapcode, (void *)EXC_BPT, (size_t)&trapsize); + bcopy(&tlbimiss, (void *)EXC_IMISS, (size_t)&tlbimsize); + bcopy(&tlbdlmiss, (void *)EXC_DLMISS, (size_t)&tlbdlmsize); + bcopy(&tlbdsmiss, (void *)EXC_DSMISS, (size_t)&tlbdsmsize); #ifdef KDB bcopy(&dblow, (void *)EXC_RST, (size_t)&dbsize); bcopy(&dblow, (void *)EXC_MCHK, (size_t)&dbsize); Index: sys/powerpc/powerpc/trap_subr.S =================================================================== RCS file: /cvsroot/src/sys/powerpc/powerpc/trap_subr.S,v retrieving revision 1.16 diff -u -r1.16 trap_subr.S --- sys/powerpc/powerpc/trap_subr.S 23 Dec 2005 13:05:27 -0000 1.16 +++ sys/powerpc/powerpc/trap_subr.S 20 Dec 2006 00:30:53 -0000 @@ -342,6 +342,205 @@ CNAME(dsisize) = .-CNAME(dsitrap) /* + * Now the tlb software load for 603 processors: + * (Code essentially from the 603e User Manual, Chapter 5, but + * corrected a lot.) + */ + +/* + * For tlb instruction misses + */ + .globl CNAME(tlbimiss),CNAME(tlbimsize) +CNAME(tlbimiss): + mfspr %r2,SPR_HASH1 /* get first pointer */ + li %r1,8 + mfctr %r0 /* save counter */ + mfspr %r3,SPR_ICMP /* get first compare value */ + addi %r2,%r2,-8 /* predec pointer */ +1: + mtctr %r1 /* load counter */ +2: + lwzu %r1,8(%r2) /* get next pte */ + cmpl %cr0,%r1,%r3 /* see if found pte */ + bdnzf 2,2b /* loop if not eq */ + bne 3f /* not found */ + lwz %r1,4(%r2) /* load tlb entry lower word */ + andi. %r3,%r1,PTE_G /* check G-bit */ + bne 4f /* if guarded, take ISI */ + mtctr %r0 /* restore counter */ + mfspr %r0,SPR_IMISS /* get the miss address for the tlbli */ + mfsrr1 %r3 /* get the saved cr0 bits */ + mtcrf 0x80,%r3 /* and restore */ + ori %r1,%r1,PTE_REF /* set the reference bit */ + mtspr SPR_RPA,1 /* set the pte */ + srwi %r1,%r1,8 /* get byte 7 of pte */ + tlbli %r0 /* load the itlb */ + stb %r1,6(%r2) /* update page table */ + RFI + +3: /* not found in pteg */ + andi. %r1,%r3,PTE_HID /* have we already done second hash? */ + bne 5f + mfspr %r2,SPR_HASH2 /* get the second pointer */ + ori %r3,%r3,PTE_HID /* change the compare value */ + li %r1,8 + addi %r2,%r2,-8 /* predec pointer */ + b 1b +4: /* guarded */ + mfsrr1 %r3 + andi. %r2,%r3,0xffff /* clean upper srr1 */ + oris %r2,%r2,DSISR_PROTECT@h /* set srr<4> to flag prot violation */ + b 6f +5: /* not found anywhere */ + mfsrr1 %r3 + andi. %r2,%r3,0xffff /* clean upper srr1 */ + oris %r2,%r2,DSISR_NOTFOUND@h /* set srr1<1> to flag pte not found */ +6: + mtctr %r0 /* restore counter */ + mtsrr1 %r2 + mfmsr %r0 + xoris %r0,%r0,PSL_TGPR@h /* flip the msr bit */ + mtcrf 0x80,%r3 /* restore cr0 */ + mtmsr %r0 /* now with native gprs */ + isync + ba EXC_ISI +CNAME(tlbimsize) = .-CNAME(tlbimiss) + +/* + * For tlb data load misses + */ + .globl CNAME(tlbdlmiss),CNAME(tlbdlmsize) +CNAME(tlbdlmiss): + mfspr %r2,SPR_HASH1 /* get first pointer */ + li %r1,8 + mfctr %r0 /* save counter */ + mfspr %r3,SPR_DCMP /* get first compare value */ + addi %r2,%r2,-8 /* predec pointer */ +1: + mtctr %r1 /* load counter */ +2: + lwzu %r1,8(%r2) /* get next pte */ + cmpl %cr0,%r1,%r3 /* see if found pte */ + bdnzf 2,2b /* loop if not eq */ + bne 3f /* not found */ + lwz %r1,4(%r2) /* load tlb entry lower word */ + mtctr %r0 /* restore counter */ + mfspr %r0,SPR_DMISS /* get the miss address for the tlbld */ + mfsrr1 %r3 /* get the saved cr0 bits */ + mtcrf 0x80,%r3 /* and restore */ + ori %r1,%r1,PTE_REF /* set the reference bit */ + mtspr SPR_RPA,%r1 /* set the pte */ + srwi %r1,%r1,8 /* get byte 7 of pte */ + tlbld %r0 /* load the dtlb */ + stb %r1,6(%r2) /* update page table */ + RFI + +3: /* not found in pteg */ + andi. %r1,%r3,PTE_HID /* have we already done second hash? */ + bne 5f + mfspr %r2,SPR_HASH2 /* get the second pointer */ + ori %r3,%r3,PTE_HID /* change the compare value */ + li %r1,8 + addi %r2,%r2,-8 /* predec pointer */ + b 1b +5: /* not found anywhere */ + mfsrr1 %r3 + lis %r1,DSISR_NOTFOUND@h /* set dsisr<1> to flag pte not found */ + mtctr %r0 /* restore counter */ + andi. %r2,%r3,0xffff /* clean upper srr1 */ + mtsrr1 %r2 + mtdsisr %r1 /* load the dsisr */ + mfspr %r1,SPR_DMISS /* get the miss address */ + mtdar %r1 /* put in dar */ + mfmsr %r0 + xoris %r0,%r0,PSL_TGPR@h /* flip the msr bit */ + mtcrf 0x80,%r3 /* restore cr0 */ + mtmsr %r0 /* now with native gprs */ + isync + ba EXC_DSI +CNAME(tlbdlmsize) = .-CNAME(tlbdlmiss) + +/* + * For tlb data store misses + */ + .globl CNAME(tlbdsmiss),CNAME(tlbdsmsize) +CNAME(tlbdsmiss): + mfspr %r2,SPR_HASH1 /* get first pointer */ + li %r1,%r8 + mfctr %r0 /* save counter */ + mfspr %r3,SPR_DCMP /* get first compare value */ + addi %r2,%r2,-8 /* predec pointer */ +1: + mtctr %r1 /* load counter */ +2: + lwzu %r1,8(%r2) /* get next pte */ + cmpl %cr0,%r1,%r3 /* see if found pte */ + bdnzf 2,2b /* loop if not eq */ + bne 3f /* not found */ + lwz %r1,4(%r2) /* load tlb entry lower word */ + andi. %r3,%r1,PTE_CHG /* check the C-bit */ + beq 4f +5: + mtctr %r0 /* restore counter */ + mfspr %r0,SPR_DMISS /* get the miss address for the tlbld */ + mfsrr1 %r3 /* get the saved cr0 bits */ + mtcrf 0x80,%r3 /* and restore */ + mtspr SPR_RPA,%r1 /* set the pte */ + tlbld %r0 /* load the dtlb */ + RFI + +3: /* not found in pteg */ + andi. %r1,%r3,PTE_HID /* have we already done second hash? */ + bne 5f + mfspr %r2,SPR_HASH2 /* get the second pointer */ + ori %r3,%r3,PTE_HID /* change the compare value */ + li %r1,8 + addi %r2,%r2,-8 /* predec pointer */ + b 1b +4: /* found, but C-bit = 0 */ + rlwinm. %r3,%r1,30,0,1 /* test PP */ + bge- 7f + andi. %r3,%r1,1 + beq+ 8f +9: /* found, but protection violation (PP==00)*/ + mfsrr1 %r3 + lis %r1,(DSISR_PROTECT|DSISR_STORE)@h + /* indicate protection violation + on store */ + b 1f +7: /* found, PP=1x */ + mfspr %r3,SPR_DMISS /* get the miss address */ + mfsrin %r1,%r3 /* get the segment register */ + mfsrr1 %r3 + rlwinm %r3,%r3,18,31,31 /* get PR-bit */ + rlwnm. %r2,%r2,%r3,1,1 /* get the key */ + bne- 9b /* protection violation */ +8: /* found, set reference/change bits */ + lwz %r1,4(%r2) /* reload tlb entry */ + ori %r1,%r1,(PTE_REF|PTE_CHG) + sth %r1,6(%r2) + b 5b +5: /* not found anywhere */ + mfsrr1 %r3 + lis %r1,(DSISR_NOTFOUND|DSISR_STORE)@h + /* set dsisr<1> to flag pte not found */ + /* dsisr<6> to flag store */ +1: + mtctr %r0 /* restore counter */ + andi. %r2,%r3,0xffff /* clean upper srr1 */ + mtsrr1 %r2 + mtdsisr %r1 /* load the dsisr */ + mfspr %r1,SPR_DMISS /* get the miss address */ + mtdar %r1 /* put in dar */ + mfmsr %r0 + xoris %r0,%r0,PSL_TGPR@h /* flip the msr bit */ + mtcrf 0x80,%r3 /* restore cr0 */ + mtmsr %r0 /* now with native gprs */ + isync + ba EXC_DSI +CNAME(tlbdsmsize) = .-CNAME(tlbdsmiss) + +/* * Preamble code for DSI/ISI traps */ disitrap: --MP_UpkjTp9EV.oiE3bclM4Ix92-- From owner-freebsd-ppc@FreeBSD.ORG Wed Dec 20 15:29:39 2006 Return-Path: X-Original-To: ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8EDCA16A40F for ; Wed, 20 Dec 2006 15:29:39 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [62.233.211.107]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACBCB43CB0 for ; Wed, 20 Dec 2006 15:29:35 +0000 (GMT) (envelope-from raj@semihalf.com) Received: from localhost (localhost [127.0.0.1]) by mail.semihalf.com (Postfix) with ESMTP id DC3941436B; Wed, 20 Dec 2006 16:29:32 +0100 (CET) Received: from mail.semihalf.com ([127.0.0.1]) by localhost (mail.semihalf.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 32641-01; Wed, 20 Dec 2006 16:29:31 +0100 (CET) Message-ID: <458956DB.7040009@semihalf.com> Date: Wed, 20 Dec 2006 16:29:31 +0100 From: Rafal Jaworowski MIME-Version: 1.0 To: Peter Grehan References: <38D687BE-F674-4954-B6D3-8D25A8E9B9B5@mac.com> <4588846D.3040709@semihalf.com> <45888E72.6050406@freebsd.org> In-Reply-To: <45888E72.6050406@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at semihalf.com Cc: ppc@FreeBSD.org Subject: Re: HFS+ 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: Wed, 20 Dec 2006 15:29:39 -0000 Hi Peter, >> On a somewhat fs-related note: is anyone aware of efforts towards >> support for cross-endian UFS? It would be nice to create and populate >> an MFS image on LE host. I looked at this briefly, but it didn't seem >> like the quickest task and maybe someone is already working on it. > > This has come up a few times with various folk (Kip Macy ?) saying that > it didn't take long to pull across the NetBSD changes that do this. > I've had a look at relevant NetBSD (3.0) changes before but they seemed rather intrusive, but am not that intimate with our UFS code, so it might be not that big in FreeBSD case. > I believe the sysutils/makefs port can handle cross-endian builds. > Thanks for this pointer! It's very much what I was looking for. It's still not possible to mount such image on LE host, but it's much better than using a Sparc host only to create and populate a PowerPC MFS image:) > If you can get away with a read-only root, mkisofs can do the job and > FreeBSD can deal with an isofs root mount. > Yes, I know, iso rootfs has been working nicely for us, but as you say it's read only which stands a limitation beyond some basic service. Rafal From owner-freebsd-ppc@FreeBSD.ORG Wed Dec 20 18:46:42 2006 Return-Path: X-Original-To: ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 17A7516A403 for ; Wed, 20 Dec 2006 18:46:42 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 883FE43CAD for ; Wed, 20 Dec 2006 18:45:52 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [192.168.0.13] (dsl-63-249-90-35.cruzio.com [63.249.90.35]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CKN13171 (AUTH peterg@ptree32.com.au); Thu, 21 Dec 2006 04:45:38 +1000 (EST) Message-ID: <4589844A.5070206@freebsd.org> Date: Wed, 20 Dec 2006 10:43:22 -0800 From: Peter Grehan User-Agent: Thunderbird 1.5.0.9 (Macintosh/20061207) MIME-Version: 1.0 To: Rafal Jaworowski References: <38D687BE-F674-4954-B6D3-8D25A8E9B9B5@mac.com> <4588846D.3040709@semihalf.com> <45888E72.6050406@freebsd.org> <458956DB.7040009@semihalf.com> In-Reply-To: <458956DB.7040009@semihalf.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: ppc@FreeBSD.org Subject: Re: HFS+ X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: grehan@freebsd.org List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Dec 2006 18:46:42 -0000 > It's still not possible to mount such image on LE host, but it's much better > than using a Sparc host only to create and populate a PowerPC MFS image:) Another option is FAT - it's endian-independent, and I have some small patches to allow a root mount. Useful for compact flash cards. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Wed Dec 20 19:32:00 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1F74816A47C for ; Wed, 20 Dec 2006 19:32:00 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6504F43CA0 for ; Wed, 20 Dec 2006 19:31:57 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [192.168.0.13] (dsl-63-249-90-35.cruzio.com [63.249.90.35]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CKN17244 (AUTH peterg@ptree32.com.au); Thu, 21 Dec 2006 05:31:51 +1000 (EST) Message-ID: <45898F1F.402@freebsd.org> Date: Wed, 20 Dec 2006 11:29:35 -0800 From: Peter Grehan User-Agent: Thunderbird 1.5.0.9 (Macintosh/20061207) MIME-Version: 1.0 To: Andrew Turner References: <20061218104841.72ba51ea@hermies.int.fubar.geek.nz> <4585CCC1.7050005@freebsd.org> <20061218222327.308dca53@hermies.int.fubar.geek.nz> <4586CA29.10803@freebsd.org> <20061219113230.34182787@hermies.int.fubar.geek.nz> <4587316C.1070500@freebsd.org> <20061220192614.04c53dbf@hermies.int.fubar.geek.nz> In-Reply-To: <20061220192614.04c53dbf@hermies.int.fubar.geek.nz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org Subject: Re: FreeBSD on an Efika X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: grehan@freebsd.org List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Dec 2006 19:32:00 -0000 Hi Andrew, >> As you can see in , the existing vector definition >> don't match these, or are incorrect for the G2 core. > There is EXC_IMISS, EXC_DLMISS and EXC_DSMISS. Better get my brain in gear, I saw EXC_DTMISS and punted. > The attached patch adds the NetBSD handlers. There is a bug in the > patch where I can read data once but on the next read or write the > kernel crashes. I'll have a look at this today. Debugging could be difficult. When you get the crash, is there a panic backtrace ? The SRR* registers should be printed if that is the case. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Thu Dec 21 11:24:59 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 00E0F16B2E7; Thu, 21 Dec 2006 11:24:58 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from mta06.xtra.co.nz (mta06.xtra.co.nz [210.54.141.249]) by mx1.freebsd.org (Postfix) with ESMTP id 8F7BE13C4A6; Thu, 21 Dec 2006 11:24:39 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from serv.int.fubar.geek.nz ([222.155.180.57]) by fep01.xtra.co.nz with ESMTP id <20061221103624.JYPS19965.fep01.xtra.co.nz@serv.int.fubar.geek.nz>; Thu, 21 Dec 2006 23:36:24 +1300 Date: Thu, 21 Dec 2006 23:36:22 +1300 From: Andrew Turner To: grehan@freebsd.org Message-ID: <20061221233622.60ca5eb3@hermies.int.fubar.geek.nz> In-Reply-To: <45898F1F.402@freebsd.org> References: <20061218104841.72ba51ea@hermies.int.fubar.geek.nz> <4585CCC1.7050005@freebsd.org> <20061218222327.308dca53@hermies.int.fubar.geek.nz> <4586CA29.10803@freebsd.org> <20061219113230.34182787@hermies.int.fubar.geek.nz> <4587316C.1070500@freebsd.org> <20061220192614.04c53dbf@hermies.int.fubar.geek.nz> <45898F1F.402@freebsd.org> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.6; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org Subject: Re: FreeBSD on an Efika 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: Thu, 21 Dec 2006 11:24:59 -0000 On Wed, 20 Dec 2006 11:29:35 -0800 Peter Grehan wrote: > > The attached patch adds the NetBSD handlers. There is a bug in the > > patch where I can read data once but on the next read or write the > > kernel crashes. > > I'll have a look at this today. Debugging could be difficult. When > you get the crash, is there a panic backtrace ? The SRR* registers > should be printed if that is the case. I get no output on either the screen or the serial line. After about 30s the computer reboots. It prints around 80 chars of a mixture of ASCII and binary and enters SmartFirmware (Open Firmware implementation) Andrew From owner-freebsd-ppc@FreeBSD.ORG Thu Dec 21 13:48:48 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 211B716A416; Thu, 21 Dec 2006 13:48:48 +0000 (UTC) (envelope-from matt@genesi-usa.com) Received: from mail.genesi-usa.com (mithrandir.softwarenexus.net [66.98.186.96]) by mx1.freebsd.org (Postfix) with ESMTP id 055B113C45F; Thu, 21 Dec 2006 13:48:47 +0000 (UTC) (envelope-from matt@genesi-usa.com) Received: from 82-36-241-164.cable.ubr02.brom.blueyonder.co.uk ([82.36.241.164] helo=[192.168.1.136]) by mail.genesi-usa.com with esmtpa (Exim 4.63 (FreeBSD)) (envelope-from ) id 1GxNcG-000DrU-NL; Thu, 21 Dec 2006 13:05:45 +0000 Message-ID: <458A88F6.8070206@genesi-usa.com> Date: Thu, 21 Dec 2006 13:15:34 +0000 From: Matt Sealey User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Rink Springer References: <20061218104841.72ba51ea@hermies.int.fubar.geek.nz> <20061218064101.GA14935@rink.nu> In-Reply-To: <20061218064101.GA14935@rink.nu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org Subject: Re: FreeBSD on an Efika 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: Thu, 21 Dec 2006 13:48:48 -0000 Hi Rick, Andrew, There are a couple of guys working on FreeBSD for Efika (and Pegasos I guess :) and I assume we get up to the same point. I was going to throw my effort behind it too but I lack the resources right now (compiling on the Efika is a chore beyond all chores and my VMWare is trashed for cross-compiling). I'll gather all the FreeBSD guys together and see if you can all work together on these issues. We'll be very excited to get FreeBSD as this does form the basis of the two best open source projects on the planet; especially regarding the Efika, they would be m0n0wall and FreeNAS :) If you need any help or technical advise whatsoever, or think something is missing from PowerDeveloper on the subject, PLEASE say so :) -- Matt Sealey Genesi, Manager, Developer Relations Rink Springer wrote: > Hi Andrew, > > On Mon, Dec 18, 2006 at 10:48:41AM +1300, Andrew Turner wrote: >> I have been sent an Efika[1] board from Genesi. >> >> When booting FreeBSD on it I found it would stop before the >> printing copyright notice. The problem seems to be similar to >> http://lists.freebsd.org/pipermail/freebsd-ppc/2006-June/001692.html (I >> have had the same output before) >> >> After some investigation I found the kernel was stopping when it >> reached sys/kern/subr_msgbuf.c line 125 [2]. The msgbuf struct appears >> to point to an invalid address. The address of the struct comes from >> virtual_addr[3]. This indicates the virtual_addr points to an invalid >> area of memory on this device. >> >> By commenting out sys/kern/subr_prf.c line 924 [4] and using the ofw >> console I managed to get past the copyright notice. It now stopped >> later attempting to read from memory in the virtual_addr range. >> >> Has any one got any suggestions how I could fix this? >> >> Andrew >> >> [1] http://www.powerdeveloper.org/efika.php >> [2] http://fxr.watson.org/fxr/source/kern/subr_msgbuf.c#L125 >> [3] http://fxr.watson.org/fxr/source/powerpc/powerpc/mmu_oea.c#L899 >> [4] http://fxr.watson.org/fxr/source/kern/subr_prf.c#L924 > > Just FYI, it appears that Suleiman Souhlal (ssouhlal@FreeBSD.org) is > already working on a port, judging from > http://projects.powerdeveloper.org/projects.php?project=239 > > Have you tried talking to him ? > > Regards, > From owner-freebsd-ppc@FreeBSD.ORG Fri Dec 22 04:29:37 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CA01816A403 for ; Fri, 22 Dec 2006 04:29:37 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.freebsd.org (Postfix) with ESMTP id 5FEB813C442 for ; Fri, 22 Dec 2006 04:29:37 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CKP15840 (AUTH peterg@ptree32.com.au); Fri, 22 Dec 2006 14:16:38 +1000 (EST) Message-ID: <458B5C21.907@freebsd.org> Date: Thu, 21 Dec 2006 20:16:33 -0800 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Andrew Turner References: <20061218104841.72ba51ea@hermies.int.fubar.geek.nz> <4585CCC1.7050005@freebsd.org> <20061218222327.308dca53@hermies.int.fubar.geek.nz> <4586CA29.10803@freebsd.org> <20061219113230.34182787@hermies.int.fubar.geek.nz> <4587316C.1070500@freebsd.org> <20061220192614.04c53dbf@hermies.int.fubar.geek.nz> <45898F1F.402@freebsd.org> <20061221233622.60ca5eb3@hermies.int.fubar.geek.nz> In-Reply-To: <20061221233622.60ca5eb3@hermies.int.fubar.geek.nz> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org Subject: Re: FreeBSD on an Efika 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: Fri, 22 Dec 2006 04:29:37 -0000 Hi Andrew, >> I'll have a look at this today. Debugging could be difficult. When >>you get the crash, is there a panic backtrace ? The SRR* registers >>should be printed if that is the case. > > I get no output on either the screen or the serial line. After about > 30s the computer reboots. It prints around 80 chars of a mixture of > ASCII and binary and enters SmartFirmware (Open Firmware implementation) Alright, no clues there :( I went through the TLB data-load miss exception handler and it looks fine. Once upon a time there was a bdneq macro in locore.S :) Here's my suggested strategy: - stick with the msgbuf-removed printf so you can get console output. - write your favourite 0xdeadbeef-style pattern into the first word of the physical address of the message buffer. - read it back through the virtual address and verify that it is this pattern. - write a different pattern to the phys address and verify it again thorugh the virt address. If it hangs on the second read as before, then it's time to try something different: - create an exception handler that is identical to the existing trapcode asm, but with 3 additional instructions prepended to clear the GPR0-3 shadowing mfmsr %r0 xoris %r0,%r0,PSL_TGPR@h mtmsr %r0 /* fall through to trapcode */ - copy this to the TLB miss exception vectors. On a trap, you will now end up in powerpc/trap.c:trap(), and can put in code to catch the TLB miss vectors. At this point, it's worth dumping the DCMP, DMISS, HASH1 and HASH2 spr's using the C-callable mfspr() routine. You can then try implementing the TLB load routine in C, and verify that it does what you think. If this eventually works (and it will only work until the loading of the stack in the low-level trapcode itself has a TLB miss), it's then time to return to the ASM code. One other way to verify that the ASM code did the right thing is to examine the PTE in the pteg table and see if it's R bit was set: the ASM code for the data-miss routine does this. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Fri Dec 22 04:55:47 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 536B316A415 for ; Fri, 22 Dec 2006 04:55:47 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.freebsd.org (Postfix) with ESMTP id E0C4B13C41A for ; Fri, 22 Dec 2006 04:55:46 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CKP19081 (AUTH peterg@ptree32.com.au); Fri, 22 Dec 2006 14:55:32 +1000 (EST) Message-ID: <458B655C.9090404@freebsd.org> Date: Thu, 21 Dec 2006 20:55:56 -0800 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Matt Sealey References: <20061218104841.72ba51ea@hermies.int.fubar.geek.nz> <20061218064101.GA14935@rink.nu> <458A88F6.8070206@genesi-usa.com> In-Reply-To: <458A88F6.8070206@genesi-usa.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org Subject: Re: FreeBSD on an Efika 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: Fri, 22 Dec 2006 04:55:47 -0000 > If you need any help or technical advise whatsoever, or think something > is missing from PowerDeveloper on the subject, PLEASE say so :) If the problems with the Efika are really in the low-level trap handlers, then having someone step through the code with a COP/BDM probe would be useful. later, Peter. From owner-freebsd-ppc@FreeBSD.ORG Fri Dec 22 09:20:22 2006 Return-Path: X-Original-To: freebsd-ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D566116A536 for ; Fri, 22 Dec 2006 09:20:22 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fep06.xtra.co.nz (fep06.xtra.co.nz [210.54.141.240]) by mx1.freebsd.org (Postfix) with ESMTP id 44CF413C44E for ; Fri, 22 Dec 2006 09:20:22 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from serv.int.fubar.geek.nz ([222.155.180.57]) by fep03.xtra.co.nz with ESMTP id <20061222091654.DNAX16699.fep03.xtra.co.nz@serv.int.fubar.geek.nz>; Fri, 22 Dec 2006 22:16:54 +1300 Date: Fri, 22 Dec 2006 22:16:54 +1300 From: Andrew Turner To: Matt Sealey Message-ID: <20061222221654.2fd7388f@hermies.int.fubar.geek.nz> In-Reply-To: <458A88F6.8070206@genesi-usa.com> References: <20061218104841.72ba51ea@hermies.int.fubar.geek.nz> <20061218064101.GA14935@rink.nu> <458A88F6.8070206@genesi-usa.com> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.6; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@FreeBSD.org Subject: Re: FreeBSD on an Efika 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: Fri, 22 Dec 2006 09:20:22 -0000 On Thu, 21 Dec 2006 13:15:34 +0000 Matt Sealey wrote: > If you need any help or technical advise whatsoever, or think > something is missing from PowerDeveloper on the subject, PLEASE say > so :) The main problem at the moment is getting the TLB handlers to work. I have the handler functions from NetBSD but I can get them to fail by reading from virtual memory twice. Any assistance in figuring out why this is would be gratefully accepted. Andrew From owner-freebsd-ppc@FreeBSD.ORG Fri Dec 22 09:20:28 2006 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D699B16A403; Fri, 22 Dec 2006 09:20:28 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from fep06.xtra.co.nz (fep06.xtra.co.nz [210.54.141.240]) by mx1.freebsd.org (Postfix) with ESMTP id 3B79B13C41A; Fri, 22 Dec 2006 09:20:28 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from serv.int.fubar.geek.nz ([222.155.180.57]) by fep02.xtra.co.nz with ESMTP id <20061222090850.IUEP16919.fep02.xtra.co.nz@serv.int.fubar.geek.nz>; Fri, 22 Dec 2006 22:08:50 +1300 Date: Fri, 22 Dec 2006 22:08:49 +1300 From: Andrew Turner To: Peter Grehan Message-ID: <20061222220849.1b978f6c@hermies.int.fubar.geek.nz> In-Reply-To: <458B5C21.907@freebsd.org> References: <20061218104841.72ba51ea@hermies.int.fubar.geek.nz> <4585CCC1.7050005@freebsd.org> <20061218222327.308dca53@hermies.int.fubar.geek.nz> <4586CA29.10803@freebsd.org> <20061219113230.34182787@hermies.int.fubar.geek.nz> <4587316C.1070500@freebsd.org> <20061220192614.04c53dbf@hermies.int.fubar.geek.nz> <45898F1F.402@freebsd.org> <20061221233622.60ca5eb3@hermies.int.fubar.geek.nz> <458B5C21.907@freebsd.org> X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.10.6; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org Subject: Re: FreeBSD on an Efika 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: Fri, 22 Dec 2006 09:20:28 -0000 On Thu, 21 Dec 2006 20:16:33 -0800 Peter Grehan wrote: > > I get no output on either the screen or the serial line. After about > > 30s the computer reboots. It prints around 80 chars of a mixture of > > ASCII and binary and enters SmartFirmware (Open Firmware > > implementation) > > Alright, no clues there :( I suspect it is from Minicom as it also puts "icom2.1Minicom2.1" on the firmware prompt. > - write your favourite 0xdeadbeef-style pattern into the first word > of the physical address of the message buffer. > - read it back through the virtual address and verify that it is > this pattern. This works. > - write a different pattern to the phys address and verify it > again thorugh the virt address. I can write to the physical address. The kernel stops while reading from the virtual address. > > If it hangs on the second read as before, then it's time to try > something different: > > - create an exception handler that is identical to the existing > trapcode asm, but with 3 additional instructions prepended to clear > the GPR0-3 shadowing > > mfmsr %r0 > xoris %r0,%r0,PSL_TGPR@h > mtmsr %r0 > > /* fall through to trapcode */ > > - copy this to the TLB miss exception vectors. On a trap, you will > now end up in powerpc/trap.c:trap(), and can put in code to catch the > TLB miss vectors. At this point, it's worth dumping the DCMP, DMISS, > HASH1 and HASH2 spr's using the C-callable mfspr() routine. You can > then try implementing the TLB load routine in C, and verify that it > does what you think. I can't get this to work. I will have to investigate getting this information by some other means. Andrew From owner-freebsd-ppc@FreeBSD.ORG Fri Dec 22 16:39:52 2006 Return-Path: X-Original-To: ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D09F816A4A7; Fri, 22 Dec 2006 16:39:52 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from mail.semihalf.com (mail.semihalf.com [62.233.211.107]) by mx1.freebsd.org (Postfix) with ESMTP id 9045813C471; Fri, 22 Dec 2006 16:39:52 +0000 (UTC) (envelope-from raj@semihalf.com) Received: from localhost (localhost [127.0.0.1]) by mail.semihalf.com (Postfix) with ESMTP id 85B9F14377; Fri, 22 Dec 2006 17:18:30 +0100 (CET) Received: from mail.semihalf.com ([127.0.0.1]) by localhost (mail.semihalf.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 10056-05; Fri, 22 Dec 2006 17:18:29 +0100 (CET) Message-ID: <458C0555.5070707@semihalf.com> Date: Fri, 22 Dec 2006 17:18:29 +0100 From: Rafal Jaworowski MIME-Version: 1.0 To: grehan@freebsd.org References: <38D687BE-F674-4954-B6D3-8D25A8E9B9B5@mac.com> <4588846D.3040709@semihalf.com> <45888E72.6050406@freebsd.org> <458956DB.7040009@semihalf.com> <4589844A.5070206@freebsd.org> In-Reply-To: <4589844A.5070206@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at semihalf.com Cc: ppc@FreeBSD.org Subject: Re: HFS+ 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: Fri, 22 Dec 2006 16:39:52 -0000 Peter Grehan wrote: > Another option is FAT - it's endian-independent, and I have some small > patches to allow a root mount. Useful for compact flash cards. > Would your patches allow for pen drive root mount? I'd be glad to have a look if so. Rafal From owner-freebsd-ppc@FreeBSD.ORG Fri Dec 22 21:03:14 2006 Return-Path: X-Original-To: ppc@FreeBSD.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A168416A506 for ; Fri, 22 Dec 2006 21:03:14 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.freebsd.org (Postfix) with ESMTP id 2960E13C47A for ; Fri, 22 Dec 2006 21:03:13 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CKQ02610 (AUTH peterg@ptree32.com.au); Sat, 23 Dec 2006 04:47:56 +1000 (EST) Message-ID: <458C2874.8030404@freebsd.org> Date: Fri, 22 Dec 2006 10:48:20 -0800 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Rafal Jaworowski References: <38D687BE-F674-4954-B6D3-8D25A8E9B9B5@mac.com> <4588846D.3040709@semihalf.com> <45888E72.6050406@freebsd.org> <458956DB.7040009@semihalf.com> <4589844A.5070206@freebsd.org> <458C0555.5070707@semihalf.com> In-Reply-To: <458C0555.5070707@semihalf.com> Content-Type: multipart/mixed; boundary="------------000401080705050202000502" Cc: ppc@FreeBSD.org Subject: Re: HFS+ 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: Fri, 22 Dec 2006 21:03:14 -0000 This is a multi-part message in MIME format. --------------000401080705050202000502 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Rafal, > Would your patches allow for pen drive root mount? I'd be glad to have a > look if so. Patch attached. Yes, should be no problem from the pen drive so long as you get the partition right: /dev/da0s? later, Peter. --------------000401080705050202000502 Content-Type: text/plain; name="msdosfs_root.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="msdosfs_root.patch" Index: sys/fs/msdosfs/msdosfs_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/fs/msdosfs/msdosfs_vfsops.c,v retrieving revision 1.155 diff -d -u -r1.155 msdosfs_vfsops.c --- sys/fs/msdosfs/msdosfs_vfsops.c 9 Dec 2006 01:49:19 -0000 1.155 +++ sys/fs/msdosfs/msdosfs_vfsops.c 22 Dec 2006 18:08:49 -0000 @@ -160,8 +160,21 @@ pmp->pm_uid = v; if (1 == vfs_scanopt(mp->mnt_optnew, "mask", "%d", &v)) pmp->pm_mask = v & ALLPERMS; +#ifdef MSDOSFS_ROOT + /* + * For root mounts the option won't be set and the mask + * will be zero, so set it to all-permissions or no files + * can be accessed. + */ + else if (pmp->pm_mask == 0) + pmp->pm_mask = ALLPERMS; +#endif if (1 == vfs_scanopt(mp->mnt_optnew, "dirmask", "%d", &v)) pmp->pm_dirmask = v & ALLPERMS; +#ifdef MSDOSFS_ROOT + else if (pmp->pm_dirmask == 0) + pmp->pm_dirmask = ALLPERMS; +#endif vfs_flagopt(mp->mnt_optnew, "shortname", &pmp->pm_flags, MSDOSFSMNT_SHORTNAME); vfs_flagopt(mp->mnt_optnew, "shortnames", --------------000401080705050202000502--