Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1oMCBb-0004xS-V4 for mharc-grub-devel@gnu.org; Thu, 11 Aug 2022 13:41:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47358) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMCBW-0004tJ-Cp for grub-devel@gnu.org; Thu, 11 Aug 2022 13:41:31 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:6844) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMCBU-0004iW-Iq for grub-devel@gnu.org; Thu, 11 Aug 2022 13:41:30 -0400 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27BHEGeF038438; Thu, 11 Aug 2022 17:41:23 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=mtMG023o0qA1YC4ed3i5uK6aPMpjDRhhDVzlL9Ay1cU=; b=kqfac2f4AbMRdVwsBli8jPIuiWCZPA7kEbLPHoazucaeKofo/kCdefiZNfz4MYsCR45J FpmOE7VYOVp/c4c/yU9f6RwPQ2uMCyeu0p1vBfDnXutdrF4M7152gD0zqAAhuxaYuufa mfKpQ2Qlvj6mwqWgJWEKQqwQRXn7jjW0jUOLQj6mYvZGUkn8I3rJeSq+w30kB95A871r e0/11KfQNlKfBS2mP//hK5sioxy2Q8Ir/ddvYF83li0tRK6P+qvt20FhqkWC2YlA2lEU WCyC0MFfRTm/koetikb/s73aauYh7qcb/ZwvHvzyVa8+yblh5u5DxlncAycfSoJeronX NA== 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 3hw6010qjb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Aug 2022 17:41:22 +0000 Received: from pps.filterd (ppma02wdc.us.ibm.com [127.0.0.1]) by ppma02wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 27BHZDct005687; Thu, 11 Aug 2022 17:41:21 GMT Received: from b01cxnp22036.gho.pok.ibm.com (b01cxnp22036.gho.pok.ibm.com [9.57.198.26]) by ppma02wdc.us.ibm.com with ESMTP id 3huwvfc23m-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Aug 2022 17:41:21 +0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 27BHfL7g17105728 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 11 Aug 2022 17:41:21 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F20FEAC05B; Thu, 11 Aug 2022 17:41:20 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CF434AC059; Thu, 11 Aug 2022 17:41:19 +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:19 +0000 (GMT) From: Diego Domingos To: grub-devel@gnu.org Cc: stefanb@linux.ibm.com, dja@axtens.net Subject: [PATCH 2/6] ieee1275: drop len -= 1 quirk in heap_init Date: Thu, 11 Aug 2022 14:41:00 -0300 Message-Id: <20220811174104.1148447-3-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: xsKkIboLjIPRnzGVHbmu9V5Kh9vq3qkL X-Proofpoint-ORIG-GUID: xsKkIboLjIPRnzGVHbmu9V5Kh9vq3qkL 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 bulkscore=0 priorityscore=1501 malwarescore=0 phishscore=0 mlxscore=0 clxscore=1015 impostorscore=0 lowpriorityscore=0 suspectscore=0 spamscore=0 mlxlogscore=903 adultscore=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:31 -0000 From: Daniel Axtens This was apparently 'required by some firmware': commit dc9468500919 ("2007-02-12 Hollis Blanchard "). It's not clear what firmware that was, and what platform from 14 years ago which exhibited the bug then is still both in use and buggy now. It doesn't cause issues on qemu (mac99 or pseries) or under PFW for Power8. I don't have access to old Mac hardware, but if anyone feels especially strongly we can put it under some feature flag. I really want to disable it under pseries because it will mess with region merging. Signed-off-by: Daniel Axtens --- grub-core/kern/ieee1275/init.c | 1 - 1 file changed, 1 deletion(-) diff --git a/grub-core/kern/ieee1275/init.c b/grub-core/kern/ieee1275/init.c index cf4bcf2cf..60a49301b 100644 --- a/grub-core/kern/ieee1275/init.c +++ b/grub-core/kern/ieee1275/init.c @@ -166,7 +166,6 @@ heap_init (grub_uint64_t addr, grub_uint64_t len, grub_memory_type_t type, addr = 0x180000; } } - len -= 1; /* Required for some firmware. */ /* Never exceed HEAP_MAX_SIZE */ if (*total + len > HEAP_MAX_SIZE) -- 2.31.1