aboutsummaryrefslogtreecommitdiff
path: root/src/boot.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-11-15 12:19:42 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-11-18 14:58:37 +0100
commit695f176d3e70ef37b4456cb33f37820457725ae9 (patch)
treeb569288f2d0c6fdb6859dce86fbd8a2fb1f0d923 /src/boot.c
parentacc70aa8d175b62847dc9a43db56e47011d24ec3 (diff)
downloadseabios-hppa-695f176d3e70ef37b4456cb33f37820457725ae9.zip
seabios-hppa-695f176d3e70ef37b4456cb33f37820457725ae9.tar.gz
seabios-hppa-695f176d3e70ef37b4456cb33f37820457725ae9.tar.bz2
Revert "geometry: Read LCHS from fw_cfg"
This reverts commit 7c66a439c07536b525ff9d5ce230775975e9c072.
Diffstat (limited to 'src/boot.c')
-rw-r--r--src/boot.c87
1 files changed, 0 insertions, 87 deletions
diff --git a/src/boot.c b/src/boot.c
index b3d4930..b5535ce 100644
--- a/src/boot.c
+++ b/src/boot.c
@@ -73,92 +73,6 @@ build_pci_path(char *buf, int max, const char *devname, struct pci_device *pci)
/****************************************************************
- * Boot device parameters
- ****************************************************************/
-
-typedef struct BootDeviceSerialized {
- u32 lcyls;
- u32 lheads;
- u32 lsecs;
-} PACKED BootDeviceSerialized;
-
-typedef struct BootDevice {
- char *name;
- u32 lcyls;
- u32 lheads;
- u32 lsecs;
-} BootDevice;
-
-static BootDevice *BootDevices VARVERIFY32INIT;
-static int BootDeviceCount;
-
-static void
-loadBootDevices(void)
-{
- BootDeviceCount = 0;
- int fsize;
- char *f = romfile_loadfile("bootdevices", &fsize);
- if (!f)
- return;
-
- if (fsize < sizeof(u32))
- return;
-
- u32 struct_size = *((u32 *)f);
- if (struct_size < sizeof(BootDeviceSerialized))
- return;
-
- fsize -= sizeof(u32);
- f += sizeof(u32);
-
- int i;
- int str_found = 0;
-
- for (i = 0; i < fsize; i++) {
- if (f[i] != '\0')
- str_found = 1;
- else if (f[i] == '\0' && str_found) {
- str_found = 0;
- i++;
- if (i + struct_size > fsize)
- break;
- i += struct_size - 1;
- BootDeviceCount++;
- } else
- break;
- }
-
- BootDevices = malloc_tmphigh(BootDeviceCount * sizeof(BootDevice));
- if (!BootDevices) {
- warn_noalloc();
- free(f);
- BootDeviceCount = 0;
- return;
- }
-
- dprintf(1, "boot devices:\n");
-
- BootDeviceSerialized *blk;
- BootDevice *d;
-
- for (i = 0; i < BootDeviceCount; i++) {
- d = &BootDevices[i];
- d->name = f;
- f += strlen(f) + 1;
-
- blk = (BootDeviceSerialized *)f;
- d->lcyls = blk->lcyls;
- d->lheads = blk->lheads;
- d->lsecs = blk->lsecs;
- f += struct_size;
-
- dprintf(1, "%s: (%u, %u, %u)\n",
- d->name, d->lcyls, d->lheads, d->lsecs);
- }
-}
-
-
-/****************************************************************
* Boot priority ordering
****************************************************************/
@@ -378,7 +292,6 @@ boot_init(void)
BootRetryTime = romfile_loadint("etc/boot-fail-wait", 60*1000);
loadBootOrder();
- loadBootDevices();
}