From owner-freebsd-ppc@freebsd.org Tue May 7 09:15:47 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 618A915A4AEA for ; Tue, 7 May 2019 09:15:47 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic317-28.consmr.mail.bf2.yahoo.com (sonic317-28.consmr.mail.bf2.yahoo.com [74.6.129.83]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 766FD81223 for ; Tue, 7 May 2019 09:15:46 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: Wp6quBcVM1mC8nfZkdnbFM84ALAqzW4lchwD245pqUZ7ktkmvttp7eay1BNOqia r.77ZDYhYZXjGjhRdzikCqD6CJjHOblVXuXZ7w2zY5ZaiIWMjBq4hIqEQRrDXUxr6x9iL._fUNpk z6SMRccbuH0iNvII1Gd55V4NnyelAL7.aZySDxCUmOxcnBMbS0CQ89bTZH9SPwUXisLYv7uRTpLc OWGmQfOVTlI0r7WTbfp0XU54jaCCShXfSVIBf38EQypCBY7GM7Uv8PIJqTa3rcuFl7Mcvwr.Z2uj 8Ycixu4v487n7KLD6cZanT8dyNNU8HhaYXawyDMEX_A8J4QHglnY5jAMudao3t63OXvuq.tb3IVI YHrpxJaaIH8Oy6hs5laKFIstKEoti.nayALGzLNbAZAFOwl3UqYF3vpSLTM3k.VOLteNeVO7uEyq Tn_SfL4eCwmoUf3_IwHQpsmJ3socJz4eDOuGD_4.YMf9VqHYJ3yPuEqbw.ayDPGiDojzEYasZNjb quA3OLxQx1ZaNqvxoeCIPDFg1OJOy62wBKMpg94WMyllwp7HPQpg7v02ajRtLFQoefgTr6wSxKeY huzUX6_G2Pg_YikhckWxcwp155etTxgJW_V4WgESmntS4EL69NoFbhPX2PYbxgjJ5Dft604U5V2s Gb15VKeVvtFZi6kgGW1SuHL5Ah6hR8aq5pkuPKO_f5toXpeeZu0bpJkuRUoFYo..5w0furTWaSwS 5K9oX.mkX4eLD4OimtGt9xQb2rGh2mko.50qGZPQJiF5urA4XuIVd8gej5u_ffHqQf.ak7pv6.cC M9MN8cvrFmCQgrHka6E5rwudTvpjVJK2lNLz.u.UVDIiy4lTmQ1p1x3ETA6_IvKKkfxC9JLTUEko J2JmiKwDVHtfETYXlXfuHp3UiRLiCWR1C2MHuyTAgxK9uV2AYWhkeCN9Z_UpYyYfcuulTmO5SO8l K0cgHTKh5x.IJQwE3RP.iZR0tbEqe_N4IJgHuvzPKRHQDdenfp1Sxe8JyCPPjRi3.YPYJOu4FpiZ AloodO4Fs3hbiyhC8wIU0T6cn5BRb2m3wcfuZneYLiPOql5aI985j1_iZQ_cwH.sE3x8bPNls5Tn o.9gKd_bV0CNbGcjzSv_G.MQgZpkUK1OnQkrFLKWS69JiL2kz.djlC3R0Lkqkcl25rzruzfRQnB6 osCAytQ-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.bf2.yahoo.com with HTTP; Tue, 7 May 2019 09:15:40 +0000 Received: from c-76-115-7-162.hsd1.or.comcast.net (EHLO [192.168.1.103]) ([76.115.7.162]) by smtp426.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 94877271bb5bfaf05035626fef4d944e; Tue, 07 May 2019 09:05:30 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: PowerMac G5 live slb entries before moea64_mid_bootstrap for bsp vs. later: are duplications of ESID's avoided? Message-Id: <3DC0E9FF-9A75-4AD4-837E-DEDCECE7DDF0@yahoo.com> Date: Tue, 7 May 2019 02:05:27 -0700 To: Justin Hibbits , FreeBSD PowerPC ML X-Mailer: Apple Mail (2.3445.104.8) X-Rspamd-Queue-Id: 766FD81223 X-Spamd-Bar: ++++ X-Spamd-Result: default: False [4.61 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MV_CASE(0.50)[]; FREEMAIL_FROM(0.00)[yahoo.com]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:26101, ipnet:74.6.128.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_SPAM_SHORT(0.79)[0.786,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; NEURAL_SPAM_MEDIUM(0.76)[0.763,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.96)[0.958,0]; RCVD_IN_DNSWL_NONE(0.00)[83.129.6.74.list.dnswl.org : 127.0.5.0]; IP_SCORE(1.61)[ip: (5.33), ipnet: 74.6.128.0/21(1.55), asn: 26101(1.24), country: US(-0.06)] 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: Tue, 07 May 2019 09:15:47 -0000 moea64_mid_bootstrap has: for (i =3D 0; i < 64; i++) { pcpup->pc_aim.slb[i].slbv =3D 0; pcpup->pc_aim.slb[i].slbe =3D 0; } which does not try to use slbmfee and slbmfev to copy the live information from prior context, such as Apple's openfirmware. (There seems to be no use of slbfev at all, though there is use of slbmfee.) One means of dealing with what this note is about might be to fill in the live entries here. (But the hard coded 64 might not be correct for what range have potential live values to get.) Is there a presumption that openfirmware and the loader and such were all strictly: MSR.IR=3D0 and MSR.DR=3D0? Is that really true of Apple's openfirmware? (Even usefdt mode would have had openfirmware in use before disabling it. There likely would still be previously established live-slb entries around for MSR.IR=3D1 or MSR.DR=3D1.) It also appears the only comparisons for checking for already-existing esid's are from the pcpup->pc_aim.slb[?].slbe content, no check of live (via slbfee). That includes in handle_kernel_slb_spill itself, effectively not checking for a duplication of a live esid with V=3D1. (The documentation explicitly reports that duplications mean undefined behavior as I remember.) This would appear to mean that starting to actually assign the first slb entries needs to be after a slbia (in a MSR.IR=3D0 context until things are re-established) so that the addition(s) do not potentially duplicate other ESID's that are valid in the live context. But that is not done. So it appears to me that in moea64_late_bootstrap and its: mtmsr(mfmsr() | PSL_DR | PSL_IR); pmap_bootstrapped++; . . . virtual_avail =3D VM_MIN_KERNEL_ADDRESS; virtual_end =3D VM_MAX_SAFE_KERNEL_ADDRESS; . . . i =3D 0; for (va =3D virtual_avail; va < virtual_end && i