Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1oMCBv-00058t-8I for mharc-grub-devel@gnu.org; Thu, 11 Aug 2022 13:41:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMCBc-0004xs-KS for grub-devel@gnu.org; Thu, 11 Aug 2022 13:41:39 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:38944) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMCBa-0004kc-Ta for grub-devel@gnu.org; Thu, 11 Aug 2022 13:41:36 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27BHRAs4029253; Thu, 11 Aug 2022 17:41:33 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=cW24/J1lrMm2OFttpHrP/ZxiburWjUeO2EN/rzBod9I=; b=Exu6tu5sXqbnjKTJiLoC/8ED652+z/Wm59w8NFzVyXL+MpH5A3fM35ss2OcKTX0/PqL+ sZQAhltx1wMEUofW+RcWn1Thk2PjaoyLq6Jd0eXQNc5UuEmaYwzBujn9hSWphi9mRSft tE8hZ+LzLzYjbWtFZOl3Hu5FWO4U8Mc/0D1g5Y2lhWuSKzXuwklTVlqPua6rKsVpRm1I BLz7NYFIR6bX5asdXYQdHZXfwnBM8VERjtaPtZMTOGh/lEKWKSf+wt2UGDmPJYVDAd1r gcp/3HMY5jOfvxU8pglEkeBpwxfKs1QzEhQhMGrI0W55nDByMuFljd4FxS+jGqAZruZp TA== 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 3hw664rbun-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Aug 2022 17:41:32 +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 27BHZmBa030683; Thu, 11 Aug 2022 17:41:31 GMT Received: from b01cxnp23034.gho.pok.ibm.com (b01cxnp23034.gho.pok.ibm.com [9.57.198.29]) by ppma01wdc.us.ibm.com with ESMTP id 3huwvqm4d8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Aug 2022 17:41:31 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp23034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27BHfVGt57606618 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 11 Aug 2022 17:41:31 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2F73BAC05B; Thu, 11 Aug 2022 17:41:31 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DE166AC059; Thu, 11 Aug 2022 17:41:29 +0000 (GMT) Received: from li-a164bb4c-3059-11b2-a85c-f2835233ac47.ibm.com.com (unknown [9.211.95.36]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 11 Aug 2022 17:41:29 +0000 (GMT) From: Diego Domingos To: grub-devel@gnu.org Cc: stefanb@linux.ibm.com, dja@axtens.net, Diego Domingos Subject: [PATCH 6/6] ieee1275: implement vec5 for cas negotiation Date: Thu, 11 Aug 2022 14:41:04 -0300 Message-Id: <20220811174104.1148447-7-diegodo@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220811174104.1148447-1-diegodo@linux.vnet.ibm.com> References: <20220811174104.1148447-1-diegodo@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: drrb902kv8TCSkSXk28788ecBtQ0Py7l X-Proofpoint-ORIG-GUID: drrb902kv8TCSkSXk28788ecBtQ0Py7l X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-11_11,2022-08-11_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 clxscore=1015 adultscore=0 mlxscore=0 phishscore=0 lowpriorityscore=0 suspectscore=0 priorityscore=1501 bulkscore=0 mlxlogscore=999 malwarescore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208110057 Received-SPF: none client-ip=148.163.156.1; envelope-from=diegodo@linux.vnet.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_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 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, 11 Aug 2022 17:41:39 -0000 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 --- 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 ec591e6e1..26d3c7a33 100644 --- a/grub-core/kern/ieee1275/init.c +++ b/grub-core/kern/ieee1275/init.c @@ -494,6 +494,19 @@ struct option_vector2 { grub_uint8_t max_pft_size; } __attribute__((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; +} __attribute__((packed)); + + struct pvr_entry { grub_uint32_t mask; grub_uint32_t entry; @@ -512,6 +525,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; } __attribute__((packed)); /* @@ -534,7 +549,7 @@ grub_ieee1275_ibm_cas (void) } args; 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, @@ -545,6 +560,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.31.1