From owner-freebsd-arch@FreeBSD.ORG Tue Jun 9 08:50:25 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E0871065670 for ; Tue, 9 Jun 2009 08:50:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 2EB3A8FC13 for ; Tue, 9 Jun 2009 08:50:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1MDwfP-0006QT-Nr; Tue, 09 Jun 2009 11:26:48 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n598Qix6059023 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 9 Jun 2009 11:26:45 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n598Qii0097285; Tue, 9 Jun 2009 11:26:44 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n598Qhc9097284; Tue, 9 Jun 2009 11:26:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 9 Jun 2009 11:26:43 +0300 From: Kostik Belousov To: Robert Watson Message-ID: <20090609082643.GB75569@deviant.kiev.zoral.com.ua> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="St7VIuEGZ6dlpu13" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.1 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1MDwfP-0006QT-Nr 2083f2f06a6d3db9afba058546a7813f X-Terabit: YES Cc: arch@freebsd.org Subject: Re: Dynamic pcpu, arm, mips, powerpc, sun, etc. help needed X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jun 2009 08:50:25 -0000 --St7VIuEGZ6dlpu13 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 04, 2009 at 10:46:42AM +0100, Robert Watson wrote: > On Wed, 3 Jun 2009, Jeff Roberson wrote: >=20 > >I have not tested anything other than amd64. If you have a !amd64=20 > >architecture, in particular any of the embedded architectures, I would= =20 > >really appreciate it. Some of the arm boards postincrement the end=20 > >address to allocate early memory and some pre-decriment. Hopefully I go= t=20 > >it right. >=20 > I appear to get an instant reboot early during the kernel startup on i386= =20 > with this patch applied: >=20 > OK lsmod > 0x400000: /boot/kernel/kernel (elf kernel, 0xcd8920) > modules: elink.1 io.1 hptrr.1 ufs.1 kernel_mac_support.4 krpc.1=20 > nfslockd.1 nfssvc.1 nfsserver.1 nfslock.1 nfs.1 wlan_sta.1 wlan.1=20 > wlan_wep.1 wlan_tkip.1 wlan_ccmp.1 wlan_amrr.1 if_gif.1 if_firewire.1=20 > if_faith.1 ether.1 sysvshm.1 sysvsem.1 sysvmsg.1 firmware.1 kernel.800096= =20 > cd9660.1 isa.1 pseudofs.1 procfs.1 msdosfs.1 usb_quirk.1 ucom.1 uvscom.1= =20 > uslcom.1 uplcom.1 uether.1 cdce.1 usb.1 random.1 ppbus.1 pci.1 pccard.1= =20 > null.1 mpt_user.1 mpt_raid.1 mpt.1 mpt_cam.1 mpt_core.1 miibus.1 mem.1=20 > isp.1 sbp.1 fwip.1 fwe.1 firewire.1 splash.1 exca.1 dcons.2 dcons_crom.1= =20 > cardbus.1 bt.1 ath.1 ast.1 afd.1 acd.1 ataraid.1 ad.1 ata_via.1 ata_sis.1= =20 > ata_sii.1 ata_serverworks.1 ata_promise.1 ata_nvidia.1 ata_netcell.1=20 > ata_national.1 ata_micron.1 ata_marvell.1 ata_jmicron.1 ata_ite.1=20 > ata_intel.1 ata_highpoint.1 ata_cyrix.1 ata_cypress.1 ata_cenatek.1=20 > ata_ati.1 ata_amd.1 ata_adaptec.1 ata_ali.1 ata_acard.1 ata_ahci.1 atapci= .1=20 > ata.1 ahc.1 ahd.1 ahd_pci.1 ahc_pci.1 ahc_isa.1 ahc_eisa.1 agp.1 acpi_pci= .1=20 > acpi.1 scsi_low.1 cam.1 > OK boot -s > The reason for the reboot is the fact that memory after physfree is not mapped, and init386() tries to carve a piece of it for dpcpu for BSP. Since IDT/exceptions are not initialized yet, generated #pf is translated into triple fault. Please, see the patch at http://people.freebsd.org/~kib/misc/dcpu.1.patch that allocates area for dpcpu0 using the same technique as the memory for proc0kstack. Another minor issue is that per-cpu sysmaps were allocated without clearing corresponding ptes, causing panic in pmap_zero_page etc due to changed KVA layout. AMD64 is fine thanks to the direct map. --St7VIuEGZ6dlpu13 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkouHMIACgkQC3+MBN1Mb4hr6wCfc9j6LACKxkrRopQjMsYQoNxO upcAnR1JuDIOO4PpTuiidG+8ZxsBtoUJ =CU4h -----END PGP SIGNATURE----- --St7VIuEGZ6dlpu13--