| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Support SMBIOS 3.0 entry points if exposed by QEMU in fw_cfg.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
|
|
|
|
|
| |
This will make coreboot code (scan_tables()) and xen code
(xen_biostable_setup()) copy SMBIOS 3.0 entry points if
found.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add new copy_smbios_30() function, that will be used to support
SMBIOS 3.0 entry points.
The SMBIOS 3.0 entry point will be tracked in a separate
SMBios30Addr variable, because both 2.1 and 3.0 entry points may
exist at the same time.
Adjust the smbios_get_tables(), smbios_major_version(), and
smbios_minor_version() helpers to use the SMBIOS 3.0 entry point
if available.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Make smbios_build_tables() get u64 address and u32 length
arguments, making it usable for SMBIOS 3.0. Adapt
smbios_21_setup_entry_point() to use intermediate variables when
calling smbios_build_tables().
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
|
|
|
|
| |
Make max_structure_size and number_of_structures optional,
as we don't have those fields in SMBIOS 3.0 entry points.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
|
|
|
|
|
| |
Extract the code specific for building the SMBIOS 2.1 entry point
from smbios_romfile_setup() to a new
smbios_21_setup_entry_point() function.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
|
|
|
|
|
|
| |
Instead of taking a SMBIOS 2.1 entry point as argument, make
smbios_build_tables() take pointers to the fields it actually
changes. This will allow us to reuse the function for SMBIOS 3.0
later.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the code that builds the SMBIOS tables to a separate
smbios_build_tables() function, to keep it isolated from the code
that initializes the SMBIOS entry point.
Thew new function will still take a smbios_21_entry_point
argument to make code review easier, but this will be changed by
the next commits.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Use smbios_next() instead of smbios_21_next(), to make the code
more generic and reusable for SMBIOS 3.0 support.
Note that `qtables_len` is initialized to `ftables->size` instead
of `ep.structure_table_length` now, but both fields are
guaranteed to have exactly the same value.
Signed-off-by: Eduardo Habkost <ehabkost@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>
|
|
|
|
|
|
|
| |
They new helpers will be useful when we start supporting SMBIOS
3.0 entry points. Use the new helpers at display_uuid().
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
|
|
|
|
| |
Make the code more generic, and not specific for SMBIOS 2.1 entry
points.
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>
|
|
|
|
|
|
|
| |
Extract generic code from smbios_21_next(), so it can be reused
for SMBIOS 3.0 support.
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>
|
|
|
|
|
|
|
| |
Replace the common malloc_fseg() + memcpy() code pattern
with a helper function.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
|
|
|
|
|
|
| |
SeaBIOS implements the SMBIOS 2.1 entry point which is limited to a
maximum length of 0xffff. If the SMBIOS data received from QEMU is large
enough, then adding the type 0 table will cause integer overflow. This
results in fun behaviour such as KVM crash, or hangs in SeaBIOS.
Signed-off-by: Daniel P. Berrangé <berrange@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>
|
|
|
|
|
|
|
| |
In case a xsdt table is present (and located below 4G)
prefer it over rsdt.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
SMBIOS 2.6+ stores the UUID in a different format, with the first 3
fields in little endian format. This is what modern qemu delivers
and what dmidecode also handles, so let's follow suit too.
Signed-off-by: Cole Robinson <crobinso@redhat.com>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Use a macro to define and obtain the value of a symbol introduced by
the linker scripts (scripts/layoutrom.py).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Very large mptable structures can fill up the space in the f-segment
and cause other important f-segment allocations to fail. Limit the
maximum size of the mptable to prevent this.
On QEMU, with the current maximum size of 600 bytes, the mptable will
not be created in configurations of ~20 cpus or more. The mptable is
rarely used in modern OSes so this should not be a problem.
Reported-by: Huaitong Han <huaitong.han@intel.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the smbios structure to use a 4 byte u32 signature field
instead of a 4 byte character string field. In practice, this allows
the compiler to place the signature in the initialize code segment and
thus makes it less likely the signature would be found in the
f-segment. (If the smbios signature is found in the f-segment it can
confuse some table scans.)
Reviewed-by: Bruce Rogers <brogers@suse.com>
Tested-by: Bruce Rogers <brogers@suse.com>
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
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>
|
|
|
|
| |
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>
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Also, sort the order of include files in the c files.
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>
|
|
Move many C files from the src/ directory to the new src/fw/ directory.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|