From owner-freebsd-ppc@freebsd.org Thu May 16 04:25:05 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 9B7CC15ACA75 for ; Thu, 16 May 2019 04:25:05 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic314-22.consmr.mail.ne1.yahoo.com (sonic314-22.consmr.mail.ne1.yahoo.com [66.163.189.148]) (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 1848788C01 for ; Thu, 16 May 2019 04:25:03 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: _4gL268VM1kpCZ_GLdR_TBcD.eXlPCQdpaXs0m.CJzxMWPNO9Z6WzwoAh7oJaQw 8PtrTfas4FepeDb21hqkQq.GEL5X_91LTm5DZBpYpuLesup4vfYHzOCYiwzON2pH7vERA47BGjCk CIeQGKDriJ2MpdPT2GzaHPYnquFYljpZuPxukr04pha1yFYLUFIAmW29GOiYgXQEVsGwouUbo0lv PiDyU8QOcGYNjQIsq.hNs9N5f1qena2B_FN6.x1Nydyxhwosg_nq7Si.uvZQ8XrZkaYsxn_KJG_F qC.8yRf8HYHterNEltV9V8SBiUp99Ay46Uj8rR4_L_uqFJxzpQsrvvyb.vxXMzna_5FA0.8XF2Lv 02NgMPF1SUBhlVdO630Zl8FAMTMoY7.Q6Z2HOVz7ApgoViKRfC1f5GVJ6ilfY5ZJLyDHz4usOtlZ 8CgfUDWjZX6u.slatVBAX0Eez_Q1jr.xJKbtOEnPbd_eq316POg3ckMREo8Uhs2KrQjv9JxZMObg ZJ2id89gGIaQL0fhCBkvAP6L8z9eb1fxSGaUwgRZ8Ii64C12O5SO53dvufjE.aeSa244C0DfX0aX sxl10zqY59bnqNspfRUevEGoHYv5jVqGhRmyqyDcAcr1eK6fopsZZ7uPxPFPhTEzj3rQqNa4oJtS quJA9T.4VXXdRVIN83if80cvBXzDpqWSgLOONVPlWCZ5yyWFOnqvy1cWt5ZfT50OOR2uO60Sj4T6 1q5G06vp7ZAvkUebUdWU2m99SQ1M9v2JO22.PFGrVt_.zUNzjrXlU_PHnzdXqvJdoeeCNCnx52P9 wg_mrnTyK_uPd1Z3L1zVRpsAKuC3_CwHCl7MpOQnyZ3onQ.dCYoFp6.M85gz1SQ0Q_c5Z7UZ8i2H XzOMOk5G6leLkzn5EFNEJRn1sVY3OYyxMG1gP_RVV.vu2pgfAl3ENSEOnbCTGFRLC2G_a22.Kqsb zQlewG7km2Ig9vkPdbOM.OPsqV7dzEYe9zMXH2CmbbBxkAKtwTXZV.khYcdsf71LPeUrU_BjoYZ0 SFsCSsA.PeSHLawgxl5EDR0zUTczGmTqoJG_biiJPErKiNc0h_MxUC7.K7cLS1N450a463Qlr1B_ pP8BxBzlUfGkLn1TC5OxEm6RTCpmhcuDQBiai14YbSjPOXVNhxJlntWUBjNNnIuemGPNqBtvgJWs 5ouTZxod5toYBh6ZJM8ifDpKDCiazGMF1ysihsCyb.rU_A0EFFsv1YV1ZDDM_UNQ5ccWxH8r1pg- - Received: from sonic.gate.mail.ne1.yahoo.com by sonic314.consmr.mail.ne1.yahoo.com with HTTP; Thu, 16 May 2019 04:24:56 +0000 Received: from c-76-115-7-162.hsd1.or.comcast.net (EHLO [192.168.1.103]) ([76.115.7.162]) by smtp402.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 51280a7e4614eb0b96a7e9fc11d48daa; Thu, 16 May 2019 04:24:53 +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's and such: Should HIOR save/restore be involved in ofw_save_trap_vec and ofw_restore_trap_vec? Message-Id: Date: Wed, 15 May 2019 21:24:51 -0700 To: Justin Hibbits , FreeBSD PowerPC ML X-Mailer: Apple Mail (2.3445.104.8) X-Rspamd-Queue-Id: 1848788C01 X-Spamd-Bar: ++++ X-Spamd-Result: default: False [4.11 / 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:+]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; SUBJECT_ENDS_QUESTION(1.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; URIBL_BLOCKED(0.00)[dsl-only.net.multi.uribl.com]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com.dwl.dnswl.org : 127.0.5.0]; NEURAL_SPAM_SHORT(0.99)[0.987,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(1.63)[ip: (5.63), ipnet: 66.163.184.0/21(1.43), asn: 36646(1.15), country: US(-0.06)]; NEURAL_SPAM_MEDIUM(0.13)[0.130,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.88)[0.877,0]; RCVD_IN_DNSWL_NONE(0.00)[148.189.163.66.list.dnswl.org : 127.0.5.0]; RWL_MAILSPIKE_POSSIBLE(0.00)[148.189.163.66.rep.mailspike.net : 127.0.0.17] 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: Thu, 16 May 2019 04:25:05 -0000 With the recent discovery that for the IBM970 family in sys/powerpc/aim/mp_cpudep.c : /* Set HIOR to 0 */ __asm __volatile("mtspr 311,%0" :: "r"(0)); powerpc_sync(); needed to be in cpudep_ap_early_bootstrap in order to avoid use of openfirmware's exception/trap handlers in powerpc64 FreeBSD, there is the question: For IBM970 family in aim (or at least PowerMac), should ofw_save_trap_vec and ofw_restore_trap_vec be managing HIOR instead of copying around vector code that is from low memory? This goes along with the modern DMAP address range placement and what address ranges are invalid vs. valid when openfirmware_core is in use. Currently (unless usefdt mode is in use), ofwdump use (such as ofwdump -ap) produces: timeout stopping cpus [ thread pid 11 tid 100003 ] Stopped at k_trap+0x28: stdu r31, r1, 0xfd50 db> bt Tracing pid 11 tid 100003 td 0xc000000002251000 KDB: reentering KDB: stack backtrace: 0x000000000119b370: at .kdb_backtrace+0x5c 0x000000000119b4a0: at .kdb_reenter+0x44 0x000000000119b520: at .trap+0x74 0x000000000119b6c0: at .powerpc_interrupt+0x2cc 0x000000000119b760: kernel DSI read trap @ 0xffffffffffb7f400 by = .db_backtrace+0x40: srr1=3D0x9000000000001032 r1=3D0x119ba10 cr=3D0x24001044 xer=3D0 ctr=3D0x60cd24 = r2=3D0x1583af0 sr=3D0x40000000 frame=3D0x119b790 0x000000000119ba10: at 0x1e95014 0x000000000119baa0: at .db_trace_thread+0x38 0x000000000119bb30: at .db_stack_trace+0x124 0x000000000119bbc0: at .db_command+0x3a8 0x000000000119bcf0: at .db_command_loop+0x74 0x000000000119bd70: at .db_trap+0x138 0x000000000119bef0: at .kdb_trap+0x194 0x000000000119bfc0: at .db_trap_glue+0x94 0x000000000119c040: at dbtrap+0x144 KDB: reentering KDB: stack backtrace: . . . where it turns out that .db_backtrace+0x40 was for the code: /* * Locate the next frame by grabbing the backchain ptr * from frame[0] */ stackframe =3D *(db_addr_t *)stackframe; So, the 0xffffffffffb7f400 seems to possibly be an openfirmware stack address (backchain pointer) that FreeBSD seems to be disallowing. There could be implications of needing to switch how address ranges are handled as part of ofw_save_trap_vec and ofw_restore_trap_vec. (At least if ofwdump is to be supported.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)