2865 Commits

Author SHA1 Message Date
d0d359929a parisc: SEABIOS_HPPA_VERSION 19
New:
- Added new "715" machine (Snake machine, no PCI bus)
- Added driver for NCR710 SCSI on LASI (Soumyajyotii Ssarkar)

Fixes & cleanups:
- Fix memory size detection on NetBSD
- Snake machines do not support the PDC_SYSTEM_MAP call
- Always return the HPA in pdc_mem_map() PDC call
- Add LMMIO range for internal artist graphic card
- various coding style cleanups

Signed-off-by: Helge Deller <deller@gmx.de>
seabios-hppa-v19
2025-10-17 20:58:26 +02:00
5504e9fd17 parisc: Drop hardcoded LASI HPA adresses
Signed-off-by: Helge Deller <deller@gmx.de>
2025-10-17 20:49:15 +02:00
0f7a9b011f parisc: Update copyright year and minor user-visible changes
Signed-off-by: Helge Deller <deller@gmx.de>
2025-10-17 20:49:15 +02:00
a991032f1e parisc: Bugfix: Always return the HPA in pdc_mem_map() PDC call
Do not return what was provided in the inventory, but instead always
return the HPA.

Signed-off-by: Helge Deller <deller@gmx.de>
2025-10-17 20:49:15 +02:00
19070f1127 parisc: Wire up the 715 machine
Signed-off-by: Helge Deller <deller@gmx.de>
2025-10-17 20:49:15 +02:00
1cc6ce8b5f parisc: Three PDC bugfixes for 715 support
- we need different CPU HPA offsets on 715, and can only support up to 8
  CPUs
- on a 64-bit machine, never always fall back to B160L and not to 715
  when asking for model from 32-bit PDC call from OS
- old machines like 715 do not support the PDC_SYSTEM_MAP call, so fall
  back to Snake detection on those.

Signed-off-by: Helge Deller <deller@gmx.de>
2025-10-17 20:49:15 +02:00
4abeb94301 parisc: More cleanups and fixes to allow LASI at various HPA addresses
Signed-off-by: Helge Deller <deller@gmx.de>
2025-10-17 20:49:15 +02:00
ba625ca021 parisc: Fix memory size detection on NetBSD
NetBSD showed the memory size of the first memory module wrong.
It turns out that our PDC_IODC_NINIT call did not returned the
expected value in the second result word.

Signed-off-by: Helge Deller <deller@gmx.de>
2025-10-17 20:49:15 +02:00
b2e3adf9c0 parisc: Add HPHW_xxx identifiers and drive_name() helper function
Signed-off-by: Helge Deller <deller@gmx.de>
2025-10-17 20:49:15 +02:00
a0e3e0137b parisc: Fix boot with LASI PS/2 port
Exit early if the LASI HPA (lasi_hpa) hasn't been set yet.
This prevents that the PS/2 driver to waits endless for a non-existant
port.

Signed-off-by: Helge Deller <deller@gmx.de>
2025-10-17 20:49:15 +02:00
ed0f5fffe5 parisc: Adjust machine inventory for 715 machine
Signed-off-by: Helge Deller <deller@gmx.de>
2025-10-17 20:49:15 +02:00
d7305005cd parisc: Disable some devices on B160L
Signed-off-by: Helge Deller <deller@gmx.de>
2025-10-17 20:49:15 +02:00
467c47f22a parisc: Disable ATA and enable NCR710_SCSI in default config
Signed-off-by: Helge Deller <deller@gmx.de>
2025-10-17 20:49:15 +02:00
41f1a67c90 SCSI-NCR710/parisc: Wire up NCR driver
Signed-of-by: Soumyajyotii Ssarkar <soumyajyotisarkar23@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
2025-10-17 20:49:15 +02:00
29a51c6de4 SCSI-NCR710/parisc: Add driver for NCR 53c710 SCSI
A driver for the NCR 53C710 SCSI chip, as used in PA-RISC and other
machines.

This driver has been developed during the Google Summer of Code 2025
program.

Signed-of-by: Soumyajyotii Ssarkar <soumyajyotisarkar23@gmail.com>
Signed-off-by: Helge Deller <deller@gmx.de>
2025-10-17 20:49:15 +02:00
c31ae07f44 parisc: Prepare for addition of a HP 715 machine
On the HP 715 machine the base address of the LASI controller is
at 0xf0100000, so introduce a constant for this address.

The firmware end address needs to be reduced to not overlap with
the LASI addresses.

Introduce LASI_XXX constants which reflects the offsets of the
various devices of the LASI base HPA.

Adjust the serial port addressess accordingly. We can not use hard
coded HPAs, because on 715 the LASI serial ports are at different
addresses than on B160L.

Signed-off-by: Helge Deller <deller@gmx.de>
2025-10-14 18:51:17 +02:00
25c6749898 parisc: Drop unused acpi tables
As suggested by Michael, drop the ACPI tables for parisc.

Suggested-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Helge Deller <deller@gmx.de>
2025-09-13 00:27:37 +02:00
3391c58096 parisc: Add LMMIO range for internal artist graphic card
Register a LMMIO range for the internal graphic card.
That allow to boot with STI graphic card (artist) when booting
on a 64-bit machine.

Signed-off-by: Helge Deller <deller@gmx.de>
2025-02-04 21:25:17 +01:00
1c516b4813 parisc: SEABIOS_HPPA_VERSION 18
Fixes:
- Fix PDC_CACHE/PDC_CACHE_RET_SPID return value for space
  register hashing on 64-bit HP-UX
- Fix IRT table entries to use slot number
- Increase PCI alignment for memory bars to 64k

New PDC functions & general enhancements:
- Allow up to 256 GB RAM on 64-bit machines

Signed-off-by: Helge Deller <deller@gmx.de>
seabios-hppa-v18
2025-01-30 13:23:36 +01:00
a52e733641 parisc: Add PDC call #73
Unknown what it does, but seems similiar to PDC_NVOLATILE.
Called by HP-UX 11 64-bit on C3700 machine, which returns PDC_BAD_PROC.

Signed-off-by: Helge Deller <deller@gmx.de>
2025-01-29 22:52:47 +01:00
db1d858227 parisc: Use PDC_SCSI_PARMS constant instead of hardcoded number
Signed-off-by: Helge Deller <deller@gmx.de>
2025-01-29 22:31:07 +01:00
4f97098ae6 parisc: Fix IRT table entries to use slot number
Do not simply enumerate the slots when walking the PCI
cards, but use the slot number (out of the bdf) to calculate
the irq_devno entry.

Signed-off-by: Helge Deller <deller@gmx.de>
2025-01-25 22:19:53 +01:00
b8aec524af parisc: Increase PCI alignment for memory bars to 64k
Allows better alignment, targetted for serial ports on Dino GSC cards.

Signed-off-by: Helge Deller <deller@gmx.de>
2025-01-25 13:11:37 +01:00
650b5494a1 parisc: Fix PDC_CACHE/PDC_CACHE_RET_SPID return value
In case space register hashing is enabled, return 0xfe00000 instead of 0xfe0.

Fixes: 8d6b0df62d ("parisc: Fix return value of PDC_CACHE/PDC_CACHE_RET_SPID for space id hashing")
Signed-off-by: Helge Deller <deller@gmx.de>
2025-01-25 00:14:38 +01:00
413f14330d parisc: Allow up to 256 GB RAM on 64-bit machines
Build the necessary tables for sprocket and PAT machines and
return them to operating system on request.

Signed-off-by: Helge Deller <deller@gmx.de>
2025-01-22 14:38:14 +01:00
a528f01d7a parisc: SEABIOS_HPPA_VERSION 17
New PDC functions & general enhancements:
- Add PDC_MODEL_GET_INSTALL_KERNEL firmware call
- Add PDC_PAT_EVENT firmware call
- Support ENTRY_IO_BOOTOUT
- Prefer memory-access over io-access of GSP serial port
- Disable LMMIO_DIRECT0 range during modification
- Small optimizations in IODC call

Fixes:
- esp-scsi: indicate acceptance of MESSAGE IN phase data
- Avoid crash when booting without SCSI controller
- Remove exec flag from hppa-firmware.img
- Fix LMMIO detection for PCI cards on Astro/Elroy
- Avoid trashing MPE IPL bootloader stack
- HP-UX 11 64-bit saves number of RAM pages in PAGE0 at 0x33c
- Fix return value of PDC_CACHE/PDC_CACHE_RET_SPID for space id hashing
- Allow PDC functions to act when called in narrow mode
- pcidevice: Use portaddr_t for io port addresses

Cleanups:
- Change default make target to "parisc"
- Clean the "out-64" directory on "make clean"

Signed-off-by: Helge Deller <deller@gmx.de>
2024-11-03 19:42:53 +01:00
72cb2523a0 esp-scsi: indicate acceptance of MESSAGE IN phase data
When the target has sent its MESSAGE IN phase data to the initiator, it waits
for the initiator to release the ACK signal before disconnecting from the bus.

Send a MSG_ACC command to the ESP so that the initiator releases the ACK signal
to allow the target to disconnect, and also return the ASC back to the
disconnected state.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-ID: <20240829115846.954993-1-mark.cave-ayland@ilande.co.uk>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-11-03 19:34:12 +01:00
7f05365dc1 parisc: sync hppa_hardware.h header with qemu code
Signed-off-by: Helge Deller <deller@gmx.de>
2024-11-03 19:34:12 +01:00
8d6b0df62d parisc: Fix return value of PDC_CACHE/PDC_CACHE_RET_SPID for space id hashing
HP-UX 11 64-bit uses space ID hashing.
If qemu implements the diagnose registers and mfdiag/mtdiag instructions
(qemu > v9.0 required), allow PDC to ask the CPU and return the correct
value of space id hashing bits.

Signed-off-by: Helge Deller <deller@gmx.de>
Suggested-by: Sven Schnelle <svens@stackframe.org>
2024-11-03 19:29:34 +01:00
c291c2fcea parisc: Remove exec flag from hppa-firmware.img
Remove the executable-flag on the generated firmware file.
This is necessary otherwise Fedora rpm builder will check for a
build-id in the executable.

Reported-by: Cole Robinson <crobinso@redhat.com>
2024-05-15 15:51:45 +02:00
dc9f8910c5 Makefile: Change default make target to "parisc"
"parisc" is the default target when using this SeaBIOS-hppa git
repository. Change it accordingly, which then allows us to just run
"make" instead of "make parisc".

Requested-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Helge Deller <deller@gmx.de>
2024-05-15 15:50:06 +02:00
d71ea061ad parisc/pci: Disable LMMIO_DIRECT0 range during modification
When modifying the LMMIO directed ranges, disable the range
to prevent that hardware (or qemu) reacts to every small
modification before all values have been set.

Signed-off-by: Helge Deller <deller@gmx.de>
2024-05-15 15:50:06 +02:00
84c30caa7c parisc: Fix LMMIO detection for PCI cards on Astro/Elroy
PCI graphic cards allocate LMMIO memory. Allow PDC_ADD_VALID to
accept this memory.

Signed-off-by: Helge Deller <deller@gmx.de>
2024-05-15 15:50:06 +02:00
dd4b770d47 parisc: Support ENTRY_IO_BOOTOUT
The hpux bios/firmware flash tool wants to write the ISL
AUTO file to hard disc. This prevents starting the flash
tool again, and instead boots into hpux at next reboot.

Signed-off-by: Sven Schnelle <svens@stackframe.org>
Signed-off-by: Helge Deller <deller@gmx.de>
2024-05-15 15:50:06 +02:00
e25c7c98c5 parisc: Avoid trashing MPE IPL bootloader stack
The MPE IPL boot loader calls PDC_MODEL when running in narrow mode.
The return buffer pointed to by arg2 holds space for eigth 32-bit integers
directly followed by the stack used by MPE.
So, when pdc_model() writes 32 64-bit integers to arg2, it unintentionally
overwrites MPE's call stack.
Fix it by limiting returned bytes depending if PDC_MODEL was called
in WIDE or NARROW mode.

Signed-off-by: Helge Deller <deller@gmx.de>
2024-05-15 15:50:06 +02:00
8c0e08f088 parisc: Allow PDC functions to act when called in narrow mode
Some PDC functions need to know at runtime if they were called in
narrow mode. Add infrastructure to hand over this information to
parisc_pdc_entry().

The background is, that the MPE IPL boot loader calls PDC_MODEL
and provides a very small return buffer, followed in memory by the
stack. So, when pdc_model writes 32 x 8 bytes in 64-bit mode,
the stack of IPL boot will be trashed.

Signed-off-by: Helge Deller <deller@gmx.de>
2024-05-15 15:50:06 +02:00
4b689a0267 parisc: Drop FUNC_MANY_ARGS parameter
This parameter was intended to make sure that the compiler saves
registers on the stack and prevents possible register corruption.
But this isn't needed and doesn't help, so just remove it.

Signed-off-by: Helge Deller <deller@gmx.de>
2024-05-15 15:50:06 +02:00
fef96b4042 parisc: Prefer memory-access over io-access of GSP serial port
HP-UX 11.x (64-bit) seems to require memory-mapped serial ports when accessing
GSP cards, so change the firmware to pre-map serial ports for memory-accesses.

As an example, the rp5470 has this GSP card (Linux output):
 pci 0000:00:04.0: [103c:128d] type 00 class 0x088000
 pci 0000:00:04.1: [103c:1048] type 00 class 0x070002
 pci 0000:00:04.1: reg 0x10: [mem 0xffffffff80000000-0xffffffff80000fff]
 pci 0000:00:04.1: reg 0x14: [io  0x0000-0x003f]

 Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
 serial 0000:00:04.1: enabling device (0142 -> 0143)
 printk: console [ttyS0] disabled
 0000:00:04.1: ttyS0 at MMIO 0xffffffff80000000 (irq = 70, base_baud = 115200) is a 16550A
 printk: console [ttyS0] enabled
 printk: bootconsole [ttyB0] disabled
 0000:00:04.1: ttyS1 at MMIO 0xffffffff80000008 (irq = 70, base_baud = 115200) is a 16450
 0000:00:04.1: ttyS2 at MMIO 0xffffffff80000010 (irq = 70, base_baud = 115200) is a 16550A
 0000:00:04.1: ttyS3 at MMIO 0xffffffff80000030 (irq = 70, base_baud = 115200) is a 16550A
 serial 0000:00:04.1: Couldn t register serial port 0, irq 70, type 2, error -28

Signed-off-by: Helge Deller <deller@gmx.de>
2024-05-15 15:50:06 +02:00
495a7f932b pcidevice: Use portaddr_t for io port addresses
This is needed on parisc, since parisc uses 32-bit I/O port addressses
while Intel uses just 16 bits.

Signed-off-by: Helge Deller <deller@gmx.de>
2024-05-15 15:50:06 +02:00
ed96379707 parisc: HP-UX 11 64-bit saves number of RAM pages in PAGE0 at 0x33c
Not sure yet, why HP-UX 11 (64-bit) stores the value here, but it's
needed to allow HP-UX 11 to boot up.

Signed-off-by: Helge Deller <deller@gmx.de>
Noticed-by: Sven Schnelle <svens@stackframe.org>
2024-05-15 15:50:06 +02:00
d2346a81cc parisc: Small optimization in IODC call
Signed-off-by: Helge Deller <deller@gmx.de>
2024-05-15 15:50:06 +02:00
29d7b7a79a parisc: Add PDC_PAT_EVENT firmware call
Add the PAT_EVENT PDC function. Disable PAT for now as the c3k machines
do not seem to support PAT.

Signed-off-by: Helge Deller <deller@gmx.de>
2024-05-15 15:50:06 +02:00
7516bcfcdc parisc: Implement PDC_MODEL_GET_INSTALL_KERNEL function
The IPL loader on the HP-UX install CD asks firmware which "kernel/program" it
should start.  By default HP-UX will load the "INSTALL" program, but on 64-bit
machines firmware can instead ask to boot the "WINSTALL" program.

Signed-off-by: Helge Deller <deller@gmx.de>
2024-05-15 15:50:06 +02:00
20e652f146 parisc: Clean the "out-64" directory on "make clean"
Signed-off-by: Helge Deller <deller@gmx.de>
2024-05-15 15:50:06 +02:00
03774edaad parisc: Fix 64-bit PDC call to not trash %dp
Fixes 64-bit HP-UX IPL boot loader.

Signed-off-by: Helge Deller <deller@gmx.de>
2024-02-08 22:39:40 +01:00
424f05599b parisc: Fix hpa_name() to resolve & print PCI device
Signed-off-by: Helge Deller <deller@gmx.de>
2024-02-08 19:44:11 +01:00
75d0088436 output: Fix %pP (PCI device) format string output on 64-bit firmware
Signed-off-by: Helge Deller <deller@gmx.de>
2024-02-08 11:58:40 +01:00
d305f1b6b6 parisc: pdc_add_valid() should allow HPA of graphics card
Signed-off-by: Helge Deller <deller@gmx.de>
2024-02-08 11:40:48 +01:00
e56a2c9b5a parisc: Fix Debug output on 64-bit PDC
Need to F-extend the CPU_HPA to get to I/O port for Debug info.

Signed-off-by: Helge Deller <deller@gmx.de>
2024-02-08 11:15:16 +01:00
1f45a92ff2 parisc/sti: Fix STI on 64-bit boot console handler
Allow the firmware boot messages and boot menu to show up
on an emulated STI/artist card.
The current fixes are functional for booting, but to support
STI on 64-bit with Linux later on, additional patches are needed.

Signed-off-by: Helge Deller <deller@gmx.de>
2024-02-08 10:08:56 +01:00