Name of user not set #1002701 has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37548 )
Change subject: New PCI ID for Family 15h (Models 60h-6fh) I/O Memory Management Unit
......................................................................
New PCI ID for Family 15h (Models 60h-6fh) I/O Memory Management Unit
The 1022:1577 IOMMU device is found in the AMD Bettong board.
Change-Id: I536ec4f24e210fa2e85e87eb4cbfde179f8c7f0f
Signed-off-by: Jorge Fernandez <jorgefm(a)cirsa.com>
---
M src/include/device/pci_ids.h
M src/soc/amd/common/block/iommu/iommu.c
2 files changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/37548/1
diff --git a/src/include/device/pci_ids.h b/src/include/device/pci_ids.h
index 6444bc1..1276994 100644
--- a/src/include/device/pci_ids.h
+++ b/src/include/device/pci_ids.h
@@ -303,6 +303,7 @@
#define PCI_DEVICE_ID_AMD_17H_MODEL_101F_NB 0x15d0
#define PCI_DEVICE_ID_AMD_15H_MODEL_101F_NB_IOMMU 0x1419
#define PCI_DEVICE_ID_AMD_15H_MODEL_303F_NB_IOMMU 0x1423
+#define PCI_DEVICE_ID_AMD_15H_MODEL_606F_NB_IOMMU 0x1577
#define PCI_DEVICE_ID_AMD_15H_MODEL_707F_NB_IOMMU 0x1577
#define PCI_DEVICE_ID_AMD_16H_MODEL_303F_NB_IOMMU 0x1567
#define PCI_DEVICE_ID_AMD_17H_MODEL_101F_NB_IOMMU 0x15d1
diff --git a/src/soc/amd/common/block/iommu/iommu.c b/src/soc/amd/common/block/iommu/iommu.c
index 18c8e66..c8b1ff7 100644
--- a/src/soc/amd/common/block/iommu/iommu.c
+++ b/src/soc/amd/common/block/iommu/iommu.c
@@ -47,6 +47,7 @@
static const unsigned short pci_device_ids[] = {
PCI_DEVICE_ID_AMD_15H_MODEL_303F_NB_IOMMU,
+ PCI_DEVICE_ID_AMD_15H_MODEL_606F_NB_IOMMU,
PCI_DEVICE_ID_AMD_15H_MODEL_707F_NB_IOMMU,
PCI_DEVICE_ID_AMD_17H_MODEL_101F_NB_IOMMU,
0
--
To view, visit https://review.coreboot.org/c/coreboot/+/37548
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I536ec4f24e210fa2e85e87eb4cbfde179f8c7f0f
Gerrit-Change-Number: 37548
Gerrit-PatchSet: 1
Gerrit-Owner: Name of user not set #1002701
Gerrit-MessageType: newchange
Aamir Bohra has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37705 )
Change subject: mainboard/intel/common: Add config for intel common mainboard support
......................................................................
mainboard/intel/common: Add config for intel common mainboard support
Add config to support intel mainboard common code. The intend is
to create common placeholder for APIs common across the mainboard.
Change-Id: Idc6f9bd298520f5e929534c64f1b038a4c9684a9
Signed-off-by: Aamir Bohra <aamir.bohra(a)intel.com>
---
A src/mainboard/intel/common/Kconfig
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/05/37705/1
diff --git a/src/mainboard/intel/common/Kconfig b/src/mainboard/intel/common/Kconfig
new file mode 100644
index 0000000..e96d943
--- /dev/null
+++ b/src/mainboard/intel/common/Kconfig
@@ -0,0 +1,5 @@
+config MAINBOARD_INTEL_COMMON
+ bool
+ help
+ common code for Intel Mainboards
+
--
To view, visit https://review.coreboot.org/c/coreboot/+/37705
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Idc6f9bd298520f5e929534c64f1b038a4c9684a9
Gerrit-Change-Number: 37705
Gerrit-PatchSet: 1
Gerrit-Owner: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-MessageType: newchange
Aamir Bohra has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37707 )
Change subject: mainboard/intel/common: Add some common board and memory APIs
......................................................................
mainboard/intel/common: Add some common board and memory APIs
Add support for below APIs in mainboard intel/common:
1. get_board_id: Returns board ID from EC.
2. get_spd_index: Returns SPD index from board ID.
Change-Id: I40c9454b583d6bc0e3034f3400beb822124ba8f4
Signed-off-by: Aamir Bohra <aamir.bohra(a)intel.com>
---
A src/mainboard/intel/common/Makefile.inc
A src/mainboard/intel/common/board/Makefile.inc
A src/mainboard/intel/common/board/board_id.c
A src/mainboard/intel/common/include/intel_mb/board_id.h
A src/mainboard/intel/common/include/intel_mb/spd.h
A src/mainboard/intel/common/memory/Makefile.inc
A src/mainboard/intel/common/memory/spd.c
7 files changed, 143 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/37707/1
diff --git a/src/mainboard/intel/common/Makefile.inc b/src/mainboard/intel/common/Makefile.inc
new file mode 100644
index 0000000..54bba3f
--- /dev/null
+++ b/src/mainboard/intel/common/Makefile.inc
@@ -0,0 +1,8 @@
+ifeq ($(CONFIG_MAINBOARD_INTEL_COMMON),y)
+
+subdirs-y += board/
+subdirs-y += memory/
+
+CPPFLAGS_common += -I$(src)/mainboard/intel/common/include/
+
+endif
diff --git a/src/mainboard/intel/common/board/Makefile.inc b/src/mainboard/intel/common/board/Makefile.inc
new file mode 100644
index 0000000..4781dfb
--- /dev/null
+++ b/src/mainboard/intel/common/board/Makefile.inc
@@ -0,0 +1,3 @@
+romstage-y += board_id.c
+ramstage-y += board_id.c
+
diff --git a/src/mainboard/intel/common/board/board_id.c b/src/mainboard/intel/common/board/board_id.c
new file mode 100644
index 0000000..19897c2
--- /dev/null
+++ b/src/mainboard/intel/common/board/board_id.c
@@ -0,0 +1,52 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 Intel Corporation.
+ *
+ * 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; version 2 of the License.
+ *
+ * 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.
+ */
+
+#include <boardid.h>
+#include <ec/acpi/ec.h>
+#include <ec/google/chromeec/ec.h>
+#include <intel_mb/board_id.h>
+#include <stdint.h>
+
+static int get_board_id_via_ext_ec(void)
+{
+ uint32_t id = BOARD_ID_INIT;
+
+ if (google_chromeec_get_board_version(&id))
+ id = BOARD_ID_UNKNOWN;
+
+ return id;
+}
+
+/* Get Board ID via EC I/O port write/read */
+int get_board_id(void)
+{
+ MAYBE_STATIC_NONZERO int id = -1;
+
+ if (id < 0) {
+ if (CONFIG(EC_GOOGLE_CHROMEEC))
+ id = get_board_id_via_ext_ec();
+ else{
+ uint8_t buffer[2];
+ uint8_t index;
+ if (send_ec_command(EC_FAB_ID_CMD) == 0) {
+ for (index = 0; index < sizeof(buffer); index++)
+ buffer[index] = recv_ec_data();
+ id = (buffer[0] << 8) | buffer[1];
+ }
+ }
+ }
+
+ return id;
+}
diff --git a/src/mainboard/intel/common/include/intel_mb/board_id.h b/src/mainboard/intel/common/include/intel_mb/board_id.h
new file mode 100644
index 0000000..9aac527
--- /dev/null
+++ b/src/mainboard/intel/common/include/intel_mb/board_id.h
@@ -0,0 +1,30 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 Intel Corporation.
+ *
+ * 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; version 2 of the License.
+ *
+ * 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 _MAINBOARD_COMMON_BOARD_ID_H_
+#define _MAINBOARD_COMMON_BOARD_ID_H_
+
+#include <stdint.h>
+
+/* Board/FAB ID Command */
+#define EC_FAB_ID_CMD 0x0D
+
+/*
+ * Returns board information (board id[15:8] and
+ * Fab info[7:0]) on success and < 0 on error
+ */
+int get_board_id(void);
+
+#endif /* _MAINBOARD_COMMON_BOARD_ID_H_ */
diff --git a/src/mainboard/intel/common/include/intel_mb/spd.h b/src/mainboard/intel/common/include/intel_mb/spd.h
new file mode 100644
index 0000000..3f834b8
--- /dev/null
+++ b/src/mainboard/intel/common/include/intel_mb/spd.h
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 Intel Corporation.
+ *
+ * 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; version 2 of the License.
+ *
+ * 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 _MAINBOARD_COMMON_SPD_H_
+#define _MAINBOARD_COMMON_SPD_H_
+
+#include <stdint.h>
+
+/* Returns SPD index from board ID */
+uint8_t get_spd_index(void);
+
+#endif /* _MAINBOARD_COMMON_SPD_H_ */
diff --git a/src/mainboard/intel/common/memory/Makefile.inc b/src/mainboard/intel/common/memory/Makefile.inc
new file mode 100644
index 0000000..c0e5f53
--- /dev/null
+++ b/src/mainboard/intel/common/memory/Makefile.inc
@@ -0,0 +1,2 @@
+romstage-y += spd.c
+
diff --git a/src/mainboard/intel/common/memory/spd.c b/src/mainboard/intel/common/memory/spd.c
new file mode 100644
index 0000000..5da5bf4
--- /dev/null
+++ b/src/mainboard/intel/common/memory/spd.c
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 Intel Corporation.
+ *
+ * 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; version 2 of the License.
+ *
+ * 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.
+ */
+
+#include <intel_mb/board_id.h>
+#include <intel_mb/spd.h>
+#include <stdint.h>
+
+uint8_t get_spd_index(void)
+{
+ return get_board_id() & 0x7;
+
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/37707
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I40c9454b583d6bc0e3034f3400beb822124ba8f4
Gerrit-Change-Number: 37707
Gerrit-PatchSet: 1
Gerrit-Owner: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-MessageType: newchange
Aamir Bohra has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37708 )
Change subject: mb/intel/icelake_rvp: Use board ID and spd index from mainboard common
......................................................................
mb/intel/icelake_rvp: Use board ID and spd index from mainboard common
Change-Id: I5d1a8a6da855b7ec2906a135a60ca2902307fd4c
Signed-off-by: Aamir Bohra <aamir.bohra(a)intel.com>
---
M src/mainboard/intel/icelake_rvp/Makefile.inc
D src/mainboard/intel/icelake_rvp/board_id.c
D src/mainboard/intel/icelake_rvp/board_id.h
M src/mainboard/intel/icelake_rvp/romstage_fsp_params.c
M src/mainboard/intel/icelake_rvp/spd/spd_util.c
M src/soc/intel/icelake/Kconfig
6 files changed, 4 insertions(+), 91 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/37708/1
diff --git a/src/mainboard/intel/icelake_rvp/Makefile.inc b/src/mainboard/intel/icelake_rvp/Makefile.inc
index 74d02cb..c9c817f 100644
--- a/src/mainboard/intel/icelake_rvp/Makefile.inc
+++ b/src/mainboard/intel/icelake_rvp/Makefile.inc
@@ -22,12 +22,10 @@
romstage-$(CONFIG_CHROMEOS) += chromeos.c
romstage-y += romstage_fsp_params.c
-romstage-y += board_id.c
ramstage-$(CONFIG_CHROMEOS) += chromeos.c
ramstage-$(CONFIG_SOC_INTEL_COMMON_BLOCK_HDA_VERB) += hda_verb.c
ramstage-y += mainboard.c
-ramstage-y += board_id.c
subdirs-y += variants/baseboard
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/baseboard/include
diff --git a/src/mainboard/intel/icelake_rvp/board_id.c b/src/mainboard/intel/icelake_rvp/board_id.c
deleted file mode 100644
index c0def22..0000000
--- a/src/mainboard/intel/icelake_rvp/board_id.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2018 Intel Corporation.
- *
- * 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; version 2 of the License.
- *
- * 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.
- */
-#include "board_id.h"
-#include <boardid.h>
-#include <ec/acpi/ec.h>
-#include <stdint.h>
-#include <ec/google/chromeec/ec.h>
-
-static int get_board_id_via_ext_ec(void)
-{
- uint32_t id = BOARD_ID_INIT;
-
- if (google_chromeec_get_board_version(&id))
- id = BOARD_ID_UNKNOWN;
-
- return id;
-}
-
-/* Get Board ID via EC I/O port write/read */
-int get_board_id(void)
-{
- MAYBE_STATIC_NONZERO int id = -1;
-
- if (id < 0) {
- if (CONFIG(EC_GOOGLE_CHROMEEC))
- id = get_board_id_via_ext_ec();
- else{
- uint8_t buffer[2];
- uint8_t index;
- if (send_ec_command(EC_FAB_ID_CMD) == 0) {
- for (index = 0; index < sizeof(buffer); index++)
- buffer[index] = recv_ec_data();
- id = (buffer[0] << 8) | buffer[1];
- }
- }
- }
-
- return id;
-}
diff --git a/src/mainboard/intel/icelake_rvp/board_id.h b/src/mainboard/intel/icelake_rvp/board_id.h
deleted file mode 100644
index 3ccfe37..0000000
--- a/src/mainboard/intel/icelake_rvp/board_id.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2018 Intel Corporation.
- *
- * 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; version 2 of the License.
- *
- * 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 _MAINBOARD_BOARD_ID_H_
-#define _MAINBOARD_BOARD_ID_H_
-
-/* Board/FAB ID Command */
-#define EC_FAB_ID_CMD 0x0D
-
-/*
- * Returns board information (board id[15:8] and
- * Fab info[7:0]) on success and < 0 on error
- */
-int get_board_id(void);
-
-#endif /* _MAINBOARD_BOARD_ID_H_ */
diff --git a/src/mainboard/intel/icelake_rvp/romstage_fsp_params.c b/src/mainboard/intel/icelake_rvp/romstage_fsp_params.c
index 5a4d681..5db6f18 100644
--- a/src/mainboard/intel/icelake_rvp/romstage_fsp_params.c
+++ b/src/mainboard/intel/icelake_rvp/romstage_fsp_params.c
@@ -15,15 +15,15 @@
#include <console/console.h>
#include <fsp/api.h>
+#include <intel_mb/spd.h>
#include <soc/romstage.h>
#include <spd_bin.h>
-#include "board_id.h"
#include "spd/spd.h"
void mainboard_memory_init_params(FSPM_UPD *mupd)
{
FSP_M_CONFIG *mem_cfg = &mupd->FspmConfig;
- u8 spd_index = (get_board_id() & 0x1F) & 0x7;
+ u8 spd_index = get_spd_index();
printk(BIOS_DEBUG, "spd index is 0x%x\n", spd_index);
if (spd_index > 0 && spd_index != 2) {
diff --git a/src/mainboard/intel/icelake_rvp/spd/spd_util.c b/src/mainboard/intel/icelake_rvp/spd/spd_util.c
index d7babbd..cae3974 100644
--- a/src/mainboard/intel/icelake_rvp/spd/spd_util.c
+++ b/src/mainboard/intel/icelake_rvp/spd/spd_util.c
@@ -15,10 +15,10 @@
#include <arch/cpu.h>
#include <intelblocks/mp_init.h>
+#include <intel_mb/spd.h>
#include <stdint.h>
#include <string.h>
-#include "../board_id.h"
#include "spd.h"
enum icl_dimm_type {
@@ -47,13 +47,6 @@
memcpy(dq_map_ptr, dq_map, sizeof(dq_map));
}
-static uint8_t get_spd_index(void)
-{
- uint8_t spd_index = (get_board_id() & 0x1F) & 0x7;
-
- return spd_index;
-}
-
void mainboard_fill_dqs_map_ch0(void *dqs_map_ptr)
{
/* DQS CPU<>DRAM map Ch0 */
diff --git a/src/soc/intel/icelake/Kconfig b/src/soc/intel/icelake/Kconfig
index 7f1cd89..09b22d5 100644
--- a/src/soc/intel/icelake/Kconfig
+++ b/src/soc/intel/icelake/Kconfig
@@ -26,6 +26,7 @@
select INTEL_GMA_ACPI
select INTEL_GMA_ADD_VBT if RUN_FSP_GOP
select IOAPIC
+ select MAINBOARD_INTEL_COMMON
select MRC_SETTINGS_PROTECT
select PARALLEL_MP
select PARALLEL_MP_AP_WORK
--
To view, visit https://review.coreboot.org/c/coreboot/+/37708
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5d1a8a6da855b7ec2906a135a60ca2902307fd4c
Gerrit-Change-Number: 37708
Gerrit-PatchSet: 1
Gerrit-Owner: Aamir Bohra <aamir.bohra(a)intel.com>
Gerrit-Reviewer: Aamir Bohra <aamir.bohra(a)intel.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