From owner-freebsd-ppc@freebsd.org Sat Feb 16 00:04:27 2019 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ABF1614EEDBB for ; Sat, 16 Feb 2019 00:04:27 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-it1-x134.google.com (mail-it1-x134.google.com [IPv6:2607:f8b0:4864:20::134]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 641FF8D2D3 for ; Sat, 16 Feb 2019 00:04:26 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-it1-x134.google.com with SMTP id l131so27587444ita.2 for ; Fri, 15 Feb 2019 16:04:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=rwwoRq7bYpE2Rl620iDHrk2n2DR8nHnwuvlxQjlIqVw=; b=vLWaTJ1vaahcSPfQ4G5jcHqzMFXOroWDphV6rWXMEFTGqKQguvunC/hhE6VdyLk1lh NnnkbTZfe1PIE2e06IZ+S43qJVpVEL7ddKOPIBJT2xp+btY7ilMVposjdCvS1NyV+Fee 7sxbBL4aIsRGdXdQmUygTKS3JvXqRq4bIY7oRQd5Z5L0gRNG1dpdkGsYHVaop0kFe7ce 1ob4pJBbCWehp9QrTImEqfBbjkzmzYqQxLQgaMcFPYkjyX322oYSSDYOHBGku2mMPtdE Gobij45hm9Z6JklJbXzvRB8RdoIwJsDQz4ASuHqfytdb1WlDC4dUChJSuc4mDT2PxB4v 7J3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=rwwoRq7bYpE2Rl620iDHrk2n2DR8nHnwuvlxQjlIqVw=; b=lDqvyvetsuCKrgbeEQGIaHzqQYkuce5xyiJWJKT7sYaTVmy7E/CfaUKR7MBz0V9ZRA P/kvMWuimyJlppZoFmRP+ljsz13IBxsfpwpEi8sGxRnHGBLBJT+kAhHKG83F8jLs4WOu iTRJ5DN/9X8/M9FHzmbIWB1B0NPAUEq4C9h5q32/Z+63fEuW2qe6O4Iux4tOGiz8ukbI oQDD9VzF2IsUz/hEAnPLuGW2N53w9E7QCCiDbhAjUcx+WwUt8QieVWGeH4IFknR6czI/ qOot49M1wQl1oez+eyXe2RaTOneTYcbNwYoev6L5V0ztznFYccwbhFhWKh8lvBOiZt7L UoqA== X-Gm-Message-State: AHQUAubYoiMIZToSXlb4Vkx3sGw64Wb1v/LgF+ez/9EdoM9Xy2PzkROj lcDUvLG17yX8Tbjvi/o3Ndm0t5PD X-Google-Smtp-Source: AHgI3IZxqPn5mSpUPzzNiqwKyl7wTO/yaQJDejv3xJB6b5AkTY0PTW3HWzrtoLGvRKpzTKEDVDrtgg== X-Received: by 2002:a24:70e:: with SMTP id f14mr6343505itf.67.1550275465486; Fri, 15 Feb 2019 16:04:25 -0800 (PST) Received: from ralga.knownspace (173-25-245-129.client.mchsi.com. [173.25.245.129]) by smtp.gmail.com with ESMTPSA id o18sm2767549ioa.40.2019.02.15.16.04.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Feb 2019 16:04:25 -0800 (PST) Date: Fri, 15 Feb 2019 18:04:21 -0600 From: Justin Hibbits To: Mark Millard Cc: Mark Millard via freebsd-ppc Subject: Re: Some evidence about the PowerMac G5 multiprocessor boot hang ups with the modern VM_MAX_KERNEL_ADDRESS value Message-ID: <20190215180421.61afcae3@ralga.knownspace> In-Reply-To: <744610C7-90EB-42A0-8B08-AFA0F12E5994@yahoo.com> References: <11680D15-D43D-4115-AF4F-5F6E4E0022C9@yahoo.com> <9FBCA729-CE80-44CD-8873-431853E55231@yahoo.com> <1F3411CF-3D28-43C0-BEF1-4672B5CC1543@yahoo.com> <20190215151710.35545a26@ralga.knownspace> <6445CE54-26AA-4E21-B17E-921D72D4081A@yahoo.com> <20190215160942.1b282f71@ralga.knownspace> <744610C7-90EB-42A0-8B08-AFA0F12E5994@yahoo.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; powerpc64-portbld-freebsd13.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 641FF8D2D3 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=vLWaTJ1v; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of chmeeedalf@gmail.com designates 2607:f8b0:4864:20::134 as permitted sender) smtp.mailfrom=chmeeedalf@gmail.com X-Spamd-Result: default: False [-6.69 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[alt3.gmail-smtp-in.l.google.com,alt4.gmail-smtp-in.l.google.com,gmail-smtp-in.l.google.com,alt2.gmail-smtp-in.l.google.com,alt1.gmail-smtp-in.l.google.com]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_SHORT(-0.96)[-0.958,0]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FREEMAIL_TO(0.00)[yahoo.com]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(-2.73)[ip: (-8.99), ipnet: 2607:f8b0::/32(-2.59), asn: 15169(-1.99), country: US(-0.07)]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ppc@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[4.3.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Feb 2019 00:04:27 -0000 On Fri, 15 Feb 2019 15:26:09 -0800 Mark Millard wrote: > On 2019-Feb-15, at 14:09, Justin Hibbits > wrote: > > > On Fri, 15 Feb 2019 14:01:18 -0800 > > Mark Millard wrote: > > > >> . . . > >> > >> Just to be sure, was the 0xc prefix a typo > >> (vs. 0xe as a prefix)?: > >> > >> 0xc000000000000010 > >> vs. > >> 0xe000000000000010 > > > > No, 0xc is correct. 0xc... is the address of the DMAP, and it so > > happens that the upper bits are ignored in real mode, simply by the > > fact that they're not placed onto the address bus. We take > > advantage of that elsewhere as well. So writing to 0xc000....10 > > actually writes to 0x0000...10, both in real mode and translated > > mode. Writing to this at various points when the AP is starting > > up, we can see just how far into the boot it gets. > > > >> . . . > > I got an odd result from a successful boot. But first > notes what I did to the code: > > I used 0xc000000000000010 via: > > + *(unsigned long*)0xc000000000000010 = 0x10; // HACK!!! > + powerpc_sync(); // HACK!!! > > just before returning from cpudep_ap_early_bootstrap > > + *(unsigned long*)0xc000000000000010 = 0x20; // HACK!!! > + powerpc_sync(); // HACK!!! > > just before return from pmap_cpu_bootstrap > > + *(unsigned long*)0xc000000000000010 = 0x30; // HACK!!! > + powerpc_sync(); // HACK!!! > > just before return from cpudep_ap_bootstrap > > + *(unsigned long*)0xc000000000000010 = 0x40; // HACK!!! > + powerpc_sync(); // HACK!!! > > just before returning from cpudep_ap_setup > > + *(unsigned long*)0xc000000000000010 = 0x51; // HACK!!! > + powerpc_sync(); // HACK!!! > > just before the ap_letgo loop in machdep_ap_boostrap [so just > after the PCPU_SET(away,1)] > > + *(unsigned long*)0xc000000000000010 = 0x50; // HACK!!! > + powerpc_sync(); // HACK!!! > > just before sched_throw(NULL) in machdep_ap_bootstrap > > > For CPU 3 just after the two (void)*rstvec related > code sequences powermac_smp_start_cpu reported: > > *(unsigned long*)0xc000000000000010=0xffa34878A > > For CPU 2 just after the two (void)*rstvec related > code sequences powermac_smp_start_cpu reported: > > *(unsigned long*)0xc000000000000010=0x51 > > For CPU 1 just after the two (void)*rstvec related > code sequences powermac_smp_start_cpu reported: > > *(unsigned long*)0xc000000000000010=0x51 > > It looks to me like something is using the memory > that 0xc000000000000010 maps to. > > None of them reported the 0x50 from just before > the sched_throw(NULL) . > > > === > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) > Interesting. That value looks like it could be an OpenFirmware phandle. PowerISA does state that the first 256 bytes of memory is free for the OS (or firmware) to use as it sees fit, and we already know address 0x80 is special for OF. Maybe pick another address if you wish to continue this experiment. Can you write at the beginning of machdep_ap_bootstrap() some value, just before the PCPU_SET()? And then right after the sync? - Justin