From owner-freebsd-ppc@freebsd.org Sun Apr 21 02:28:11 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 17B8D157DA66 for ; Sun, 21 Apr 2019 02:28:11 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic305-21.consmr.mail.gq1.yahoo.com (sonic305-21.consmr.mail.gq1.yahoo.com [98.137.64.84]) (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 9717E860B8 for ; Sun, 21 Apr 2019 02:28:08 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: SvO30FkVM1ncoTC4ls4wzUeUQIVkKl7VPElpSbo_opOnulJ.2Q.vrQ1xor_TEZq fle8HPv1sT_ItsKwny2zwxvi45E1DR_Wju78HsjcDJTNFvlEFaWr7BpAT_J2iqtxnQ0wOOWYVgvi Bu2BFB.1tQp1rTlM2LtZw4SnGBEhVYEdC9Oi64xNysSCbz1gQnreeo06dck0cz7eiCBtgJMBU7y7 ojeX_gECbfMuChp_yAtxuZWqCoJNSFgL1UfLsMyN41Wb25ApvYw2iD1.CCtSnxrvawrO9.ARKQmG YZplw9L_vbu6tTHjmG0VxbdMHDsmd892rned_i50alh5CkM9vxZam8HWZYuBTj4b3gq3bMW8eUtx 001p9dIpT6jmTn9KhqrLYFanG65bnhZ9aSNBBuHpHwFN52tJztekn.DnPg_SrAU1hDkN6dVqCpKT 6bPzrMdOgAxLhvSu49Gj7aM3n3YrE57peam3cNqsTM_4m1xZkO0UDaDbrEadbUuJhqrm91gRftBJ Yi.ubYuPQZbIDL6xNQ57m5r4AlP8edNRyHdu0DXRcheEwQmJw8as_Enzi2.Vidyg22bKQiZXUu_0 X4fnMBaXfRX52xSZGAnOOg80Q2pm0.FqxcNXpQW_0uWa2Je8KEEf6WDb._JqEwPDzEBF0DByfplu B74ZhJBrUInDZtkcAZ8LbASOw2j5z9WqtB23441umLo_HMi5lKRyowxFZbfqQpISie2RaeXfh9vv JW3vWR5gTYRnXi45eWIuADLwGsmJTotQmbtnGSIxcMqC9dOftjZIhNc.6nXA1uaA1TU8LnQRqqOQ 2.iVn8tSNwgBAXUrjp6iNMKSd8Ic_CCT4P_WsARHB.Ex3x4pjRRQ6heAkmglV5NHFUNw4r6udEcc rPDWfBdMiVhlgV2jBi39g4YjkgvEJdyQMxkZobXVdfJ_CGY5TURvnu8Skv9K4PL27E2FpWWIRmQl uw8SFdcZU1XbIz3Zxq9XmhkfOmf62CY4JtOfsa7yntTUpf.qDN8Gw0JmXWurKtAV.0.9yqas.4lK tqLwOvMsCWgoB5u2dxH0qa0lpZwkAcqUZZOE13oqAZBDLlCUCMUfcWLe48xmJqdeRP8yZVqVVszL yU9G1RZSyf563Vj9dBGtwCHxVRG0zbFfk4N8ZEdAAfXoJXfv3gYD4ypPs Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.gq1.yahoo.com with HTTP; Sun, 21 Apr 2019 02:28:01 +0000 Received: from c-76-115-7-162.hsd1.or.comcast.net (EHLO [192.168.1.103]) ([76.115.7.162]) by smtp427.mail.gq1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID af6bc23e06562ef76d02bfc93ba07bb2; Sun, 21 Apr 2019 02:27:57 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: Re: Patches to allow usefdt mode that works on a 2 socket PowerMac3, 6 example too --and makes more work on 2-socket/1-core-each PowerMac11, 2 From: Mark Millard In-Reply-To: <433A1839-8232-4785-91AD-1EF5EAF31294@yahoo.com> Date: Sat, 20 Apr 2019 19:27:56 -0700 Cc: freebsd-ppc@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <11433EF4-5A8B-48FF-BA41-F11AF4873647@yahoo.com> References: <988F644F-D5E7-4FB4-AAB3-A72E9DA88CE6@yahoo.com> <465DBF40-EEF5-4D4A-95F6-DF17EB5B130B@yahoo.com> <5aecd21e-e53c-f14c-0bdc-8732fa88fed6@blastwave.org> <55E83F50-197D-43C7-B4D6-E69A5AEC2630@yahoo.com> <1B999D64-036F-4553-B024-93D0150FD60D@yahoo.com> <433A1839-8232-4785-91AD-1EF5EAF31294@yahoo.com> To: Dennis Clarke X-Mailer: Apple Mail (2.3445.104.8) X-Rspamd-Queue-Id: 9717E860B8 X-Spamd-Bar: +++ X-Spamd-Result: default: False [3.78 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(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]; 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]; 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:36647, ipnet:98.137.64.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.94)[0.939,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(1.93)[ip: (8.06), ipnet: 98.137.64.0/21(0.92), asn: 36647(0.73), country: US(-0.06)]; NEURAL_SPAM_MEDIUM(0.64)[0.636,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.79)[0.786,0]; RCVD_IN_DNSWL_NONE(0.00)[84.64.137.98.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: Sun, 21 Apr 2019 02:28:11 -0000 To my knowledge, the investigatory patches to head -r345758 that are now in: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233863 are sufficient for both non-usefdt mode and usefdt mode for booting and using the old PowerMac's that I can test, both G5 and G4. I'm hoping that other Apple ppc's that used to work before various changes again work for non-usefdt mode. Ones with even longer term problems probably still have such. One requirement for usefdt mode is: kern.vty=vt Using sc hangs after the "Kernel entry at" message before even clearing the screen. (This is so early I may never figure out a way to isolate the problem for sc: no serial console context.) So, unlike before, I now expect that testing on whatever variety of Apple G5 types that you have access to would be very useful to you and make evidence about the patches beyond what I can do with what I have access to. (It also cross checks if I've forgotten to post something.) This applies to both non-usefdt mode and usefdt mode. Similarly for any variety of Apple G4's, if you have access to some. The only powerpc64 and 32-bit-powerpc systems that I have access to are old PowerMacs. So I can not check the status of any other types of ppc systems with my patches involved. One thing I'm not sure of for usefdt mode is what the consequences of small memory machines might be. /usr/src/stand/powerpc/ofw/ofwfdt.c has: int fdt_platform_load_dtb(void) { void *buffer; size_t buflen = 409600; buffer = malloc(buflen); fdt_create_empty_tree(buffer, buflen); add_node_to_fdt(buffer, OF_peer(0), fdt_path_offset(buffer, "/")); ofwfdt_fixups(buffer); fdt_pack(buffer); fdt_load_dtb_addr(buffer); free(buffer); return (0); } On a 1 GiByte machine, with some other overhead use of RAM, that 409600 could be around half the available memory --or more. Even though fdt_load_dtb_addr will make a smaller copy, and then the bigger one will be freed, the copy's address range is constrained by the existing big allocation at the time. On a sufficiently small memory machine the 409600 would just not be possible. (That might even be true for a 1 GiByte machine.) Note the lack of any check on the malloc(409600)'s success vs. failure status. (By contrast, fdt_load_dtb_addr does check for a NULL return, even though fdt_platform_load_dtb ignores the fdt_load_dtb_addr return value.) So if any of your testing contexts are "small" memory ones, it may be for those that only non-usefdt mode is the only effective option. Some patches only matter for usefdt mode, because they are about the conversion to fdt in the loader or use of the phandle nodes that the conversion adds to record openfirmware's original node-ids (xrefs vs. node refs). (Presumes no typing of commands like "fdt header" or such in the loader before the non-usefdt boot. Otherwise the fdt command itself does do a conversion at the time and so the conversion code would be involved.) So, for just testing non-usefdt mode, fewer of the patches are needed. No longer should any of my usefdt mode pure-hacks be required. (I now use my hacks to see if they report ever having anything special to do vs. not. This is more complete of a check than just watching overall normal-use behavior for usefdt mode.) I've not posted the current versions of my pure-hacks anywhere and I'd avoid any old postings about old versions. I hope to back out the hacks in my context as well. (Note: I have access to one old PowerMac G4 that no version of FreeBSD that I've ever tried over the years could complete the boot. OS X had no problem with it, nor did the Linux that I tried. Until/unless I isolate the low level spot were FreeBSD fails on it, I ignore this old PowerMac in my wording for my testing.) === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)