Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1p0qr2-0006nt-J8 for mharc-grub-devel@gnu.org; Thu, 01 Dec 2022 16:12:24 -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 1p0qr0-0006n8-RN for grub-devel@gnu.org; Thu, 01 Dec 2022 16:12:22 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p0qqy-0000hC-3r for grub-devel@gnu.org; Thu, 01 Dec 2022 16:12:22 -0500 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2B1Krbwq007987; Thu, 1 Dec 2022 21:12:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=EoHCVUXc0d8TwAFadbh0fkx+oS7zbFcLQ6+GWAAtF+U=; b=Ir4X95rRx0g0hG6Di9yijwXc0sW4WMkzKWVE9VkHSjxbxRxGSIlg1eNtdspvv/kEtheS basFngMkrZrcUUdz5dp4aKHCnWKMW5Cyb5ihN6HsbJ+MBd40jVCLW+O7OoNBZGxfLcbw 1lJC0bmc5F0dSc42AeES39QVb9PRsVbBcLETX00L1rDWobinrSZs/Ixn1CZooIfoLEJg bM2V/jtpFMQRyFUIyUlQZtbdV5atTNFqu7+8TGQ2pSipqOC4lhANpRf2NCYNRd2mIYc5 mJbU43evXbgacsb25AvbNEAkzfHAcXeHHL5PTHwNVwaBuHGGesRIMwe32S86S4xP6cY2 zw== 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 3m73q28h27-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Dec 2022 21:12:16 +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 2B1L5Wkh024830; Thu, 1 Dec 2022 21:12:16 GMT Received: from smtprelay06.dal12v.mail.ibm.com ([9.208.130.100]) by ppma01wdc.us.ibm.com with ESMTP id 3m3ae9wdn3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Dec 2022 21:12:16 +0000 Received: from smtpav03.dal12v.mail.ibm.com (smtpav03.dal12v.mail.ibm.com [10.241.53.102]) by smtprelay06.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 2B1LCFOX1573558 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 1 Dec 2022 21:12:15 GMT Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 160B758056; Thu, 1 Dec 2022 21:12:15 +0000 (GMT) Received: from smtpav03.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 964CF5805A; Thu, 1 Dec 2022 21:12:14 +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:14 +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 4/6] ieee1275: implement vec5 for cas negotiation Date: Thu, 1 Dec 2022 16:11:59 -0500 Message-Id: <20221201211201.2915206-5-stefanb@linux.ibm.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221201211201.2915206-1-stefanb@linux.ibm.com> References: <20221201211201.2915206-1-stefanb@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 1zOTIDCVSoz69piSiXwz7HQiCv4cKJAm X-Proofpoint-ORIG-GUID: 1zOTIDCVSoz69piSiXwz7HQiCv4cKJAm 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 impostorscore=0 adultscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 spamscore=0 suspectscore=0 mlxlogscore=999 clxscore=1015 bulkscore=0 mlxscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2212010161 Received-SPF: pass client-ip=148.163.158.5; envelope-from=stefanb@linux.ibm.com; helo=mx0b-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:23 -0000 From: Diego Domingos As a legacy support, if the vector 5 is not implemented, Power Hypervisor will consider the max CPUs as 64 instead 256 currently supported during client-architecture-support negotiation. This patch implements the vector 5 and set the MAX CPUs to 256 while setting the others values to 0 (default). Signed-off-by: Diego Domingos Acked-by: Daniel Axtens Signed-off-by: Stefan Berger --- grub-core/kern/ieee1275/init.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c index e5fdc1fd2..870f89a54 100644 --- a/grub-core/kern/ieee1275/init.c +++ b/grub-core/kern/ieee1275/init.c @@ -498,6 +498,19 @@ struct option_vector2 grub_uint8_t max_pft_size; } GRUB_PACKED; +struct option_vector5 +{ + grub_uint8_t byte1; + grub_uint8_t byte2; + grub_uint8_t byte3; + grub_uint8_t cmo; + grub_uint8_t associativity; + grub_uint8_t bin_opts; + grub_uint8_t micro_checkpoint; + grub_uint8_t reserved0; + grub_uint32_t max_cpus; +} GRUB_PACKED; + struct pvr_entry { grub_uint32_t mask; @@ -519,6 +532,8 @@ struct cas_vector grub_uint16_t vec3; grub_uint8_t vec4_size; grub_uint16_t vec4; + grub_uint8_t vec5_size; + struct option_vector5 vec5; } GRUB_PACKED; /* @@ -543,7 +558,7 @@ grub_ieee1275_ibm_cas (void) struct cas_vector vector = { .pvr_list = { { 0x00000000, 0xffffffff } }, /* any processor */ - .num_vecs = 4 - 1, + .num_vecs = 5 - 1, .vec1_size = 0, .vec1 = 0x80, /* ignore */ .vec2_size = 1 + sizeof (struct option_vector2) - 2, @@ -554,6 +569,10 @@ grub_ieee1275_ibm_cas (void) .vec3 = 0x00e0, /* ask for FP + VMX + DFP but don't halt if unsatisfied */ .vec4_size = 2 - 1, .vec4 = 0x0001, /* set required minimum capacity % to the lowest value */ + .vec5_size = 1 + sizeof (struct option_vector5) - 2, + .vec5 = { + 0, 0, 0, 0, 0, 0, 0, 0, 256 + } }; INIT_IEEE1275_COMMON (&args.common, "call-method", 3, 2); -- 2.25.1