From 20fa59fc2ce05da9a62f559c8958524ee59c0a14 Mon Sep 17 00:00:00 2001 From: JingleHsuWiwynn Date: Tue, 26 Jan 2021 09:55:34 +0800 Subject: arch/x86/smbios: Let SMBIOS type 9 be able to write slot ID The slot ID can be passed in from the function caller but parsing slot ID from devicetree is not yet supported and would still be 0. Add Slot ID in SMBIOS type 9 for Delta Lake. Tested=Execute "dmidecode -t 9" to verify. Signed-off-by: JingleHsuWiwynn Change-Id: I9bf2e3b1232637a25ee595d08f8fbbc2283fcd5d Reviewed-on: https://review.coreboot.org/c/coreboot/+/49917 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/mainboard/ocp/deltalake/ramstage.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mainboard/ocp') diff --git a/src/mainboard/ocp/deltalake/ramstage.c b/src/mainboard/ocp/deltalake/ramstage.c index 211ba0f7b6..50a87e9232 100644 --- a/src/mainboard/ocp/deltalake/ramstage.c +++ b/src/mainboard/ocp/deltalake/ramstage.c @@ -83,6 +83,7 @@ typedef struct { const char *slot_designator; } slot_info; +/* Array index + 1 would be used as Slot ID */ slot_info slotinfo[] = { {CSTACK, SlotTypePciExpressGen3X4, SlotDataBusWidth4X, 0xE8, "SSD1_M2_Data_Drive"}, {PSTACK1, SlotTypePciExpressGen3X4, SlotDataBusWidth4X, 0x10, "SSD0_M2_Boot_Drive"}, @@ -265,12 +266,14 @@ static int create_smbios_type9(int *handle, unsigned long *current) if (sltcap & PCI_EXP_SLTCAP_HPC) characteristics_2 |= SMBIOS_SLOT_HOTPLUG; + const uint16_t slot_id = index + 1; length += smbios_write_type9(current, handle, slotinfo[index].slot_designator, slotinfo[index].slot_type, slotinfo[index].slot_data_bus_width, slot_usage, slot_length, + slot_id, characteristics_1, characteristics_2, stack_busnos[slotinfo[index].stack], -- cgit v1.2.3