Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1p0qr3-0006ol-W3 for mharc-grub-devel@gnu.org; Thu, 01 Dec 2022 16:12:26 -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 1p0qr3-0006oR-4X for grub-devel@gnu.org; Thu, 01 Dec 2022 16:12:25 -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 1p0qqy-0000h7-2h for grub-devel@gnu.org; Thu, 01 Dec 2022 16:12:24 -0500 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B1LBteo027918; Thu, 1 Dec 2022 21:12:15 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=T3/jiRU6Vd+dOGBt08UEExOR07unjtkUset/H0qbPJw=; b=Q3U4c8gcCDOPId+34LA/Cioe742uHLlLFppezo/cQqolxvHtwmWL98wE5mDezlYqQHWl BTMjt5MmmZFE2SVGIckkXzDk8KZ0YwTdXZf04kZgIINQbmt1wVAxB3eh9g/mzPUP2Gus zin27j+dBC7+aiIejzwNiEdN214otNKayiqeDQaXBdK0oU4hkrvF/wZcEVv7LKiJ3uJY rnmFKOGBSaj3UiI3mMFNHJHksloJx4Np/eeB3tgToYxb+XIEDq0I5cVVzCcsUgnne/bG 0Wg3YMaY1FOdfxcio7JcZVvtcMjljixu+1kbF13xM312lpeET+56CgkmS3H/d3V2ZnUk zg== Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3m73ykg057-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Dec 2022 21:12:15 +0000 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 2B1L5VS0024824; Thu, 1 Dec 2022 21:12:13 GMT Received: from smtprelay03.dal12v.mail.ibm.com ([9.208.130.98]) by ppma01wdc.us.ibm.com with ESMTP id 3m3ae9wdmx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Dec 2022 21:12:13 +0000 Received: from smtpav03.dal12v.mail.ibm.com (smtpav03.dal12v.mail.ibm.com [10.241.53.102]) by smtprelay03.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2B1LCCF359048438 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Dec 2022 21:12:12 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B05BC5803F; Thu, 1 Dec 2022 21:12:12 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3C4BC58064; Thu, 1 Dec 2022 21:12:12 +0000 (GMT) Received: from sbct-3.pok.ibm.com (unknown [9.47.158.153]) by smtpav03.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 1 Dec 2022 21:12:12 +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 v2 0/6] Dynamic allocation of memory regions and IBM vTPM v2 Date: Thu, 1 Dec 2022 16:11:55 -0500 Message-Id: <20221201211201.2915206-1-stefanb@linux.ibm.com> X-Mailer: git-send-email 2.37.3 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: 8ytYauHBh3Bo_WSEr18_g_i2qL1h2Z6W X-Proofpoint-GUID: 8ytYauHBh3Bo_WSEr18_g_i2qL1h2Z6W 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.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-01_14,2022-12-01_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 bulkscore=0 phishscore=0 spamscore=0 mlxscore=0 suspectscore=0 lowpriorityscore=0 impostorscore=0 mlxlogscore=999 clxscore=1015 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212010161 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, 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 21:12:25 -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 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 | 151 +++++++++ grub-core/commands/memtools.c | 160 ++++++++++ grub-core/kern/ieee1275/cmain.c | 3 + grub-core/kern/ieee1275/init.c | 443 +++++++++++++++++++++++++- grub-core/kern/mm.c | 4 + include/grub/ieee1275/ieee1275.h | 11 + 10 files changed, 779 insertions(+), 17 deletions(-) create mode 100644 grub-core/commands/ieee1275/ibmvtpm.c create mode 100644 grub-core/commands/memtools.c -- 2.25.1