Skip to content

mb/{clevo,novacustom}: Add SMBIOS DIMM locators #663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/mainboard/clevo/adl-p/ramstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,3 +281,19 @@ void mainboard_update_soc_chip_config(struct soc_intel_alderlake_config *config)
else
config->s0ix_enable = 1;
}

void smbios_fill_dimm_locator(const struct dimm_info *dimm,
struct smbios_type17 *t)
{
switch (dimm->ctrlr_num) {
case 0:
t->device_locator = smbios_add_string(t->eos, "RAM1");
break;
case 1:
t->device_locator = smbios_add_string(t->eos, "RAM2");
break;
default:
t->device_locator = smbios_add_string(t->eos, "UNKNOWN");
break;
}
}
16 changes: 16 additions & 0 deletions src/mainboard/clevo/tgl-u/ramstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,3 +226,19 @@ struct chip_operations mainboard_ops = {
.enable_dev = mainboard_enable,
.init = init_mainboard,
};

void smbios_fill_dimm_locator(const struct dimm_info *dimm,
struct smbios_type17 *t)
{
switch (dimm->ctrlr_num) {
case 0:
t->device_locator = smbios_add_string(t->eos, "RAM1");
break;
case 1:
t->device_locator = smbios_add_string(t->eos, "RAM2");
break;
default:
t->device_locator = smbios_add_string(t->eos, "UNKNOWN");
break;
}
}
17 changes: 17 additions & 0 deletions src/mainboard/novacustom/mtl-h/variants/dgpu/ramstage.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <device/pci_def.h>
#include <smbios.h>
#include <soc/intel/common/reset.h>

void variant_devtree_update(void)
Expand Down Expand Up @@ -88,3 +89,19 @@ void variant_final(void)
set_dgpu_only();

}

void smbios_fill_dimm_locator(const struct dimm_info *dimm,
struct smbios_type17 *t)
{
switch (dimm->ctrlr_num) {
case 0:
t->device_locator = smbios_add_string(t->eos, "RAM1");
break;
case 1:
t->device_locator = smbios_add_string(t->eos, "RAM2");
break;
default:
t->device_locator = smbios_add_string(t->eos, "UNKNOWN");
break;
}
}
23 changes: 17 additions & 6 deletions src/mainboard/novacustom/mtl-h/variants/igpu/ramstage.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
/* SPDX-License-Identifier: CC-PDDC */
/* SPDX-License-Identifier: GPL-2.0-only */

/* Please update the license if adding licensable material. */
#include <smbios.h>

/*
* This is a placeholder, if there ever is something variant specific to
* add to ramstage, do it here.
*/
void smbios_fill_dimm_locator(const struct dimm_info *dimm,
struct smbios_type17 *t)
{
switch (dimm->ctrlr_num) {
case 0:
t->device_locator = smbios_add_string(t->eos, "RAM2");
break;
case 1:
t->device_locator = smbios_add_string(t->eos, "RAM1");
break;
default:
t->device_locator = smbios_add_string(t->eos, "UNKNOWN");
break;
}
}