Age | Commit message (Collapse) | Author | Files | Lines |
|
On parisc qemu reports the main PCI bus as "/dino-pcihost" instead of
"/pci@i0cf8". This is important when using the bootindex parameter for
SCSI discs, because the seabios boot code uses this name as prefix when
identifying and sorting the bootable discs.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Add support to boot from a specific SCSI ID by mapping drives
g-m to SCSI IDs 0-7, e.g.
-boot order=g for SCSI ID 0, and
-boot order=l for SCSI ID 5
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
PA-RISC is big endian. Add necessary endianess conversion functions
to get disc detection correct.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Boot directly from ATA drive without going through the process_op_32()
function. Additionally PA-RISC can read/write chunks from disk which
are bigger than 64kb, so don't abort when this is tried.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
This patch adds the various drivers for PA-RISC.
To build the parisc firmware enable CONFIG_PARISC and run "make parisc".
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
This header file is included from many places and provides
low-level inline assembly functions used on the Intel CPU.
On PA-RISC similiar functions exists, so provide replacement
functions in an own header file and include that instead.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Rearrange the thread functions and provide wrappers which evaluates to
no code when !CONFIG_THREADS.
The function call16_int() isn't used on PA-RISC, so replace it by an
empty function call.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Convert from little-endian to host-endian when returning the value from
romfile_loadint().
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
On PA-RISC we want to print some numbers as 64-bits, so
fix the bvprintf() function acordingly.
On x86 printing integers was (and still is) limited to 32bit,
probaby to avoid gcc to insert calls to __umoddi3 and __udivdi3
and thus getting undefined reference linker errors.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
On PA-RISC call an own screenc() implementation which doesn't use int10,
prevent the Intel-specific \r newline when printing \n and
don't output to serial debug port.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
On x86 mremap() is used to provide malloc'ed memory.
This can't be used on PA-RISC, so provide an own malloc()
implementation.
Since PA-RISC is fully 32-/64-bit use "unsigned long" instead
of "u32".
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Add the IO-Ports for the PCI bus on PA-RISC.
The PCI bus is little-endian on x86 and PA-RISC, so add the necessary
conversions for PA-RISC.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
The lsi-scsi driver expects the SCSI script in little-endian
format. Do this conversion on PA-RISC (which is big-endian).
On x86 this conversion will be optimized away.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
On PA-RISC it's possible to boot from various SCSI targets and LUNs.
Add fields to the drive_s struct to be able to store those.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
The cdbcmd pointer given to scsi_fill_cmd() can point to
an unaligned address. On x86 writing a 64-bit value to an
unaligned address will succeed, while on PA-RISC the machine
will stop with an unaligned access error (esp. since the
fault handlers are not implemented in the firmware).
Work around that issue by using a temporary variable and
copy it to the destination when finished.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Fix linkage problem on PA-RISC, no functional change on x86.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
On x86 I/O ports are located below address 0x4000, while
on PA-RISC I/O ports are allowed in the whole 32/64 bit
address space.
So, introduce a portaddr_t typedef which defaults to the
current u16 type on x86 and to unsigned long on PA-RISC.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Initialize the PA-RISC Dino PCI chip. On Dino, do not remap
PCI IDE ports and allow PCI IO regions above address 0x4000.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Add wrappers for the FLATPTR_* functions for the parisc architecture.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
SeaBIOS until now only supported the little-endian x86 platform.
PA-RISC is big endian, so add the necessary conversion functions
depending on the architecture.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Use the get_bda_ptr() accessor function instead of hardcoding with
MAKE_FLATPTR().
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
This patch adds or adjust the existing accessors to the various data
areas in a x86 BIOS for usage with a PA-RISC BIOS.
On PA-RISC the x86 areas are emulated as normal variables, stored in
normal RAM and can be accessed directly.
GET_IVT() and SET_IVT() are emulated by a static ivt_table[] array.
Introduce a get_bda_ptr() inline function to return the address of the
Bios Data Area (BDA).
GET_BDA() and SET_BDA() are used to directly access variables from the
BDA.
GET_GLOBAL() is used to access variables directly.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Add a config option to Kconfig to choose between building for
Intel/AMD CPUs (x86) or HP PA-RISC CPUs (parisc/hppa).
Add dependency for some config options based on the choosen
architecture.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
In the rare case of a TPM 2 failure, disable the platform hierarchy after
disabling the endorsement and owner hierarchies.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
|
|
Signed-off-by: Alex Martens <alexmgit@protonmail.com>
|
|
Instead of just using sha1 for all PCR banks (and truncating
the value or zero-padding it) use the proper hash function for
each one of the banks. For unimplemented hashes, fill the buffer
with 0xff.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
|
|
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
|
|
Fix two details of the logs:
- Set the field 'SpecErrata' to 2 as required by specs.
- Write the separator into the log entry's event field.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
|
|
In function run_thread() the function check_irqs() gets called
after the thread switch for atomic handoff reasons. In yield()
it's the other way round.
If check_irqs() is called after run_thread() and check_irqs()
is called before switch_next() in yield(), it can happen in a
constructed case that a background thread runs twice without
a check_irqs() call in between. Call check_irqs() after
switch_next() in yield() to prevent this.
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
|
|
The comment above the yield() function suggests that yield()
allows interrupts for a short time. But yield() only briefly
enables interrupts if seabios was built without CONFIG_THREADS
or if yield() is called from the main thread. In order to
guarantee that the interrupts were enabled once before yield()
returns in a background thread, the main thread must call
check_irqs() before or after every thread switch. The function
run_thread() also switches threads, but the call to check_irqs()
was forgotten. Add the missing check_irqs() call.
This fixes PS/2 keyboard initialization failures.
The code in src/hw/ps2port.c relies on yield() to briefly enable
interrupts. There is a comment above the yield() function in
__ps2_command(), where the author left a remark why the call to
yield() is actually needed.
Here is one of the call sequences leading to a PS/2 keyboard
initialization failure.
ps2_keyboard_setup()
|
ret = i8042_command(I8042_CMD_CTL_TEST, param);
# This command will register an interrupt if the PS/2 device
# controller raises interrupts for replies to a controller
# command.
|
ret = ps2_kbd_command(ATKBD_CMD_RESET_BAT, param);
|
ps2_command(0, command, param);
|
ret = __ps2_command(aux, command, param);
|
// Flush any interrupts already pending.
yield();
# yield() doesn't flush interrupts if the main thread
# hasn't reached wait_threads().
|
ret = ps2_sendbyte(aux, command, 1000);
# Reset the PS/2 keyboard controller and wait for
# PS2_RET_ACK.
|
ret = ps2_recvbyte(aux, 0, 4000);
|
for (;;) {
|
status = inb(PORT_PS2_STATUS);
# I8042_STR_OBF isn't set because the keyboard self
# test reply is still on wire.
|
yield();
# After a few yield()s the keyboard interrupt fires
# and clears the I8042_STR_OBF status bit. If the
# keyboard self test reply arrives before the
# interrupt fires the keyboard reply is lost and
# ps2_recvbyte() returns after the timeout.
}
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
|
|
BUILD_MIN_BIOSTABLE reserves space in the f-segment. Some data
structures -- for example disk drives known to seabios -- must be
stored there, so the space available here limits the number of
devices seabios is able to manage.
This patch sets BUILD_MIN_BIOSTABLE to 8k for bios images being 256k or
larger in size. 32bit code is moved off in that case, so we have more
room in the f-segment then.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Instead of allocating a big array upfront go probe the namespaces and
only allocate an nvme_namespace struct for those namespaces which are
actually active.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Modern binutils unconditionally tracks x86_64 ISA levels in intermediate
files in .note.gnu.property. Custom liker script does not handle the
section and complains about it:
ld --gc-sections -T out/vgasrc/vgalayout.lds out/vgaccode16.o \
out/vgaentry.o out/vgaversion.o -o out/vgarom.o
ld: section .note.gnu.property LMA [0000000000000000,0000000000000027] \
overlaps section .text LMA [0000000000000000,00000000000098af]
The change ignores .note* sections.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
Some USB keyboards use max packet sizes beyond the current maximum
supported by SeaBIOS.
This increases the available size to support keyboards such as the
Matias Ergo Pro.
Signed-off-by: Stefan Ott <stefan@ott.net>
|
|
At least some USB drives with a write protect switch (e.g. Netac U335)
could report "MEDIUM NOT PRESENT" for a while if a write protection is
enabled. Instead of stopping the initialization attempts immediately,
stop only after getting this report for 3 times, to ensure the
successful initialization of such a "broken hardware".
Signed-off-by: Mike Banon <mikebdp2@gmail.com>
|
|
This ended up with an odd mix of recursion (albeit *mostly*
tail-recursion) and interation that could have been prettier. In
addition, while recursing it potentially adjusted op->count which is
used by callers to see the amount of I/O actually performed.
Fix it by bringing nvme_build_prpl() into the normal loop using 'i'
as the offset in the op.
Fixes: 94f0510dc ("nvme: Split requests by maximum allowed size")
Reviewed-by: Alexander Graf <graf@amazon.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
|
|
Some NVMe controllers only support small maximum request sizes, such as
the AWS EBS NVMe implementation which only supports NVMe requests of up
to 32 pages (256kb) at once.
BIOS callers can exceed those request sizes by defining sector counts
above this threshold. Currently we fall back to the bounce buffer
implementation for those. This is slow.
This patch introduces splitting logic to the NVMe I/O request code so
that every NVMe I/O request gets handled in a chunk size that is
consumable by the NVMe adapter, while maintaining the fast path PRPL
logic we just introduced.
Signed-off-by: Alexander Graf <graf@amazon.com>
|
|
Today, we split every I/O request into at most 4kb chunks and wait for these
requests to finish. We encountered issues where the backing storage is network
based, so every I/O request needs to go over the network with associated
latency cost. A few ms of latency when loading 100MB initrd in 4kb chunks
does add up.
NVMe implements a feature to allow I/O requests spanning multiple pages,
called PRP lists. This patch takes larger I/O operations and checks if
they can be directly passed to the NVMe backing device as PRP list.
At least for grub, read operations can always be mapped directly into
PRP list items.
This reduces the number of I/O operations required during a typical boot
path by roughly a factor of 5.
Signed-off-by: Alexander Graf <graf@amazon.com>
|
|
When creating a PRP based I/O request, we pass in the pointer to operate
on. Going forward, we will want to be able to pass additional pointers
though for mappings above 4k.
This patch adds a parameter to nvme_get_next_sqe() to pass in the PRP2
value of an NVMe I/O request, paving the way for a future patch to
implement PRP lists.
Signed-off-by: Alexander Graf <graf@amazon.com>
Reviewed-by: Filippo Sironi <sironi@amazon.de>
|