soc/intel/xeon_sp: Use a common function to get the IIO HOB
TESTED ocp/deltalake still boots. Change-Id: I69f336c1ff348b8e820340b84494929f2c58ce72 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47296 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
04ebdd9710
commit
83b262275c
4 changed files with 7 additions and 32 deletions
|
@ -29,13 +29,7 @@ const struct SystemMemoryMapHob *get_system_memory_map(void)
|
|||
|
||||
uint8_t get_iiostack_info(struct iiostack_resource *info)
|
||||
{
|
||||
size_t hob_size;
|
||||
const uint8_t fsp_hob_iio_universal_data_guid[16] = FSP_HOB_IIO_UNIVERSAL_DATA_GUID;
|
||||
const IIO_UDS *hob;
|
||||
|
||||
hob = fsp_find_extension_hob_by_guid(
|
||||
fsp_hob_iio_universal_data_guid, &hob_size);
|
||||
assert(hob != NULL && hob_size != 0);
|
||||
const IIO_UDS *hob = get_iio_uds();
|
||||
|
||||
// copy IIO Stack info from FSP HOB
|
||||
info->no_of_stacks = 0;
|
||||
|
|
|
@ -362,10 +362,7 @@ static unsigned long acpi_create_rmrr(unsigned long current)
|
|||
|
||||
static unsigned long acpi_create_rhsa(unsigned long current)
|
||||
{
|
||||
size_t hob_size;
|
||||
const uint8_t uds_guid[16] = FSP_HOB_IIO_UNIVERSAL_DATA_GUID;
|
||||
const IIO_UDS *hob = fsp_find_extension_hob_by_guid(uds_guid, &hob_size);
|
||||
assert(hob != NULL && hob_size != 0);
|
||||
const IIO_UDS *hob = get_iio_uds();
|
||||
|
||||
for (int socket = 0; socket < hob->PlatformData.numofIIO; ++socket) {
|
||||
IIO_RESOURCE_INSTANCE iio_resource =
|
||||
|
@ -386,10 +383,7 @@ static unsigned long acpi_create_rhsa(unsigned long current)
|
|||
|
||||
static unsigned long acpi_fill_dmar(unsigned long current)
|
||||
{
|
||||
size_t hob_size;
|
||||
const uint8_t uds_guid[16] = FSP_HOB_IIO_UNIVERSAL_DATA_GUID;
|
||||
const IIO_UDS *hob = fsp_find_extension_hob_by_guid(uds_guid, &hob_size);
|
||||
assert(hob != NULL && hob_size != 0);
|
||||
const IIO_UDS *hob = get_iio_uds();
|
||||
|
||||
// DRHD
|
||||
for (int iio = 1; iio <= hob->PlatformData.numofIIO; ++iio) {
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <soc/pci_devs.h>
|
||||
#include <soc/pm.h>
|
||||
#include <soc/soc_util.h>
|
||||
#include <soc/util.h>
|
||||
|
||||
/* TODO: Check if the common/acpi weak function can be used */
|
||||
unsigned long acpi_fill_mcfg(unsigned long current)
|
||||
|
@ -99,10 +100,7 @@ void soc_fill_fadt(acpi_fadt_t *fadt)
|
|||
|
||||
void uncore_inject_dsdt(const struct device *device)
|
||||
{
|
||||
size_t hob_size;
|
||||
const uint8_t uds_guid[16] = FSP_HOB_IIO_UNIVERSAL_DATA_GUID;
|
||||
const IIO_UDS *hob = fsp_find_extension_hob_by_guid(uds_guid, &hob_size);
|
||||
assert(hob != NULL && hob_size != 0);
|
||||
const IIO_UDS *hob = get_iio_uds();
|
||||
|
||||
/* Only add RTxx entries once. */
|
||||
if (device->bus->secondary != 0)
|
||||
|
|
|
@ -57,13 +57,7 @@ const struct SystemMemoryMapHob *get_system_memory_map(void)
|
|||
|
||||
uint8_t get_iiostack_info(struct iiostack_resource *info)
|
||||
{
|
||||
size_t hob_size;
|
||||
const uint8_t fsp_hob_iio_universal_data_guid[16] = FSP_HOB_IIO_UNIVERSAL_DATA_GUID;
|
||||
const IIO_UDS *hob;
|
||||
|
||||
hob = fsp_find_extension_hob_by_guid(
|
||||
fsp_hob_iio_universal_data_guid, &hob_size);
|
||||
assert(hob != NULL && hob_size != 0);
|
||||
const IIO_UDS *hob = get_iio_uds();
|
||||
|
||||
// copy IIO Stack info from FSP HOB
|
||||
info->no_of_stacks = 0;
|
||||
|
@ -83,15 +77,10 @@ uint8_t get_iiostack_info(struct iiostack_resource *info)
|
|||
|
||||
uint32_t get_socket_stack_busno(uint32_t socket, uint32_t stack)
|
||||
{
|
||||
size_t hob_size;
|
||||
const IIO_UDS *hob;
|
||||
const uint8_t fsp_hob_iio_universal_data_guid[16] = FSP_HOB_IIO_UNIVERSAL_DATA_GUID;
|
||||
const IIO_UDS *hob = get_iio_uds();
|
||||
|
||||
assert(socket < MAX_SOCKET && stack < MAX_IIO_STACK);
|
||||
|
||||
hob = fsp_find_extension_hob_by_guid(fsp_hob_iio_universal_data_guid, &hob_size);
|
||||
assert(hob != NULL && hob_size != 0);
|
||||
|
||||
return hob->PlatformData.CpuQpiInfo[socket].StackBus[stack];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue