Hello Marco Chen,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/40836
to review the following change.
Change subject: mb/google/dedede: Read DRAM part number from CBI
......................................................................
mb/google/dedede: Read DRAM part number from CBI
The index of MEM_STRAPS will be migrated from per DRAM part number to
per DRAM characteristic therefore one index mapped to a single SPD
binary can represent to multiple DRAM part numbers as long as their
characteristic is the same for DRAM controller to support. In this case,
the real DRAM part number would be provisioned in the CBI instead of SPD
in the factory flow. As a result, we need to extract DRAM part number
from CBI.
BUG=b:152019429
BRANCH=None
TEST=1. provision dram_part_num field of CBI
2. check DRAM part number is correct in SMBIOS for memory device
Change-Id: I40780a35e04efb279591e9db179cb86b5e907c0d
Signed-off-by: Marco Chen <marcochen(a)google.com>
---
M src/mainboard/google/dedede/romstage.c
1 file changed, 31 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/40836/1
diff --git a/src/mainboard/google/dedede/romstage.c b/src/mainboard/google/dedede/romstage.c
index 2efaaf1..a5ded5f 100644
--- a/src/mainboard/google/dedede/romstage.c
+++ b/src/mainboard/google/dedede/romstage.c
@@ -6,9 +6,13 @@
*/
#include <baseboard/variants.h>
+#include <console/console.h>
+#include <ec/google/chromeec/ec.h>
#include <gpio.h>
+#include <memory_info.h>
#include <soc/meminit.h>
#include <soc/romstage.h>
+#include <string.h>
#include <variant/gpio.h>
void mainboard_memory_init_params(FSPM_UPD *memupd)
@@ -22,3 +26,30 @@
memcfg_init(&memupd->FspmConfig, board_cfg, &spd_info, half_populated);
}
+
+bool mainboard_get_dram_part_num(const char **part_num, size_t *len)
+{
+ static char part_num_store[DIMM_INFO_PART_NUMBER_SIZE];
+ static enum {
+ PART_NUM_NOT_READ,
+ PART_NUM_AVAILABLE,
+ PART_NUM_NOT_IN_CBI,
+ } part_num_state = PART_NUM_NOT_READ;
+
+ if (part_num_state == PART_NUM_NOT_READ) {
+ if (google_chromeec_cbi_get_dram_part_num(&part_num_store[0],
+ sizeof(part_num_store)) < 0) {
+ printk(BIOS_ERR, "No DRAM part number in CBI!\n");
+ part_num_state = PART_NUM_NOT_IN_CBI;
+ } else {
+ part_num_state = PART_NUM_AVAILABLE;
+ }
+ }
+
+ if (part_num_state == PART_NUM_NOT_IN_CBI)
+ return false;
+
+ *part_num = &part_num_store[0];
+ *len = strlen(part_num_store) + 1;
+ return true;
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/40836
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I40780a35e04efb279591e9db179cb86b5e907c0d
Gerrit-Change-Number: 40836
Gerrit-PatchSet: 1
Gerrit-Owner: Marco Chen <marcochen(a)google.com>
Gerrit-Reviewer: Marco Chen <marcochen(a)chromium.org>
Gerrit-MessageType: newchange
Keith Hui has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40959 )
Change subject: nb/intel/i440bx: Use SPDX for remaining files
......................................................................
nb/intel/i440bx: Use SPDX for remaining files
Change-Id: I0d28f1fc835fc05b4fc3ab891e9e6e340848aa49
Signed-off-by: Keith Hui <buurin(a)gmail.com>
---
M src/northbridge/intel/i440bx/Makefile.inc
M src/northbridge/intel/i440bx/i440bx.h
M src/northbridge/intel/i440bx/raminit.c
M src/northbridge/intel/i440bx/raminit.h
M src/northbridge/intel/i440bx/romstage.c
5 files changed, 9 insertions(+), 68 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/59/40959/1
diff --git a/src/northbridge/intel/i440bx/Makefile.inc b/src/northbridge/intel/i440bx/Makefile.inc
index 708a41f..6270811 100644
--- a/src/northbridge/intel/i440bx/Makefile.inc
+++ b/src/northbridge/intel/i440bx/Makefile.inc
@@ -1,17 +1,5 @@
-##
+## SPDX-License-Identifier: GPL-2.0-or-later
## This file is part of the coreboot project.
-##
-##
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2 of the License, or
-## (at your option) any later version.
-##
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-##
ifeq ($(CONFIG_NORTHBRIDGE_INTEL_I440BX),y)
diff --git a/src/northbridge/intel/i440bx/i440bx.h b/src/northbridge/intel/i440bx/i440bx.h
index 3a2b3f4..1b58003 100644
--- a/src/northbridge/intel/i440bx/i440bx.h
+++ b/src/northbridge/intel/i440bx/i440bx.h
@@ -1,17 +1,5 @@
-/*
- * This file is part of the coreboot project.
- *
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* This file is part of the coreboot project. */
#ifndef NORTHBRIDGE_INTEL_I440BX_I440BX_H
#define NORTHBRIDGE_INTEL_I440BX_I440BX_H
diff --git a/src/northbridge/intel/i440bx/raminit.c b/src/northbridge/intel/i440bx/raminit.c
index ee1e759..18997c5 100644
--- a/src/northbridge/intel/i440bx/raminit.c
+++ b/src/northbridge/intel/i440bx/raminit.c
@@ -1,17 +1,5 @@
-/*
- * This file is part of the coreboot project.
- *
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* This file is part of the coreboot project. */
#include <spd.h>
#include <delay.h>
diff --git a/src/northbridge/intel/i440bx/raminit.h b/src/northbridge/intel/i440bx/raminit.h
index dcc8007..534bc44 100644
--- a/src/northbridge/intel/i440bx/raminit.h
+++ b/src/northbridge/intel/i440bx/raminit.h
@@ -1,17 +1,5 @@
-/*
- * This file is part of the coreboot project.
- *
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* This file is part of the coreboot project. */
#ifndef RAMINIT_H
#define RAMINIT_H
diff --git a/src/northbridge/intel/i440bx/romstage.c b/src/northbridge/intel/i440bx/romstage.c
index bdcfdc9..69cfa7f 100644
--- a/src/northbridge/intel/i440bx/romstage.c
+++ b/src/northbridge/intel/i440bx/romstage.c
@@ -1,16 +1,5 @@
-/*
- * This file is part of the coreboot project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* This file is part of the coreboot project. */
#include <arch/romstage.h>
#include <cbmem.h>
--
To view, visit https://review.coreboot.org/c/coreboot/+/40959
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0d28f1fc835fc05b4fc3ab891e9e6e340848aa49
Gerrit-Change-Number: 40959
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Hui <buurin(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newchange
Keith Hui has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40958 )
Change subject: nb/intel/i440bx: Drop northbridge.h
......................................................................
nb/intel/i440bx: Drop northbridge.h
It declares a function that was either never or no longer implemented.
Change-Id: I714d39374519bff1afb94870d0e84f57db619a1f
Signed-off-by: Keith Hui <buurin(a)gmail.com>
---
M src/northbridge/intel/i440bx/northbridge.c
D src/northbridge/intel/i440bx/northbridge.h
2 files changed, 0 insertions(+), 22 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/58/40958/1
diff --git a/src/northbridge/intel/i440bx/northbridge.c b/src/northbridge/intel/i440bx/northbridge.c
index da0107c..d0c93fd 100644
--- a/src/northbridge/intel/i440bx/northbridge.c
+++ b/src/northbridge/intel/i440bx/northbridge.c
@@ -8,7 +8,6 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <cpu/cpu.h>
-#include "northbridge.h"
#include "i440bx.h"
static void northbridge_init(struct device *dev)
diff --git a/src/northbridge/intel/i440bx/northbridge.h b/src/northbridge/intel/i440bx/northbridge.h
deleted file mode 100644
index f42211e..0000000
--- a/src/northbridge/intel/i440bx/northbridge.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#ifndef NORTHBRIDGE_INTEL_440BX_H
-#define NORTHBRIDGE_INTEL_440BX_H
-
-extern unsigned int i440bx_scan_root_bus(struct device *root, unsigned int max);
-
-#endif /* NORTHBRIDGE_INTEL_440BX_H */
--
To view, visit https://review.coreboot.org/c/coreboot/+/40958
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I714d39374519bff1afb94870d0e84f57db619a1f
Gerrit-Change-Number: 40958
Gerrit-PatchSet: 1
Gerrit-Owner: Keith Hui <buurin(a)gmail.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newchange