From nobody Thu Apr 18 01:21:08 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=1560332287; cv=none; d=zoho.com; s=zohoarc; b=F2nAuLbU7JgrjrujunIC/O6zAY6WyUkMOumaQxobF4OfVvAfAl/AY4PUhFgx4M7kpqHFEbrsR5FhRYu/+yiz5i4oVVfiv2JpzOidZEY3QnVyZvkIQC8fYnYSDF2fDBvhVD15ovOH/cqu8VhDN8u52jzWv+k5KaLOjPYpiHjw+Vc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1560332287; 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=PeDI+cxLSoFV3uNX48NZiKtH1R+M/nB0XN0Ac8LqOT0=; b=LAWOm2/3xDoJZl7V3O6AjKIo/svcy44cEtkI2pfBDBdsEOgJjovL7RyYz6TZt7vlhIPUSBgvrWVsrISs0WELRuQwY0Wm+NuNoOAEPhf1a5zMdtz4c5rrL3yLoyf+oMB2JLBFzE7CSTMeGj+pXT79TM4HO+oYOc+LpcltLjoHu/o= 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 1560332287714758.7581226624934; Wed, 12 Jun 2019 02:38:07 -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 1203112E2EC8; Wed, 12 Jun 2019 09:38:03 +0000 (UTC) Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) by coreboot.org (Postfix) with ESMTP id 9C19E12E2EC6 for ; Wed, 12 Jun 2019 09:37:54 +0000 (UTC) Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5C9XnxA007494; Wed, 12 Jun 2019 09:37:31 GMT Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2130.oracle.com with ESMTP id 2t02hetea0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Jun 2019 09:37:31 +0000 Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5C9atrE052470; Wed, 12 Jun 2019 09:37:31 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 2t04hyu8rj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 12 Jun 2019 09:37:30 +0000 Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x5C9bU55000342; Wed, 12 Jun 2019 09:37:30 GMT Received: from nexus.ravello.local (/213.57.127.2) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 12 Jun 2019 02:37:30 -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=BlGgCWhzoEcmkpG4cDlZVUBAAZPEFbNi+NpVkxuRpWw=; b=iFKojhJDNpC1LhBqf+w5M2aR77M23QiVPA3BPv2em4IZbSGxbHaH0RaE2IPdIDTt3WE4 fIq/SFYFzh+bVvinao6qm8jWiMBFx8aq7+tS+hkr2519kU2k6LAqAsayfaPWb2FM5mne 5oZohacCSPwdD69aeFNaGQ7A7WIemj+W8CcotDMG1yWLKYC1sB/brKgkNc7DXgrICXhM /KJuTV7mm7HrBJc++6Fs3qaWLiaVQ7DX6yiWHoziM41JFWnWB5rD1xgK2uVwBZ5xNraH 5oHhZXHgcbBJ6MfhwJLSMa34pa2th6HRIEcE6iHDd+gjx422U8VY2M0hUIfnY77MFgKQ Mg== From: Sam Eiderman To: seabios@seabios.org, kraxel@redhat.com, kevin@koconnor.net, kwolf@redhat.com, qemu-block@nongnu.org, mreitz@redhat.com Date: Wed, 12 Jun 2019 12:37:03 +0300 Message-Id: <20190612093704.47175-5-shmuel.eiderman@oracle.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20190612093704.47175-1-shmuel.eiderman@oracle.com> References: <20190612093704.47175-1-shmuel.eiderman@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9285 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-1906120066 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9285 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-1906120066 Message-ID-Hash: UNNCWN3C7YYICRQ544I3BJUJAFIQTFT7 X-Message-ID-Hash: UNNCWN3C7YYICRQ544I3BJUJAFIQTFT7 X-MailFrom: shmuel.eiderman@oracle.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: arbel.moshe@oracle.com, karl.heubaum@oracle.com X-Mailman-Version: 3.2.2 Precedence: list Subject: [SeaBIOS] [PATCH 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 X-Spamd-Bar: ++++ X-Spam-Level: **** Authentication-Results: coreboot.org X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Add the "BOOTDEVICES" 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 | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/src/Kconfig b/src/Kconfig index 55a87cb7..b3645b33 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 BOOTDEVICES + depends on BOOT + bool "Boot device information" + default y + help + Support boot device information via the fw_cfg/CBFS + "bootdevices" file. =20 config COREBOOT_FLASH depends on COREBOOT diff --git a/src/boot.c b/src/boot.c index 9248fab9..e89b9238 100644 --- a/src/boot.c +++ b/src/boot.c @@ -95,6 +95,9 @@ static int BootDeviceCount; static void loadBootDevices(void) { + if (!CONFIG_BOOTDEVICES) + return; + BootDeviceCount =3D 0; int fsize; char *f =3D romfile_loadfile("bootdevices", &fsize); @@ -172,6 +175,8 @@ bootdevice_find(const char *glob) static BootDevice * bootdevice_find_pci_device(struct pci_device *pci) { + if (!CONFIG_BOOTDEVICES) + return NULL; // Find pci device - for example: /pci@i0cf8/ethernet@5 char desc[256]; build_pci_path(desc, sizeof(desc), "*", pci); @@ -181,6 +186,8 @@ bootdevice_find_pci_device(struct pci_device *pci) static BootDevice * bootdevice_find_scsi_device(struct pci_device *pci, int target, int lun) { + if (!CONFIG_BOOTDEVICES) + return NULL; if (!pci) // support only pci machine for now return NULL; @@ -194,6 +201,8 @@ bootdevice_find_scsi_device(struct pci_device *pci, int= target, int lun) static BootDevice * bootdevice_find_ata_device(struct pci_device *pci, int chanid, int slave) { + if (!CONFIG_BOOTDEVICES) + return NULL; if (!pci) // support only pci machine for now return NULL; --=20 2.13.3 _______________________________________________ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-leave@seabios.org