diff options
author | Helge Deller <deller@gmx.de> | 2024-02-02 10:32:16 +0100 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2024-02-02 10:32:16 +0100 |
commit | 71e951fd0492004a0e893692d324b11ceee9db41 (patch) | |
tree | bc11e1748293da8ce70cf4dc2dc195e4c1b9fbcc /src/parisc/parisc.c | |
parent | 836ea5290a1c72e49579e1155166663fe5d8b011 (diff) | |
download | seabios-hppa-71e951fd0492004a0e893692d324b11ceee9db41.zip seabios-hppa-71e951fd0492004a0e893692d324b11ceee9db41.tar.gz seabios-hppa-71e951fd0492004a0e893692d324b11ceee9db41.tar.bz2 |
parisc: Allow booting without SCSI controller
When booting qemu with --nodefaults, no SCSI controller will be
available. In this case make preparation of mem_boot in PAGE0
non-fatal, as we still can boot kernel and ramdisc as provided
on the command line.
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'src/parisc/parisc.c')
-rw-r--r-- | src/parisc/parisc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c index fe8ff36..6c8899d 100644 --- a/src/parisc/parisc.c +++ b/src/parisc/parisc.c @@ -2942,7 +2942,7 @@ static void find_scsi_pci_card(void) /* Prepare boot paths in PAGE0 and stable memory */ -static void prepare_boot_path(volatile struct pz_device *dest, +static int prepare_boot_path(volatile struct pz_device *dest, const struct pz_device *source, unsigned int stable_offset) { @@ -2952,7 +2952,8 @@ static void prepare_boot_path(volatile struct pz_device *dest, hpa = source->hpa; dev = find_hpa_device(hpa); - BUG_ON(!dev); + if (!dev) + return 1; if (0 && DEV_is_storage_device(dev)) mod_path = &mod_path_emulated_drives; @@ -2971,6 +2972,7 @@ static void prepare_boot_path(volatile struct pz_device *dest, BUG_ON(sizeof(*mod_path) != 0x20); BUG_ON(sizeof(struct pdc_module_path) != 0x20); + return 0; } unsigned long _atoul(char *str) @@ -3324,7 +3326,8 @@ void __VISIBLE start_parisc_firmware(void) mod_path_emulated_drives.layers[1] = parisc_boot_harddisc->lun; } - prepare_boot_path(&(PAGE0->mem_boot), &mem_boot_boot, 0x0); + if (prepare_boot_path(&(PAGE0->mem_boot), &mem_boot_boot, 0x0)) + printf("Note: No supported SCSI controller or SCSI boot device found.\n"); // copy primary boot path to alt boot path memcpy(&stable_storage[0x80], &stable_storage[0], 0x20); |