From: Sam Eiderman <shmuel.eiderman@oracle.com>
To: kwolf@redhat.com, qemu-block@nongnu.org, qemu-devel@nongnu.org,
mreitz@redhat.com, seabios@seabios.org, kraxel@redhat.com,
kevin@koconnor.net
Cc: liran.alon@oracle.com, shmuel.eiderman@oracle.com,
karl.heubaum@oracle.com, arbel.moshe@oracle.com
Subject: [Qemu-devel] [SeaBIOS] [PATCH v2 4/5] config: Add toggle for bootdevice information
Date: Mon, 17 Jun 2019 18:04:18 +0300 [thread overview]
Message-ID: <20190617150419.4953-5-shmuel.eiderman@oracle.com> (raw)
In-Reply-To: <20190617150419.4953-1-shmuel.eiderman@oracle.com>
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 <karl.heubaum@oracle.com>
Reviewed-by: Arbel Moshe <arbel.moshe@oracle.com>
Signed-off-by: Sam Eiderman <shmuel.eiderman@oracle.com>
---
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.
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 = 0;
int fsize;
char *f = romfile_loadfile("bios-geometry", &fsize);
@@ -163,6 +165,8 @@ boot_lchs_find(const char *glob)
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 = boot_lchs_find(desc);
@@ -177,6 +181,8 @@ int boot_lchs_find_pci_device(struct pci_device *pci, struct 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 slave,
struct chs_s *chs)
{
+ if (!CONFIG_BIOS_GEOMETRY)
+ return -1;
if (!pci)
// support only pci machine for now
return -1;
--
2.13.3
next prev parent reply other threads:[~2019-06-17 15:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-17 15:04 [Qemu-devel] [SeaBIOS] [PATCH v2 0/5] Add Qemu to SeaBIOS LCHS interface Sam Eiderman
2019-06-17 15:04 ` [Qemu-devel] [SeaBIOS] [PATCH v2 1/5] geometry: Read LCHS from fw_cfg Sam Eiderman
2019-06-17 15:04 ` [Qemu-devel] [SeaBIOS] [PATCH v2 2/5] boot: Reorder functions in boot.c Sam Eiderman
2019-06-17 15:04 ` [Qemu-devel] [SeaBIOS] [PATCH v2 3/5] geometry: Add boot_lchs_find_*() utility functions Sam Eiderman
2019-06-17 15:04 ` Sam Eiderman [this message]
2019-06-17 15:04 ` [Qemu-devel] [SeaBIOS] [PATCH v2 5/5] geometry: Apply LCHS values for boot devices Sam Eiderman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190617150419.4953-5-shmuel.eiderman@oracle.com \
--to=shmuel.eiderman@oracle.com \
--cc=arbel.moshe@oracle.com \
--cc=karl.heubaum@oracle.com \
--cc=kevin@koconnor.net \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=liran.alon@oracle.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=seabios@seabios.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).