From owner-freebsd-ppc@freebsd.org Fri May 10 03:06:01 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 0E5F015956EC for ; Fri, 10 May 2019 03:06:01 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic302-1.consmr.mail.bf2.yahoo.com (sonic302-1.consmr.mail.bf2.yahoo.com [74.6.135.40]) (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 A92708CFC9 for ; Fri, 10 May 2019 03:05:59 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: RDoOTzMVM1kowF7Z0uMsAiuMR7AzXFSlxBKIuiOT2jYn52RynlB6F_IKa1pxxkt EX9Rsd37XA2ywow.ZZtk4PVLlx.VznZHWYPHLL5uLnLjgpuSb4RD.EM163c3jf7zyOsuOXn3CLVs Wca0GbWy9JuJo6pc6cOm5xjGZxH7lEAHF18D3iR7QMLsxKSlgc4rVHWEt7xMqsnF9.DL9LWCx0_m QVuVhVfJyMtwRBlj7uOepbpSOge0oFAmHYU3rLNLrCmw9ySZOfOCBYXCMnfReVTv7WmzjKc5vWEx iyayzbSEksXPrdjTlYCkfHE92miEtk3R7aOO3EI9aNNz3hOIieK51ziNnjFYs4BeSGkGxEZs_Z4L FJG7b5Oi5FJvTIqF3NjnBqw4R0hQQjG269o_l4DqH0jc4HWP2JIbNVI8F5vWJbr4Sr.G6z.9WaNj VXtbiNY44XwiJU5owBktdXLJqOvKIn_GWlQXiTNAWtm6xnvawmH2uGBTgaxWytXfxSx3RaVFMeTZ wLNv4lHsPP_DK.D9TGfQHthhfpYNtdWPJ8hZPwH9LC.Zg9oTsy3Qtx2pPs9oj6eUlY1szaCminml kSh0kGPTvJnhfr.4Vt1pCZrOEq_YoUJf07Sk5_pQ5Wkjxy_UytCDPpIQ_DC0dqsSpnMPqBfKD_rA lKuUkSO3JvT6SBB2mW4ahU38BGy.8Lo395v1rWJsK7JvMhdicb1Sozmd340JhC8OQ4OPGeUX92kz pygSxCu5Y4bCgJx_p9XYUCt1tUOe6kLZjs04Vxj9Vg8sPtcHzuAC3ZcSJpM5UvviDxkkTWXNBopv xNf5aZYKFknMKfIbDeFaPBl56P08YPy058mmXBT3k9Uv19rH4eLWyhSScpE13vtH.XuVTxo4dMJ. K.f6GIwUZqSlnx_LakK_GfXAkPxVZ_JMPZuVJWUjURnUlULpYtsdkYMpyH0ITwhJ7LsDZSQl8CSd edElFxpF9jK0XQH1HM9FA3qJ59e6WvEk.vNf.1h4Zj91ydidfUIlV4R__9g_eHFkjRbZqpriDSsl hVPDk3nZuP3LfUiJBek8nEo2bT0UrIWmQwOnBiHjWbYoVY_FXuEOumFQo2fHKAd7k9pRV93yC51u l9UOgTCqFgrLCCdLHgjMOoXpqXp2Aa7jSJBNpiksVDCIj4IckRpSpR_3XcBgQ7y0EGJFsjPcDZLv ZU7Nt Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.bf2.yahoo.com with HTTP; Fri, 10 May 2019 03:05:53 +0000 Received: from c-76-115-7-162.hsd1.or.comcast.net (EHLO [192.168.1.103]) ([76.115.7.162]) by smtp403.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 3fd30e9b401ce6531061e9173aa9cde2; Fri, 10 May 2019 03:05:50 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: PowerMac G5's vs. PSL_ME manipulation in the msr: mtmsr ignores it, only rfid can set it? (How to avoid checkstop on the ap's?) Message-Id: <2850A34A-854D-41DB-976D-3D859789D3DB@yahoo.com> Date: Thu, 9 May 2019 20:05:48 -0700 To: Justin Hibbits , FreeBSD PowerPC ML X-Mailer: Apple Mail (2.3445.104.8) X-Rspamd-Queue-Id: A92708CFC9 X-Spamd-Bar: + X-Spamd-Result: default: False [1.65 / 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)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; 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)[]; SUBJECT_HAS_QUESTION(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; NEURAL_SPAM_SHORT(0.92)[0.916,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(1.03)[ip: (2.45), ipnet: 74.6.128.0/21(1.53), asn: 26101(1.22), country: US(-0.06)]; NEURAL_SPAM_MEDIUM(0.13)[0.128,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.08)[0.083,0]; RCVD_IN_DNSWL_NONE(0.00)[40.135.6.74.list.dnswl.org : 127.0.5.0] 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: Fri, 10 May 2019 03:06:01 -0000 Quoting: PPC_Vers201_Book3_public.pdf QUOTE The only instruction that can alter MSR.ME is the rfid instruction. END QUOTE (Doing so involves using mtsrr1 before the rfid instruction.) Various places in FreeBSD are trying to control the PDL_ME bit via mtmsr. In fact, most FreeBSD PSL_ME use for the context is associated with mtmsr. So far I only see: enter_idle_powerx sets PSL_ME via mtsrr1 and rfid. kbootentry clears srr1 completely via mtsrr1 before doing ba EXC_RST. Other mtsrr1 usage are just save/restore or do updates not involving PSL_ME changes. How I got into looking at PSL_ME use: How it relates to the hang-up problem investigation . . . Note: CPU 1 never makes it to handle_kernel_slb_spill when the it tries the td_pcb-> access in cpudep_ap_bootstrap. CPU 1 appears to have ended up checkstop'd, not getting other traps either. There are the following dependencies on td_pcb-> access in powerpc/powerpc/trap.c : handle_onfault: td->td_pcb->pcb_onfault trap_pfault: Can use handle_onfault trap for kernel EXC_MCHK: Uses handle_onfault trap for kernel EXC_DSI: Uses trap_pfault trap for kernel EXC_DSE: td->td_pcb->pcb_cpu.aim.usr_vsid fix_unaligned for ESR_SPE: td->td_pcb->pcb_vec.vr[reg] fix_unaligned for EXC_ALI_LFD: td->td_pcb->pcb_fpu.fpr[reg].fp fix_unaligned for EXC_ALI_STFD: td->td_pcb->pcb_fpu.fpr[reg].fp As near as I can tell, for the PowerMac G5's, PDL_ME is as openfirmware or the loader set it for each CPU. But CPU 1 does happen to have the PSL_ME bit enabled. With td_pcb-> access in cpudep_ap_bootstrap failing to get to handle_kernel_slb_spill at all when the slb does not cover the segment, the rest of the above are not likely to work under such conditions ether. slbtrap's and handle_kernel_slb_spill would be involved. My evidence gathering, some notes: I have handle_kernel_slb_spill recording CPU 1 activity but it never reports any activity except before the pcpup->pc_curthread-> access attempt. I also have recording in trap's kernel trap path for CPU 1 and it also reports nothing. (The reporting is to memory, with the bsp looking at what was recorded and reporting based on such via printf's when there is something to report.) === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)