From nobody Mon Sep 16 19:06:19 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) client-ip=78.46.105.101; envelope-from=seabios-bounces@seabios.org; helo=coreboot.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail(p=none dis=none) header.from=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1560783962; cv=none; d=zoho.com; s=zohoarc; b=auqGHdOMbB6043KjnMVUgdkQj+It2vSMqno9JLsFO4vCt1fstfB3S8Yy/zETQNiDyqdbDAErnTPcZM2uGr+SMWWwIA6q314zqeeFmqaceXEerktd5aJm8eMnLwhtAitjySWOOy/0gBax2c69Ls4le+Tl9NxsiN7SwjO3qczOLVs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560783962; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=qbaloC2OS6BOvkPoVXxZds5E9En6PzPpiplAIaJ+irE=; b=nZi2HVtWpdbpx0JyRTuw3P+da9NWp9TTknIJxWLl/pqkpTGXiDdfcP5mDndUiDt6A6Ku2L526gm+FPw7x0i/kCVNx+ydu/cezG0a5dP2e8ZsgAsnIh1Xaoj3aRPa5/j0KfoIajDdtReBBGsSVpBqEIFN8Jq0Tex8HPtp2GkG55Q= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 78.46.105.101 is neither permitted nor denied by domain of seabios.org) smtp.mailfrom=seabios-bounces@seabios.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from coreboot.org (coreboot.org [78.46.105.101]) by mx.zohomail.com with SMTPS id 1560783962950333.90568633427586; Mon, 17 Jun 2019 08:06:02 -0700 (PDT) Received: from [192.168.203.99] (mailu_mailman-core_1.mailu_default [192.168.203.99]) by coreboot.org (Postfix) with ESMTP id 0F1B9BA3AD7; Mon, 17 Jun 2019 15:05:58 +0000 (UTC) Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) by coreboot.org (Postfix) with ESMTP id 9235ABA3AC8 for ; Mon, 17 Jun 2019 15:05:45 +0000 (UTC) Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5HF3j5g008673; Mon, 17 Jun 2019 15:04:57 GMT Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 2t4saq72h8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 Jun 2019 15:04:57 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5HF3XBl061731; Mon, 17 Jun 2019 15:04:56 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 2t59gd97n1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 Jun 2019 15:04:56 +0000 Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x5HF4tPN017481; Mon, 17 Jun 2019 15:04:55 GMT Received: from nexus.ravello.local (/213.57.127.2) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 17 Jun 2019 08:04:55 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2018-07-02; bh=AHpQmog86BPC1eT3XUEskufqXnj+rJVeOHWbUO5moAo=; b=qVv9tEoBCpwUpl6FG6q1H8qGHeQuflgIU4O/bQ9k/jDg67IFU/56Z/WI7yyrRUNg2evh 46P93dr+drs2Ner8gPFzW77tUzBjEX1LVMhEu9RKMzVSvKE12X24JKCTAk7AE2R8UKos hIA6fiHrrXYfr2Rc5BqSgq/288ElWHWVlRxD8aZclpw92TZeQxLobVkLjJIlkXBAADsb +2O/wsOv41JpuE7lfPGDaBGwV1zCQ8tG6QI72in5R7Eb8V1X29r36wTp/0EAFv0W9Ysp mCzmCv4X+CmVwKU1vm/QnX+Fu/NiHNYvldmmiE9z6njwLi3dfpFmm9qJZZeivMD28DXV jA== From: Sam Eiderman To: kwolf@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org, mreitz@redhat.com, seabios@seabios.org, kraxel@redhat.com, kevin@koconnor.net Date: Mon, 17 Jun 2019 18:04:18 +0300 Message-Id: <20190617150419.4953-5-shmuel.eiderman@oracle.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20190617150419.4953-1-shmuel.eiderman@oracle.com> References: <20190617150419.4953-1-shmuel.eiderman@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9291 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906170136 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9291 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906170136 Message-ID-Hash: G7E6R5HD7RR4TF2ZR4POX6AMB2W5XM4S X-Message-ID-Hash: G7E6R5HD7RR4TF2ZR4POX6AMB2W5XM4S X-MailFrom: shmuel.eiderman@oracle.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-seabios.seabios.org-0; header-match-seabios.seabios.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: karl.heubaum@oracle.com, arbel.moshe@oracle.com X-Mailman-Version: 3.2.2 Precedence: list Subject: [SeaBIOS] [PATCH v2 4/5] config: Add toggle for bootdevice information List-Id: SeaBIOS mailing list Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Authentication-Results: coreboot.org X-Spamd-Bar: / X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add the "BIOS_GEOMETRY" toggle to remove boot device information received through fw_cfg. We will use this toggle in QEMU to reduce the size of the 128k SeaBIOS rom, which is only used in old compat versions, where this boot device information does not exist. Reviewed-by: Karl Heubaum Reviewed-by: Arbel Moshe Signed-off-by: Sam Eiderman --- src/Kconfig | 7 +++++++ src/boot.c | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/src/Kconfig b/src/Kconfig index 55a87cb7..0b4c1c0d 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -72,6 +72,13 @@ endchoice help Support controlling of the boot order via the fw_cfg/CBFS "bootorder" file. + config BIOS_GEOMETRY + depends on BOOT + bool "Boot device bios geometry override" + default y + help + Support overriding bios (logical) geometry of boot devices via= the + fw_cfg/CBFS "bios-geometry" file. =20 config COREBOOT_FLASH depends on COREBOOT diff --git a/src/boot.c b/src/boot.c index 8162cb74..695bc189 100644 --- a/src/boot.c +++ b/src/boot.c @@ -95,6 +95,8 @@ static int BiosGeometryCount; static void loadBiosGeometry(void) { + if (!CONFIG_BIOS_GEOMETRY) + return; BiosGeometryCount =3D 0; int fsize; char *f =3D romfile_loadfile("bios-geometry", &fsize); @@ -163,6 +165,8 @@ boot_lchs_find(const char *glob) =20 int boot_lchs_find_pci_device(struct pci_device *pci, struct chs_s *chs) { + if (!CONFIG_BIOS_GEOMETRY) + return -1; char desc[256]; build_pci_path(desc, sizeof(desc), "*", pci); BootDeviceLCHS *b =3D boot_lchs_find(desc); @@ -177,6 +181,8 @@ int boot_lchs_find_pci_device(struct pci_device *pci, s= truct chs_s *chs) int boot_lchs_find_scsi_device(struct pci_device *pci, int target, int lun, struct chs_s *chs) { + if (!CONFIG_BIOS_GEOMETRY) + return -1; if (!pci) // support only pci machine for now return -1; @@ -196,6 +202,8 @@ int boot_lchs_find_scsi_device(struct pci_device *pci, = int target, int lun, int boot_lchs_find_ata_device(struct pci_device *pci, int chanid, int slav= e, struct chs_s *chs) { + if (!CONFIG_BIOS_GEOMETRY) + return -1; if (!pci) // support only pci machine for now return -1; --=20 2.13.3 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org