| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Allow setting pci_pad_mem64 via fw_cfg.
Usage: qemu -fw_cfg name=opt/org.seabios/pci64,string={yes,no}
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
| |
The variable is now only used inside biostables.c, there's no
need to make it global.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
|
|
|
|
| |
The new function will be useful for code that just needs the
address and length of SMBIOS tables.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
|
|
|
|
|
| |
Rename copy_smbios(), smbios_next(), SMBIOS_SIGNATURE,
smbios_entry_point, and SMBiosAddr, to indicate they refer to
SMBIOS 2.1 entry points.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
|
|
|
|
| |
The get_smbios_entry_point() function doesn't exist, delete
unused prototype.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
|
|
|
|
|
| |
Create a list of devices found in the DSDT table. Add helper functions
to find devices, walk the list and figure device informations like mmio
ranges and irqs.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Add and use bootprio_find_mmio_device() to figure
the boot priority of virtio-mmio block devices.
Add init_virtio_blk_mmio to initialize one
virtio-mmio block device.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add new fields to struct virtio_lun_s for mmio support,
add mmio parameter to virtio_scsi_init_lun(), so both
pci and mmio devices can be handled.
Add and use bootprio_find_scsi_mmio_device() to figure
boot priority of devices connected to a virtio-mmio
scsi controller.
Finally add init_virtio_scsi_mmio() to initialize one
virtio-mmio scsi controller.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Add function to set tsc frequency directly, without calibration.
Also tweak timer setup functions a bit: skip setup in case TimerPort
has not the default value any more, i.e. another timer has been setup
already.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20200310102248.28412-1-kraxel@redhat.com
|
|
|
|
|
|
|
|
|
| |
Introduce is_bootprio_strict().
We will reuse this function in the next commit.
Signed-off-by: Alexey Kirillov <lekiravi@yandex-team.ru>
Message-id: 20200107171917.7535-2-lekiravi@yandex-team.ru
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding the following utility functions:
* boot_lchs_find_pci_device
* boot_lchs_find_scsi_device
* boot_lchs_find_ata_device
These will be used to apply LCHS values received through fw_cfg.
Reviewed-by: Karl Heubaum <karl.heubaum@oracle.com>
Reviewed-by: Arbel Moshe <arbel.moshe@oracle.com>
Signed-off-by: Sam Eiderman <shmuel.eiderman@oracle.com>
Message-Id: <20190626123816.8907-5-shmuel.eiderman@oracle.com>
|
|
|
|
| |
This reverts commit ad2910949b1886deba24f574cee76cdc75e7cabe.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding the following utility functions:
* boot_lchs_find_pci_device
* boot_lchs_find_scsi_device
* boot_lchs_find_ata_device
These will be used to apply LCHS values received through fw_cfg.
Reviewed-by: Karl Heubaum <karl.heubaum@oracle.com>
Reviewed-by: Arbel Moshe <arbel.moshe@oracle.com>
Signed-off-by: Sam Eiderman <shmuel.eiderman@oracle.com>
Message-Id: <20190612093704.47175-4-shmuel.eiderman@oracle.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Switch get_raw_keystroke() to return ax instead of ah, so it returns
both scan code and ascii code of the key pressed.
Add get_keystroke_full() function which passes up ax to the caller.
The get_keystroke() function continues to return the scancode only like
it did before. It is a thin wrapper around get_keystroke_full() now
though.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically added support for 16 and 32bpp files, in addition to
24bpp. The function bmp_show() in bmp.c has had the hardcoded check
for 24bpp replaced with a general bpp check that uses a % to check for
remainder, and returns 1 if the remainder is >0. The previous method
for adjusting the BMP data (raw_data_format_adjust_24bpp) relied on a
preset 3*bytes_per_line_src, this has been changed and the
multiplication is now performed in the function's arguments. This
change still allows someone else to reuse the same function for
1/2/4bpp support if necessary. The file util.h has been modified to
reflect this decision.
The changes to raw_data_format_adjust() is based on an abandoned patch
by Gert Menke (submitted March 14, 2017), credit to them for that
change and the addition of *bpp to bmp_get_info().
Signed-off-by: Joseph S. Pacheco-Corwin <hammersamatom@gmail.com>
|
|
|
|
|
|
| |
Show the volume label of bootable cdroms.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Redirect int10 calls to serial console output.
Parse serial input and queue key events.
The serial console can work both as primary display
and in parallel to another vga display (splitmode).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
| |
serial console wants queue key events and needs to map ascii chars to
the keycode, so make enqueue_key public and also exports a helper
function so sercon can use the scan_to_keycode mapping table.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
The find_fadt() and find_tcpa_by_rsdp() functions are very similar.
Create a new find_acpi_table() function and replace the two functions
with this new function.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the MTRRs and MSR_IA32_FEATURE_CONTROL are not restored on S3
resume. Because these have to be applied to all processors, SMP setup
has to be added to S3 resume.
There are two differences between the boot and resume paths. First,
romfile_* is not usable in the resume paths so we separate out the
remaining common code to a new smp_scan function. Second, smp_msr has
to be walked on the BSP as well, so we extract that out of handle_smp
and into a new function smp_write_msrs. Then, resume can call
smp_write_msrs on the BSP followed by smp_scan to initialize the APs.
Reported-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
| |
The HaveRunPost flag controls whether post or reboot handling is
entered on a reset signal. The flag needs to be set before any other
global variable because an external reboot signal could occur at any
time. (If any global variable is modified prior to setting
HaveRunPost then the code might enter post with global variables in a
dirty state.)
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds an new menu entry to the main menu. This menu item enables
the user to enter a TPM control menu which allows control of those aspects
of the TPM's state that can only be controlled while in the firmware
and while physical presence can be asserted.
If the machine has a TPM, the boot menu will look as follows, with
the new menu item accessible by pressing the 't' key.
Select boot device:
1. ata0-1: QEMU HARDDISK ATA-7 Hard-Disk (6144 MiBytes)
2. Legacy option rom
3. iPXE (PCI 00:03.0)
t. TPM Menu
Upon pressing t the TPM submenu will be shown:
The Trusted Platform Module (TPM) is a hardware device in this machine.
It can help verify the integrity of system software.
The current state of the TPM is:
Enabled and active
Ownership has not been taken
A user can take ownership of the TPM
Available options are:
d. Disable the TPM
v. Deactivate the TPM
p. Prevent installation of an owner
If no change is desired or if this menu was reached by mistake, press ESC to
reboot the machine.
The TPM menu only shows those options that are currently accessible considering
the state of the TPM.
The patch adds several functions for sending those messages to the TPM
required for supporting those menu items.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Attempt to extract the gcc and binutils versions. Report that
information in the debug log.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
| |
Some Chromebooks (with Baytrail CPUs) apparently do not support
routing of legacy interrupts. This patch adds minimal support for
running SeaBIOS in such an environment. Even with this patch, it is
known that old operating systems and even some recent bootloaders will
not function without real hardware interrupts.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Rename disk driver dispatch functions to a consistent naming style.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I've been successfully using SeaBIOS as secondary bootloader. In more details
I have GRUB2-as-payload in flash together with coreboot. SeaBIOS binary is on
the HDD and loaded by GRUB when needed. This has an unfortunate consequence
that I have to keep vga oprom in flash even if usually I boot without it. This
patches makes bios.bin.elf multiboot executable with files passed as modules.
Example:
menuentry "SeaBIOS (mb)" --unrestricted {
root=ahci0,2
multiboot /bios.bin.elf
module /vgabios_x230.rom name=pci8086,0166.rom
}
the parameter name= specifies under which name SeaBIOS will see it.
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch implements the TCG BIOS interrupt handler 1ah. It is for
example used by trusted grub.
This patch adds an implementation of SHA1 (following NIST specs., IETF RFC 3147
and Wikipedia) for speeding up measurements of code. Trusted Grub for example
makes use of this interface and measures (calculates SHA1) of the Linux kernel
and initrd. Those files can be rather large and hunting their bytes through
the TIS interface as part of the int handler commands invoked by trusted grub
does take quite some time due to the many vmexits the interface is creating
(one per byte).
There is also a threshold for the size of data to hash (100k) below which
the TPM is used and above the internal faster SHA1 algorithm is used.
This patch for example enables trusted grub to interact with the TPM
and take additional measurements.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
This adds basic read/write support for SD cards emulated by QEMU.
This code is not expected to work on real hardware, because the
current controller and card initialization is not robust.
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>
|
|
|
|
|
|
|
|
|
| |
Change the multi-processor init code to trampoline into 32bit mode on
each of the additional processors. Implement an atomic lock so that
each processor performs its initialization serially.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Store the fields necessary to export the "el-torito" spec information
directly in an internal copy of the "el-torito" struct. This
simplifies the interface and obviates the need for an internal home
grown struct with the same info.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Use the new acpi_pm_base variable instead.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Modify the int 1587 handler to check if the POST phase is still
running. If it is, use bigreal mode segment limits so that the caller
remains in bigreal mode when the 1587 handler completes. This helps
with SeaVGABIOS' use of "direct" framebuffer accesses (an option rom
may attempt to display text during its option rom execution which can
cause SeaVGABIOS to make the int 1587 calls).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check fw_cfg for the presence of an aggregate set of smbios
tables (etc/smbios/smbios-tables) and an entry point structure
(etc/smbios/smbios-anchor), and, if found, use them instead of
generating entries locally.
We ensure the presence of a type 0 (bios information) structure
by generating it locally if necessary, which is expected to be
the common case.
Signed-off-by: Gabriel L. Somlo <somlo@cmu.edu>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
| |
Make the coreboot table searching code available to code outside
coreboot.c, and make it runnable from 16bit mode.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Use the biostables.c copy_pir(), copy_smbios(), copy_acpi_rsdp(), and
copy_mptable() code even when using the legacy bios table generation
code. This unifies the final bios table deployment code between qemu,
coreboot, and csm.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
After this change, src/fw/smbios.c only contains the legacy code for
generating SMBIOS tables. This change only contains code movement -
no logic is changed.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
After this change, src/fw/acpi.c only contains the legacy code for
generating ACPI tables. This change only contains code movement - no
logic is changed.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On resume, the OS queries the power management event that
caused it. In order to complete this task, it executes some
reads to the piix pm io space. This all happens before the
OS has a chance to restore the PCI config space for devices,
so it is bios's responsibility to make sure the pm IO space
is configured correctly. (During suspend, the piix pm
configuration space is lost).
Note: For 'ordinary' pci devices the config space is
saved by the OS on sleep and restored on resume.
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Avoid hardware specific code in output.c. This will reduce the amount
of change needed to output.c as support for more serial hardware is
added.
This patch also renames some functions to improve the naming scheme.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Will be used when it's loaded from QEMU.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add vgahooks to support the SMI SM720 VGA BIOS used on the
WIN Enterprises MB-60470. The response from smi_157f14() is necessary
for the CRT output to turn on. The response from smi_157f02() is used
to configure which connector(s) output is routed to.
As I lack hardware to test LCD panel output, I've selected CRT-only
output on the MB-60470 as this prevents the CRT output from being scaled
to the resolution of the LCD panel.
Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
|