aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-10-14parisc: ad .vimrc editor helper filedevel4Helge Deller1-0/+4
Signed-off-by: Helge Deller <deller@gmx.de>
2023-09-18parisc: Add PDC_CACHE_RET_SPID functionHelge Deller1-0/+5
Signed-off-by: Helge Deller <deller@gmx.de>
2023-09-18parisc: Some more PDC constantsHelge Deller1-2/+25
Signed-off-by: Helge Deller <deller@gmx.de>
2023-09-16parisc: Fix serial output at early bootupHelge Deller1-3/+11
If some bug happens during early bootup, the mem_cons might not have been initialized yet. In that case use default PARISC_SERIAL_CONSOLE to show something. Signed-off-by: Helge Deller <deller@gmx.de>
2023-09-16esp-scsi: handle non-DMA SCSI commands with no data phaseMark Cave-Ayland1-1/+10
The existing esp-scsi state machine checks for the STAT_TC bit to exit state 1 but in the case where there is no data phase, a non-DMA command is executed which doesn't set STAT_TC. This only works because QEMU currently always sets STAT_TC just after issuing every SCSI command. Update the esp-scsi state machine so that in the case where there is no data phase, we immediately execute CMD_ICCS instead of waiting for STAT_TC to be set which will never happen with a non-DMA CMD_SELATN command. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-ID: <20230807065300.366070-4-mark.cave-ayland@ilande.co.uk> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2023-09-16esp-scsi: check for INTR_BS/INTR_FC instead of STAT_TC for command completionMark Cave-Ayland1-14/+22
The ESP SELATN command used to send SCSI commands from the ESP to the SCSI bus is not a DMA command and therefore does not affect the STAT_TC bit. The only reason this works at all is due to a bug in QEMU which (currently) always updates the STAT_TC bit in ESP_RSTAT regardless of the state of the ESP_CMD_DMA bit. According to the NCR datasheet [1] the INTR_BS/INTR_FC bits are set when the SELATN command has completed, so update the existing logic to check for these bits in ESP_RINTR instead. Note that the read of ESP_RINTR needs to be restricted to state == 0 as reading ESP_RINTR resets the ESP_RSTAT register which breaks the STAT_TC check when state == 1. This commit also includes an extra read of ESP_INTR to clear all the interrupt bits before submitting the SELATN command to ensure that we don't accidentally immediately progress to the data phase handling logic where ESP_RINTR bits have already been set by a previous ESP command. [1] "NCR 53C94, 53C95, 53C96 Advanced SCSI Controller" NCR_53C94_53C95_53C96_Data_Sheet_Feb90.pdf Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-ID: <20230807065300.366070-3-mark.cave-ayland@ilande.co.uk> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2023-09-16esp-scsi: flush FIFO before sending SCSI commandMark Cave-Ayland1-0/+4
The ESP FIFO is used as a buffer for DMA requests and so isn't guaranteed to be empty in the case of SCSI errors or a mixed DMA/non-DMA request. Flush the FIFO before sending a SCSI command to guarantee that it is correctly positioned at the start of the FIFO. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20230807065300.366070-2-mark.cave-ayland@ilande.co.uk> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2023-09-13parisc: SEABIOS_HPPA_VERSION 9seabios-hppa-v9devel-btlb-2Helge Deller1-2/+2
Enhancements: - Support for Block-TLB (BTLB) on 32-bit CPUs Signed-off-by: Helge Deller <deller@gmx.de>
2023-09-13parisc: Implement Block-TLB (BTLB) support for 32-bit CPUsHelge Deller1-20/+11
SeaBIOS has no information about the lower implementation details for Block-TLB (or generic TLB) support, so it simply hands over the parameters in the CPU registers provided by the operating system to the PDC_BLOCK_TLB PDC function to QEMU. Calling QEMU happens via a diagnostics instruction (diag 0x100) which QEMU will respond to. Older QEMU versions without the BTLB support will simply log that they ignored the diag instruction, and SeaBIOS will return PDC_BAD_OPTION for this PDC call in that case. Signed-off-by: Helge Deller <deller@gmx.de>
2023-06-24parisc: SEABIOS_HPPA_VERSION 8seabios-hppa-v8hppa-reboot-fixHelge Deller1-2/+2
Fixes - boot of HP-UX with SMP, and - reboot of Linux and HP-UX with SMP Enhancements: - show qemu version in boot menu - adds exit menu entry in boot menu to quit emulation - allow to trace PCD_CHASSIS codes more specifically Signed-off-by: Helge Deller <deller@gmx.de>
2023-06-24parisc: Drop unnecessary SMP wake-up codeHelge Deller2-13/+1
Signed-off-by: Helge Deller <deller@gmx.de>
2023-06-24parisc: Enable PSW_Q bit at bootupHelge Deller1-1/+2
Qemu currently only supports PSW_Q handling, so enable it by default. Signed-off-by: Helge Deller <deller@gmx.de>
2023-06-24parisc: Show qemu version in boot menuHelge Deller1-3/+9
Get the qemu version from the fw_cfg interface and show it during bootup. Signed-off-by: Helge Deller <deller@gmx.de>
2023-06-24parisc: Move boot_args[] to pad608 to fix HP-UX SMP bootHelge Deller2-11/+12
Do not store the boot args in the pad0 field of PAGE0. This breaks booting HP-UX SMP kernels. Use pad608 instead. Signed-off-by: Helge Deller <deller@gmx.de>
2023-06-21parisc: Add exit option to boot menuHelge Deller1-0/+5
Signed-off-by: Helge Deller <deller@gmx.de>
2023-06-21parisc: Add code to show PDC_CHASSIS codes at runtimeHelge Deller1-2/+3
Signed-off-by: Helge Deller <deller@gmx.de>
2023-06-21parisc: Fix SMP rebootHelge Deller2-66/+93
Most important is the flushing of the TLB entries Signed-off-by: Helge Deller <deller@gmx.de>
2023-06-21parisc: Move SeaBIOS-hppa version stringHelge Deller3-9/+10
This allows to include the version number in the binary header of hppa-firmware.img Signed-off-by: Helge Deller <deller@gmx.de>
2023-06-21stirom: Don't initialize graphics twiceHelge Deller1-0/+4
Signed-off-by: Helge Deller <deller@gmx.de>
2023-06-20parisc: SEABIOS_HPPA_VERSION 7seabios-hppa-v7Helge Deller1-6/+27
Fixes boot of the Debian-12 installation CD-ROM The size of the ramdisc of Debian-12 is 17123328 bytes and occupies 8361 CD-ROM sectors (of 2048 bytes each). As such the palo bootloader tries to read 8361 sectors, which fails with DISK_RET_EBADTRACK error because the emulated LSI SCSI driver only supports (due to hardware limitation) reading 8192 sectors at once. Fix it in the SeaBIOS firmware by limiting the sectors which can be read at once to 8192-16 sectors. The palo bootloader will then simply do additional calls to read the remaining sectors. This firmware bug didn't show up with Debian-11 because that ramdisc was smaller and below the 8192 sector limit. Signed-off-by: Helge Deller <deller@gmx.de>
2022-05-26parisc: SEABIOS_HPPA_VERSION 6seabios-hppa-v6v6-testHelge Deller1-3/+12
Fixes the serial port emulation Qemu versions which request a SEABIOS_HPPA_VERSION < 6 have the bug that they use the DINO UART instead of the LASI UART as serial port #0. Staring with SEABIOS_HPPA_VERSION 6 the serial ports are now emulated as on physical hardware, with LASI UART being serial port #0. This patch adds a compat patch, which will use the DINO UART port for console I/O if it detects that qemu requests a SEABIOS_HPPA_VERSION < 6. Signed-off-by: Helge Deller <deller@gmx.de>
2022-05-26parisc: Avoid build warnings with -Wno-stringop-overflow -Wno-array-boundsHelge Deller1-0/+1
Signed-off-by: Helge Deller <deller@gmx.de>
2022-05-26parisc: Avoid build warningHelge Deller1-0/+2
Signed-off-by: Helge Deller <deller@gmx.de>
2022-05-26parisc: Avoid build warning in vgainit.cHelge Deller1-1/+2
Signed-off-by: Helge Deller <deller@gmx.de>
2022-05-26parisc: Avoid build warnings with -Wno-address-of-packed-member compiler optionHelge Deller1-1/+1
Add this option to avoid some warnings like: src/tcgbios.c: In function 'tpm_interrupt_handler32': src/tcgbios.c:1721:45: warning: taking address of packed member of 'struct bregs' may result in an unaligned pointer value [-Waddress-of-packed-member] Signed-off-by: Helge Deller <deller@gmx.de>
2022-05-26parisc: Provide serial port name based on given hpa addressHelge Deller1-1/+1
Prevent usage of the hardcoded PARISC_SERIAL_CONSOLE value and instead check the given hpa and provide the correct serial port name. Signed-off-by: Helge Deller <deller@gmx.de>
2022-05-26parisc: Use serial port addresses for console I/O from PAGE0Helge Deller1-2/+2
The structs mem_kbd and mem_cons holds the HPA of the serial ports used for console I/O, so use those instead of hardcoding to PARISC_SERIAL_CONSOLE. There is no functional change with this, but now it complies to how the values from PAGE0 should be used. Signed-off-by: Helge Deller <deller@gmx.de>
2022-05-26parisc: Switch serial ports 1 and 2Helge Deller1-2/+2
On real hardware, Linux detects the UART which is built-into LASI as serial port #1, and the UART which is built-into DINO as serial port #2. But to now qemu and SeaBIOS used the UART on DINO as serial port #1, which breaks qemu's possibility to use the "-serial" option to pass-through host serial ports to the guest. Fix this by swapping the addresses of PORT_SERIAL1 and PORT_SERIAL2. Signed-off-by: Helge Deller <deller@gmx.de>
2022-05-26parisc: Add note that hppa_hardware.h is shared between qemu and SeaBIOSHelge Deller1-0/+1
Signed-off-by: Helge Deller <deller@gmx.de>
2022-05-26parisc: Allow key Z as Y in boot menuHelge Deller1-3/+5
On german keyboards, the Z key is positioned at the same location as Y on english keyboards. German users may thus type Z instead of Y. So this patch allows Z as synonym for Y. Signed-off-by: Helge Deller <deller@gmx.de>
2022-05-16parisc: SEABIOS_HPPA_VERSION 5seabios-hppa-v5Helge Deller1-1/+1
New features and fixes: * Fixed SeaBIOS PS/2 keyboard support. This now allows to use the qemu "-boot menu=on" option to start the firmware boot selection menu and provide a working menu with keyboard on serial (qemu "-nographic" option) and PS/2 keyboard (qemu "-graphic" option) on graphical screen.
2022-05-14parisc: Add full PDC firmware boot menuHelge Deller4-36/+209
Finally add the real boot menu. If qemu is started with the "-boot menu=on" option, the PDC boot menu is shown and the user can then boot any of the available SCSI disc/CDs. Just type "BOOT" (to boot the default device), or "BOOT FWSCSI.4" (to boot SCSI device #4). Signed-off-by: Helge Deller <deller@gmx.de>
2022-05-14parisc/lasips2: Fix lasips2_kbd_in() to return early without inputHelge Deller1-1/+8
lasips2_kbd_in() is used to read input from an emulated PS/2 keyboard. Since there is no interrupt support durig PDC/IODC we need to poll the PS/2 status flags to see if a new key was pressed. In order to be able to poll regularily, exit the loop to read already pressed chars as soon as possible. This can be done by calling handle_16() with register ah = 0x11 to check if keys are queued up and exit if none are available. This patch fixes the problem that keys couldn't be read when using a graphical output (artist graphics). This patch fixes palo and other bootloaders to be able to use input from the emulated PS/2 keyboard. Signed-off-by: Helge Deller <deller@gmx.de>
2022-05-14parisc: Add CONSOLE_DEFAULT constantHelge Deller1-2/+10
Add the CONSOLE_DEFAULT constant to make the decision which I/O console to use easier to understand. Signed-off-by: Helge Deller <deller@gmx.de>
2022-05-11parisc: SEABIOS_HPPA_VERSION 4seabios-hppa-v4Helge Deller1-2/+2
New features and fixes: * Fix firmware rendenzvous code to clear all pending external intrrupts before entering the waiting loop. * STI firmware now contains additional fonts built-in, which can be selected with qemu command-line options: -fw_cfg opt/font,string=1 - a HP 8x16 font -fw_cfg opt/font,string=2 - a HP 6x13 font -fw_cfg opt/font,string=3 - a HP 10x20 font -fw_cfg opt/font,string=4 - a Linux 16x32 font Signed-off-by: Helge Deller <deller@gmx.de>
2022-05-11stirom: Add 6x13 and 10x20 fonts, replace 8x16 fontHelge Deller1-266/+1164
Add additional fonts to STI ROM. They can be selected with qemu command-line options: -fw_cfg opt/font,string=1 - a HP 8x16 font -fw_cfg opt/font,string=2 - a HP 6x13 font -fw_cfg opt/font,string=3 - a HP 10x20 font -fw_cfg opt/font,string=4 - a Linux 16x32 font Signed-off-by: Helge Deller <deller@gmx.de>
2022-05-11Move PAGE0 to hppa.h and fix sti_putchar() to take selected fontHelge Deller2-3/+5
Signed-off-by: Helge Deller <deller@gmx.de>
2022-03-25parisc: Fix CPU hotplug rendenzvous codeHelge Deller2-4/+22
Fix the PDC rendenzvous code to clear all pending external intrrupts before entering the waiting loop. Without clearing them before, the CPU was waken up immediately again. This fixes the CPU hotplug on Linux, which can be run with chcpu -d 2 # to disable CPU2 chcpu -e 2 # to wake up CPU2 Signed-off-by: Helge Deller <deller@gmx.de>
2022-02-02parisc: SEABIOS_HPPA_VERSION 3seabios-hppa-v3seabios-hppa-v3-rc2Helge Deller1-1/+1
New features and fixes: * Allow up to 16 CPUs * Add TOC button support: To trigger a TOC, execute "nmi" in the qemu monitor (Ctrl-A C) * New opt/hostid fw_cfg option to change hostid: -fw_cfg opt/hostid,string=334455 * Add opt/console fw_cfg option to select default console: -fw_cfg opt/console,string=serial -fw_cfg opt/console,string=graphics * Add Linux TER16x32 font to STI firmware: -fw_cfg opt/font,string=2 * Leave IRQs disabled after rendevouz Signed-off-by: Helge Deller <deller@gmx.de>
2022-02-02parisc: Add Linux TER16x32 font to STI firmwareHelge Deller4-3/+2084
The new 16x32 font can be selected as default firmware font with this Qemu option: -fw_cfg opt/font,string=2 Any other values will choose the current HP 8x16 font. Signed-off-by: Helge Deller <deller@gmx.de>
2022-01-12parisc: Add opt/console fw_cfg option to select default consoleHelge Deller1-4/+24
By default the firmware will choose the (virtual) graphics card as firmware console if the graphics card is available. If not it defaults to serial console. In some configurations it's useful to select the serial console als default output device even if the graphics card is available. For that, this patch adds the opt/console fw_cfg qemu option. Qemu option usage to switch the firmare to use the serial or graphics default output: -fw_cfg opt/console,string=serial -fw_cfg opt/console,string=graphics Signed-off-by: Helge Deller <deller@gmx.de>
2022-01-12parisc: Warn if CONFIG_PARISC is not enabledHelge Deller1-0/+3
Signed-off-by: Helge Deller <deller@gmx.de>
2022-01-12parisc: Allow 16 CPUsHelge Deller2-5/+9
Move the HPA for MEMORY_HPA out of the address space of the 16th CPU, and fix the PDC_COPROC_CFG PDC function to report functional FPUs for all configured CPUs. The documentation specifies that cr10 can only report for 8 CPUs, but that seems outdated as both HP-UX 10 and HP-UX 11 accepts this change. Signed-off-by: Helge Deller <deller@gmx.de>
2022-01-11parisc: Leave IRQs disabled after rendevouzHelge Deller1-2/+1
And only enable the timer IRQ for wakeup (not all). Signed-off-by: Helge Deller <deller@gmx.de>
2022-01-06parisc: Add TOC button supportHelge Deller4-10/+279
Add support for an emulated TOC/NMI button. Almost all PA-RISC machines have either a button that is labeled with 'TOC' or a BMC/GSP function to trigger a TOC. TOC is a non-maskable interrupt that is sent to the processor. This can be used for diagnostic purposes like obtaining a stack trace/register dump or to enter KDB/KGDB in Linux. This patch adds support for such an emulated TOC button. This patch writes the CPU registers into PIM (processor internal memmory) for later analysis. It uses the CPU "shadow registers", the IAOQ-back and IASQ-back values are provided by qemu in r24/r25. This patch uses the new qemu aritificial opcode "getshadowregs" (0xfffdead2) which restores the original values of the shadow registers. To trigger a TOC, switch to the "qemu monitor" with Ctrl-A C, and type in the command "nmi". After the TOC started the OS-debugger, exit the qemu monitor with Ctrl-A C. Signed-off-by: Helge Deller <deller@gmx.de>
2022-01-02parisc: Add opt/hostid fw_cfg option to change hostidHelge Deller1-3/+7
Allow the user to select another hostid value. In HP/UX the "uname -i" command shows the number, and in Linux it's visible in the /proc/cpuinfo output. The default hostid number is 2006243326, any other value can be selected with this qemu command line option: -fw_cfg opt/hostid,string=334455 Signed-off-by: Helge Deller <deller@gmx.de>
2021-09-24parisc: Increase SEABIOS_HPPA_VERSION to version 2seabios-hppa-v2parisc-qemu-6hppa-target-2Helge Deller1-1/+1
This version adds fixes which allow choosing the primary boot device. Either via qemu bootindex parameter, e.g.: -device scsi-hd,drive=drive1,bus=scsi0.0,channel=0,scsi-id=6,lun=0,bootindex=1 -drive file=image.img,if=none,id=drive1 or via qemu boot order option to select the SCSI ID, e.g.: -boot order=g-m: machine implementation dependent drives (SCSI ID) where "g" means SCSI ID 0, "h" is SCSI ID 1 and so on. Signed-off-by: Helge Deller <deller@gmx.de>
2021-09-24parisc: Add sha256.c sha512.c and ror() functionHelge Deller2-1/+6
Needed to cope with upstream changes. Signed-off-by: Helge Deller <deller@gmx.de>
2021-09-24parisc: Document the fw_cfg opt/pdc_debug optionHelge Deller1-0/+1
Enable firmware debug info at startup with this option: -fw_cfg pdc_debug,string=<val> <val> is an integer with this bitmask: DEBUG_PDC 0x0001, enables debug info for PDC calls DEBUG_IODC 0x0002, enables debug info for IODC calls Signed-off-by: Helge Deller <deller@gmx.de>
2021-09-24parisc: Fix boot priority and malloc initializationsHelge Deller1-2/+6
Make the malloc area initialization the first step after bootup. It's important, because the first mallocs otherwise ends up in lower memory area (PAGE0 from parisc) which will gets overwritten later. That change fixes the fw_cfg() interface as well. Before that change fw_cfg got initialized and zeroed-out shortly later in the boot process. And now the initialization of the boot structures succeeds too, so we can run boot_init() directly after setting up malloc and fw_cfg, and the bootindex parameter from qemu suddenly works out of the box. Signed-off-by: Helge Deller <deller@gmx.de>