Age | Commit message (Collapse) | Author | Files | Lines |
|
Review-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
(cherry picked from commit 1ef72ab2f89ae61dcdb3f01323bd0a7dc978c2b9)
|
|
Increase the boot menu description size so that menu items up to 80
characters display without truncation.
Reported-by: Rene Shuster <rene.shuster@bcsemail.org>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
(cherry picked from commit 6f090f868dcdc089a669b3664f9564ef8f65d0ea)
|
|
On QEMU it's necessary to manually reset the BIOS memory region
between 0xc0000-0x100000 on a reboot. After this manual memory reset
is completed, it's not valid to use the generic reset mechanisms.
Rename qemu_prep_reset() to qemu_reboot() and change the function to
immediately reboot after the code memcpy.
This fixes a bug that could cause code corruption on reboots - calling
the udelay() function (as invoked by i8042_reboot and/or pci_reboot)
was not valid after the BIOS was memcpy'd.
Reported-by: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Tested-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
(cherry picked from commit c68aff57ce317d9f2d69d20eba893a10d964f316)
|
|
Any pointers to BIOS-allocated memory that were written back to QEMU
fw_cfg files are replayed when resuming from S3 sleep.
Signed-off-by: Ben Warren <ben@skyportsystems.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
(cherry picked from commit 8f598a4641f98cf503653f80c779793d91c95a84)
|
|
Due to memory contraints, when resuming from S3 the fw_cfg "files" API
isn't available. This adds a simple API to get a file 'key', and to
write to the file using the key as a reference.
Signed-off-by: Ben Warren <ben@skyportsystems.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
(cherry picked from commit 336b60bb10196adf287489cca4fd17092d9fac5e)
|
|
This command is similar to ADD_POINTER, but instead of patching
memory, it writes the pointer back to QEMU over the DMA interface.
Signed-off-by: Ben Warren <ben@skyportsystems.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
(cherry picked from commit bb9cbbcabc37665cb645cacd1cfefbfe1f4364ab)
|
|
This is a little cleaner and matches how the command structures are
defined in QEMU.
Signed-off-by: Ben Warren <ben@skyportsystems.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
(cherry picked from commit e5bebc77d2a9dfa67cda100b67d787c3ebdb5397)
|
|
This allows BIOS to write data back to QEMU using the DMA interface and
provides a higher-level abstraction to write to a fw_cfg file
Signed-off-by: Ben Warren <ben@skyportsystems.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
(cherry picked from commit f991822f24adbeea519495dd8fe2d8ca7ed47291)
|
|
If one of the ps2 ports is enabled prior to the ps2 controller reset
then it is possible a device event (eg, key press or mouse move) could
be mistaken for the controller reset response code. This would result
in a failure and the keyboard would be disabled during the boot.
Always disabling the keyboard and mouse prior to reset ensures that
the controller reset return code can be read properly.
Tested-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
(cherry picked from commit dbf9dd27f3aefc171839d60c188134da8ad3089d)
|
|
You only want this information for debugging. As it also slows down the
boot considerably, as, for example, for every character of the GRUB
menu, something is sent over the serial console.
Therefore, increase the debugging level to 9.
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
(cherry picked from commit 970af16e6e5a6cb8de6b6658663b8adc00d25b8b)
|
|
If the HBA supports 64-bit addressing, the registers may contain
non-zero values, for example after reboot as a leftover from the
OS driving the adapter.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Ladi Prosek <lprosek@redhat.com>
(cherry picked from commit 106543deb447c4005f9a9845f1f43a72547f6209)
|
|
since QEMU_CFG_NB_CPUS not going away anytime soon
and serves the same purpose as just added "etc/boot-cpus" fw_cfg
drop support for "etc/boot-cpus" while this code is not
in use yet (i.e. QEMU with "etc/boot-cpus" hasn't been released)
and reuse QEMU_CFG_NB_CPUS instead of it.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
(cherry picked from commit b98c6586c0c3d519359d6e751ecb3e637e82dbcb)
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Reported-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
SDM[*1] says that if there are CPUs with APIC ID
greater than 254, BIOS is to pass control to OS
in x2APIC mode. Use the fact that QEMU passes in
"etc/max-cpus" max possible "APIC ID + 1" to
detect need for x2APIC mode. Also instead of
CMOS_BIOS_SMP_COUNT which is limited to 256 CPUs
use a new rom file "etc/boot-cpus" that QEMU
supporting more than 256 CPUs will provide.
*1) SDM: Volume 3: EXTENDED XAPIC (X2APIC):
Initialization by System Software
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
|
|
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
|
|
Signed-off-by: "Kevin O'Connor" <kevin@koconnor.net>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
|
|
MPTable doesn't support more than 255 CPUs and
QEMU supplies an alternative MADT table which
guest will use instead of it. So do not install
legacy tables if more than 254 CPUs are provided
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Piotr Król <piotr.krol@3mdeb.com>
|
|
virtio-pci calls pci_enable_{io,mem}bar with the bar number,
but the functions expect the bar base register offset.
Reported-by: Igor Mammedov <imammedo@redhat.com>
Tested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
Move checking for extended scancodes and key release to the top of
__process_key().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
int 0x05 was not assigned in the interrupt table - fix that.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Generate the appropriate interrupt events for the given keys.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Detect the sequences for generating Ctrl+Break and Alt+SysReq on USB
keyboards and produce the appropriate legacy scancodes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
AT keyboards can produce "fake" shift keys on some extended events.
It's not necessary to process these artificial events as the actual
extended keys are detected directly.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Merge the two consecutive u8 fields into a single u16 field.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Don't warn if a key without a mapping is pressed - it's known that
some keys aren't mapped to keycodes. Suppress these keys instead of
sending 0x0000 to the keyboard buffer - as 0x0000 can confuse some
programs.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
On a 101-key keyboard the keypad enter and keypad '/' keys have unique
BIOS keycodes that are distinct from the main keyboard enter and '/'
keys.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
The current keyboard code only supports the keycode mappings for
83-key keyboards (plus handling for alt-esc and f11/f12). Add a more
complete mapping of keycodes for 101-key keyboards. This adds more
alt key and ctrl key mappings.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Hardware interrupt handlers don't take a parameter. Remove the
incorrect (and unused) parameter from handle_hwpic1/2().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Commit 4ce5d207 removed the code to wait for a possible second byte
from a keyboard reset command, but it did not remove the extra check
when warning in ps2_recvbyte(). Remove the now stale code in
ps2_recvbyte().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Modify the function that writes the TPM logs to take the same digest
passed to tpm_extend. Update the tpm2 acpi log header to describe the
digest format.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Extend the tpm20_extend function to support extending a hash to
multiple PCR banks. The sha1 hash that's being extended into the
sha256 bank for example, will be filled with zero-bytes to the
size of a sha256 hash.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Refactor the tpml_digest_values_sha1 structure so we can later cast it
to the more general tpml_digest_values structure. Move the count member
into this structure.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
|
|
Restructure the tpm20_extend function to use a buffer for the
command to send to the TPM. The size of the buffer is calculated
from the size of tpm2_req_extend structure and the appended SHA1
hash.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
|
|
Implement tpm20_get_capability and retrieve the PCR Bank configuration
from the TPM using this function.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
|
|
Recent versions of gcc will sometimes place conditional checks in the
code prior to setting up the function's stack frame. Handle this case
correctly.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Avoid using the scarce ZoneLow memory.
This limits max number of pvscsi controllers.
As driver runs in 32bit mode, use ZoneHigh allocation instead.
Signed-off-by: Dana Rubin <dana.rubin@ravellosystems.com>
Signed-off-by: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
|
|
First argument should be 'align' and second 'size'.
Signed-off-by: <dana.rubin@ravellosystems.com>
Signed-off-by: <shmulik.ladkani@ravellosystems.com>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
These files only need to export simple function definitions - move
them to vgautil.h.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Don't use stdvga.h for function definitions of code in stdvgamodes.c
and stdvgaio.c. Move them to vgautil.h.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Move the generic function and variable definitions from vgabios.h to a
new file vgautil.h. This reduces the size and complexity of
vgabios.h.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Move the full video_param_table[] setup (including the updating of the
BDA) to stdvga_build_video_param().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
The software cursor code is not frequently used (only the coreboot
framebuffer vga code uses it). Move its logic out of the main code
and into swcursor.c.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|