Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1pMZax-0002fA-65 for mharc-grub-devel@gnu.org; Mon, 30 Jan 2023 14:13:35 -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 1pMZal-0002dS-T8 for grub-devel@gnu.org; Mon, 30 Jan 2023 14:13:24 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pMZaj-00044P-RK for grub-devel@gnu.org; Mon, 30 Jan 2023 14:13:23 -0500 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30UHo9QG026025; Mon, 30 Jan 2023 19:13:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : content-transfer-encoding : mime-version; s=pp1; bh=BGJ6/BXYoAL2Aj4d6ZMA4hm+cn8vr6oLaRu380wcQ50=; b=UzrJJ+UVyXSWgiW9fikfg2JctNaADqyyEW98ScSa3wOeEwCLzrjW1766S9vuvio5i2IX KOW2eJje4Ky3NJGlpBuSEzcJDzWQGgwePx9JWnJBPY1weAt6M9AFIo5Py6wrm6IvJ2Zg 4rQtX8hK1ztOMG4if+92Gbn9g7WgBYTwDX8cGyb+RAZmx0rzaUs+TY3uU3Ke2Xj0w+uF 9j0BCI/ez1Q95/iLG790qNtm6zXYUxkrKk7BWWY788RT6/O4yqQEqJ/qh1wHTuX0Hsml UhP93qu873zhfACkjSO16DM2ggNqJxYAnzMJuQ97CT5dZWbslbcZolyt0oSSbFTFhE4U XA== Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3nejn2j0dw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 Jan 2023 19:13:17 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 30UHkkgH025436; Mon, 30 Jan 2023 19:13:16 GMT Received: from smtprelay06.dal12v.mail.ibm.com ([9.208.130.100]) by ppma03dal.us.ibm.com (PPS) with ESMTPS id 3ncvtrfa7y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 Jan 2023 19:13:16 +0000 Received: from smtpav03.wdc07v.mail.ibm.com (smtpav03.wdc07v.mail.ibm.com [10.39.53.230]) by smtprelay06.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30UJDE3p2163370 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Jan 2023 19:13:15 GMT Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CDF215805C; Mon, 30 Jan 2023 19:13:14 +0000 (GMT) Received: from smtpav03.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 193BC58058; Mon, 30 Jan 2023 19:13:14 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by smtpav03.wdc07v.mail.ibm.com (Postfix) with ESMTP; Mon, 30 Jan 2023 19:13:13 +0000 (GMT) From: Stefan Berger To: grub-devel@gnu.org, dkiper@net-space.pl Cc: development@efficientek.com, diegodo@linux.vnet.ibm.com, dja@axtens.net, sudhakar@linux.ibm.com, nasastry@in.ibm.com, Stefan Berger Subject: [PATCH v3 0/6] Dynamic allocation of memory regions and IBM vTPM v2 Date: Mon, 30 Jan 2023 14:12:58 -0500 Message-Id: <20230130191304.3518171-1-stefanb@linux.ibm.com> X-Mailer: git-send-email 2.39.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: KLRwo_bYvVDDk7UiCcegVLl7V2v35iHG X-Proofpoint-ORIG-GUID: KLRwo_bYvVDDk7UiCcegVLl7V2v35iHG Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-01-30_17,2023-01-30_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 adultscore=0 clxscore=1011 suspectscore=0 priorityscore=1501 mlxlogscore=999 impostorscore=0 bulkscore=0 spamscore=0 phishscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301300180 Received-SPF: pass client-ip=148.163.156.1; envelope-from=stefanb@linux.ibm.com; helo=mx0a-001b2d01.pphosted.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, 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: Mon, 30 Jan 2023 19:13:24 -0000 Hello, This is an addition to the series sent from Daniel Axtens (https://lists.gnu.org/archive/html/grub-devel/2022-04/msg00064.html). Patch 'ieee1275: request memory with ibm,client-architecture-support' implements vectors 1-4 of client-architecture-support negotiation However, during some tests, we found this can be a problem if: - we have more than 64 CPUs - Hardware Management Console (HMC) is configured to minimum of CPUs >64 (for example, min of 200 CPUs) - Grub needs to request memory. If vector 5 is not implemented, Power Hypervisor will consider the default value for vector 5 and 64 will bet set as the maximum number of CPUs supported by the OS, causing the machine to fail to init. Today we support 256 CPUs (max) on Power, so we need to implement vector 5 and set the MAX CPUs bits to this value. Stefan v3: - Added #if defined(__powerpc__) [1/6] - Address possible integer underlow [3/6] - Added comment why tpm_init() function cannot be called from GRUB_MOD_INIT() - Added Reviewed-by tags to {1,2,5,6}/6 v2: - Followed Daniel K.'s list of suggestions checking the list more than twice and adjusted formatting, line breaks, etc. in all patches - Conditional compilation of ppc64-specific code using #ifdef __powerpc__ - Fixing of installation of memtool; adding of warning message for __powerpc__ since it requires a reboot after running memory stress test - Tested it on i386-pc and PowerKVM Daniel Axtens (4): ieee1275: request memory with ibm, client-architecture-support ieee1275: drop len -= 1 quirk in heap_init ieee1275: support runtime memory claiming Add memtool module with memory allocation stress-test Diego Domingos (1): ieee1275: implement vec5 for cas negotiation Stefan Berger (1): ibmvtpm: Add support for trusted boot using a vTPM 2.0 configure.ac | 1 + docs/grub-dev.texi | 7 +- docs/grub.texi | 3 +- grub-core/Makefile.core.def | 13 + grub-core/commands/ieee1275/ibmvtpm.c | 155 +++++++++ grub-core/commands/memtools.c | 160 +++++++++ grub-core/kern/ieee1275/cmain.c | 5 + grub-core/kern/ieee1275/init.c | 445 +++++++++++++++++++++++++- grub-core/kern/mm.c | 4 + include/grub/ieee1275/ieee1275.h | 13 + 10 files changed, 789 insertions(+), 17 deletions(-) create mode 100644 grub-core/commands/ieee1275/ibmvtpm.c create mode 100644 grub-core/commands/memtools.c -- 2.25.1