Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1pMZe7-0005TY-6M for mharc-grub-devel@gnu.org; Mon, 30 Jan 2023 14:16: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 1pMZe3-0005Qz-U4 for grub-devel@gnu.org; Mon, 30 Jan 2023 14:16:48 -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 1pMZe0-0004qK-F1 for grub-devel@gnu.org; Mon, 30 Jan 2023 14:16:47 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 30UISWFn032249; Mon, 30 Jan 2023 19:16:39 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=clp6dg6MN6nl5JRGwU83+D+XMFKv26sAFUDcFw5egAHkBYwNGAKgW6+4AXLZv/1iD+PJ KJIDLlWka2Q2aXcM+2ao1gDCprKu3wPfblZ/TQ42jXyl+/F+xdWb6/lOLsg0xE7SZghY jfltQfKut4Sw2xm62S+5mNYeKl6hroQy11Hbid4ZqtWArDxpcbvKkmzUx9b8ck+Mqanq rHcARCfA70L/HqetDFubO8pGOYEXDbkfUyOpLS5FKRpJNaufjlOeTiqkJ5CJiUVG52cr tViCDoptm+1AuSgIFTaTsLthLBssnly6Rfvx2PrWFu/YnYUMaga+bBxiKVZovbDJSzMS HQ== Received: from ppma02wdc.us.ibm.com (aa.5b.37a9.ip4.static.sl-reverse.com [169.55.91.170]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3nek738yqa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 Jan 2023 19:16:39 +0000 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 30UFv0j1005451; Mon, 30 Jan 2023 19:16:38 GMT Received: from smtprelay05.wdc07v.mail.ibm.com ([9.208.129.117]) by ppma02wdc.us.ibm.com (PPS) with ESMTPS id 3ncvv1m869-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 30 Jan 2023 19:16:38 +0000 Received: from smtpav04.wdc07v.mail.ibm.com (smtpav04.wdc07v.mail.ibm.com [10.39.53.231]) by smtprelay05.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 30UJGaDP7865062 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Jan 2023 19:16:36 GMT Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9BA6B58045; Mon, 30 Jan 2023 19:16:36 +0000 (GMT) Received: from smtpav04.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CEB1B58050; Mon, 30 Jan 2023 19:16:35 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by smtpav04.wdc07v.mail.ibm.com (Postfix) with ESMTP; Mon, 30 Jan 2023 19:16:35 +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:16:15 -0500 Message-Id: <20230130191621.3518274-1-stefanb@linux.ibm.com> X-Mailer: git-send-email 2.39.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: n_9nrBbKHoMOiQtN0snLkv1rWZu7Z2Ov X-Proofpoint-GUID: n_9nrBbKHoMOiQtN0snLkv1rWZu7Z2Ov 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 spamscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 phishscore=0 suspectscore=0 malwarescore=0 clxscore=1015 impostorscore=0 adultscore=0 bulkscore=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:16:48 -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