Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
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>
|
|
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>
|
|
Needed to cope with upstream changes.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
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>
|
|
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>
|
|
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>
|