mb/ocp/tiogapass: Implement mainboard_dimm_slot_exists

The board has 24 slots for DDR4 ECC RDIMMs and it has 2 CPU sockets,
where each is connected to 12 DIMMs. Every socket supports up to
6 channels, thus every channel is connected to 2 DIMMs.

Implement mainboard_dimm_slot_exists accordingly to advertise all slots
as SMBIOS type 17.

TEST: Found all installed DIMMs advertised through SMBIOS on
      ocp/tiogapass.

Change-Id: I31cb4a89aa11258ac04eb69a0e9c86f258280484
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85318
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Patrick Rudolph 2024-11-26 09:41:41 +01:00 committed by Lean Sheng Tan
commit 28c03b501e

View file

@ -1,13 +1,14 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <fsp/api.h>
#include <FspmUpd.h>
#include <drivers/ipmi/ipmi_if.h>
#include <drivers/ipmi/ocp/ipmi_ocp.h>
#include <fsp/api.h>
#include <FspmUpd.h>
#include <gpio.h>
#include <soc/ddr.h>
#include <soc/gpio_soc_defs.h>
#include <soc/romstage.h>
#include <string.h>
#include <gpio.h>
#include <soc/gpio_soc_defs.h>
#include <skxsp_tp_iio.h>
#include "ipmi.h"
@ -64,3 +65,15 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
mupd->FspmConfig.GpioConfig.GpioTable = NULL;
mupd->FspmConfig.GpioConfig.NumberOfEntries = 0;
}
bool mainboard_dimm_slot_exists(uint8_t socket, uint8_t channel, uint8_t dimm)
{
if (socket >= CONFIG_MAX_SOCKET)
return false;
if (channel >= 6)
return false;
if (dimm >= 2)
return false;
return true;
}