diff options
author | Helge Deller <deller@gmx.de> | 2024-02-02 08:37:08 +0100 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2024-02-02 08:37:08 +0100 |
commit | 836ea5290a1c72e49579e1155166663fe5d8b011 (patch) | |
tree | ddbfcb506efb2ec2eaa8daecd3bea2232a329f93 | |
parent | 8898a6c26c5eacad8751b57d5f3d93988a1daa86 (diff) | |
download | seabios-hppa-836ea5290a1c72e49579e1155166663fe5d8b011.zip seabios-hppa-836ea5290a1c72e49579e1155166663fe5d8b011.tar.gz seabios-hppa-836ea5290a1c72e49579e1155166663fe5d8b011.tar.bz2 |
parisc: Add -fw_cfg opt/OS64,string=1 option
This option is only relevant when booting a 64-bit machine and the value
defaults to enabled (1).
When OS64 is set to 0, the firmware will tell the OS that 64-bit
firmware calls are not supported.
Effectively, this prevents the OS to install a 64-bit OS (on the 64-bit
machine).
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r-- | src/parisc/parisc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c index 64fda0f..fe8ff36 100644 --- a/src/parisc/parisc.c +++ b/src/parisc/parisc.c @@ -203,6 +203,9 @@ static unsigned int chassis_code = 0; int powersw_nop; int *powersw_ptr; +/* allow 64-bit OS installation on 64-bit firmware */ +int enable_OS64 = 1; + /* * Real time clock emulation * Either LASI or Astro will provide access to an emulated RTC clock. @@ -1556,8 +1559,8 @@ static int pdc_model(unsigned long *arg) /* unlock pdc call if running wide. */ firmware_width_locked = !(psw_defaults & PDC_PSW_WIDE_BIT); result[0] = current_machine->pdc_caps; - result[0] |= PDC_MODEL_OS32; /* we only support 32-bit PDC for now. */ - if (is_64bit_PDC()) /* and maybe 64-bit */ + result[0] |= PDC_MODEL_OS32; /* we always support 32-bit PDC */ + if (is_64bit_PDC() && enable_OS64) /* and maybe 64-bit */ result[0] |= PDC_MODEL_OS64; /* this means 64-bit PDC calls are supported */ else result[0] &= ~PDC_MODEL_OS64; @@ -3114,6 +3117,9 @@ void __VISIBLE start_parisc_firmware(void) powersw_ptr = NULL; } + /* possibility to disable 64-bit OS installation: "-fw_cfg opt/OS64,string=0" */ + enable_OS64 = romfile_loadstring_to_int("opt/OS64", enable_OS64); + /* real-time-clock addr */ rtc_ptr = (int *) F_EXTEND(romfile_loadint("/etc/hppa/rtc-addr", (int) LASI_RTC_HPA)); // dprintf(0, "RTC PTR 0x%p\n", rtc_ptr); |