Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1p0l1b-0006Yg-Ax for mharc-grub-devel@gnu.org; Thu, 01 Dec 2022 09:58:55 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0l1Z-0006YV-5m for grub-devel@gnu.org; Thu, 01 Dec 2022 09:58:53 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5] helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0l1X-0003d4-1I for grub-devel@gnu.org; Thu, 01 Dec 2022 09:58:52 -0500 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B1EiblT019018; Thu, 1 Dec 2022 14:58:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=j6V3pPtYZ3NhRGu1WbXBt/yGdOTK45kuWEiJytpfl20=; b=aMYcaUiudzwu2EfVA5AkdFE5L4V71KGo4YrCr7tnDIB8hw0G254mo4bNJ4jL3SDIF0wI CwtDvxT/iBIDsTEuEX28uDm8xUNLyPx2YXw8wHAQ1ifEQXAikrSiWvAiR5/aGfIBCY+O FjUBcdH1d6dFLPP1n+GNpkZJ07EjG4MklswuiQ1pM8u4h0giMaEya127rUl5S8tfpaiS bX5pvGvapkRUkEcD6YvzcjQM9d5U8BcIbx0OQi8FdiT6JD6NQ6w6WO3ITOieVXdc5Ukn iA4nsY7h0S/AE+jOtRJ7vHFODr6JYakT1PD9zxuKC4AcPNXhjY6FGQ79z+UCDyTypj0e aA== Received: from ppma02dal.us.ibm.com (a.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.10]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3m6xa00cnv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Dec 2022 14:58:48 +0000 Received: from pps.filterd (ppma02dal.us.ibm.com [127.0.0.1]) by ppma02dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2B1Eo5oh021386; Thu, 1 Dec 2022 14:58:48 GMT Received: from smtprelay07.dal12v.mail.ibm.com ([9.208.130.99]) by ppma02dal.us.ibm.com with ESMTP id 3m3aea45r3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Dec 2022 14:58:47 +0000 Received: from smtpav03.wdc07v.mail.ibm.com (smtpav03.wdc07v.mail.ibm.com [10.39.53.230]) by smtprelay07.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2B1Ewkm213369682 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Dec 2022 14:58:46 GMT Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8D8125805A; Thu, 1 Dec 2022 14:58:46 +0000 (GMT) Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E2CDD58064; Thu, 1 Dec 2022 14:58:45 +0000 (GMT) Received: from [9.47.158.152] (unknown [9.47.158.152]) by smtpav03.wdc07v.mail.ibm.com (Postfix) with ESMTP; Thu, 1 Dec 2022 14:58:45 +0000 (GMT) Message-ID: <96b23d7a-3b36-1ec8-cf09-76c880f35c0c@linux.ibm.com> Date: Thu, 1 Dec 2022 09:58:45 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1 Subject: Re: [PATCH 0/6] Dynamic allocation of memory regions and IBM vTPM v2 Content-Language: en-US To: Daniel Kiper Cc: The development of GNU GRUB , Glenn Washburn , Diego Domingos , dja@axtens.net, sudhakar@linux.ibm.com References: <20220811174104.1148447-1-diegodo@linux.vnet.ibm.com> <20221124175624.kicbqsuesqqjxvjd@tomti.i.net-space.pl> <71a82a45-7caa-3149-89a7-7fe11cd01540@linux.ibm.com> <663beab6-860e-1afb-5529-91c217c37c94@linux.ibm.com> <2ae2e7d7-b86b-4221-3328-3ce0fc4c0893@linux.ibm.com> <20221130231947.44624ef5@crass-HP-ZBook-15-G2> <90d31915-4714-9707-6051-31c18c3fe6d7@linux.ibm.com> <20221201140232.rggn7tryblu3yohd@tomti.i.net-space.pl> <2238198b-04de-942f-f814-ff007cc2fde6@linux.ibm.com> <20221201144730.he6t5piqqnnv5v6j@tomti.i.net-space.pl> From: Stefan Berger In-Reply-To: <20221201144730.he6t5piqqnnv5v6j@tomti.i.net-space.pl> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: DwUAmuQyUM_pfifj1tZAGiaJ7F0G-Ojo X-Proofpoint-GUID: DwUAmuQyUM_pfifj1tZAGiaJ7F0G-Ojo X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-01_04,2022-12-01_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 phishscore=0 suspectscore=0 malwarescore=0 mlxscore=0 priorityscore=1501 spamscore=0 clxscore=1015 mlxlogscore=999 impostorscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212010105 Received-SPF: pass client-ip=148.163.158.5; envelope-from=stefanb@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-0.257, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2022 14:58:53 -0000 On 12/1/22 09:47, Daniel Kiper wrote: > On Thu, Dec 01, 2022 at 09:22:42AM -0500, Stefan Berger wrote: >> On 12/1/22 09:02, Daniel Kiper wrote: > > [...] > >>> ./configure --target=i386 --with-platform=ieee1275 ... >> >> I had to adjust the created symlist.h like this to make it compile at least: >> >> //#include <../include/grub/machine/pxe.h> >> //#include <../include/grub/machine/int.h> > > Hmmm... Strange... It builds for me without any issues. I use latest > Debian testing, gcc version 12.2.0 (Debian 12.2.0-9). It builds with > gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) too. What compiler > do you use? $ cat /etc/debian_version 11.5 $ gcc --version gcc (Debian 10.2.1-6) 10.2.1 20210110 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. > >> When trying to install this on my i386 VM I get this here: >> >> sudo grub-install /dev/vda --target=i386-ieee1275 >> Installing for i386-ieee1275 platform. >> grub-install: warning: cannot open directory `/usr/local/share/locale': No such file or directory. >> grub-install: warning: unknown device type vda1. >> grub-install: error: ofpathname: not found. >> >> Would this type of target produce a grub version that works on a VM >> that would otherwise work with i386-pc? > > Nope... Well, not good... > >> And is this still a supported target? > > What do you mean by "supported"? It is build tested and, AIUI, all "make check" > tests pass. Though I am not sure anybody uses this kinda weird target. Well, > I think I knew but I forgot... :-) The problem is I don't know much about the target other than ieee1275 being OpenFirmare or so. So we (I) could easily break someone's favorite target here ... The following function from this series would probably run on i386-ieee1275 as well since these nodes are probably so fundamental to OpenFirmware that there's no point in surrounding it with #ifdef __powerpc__ ? static grub_err_t grub_ieee1275_total_mem (grub_uint64_t *total) { grub_ieee1275_phandle_t root; grub_ieee1275_phandle_t memory; grub_uint32_t reg[4]; grub_ssize_t reg_size; grub_uint32_t address_cells = 1; grub_uint32_t size_cells = 1; grub_uint64_t size; /* If we fail to get to the end, report 0. */ *total = 0; /* Determine the format of each entry in `reg'. */ if (grub_ieee1275_finddevice ("/", &root)) return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "couldn't find / node"); if (grub_ieee1275_get_integer_property (root, "#address-cells", &address_cells, sizeof (address_cells), 0)) return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "couldn't examine #address-cells"); if (grub_ieee1275_get_integer_property (root, "#size-cells", &size_cells, sizeof (size_cells), 0)) return grub_error (GRUB_ERR_UNKNOWN_DEVICE, "couldn't examine #size-cells"); I added the if's here just to be 'safe'. In the end i386-ieee1275 shouldn't hold up progress on powerpc ieee1275... Stefan > > Daniel