drivers/amd/opensil: Add hooks to populate CBMEM_ID_MEMINFO
Add a hooks that will populate mem_info structure with DIMM data obtained from OpenSIL. As the memory population may be SoC-specific, call a SoC-specific hook to fill the data. Change-Id: I0b489c685877ac56f45e0e3abd0bd1b64549585b Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/89484 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
This commit is contained in:
parent
23f0b0b313
commit
7639118729
3 changed files with 19 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ subdirs-y += mpio
|
|||
romstage-y += romstage.c
|
||||
|
||||
ramstage-y += acpi.c
|
||||
ramstage-y += dmi.c
|
||||
ramstage-y += ramstage.c
|
||||
ramstage-y += memmap.c
|
||||
|
||||
|
|
|
|||
13
src/drivers/amd/opensil/dmi.c
Normal file
13
src/drivers/amd/opensil/dmi.c
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
#include <bootstate.h>
|
||||
#include "opensil.h"
|
||||
|
||||
__weak void opensil_smbios_fill_cbmem_meminfo(void) { }
|
||||
|
||||
static void prepare_dmi_17(void *unused)
|
||||
{
|
||||
opensil_smbios_fill_cbmem_meminfo();
|
||||
}
|
||||
|
||||
BOOT_STATE_INIT_ENTRY(BS_DEV_ENUMERATE, BS_ON_ENTRY, prepare_dmi_17, NULL);
|
||||
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include <acpi/acpi.h>
|
||||
#include <device/device.h>
|
||||
#include <smbios.h>
|
||||
|
||||
/* Set up openSIL env and call TP1 */
|
||||
void amd_opensil_silicon_init(void);
|
||||
|
|
@ -14,5 +15,9 @@ void configure_mpio(void);
|
|||
void amd_opensil_add_memmap(struct device *dev, unsigned long *idx);
|
||||
/* Fill in FADT from openSIL */
|
||||
void amd_opensil_fill_fadt_io_ports(acpi_fadt_t *fadt);
|
||||
/* Marshalls dimm info from SIL_DMI_INFO into CBMEM_ID_MEMINFO */
|
||||
void opensil_smbios_fill_cbmem_meminfo(void);
|
||||
/* Fill DIMM locators using OpenSIL DMI info, returns 0 on success */
|
||||
int opensil_smbios_fill_dimm_locator(const struct dimm_info *dimm, struct smbios_type17 *t);
|
||||
|
||||
#endif /* OPENSIL_DRIVER_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue