coreboot-gerrit
Threads by month
- ----- 2026 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
August 2021
- 1 participants
- 4525 discussions
Sept. 19, 2026
Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39658 )
Change subject: [DO NOT MERGE] q1900m
......................................................................
[DO NOT MERGE] q1900m
Change-Id: Id029074e4231db231a68bc92a4210dc052bba1c9
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
A src/mainboard/asrock/q1900m/Kconfig
A src/mainboard/asrock/q1900m/Kconfig.name
A src/mainboard/asrock/q1900m/Makefile.inc
A src/mainboard/asrock/q1900m/acpi/dptf.asl
A src/mainboard/asrock/q1900m/acpi/ec.asl
A src/mainboard/asrock/q1900m/acpi/superio.asl
A src/mainboard/asrock/q1900m/acpi_tables.c
A src/mainboard/asrock/q1900m/board_info.txt
A src/mainboard/asrock/q1900m/devicetree.cb
A src/mainboard/asrock/q1900m/dsdt.asl
A src/mainboard/asrock/q1900m/fadt.c
A src/mainboard/asrock/q1900m/gpio.c
A src/mainboard/asrock/q1900m/irqroute.c
A src/mainboard/asrock/q1900m/irqroute.h
A src/mainboard/asrock/q1900m/mainboard.c
A src/mainboard/asrock/q1900m/romstage.c
A src/mainboard/asrock/q1900m/spd/spd0.spd.hex
A src/mainboard/asrock/q1900m/spd/spd1.spd.hex
18 files changed, 841 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/58/39658/1
diff --git a/src/mainboard/asrock/q1900m/Kconfig b/src/mainboard/asrock/q1900m/Kconfig
new file mode 100644
index 0000000..79db93c
--- /dev/null
+++ b/src/mainboard/asrock/q1900m/Kconfig
@@ -0,0 +1,28 @@
+## SPDX-License-Identifier: GPL-2.0-only
+## This file is part of the coreboot project.
+
+if BOARD_ASROCK_Q1900M
+
+config BOARD_SPECIFIC_OPTIONS
+ def_bool y
+ select SOC_INTEL_BAYTRAIL
+ select BOARD_ROMSIZE_KB_8192
+ select HAVE_ACPI_TABLES
+ select HAVE_ACPI_RESUME
+ select SUPERIO_NUVOTON_NCT6776
+ select SUPERIO_NUVOTON_NCT6776_COM_A
+ select MAINBOARD_HAS_CHROMEOS
+
+config MAINBOARD_DIR
+ string
+ default "asrock/q1900m"
+
+config MAINBOARD_PART_NUMBER
+ string
+ default "Q1900M"
+
+config VGA_BIOS_FILE
+ string
+ default "pci8086,0f31.rom"
+
+endif
diff --git a/src/mainboard/asrock/q1900m/Kconfig.name b/src/mainboard/asrock/q1900m/Kconfig.name
new file mode 100644
index 0000000..1056ef9
--- /dev/null
+++ b/src/mainboard/asrock/q1900m/Kconfig.name
@@ -0,0 +1,2 @@
+config BOARD_ASROCK_Q1900M
+ bool "Q1900M"
diff --git a/src/mainboard/asrock/q1900m/Makefile.inc b/src/mainboard/asrock/q1900m/Makefile.inc
new file mode 100644
index 0000000..8947e78
--- /dev/null
+++ b/src/mainboard/asrock/q1900m/Makefile.inc
@@ -0,0 +1,24 @@
+## SPDX-License-Identifier: GPL-2.0-only
+## This file is part of the coreboot project.
+
+SPD_BIN = $(obj)/spd.bin
+
+SPD_SOURCES = spd0
+SPD_SOURCES += spd1
+
+SPD_DEPS := $(foreach f, $(SPD_SOURCES), src/mainboard/$(MAINBOARDDIR)/spd/$(f).spd.hex)
+
+# Include spd ROM data
+$(SPD_BIN): $(SPD_DEPS)
+ for f in $+; \
+ do for c in $$(cat $$f | grep -v ^#); \
+ do printf $$(printf '\%o' 0x$$c); \
+ done; \
+ done > $@
+
+cbfs-files-y += spd.bin
+spd.bin-file := $(SPD_BIN)
+spd.bin-type := spd
+
+ramstage-y += irqroute.c
+ramstage-y += gpio.c
diff --git a/src/mainboard/asrock/q1900m/acpi/dptf.asl b/src/mainboard/asrock/q1900m/acpi/dptf.asl
new file mode 100644
index 0000000..bdc396b
--- /dev/null
+++ b/src/mainboard/asrock/q1900m/acpi/dptf.asl
@@ -0,0 +1,66 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/* This file is part of the coreboot project. */
+
+#define DPTF_CPU_PASSIVE 80
+#define DPTF_CPU_CRITICAL 105
+
+#define DPTF_TSR0_SENSOR_ID 1
+#define DPTF_TSR0_SENSOR_NAME "TMP432_Internal"
+#define DPTF_TSR0_PASSIVE 48
+#define DPTF_TSR0_CRITICAL 80
+
+#define DPTF_TSR1_SENSOR_ID 2
+#define DPTF_TSR1_SENSOR_NAME "TMP432_Power_top"
+#define DPTF_TSR1_PASSIVE 60
+#define DPTF_TSR1_CRITICAL 80
+
+#define DPTF_TSR2_SENSOR_ID 3
+#define DPTF_TSR2_SENSOR_NAME "TMP432_CPU_bottom"
+#define DPTF_TSR2_PASSIVE 55
+#define DPTF_TSR2_CRITICAL 80
+
+/* Mainboard specific _PDL is 1GHz */
+Name (MPDL, 8)
+
+Name (DTRT, Package () {
+ /* CPU Throttle Effect on CPU */
+ Package () { \_SB.DPTF.TCPU, \_SB.DPTF.TCPU, 100, 50, 0, 0, 0, 0 },
+
+ /* CPU Effect on Temp Sensor 0 */
+ Package () { \_SB.DPTF.TCPU, \_SB.DPTF.TSR0, 100, 600, 0, 0, 0, 0 },
+
+#ifdef DPTF_ENABLE_CHARGER
+ /* Charger Effect on Temp Sensor 1 */
+ Package () { \_SB.DPTF.TCHG, \_SB.DPTF.TSR1, 200, 600, 0, 0, 0, 0 },
+#endif
+
+ /* CPU Effect on Temp Sensor 1 */
+ Package () { \_SB.DPTF.TCPU, \_SB.DPTF.TSR1, 100, 600, 0, 0, 0, 0 },
+
+ /* CPU Effect on Temp Sensor 2 */
+ Package () { \_SB.DPTF.TCPU, \_SB.DPTF.TSR2, 100, 600, 0, 0, 0, 0 },
+})
+
+Name (MPPC, Package ()
+{
+ 0x2, // Revision
+ Package () { // Power Limit 1
+ 0, // PowerLimitIndex, 0 for Power Limit 1
+ 1600, // PowerLimitMinimum
+ 6200, // PowerLimitMaximum
+ 1000, // TimeWindowMinimum
+ 1000, // TimeWindowMaximum
+ 200 // StepSize
+ },
+ Package () { // Power Limit 2
+ 1, // PowerLimitIndex, 1 for Power Limit 2
+ 8000, // PowerLimitMinimum
+ 8000, // PowerLimitMaximum
+ 1000, // TimeWindowMinimum
+ 1000, // TimeWindowMaximum
+ 1000 // StepSize
+ }
+})
+
+/* Include SoC DPTF */
+#include <soc/intel/baytrail/acpi/dptf/dptf.asl>
diff --git a/src/mainboard/asrock/q1900m/acpi/ec.asl b/src/mainboard/asrock/q1900m/acpi/ec.asl
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/mainboard/asrock/q1900m/acpi/ec.asl
diff --git a/src/mainboard/asrock/q1900m/acpi/superio.asl b/src/mainboard/asrock/q1900m/acpi/superio.asl
new file mode 100644
index 0000000..e224349
--- /dev/null
+++ b/src/mainboard/asrock/q1900m/acpi/superio.asl
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+/* This file is part of the coreboot project. */
+
+#define SUPERIO_DEV SIO0
+#define SUPERIO_PNP_BASE 0x2e
+#define NCT6776_SHOW_PP
+#define NCT6776_SHOW_SP1
+#define NCT6776_SHOW_KBC
+#define NCT6776_SHOW_HWM
+
+#undef NCT6776_SHOW_GPIO
+
+#include <superio/nuvoton/nct6776/acpi/superio.asl>
diff --git a/src/mainboard/asrock/q1900m/acpi_tables.c b/src/mainboard/asrock/q1900m/acpi_tables.c
new file mode 100644
index 0000000..c8a95c6
--- /dev/null
+++ b/src/mainboard/asrock/q1900m/acpi_tables.c
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/* This file is part of the coreboot project. */
+
+#include <types.h>
+#include <string.h>
+#include <arch/acpi.h>
+#include <arch/ioapic.h>
+#include <arch/smp/mpspec.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <soc/acpi.h>
+#include <soc/nvs.h>
+#include <soc/iomap.h>
+
+void acpi_create_gnvs(global_nvs_t *gnvs)
+{
+ acpi_init_gnvs(gnvs);
+}
+
+unsigned long acpi_fill_madt(unsigned long current)
+{
+ /* Local APICs */
+ current = acpi_create_madt_lapics(current);
+
+ /* IOAPIC */
+ current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, 2, IO_APIC_ADDR, 0);
+
+ current = acpi_madt_irq_overrides(current);
+
+ return current;
+}
diff --git a/src/mainboard/asrock/q1900m/board_info.txt b/src/mainboard/asrock/q1900m/board_info.txt
new file mode 100644
index 0000000..d3e1fc2
--- /dev/null
+++ b/src/mainboard/asrock/q1900m/board_info.txt
@@ -0,0 +1,6 @@
+Category: desktop
+Board URL: https://www.asrock.com/mb/Intel/Q1900M/
+ROM package: SOIC-8
+ROM protocol: SPI
+ROM socketed: possible
+Flashrom support: y
diff --git a/src/mainboard/asrock/q1900m/devicetree.cb b/src/mainboard/asrock/q1900m/devicetree.cb
new file mode 100644
index 0000000..3085696
--- /dev/null
+++ b/src/mainboard/asrock/q1900m/devicetree.cb
@@ -0,0 +1,118 @@
+chip soc/intel/baytrail
+
+ # SATA port enable mask (2 ports)
+ register "sata_port_map" = "0x1"
+ register "sata_ahci" = "1"
+ register "ide_legacy_combined" = "0"
+
+ # Route USB ports to XHCI
+ register "usb_route_to_xhci" = "1"
+
+ # USB Port Disable Mask
+ register "usb2_port_disable_mask" = "0"
+ register "usb3_port_disable_mask" = "0"
+
+ # USB PHY settings
+ # TODO: These values are from Baytrail and need tuning for Q1900M board
+ register "usb2_per_port_lane0" = "0x00049a09"
+ register "usb2_per_port_rcomp_hs_pullup0" = "0x0300401d"
+ register "usb2_per_port_lane1" = "0x00049a09"
+ register "usb2_per_port_rcomp_hs_pullup1" = "0x0300401d"
+ register "usb2_per_port_lane2" = "0x00049209"
+ register "usb2_per_port_rcomp_hs_pullup2" = "0x01004015"
+ register "usb2_per_port_lane3" = "0x00049a09"
+ register "usb2_per_port_rcomp_hs_pullup3" = "0x0300401d"
+ register "usb2_comp_bg" = "0x4700"
+
+ # Allow PCIe devices to wake system from suspend
+ register "pcie_wake_enable" = "1"
+
+ # Enable PIPEA as DP_C
+ #register "gpu_pipea_port_select" = "2" # DP_C
+ #register "gpu_pipea_power_cycle_delay" = "6" # 600ms
+ #register "gpu_pipea_power_on_delay" = "5000" # 500ms
+ #register "gpu_pipea_light_on_delay" = "70" # 7ms
+ #register "gpu_pipea_power_off_delay" = "500" # 50ms
+ #register "gpu_pipea_light_off_delay" = "2000" # 200ms
+
+ # VR PS2 control
+ register "vnn_ps2_enable" = "1"
+ register "vcc_ps2_enable" = "1"
+
+ # Disable SLP_X stretching after SUS power well fail.
+ register "disable_slp_x_stretch_sus_fail" = "1"
+
+ device cpu_cluster 0 on
+ device lapic 0 on end
+ end
+ device domain 0 on
+ device pci 00.0 on end # SoC router
+ device pci 02.0 on end # GFX
+ device pci 11.0 off end # SDIO
+ device pci 12.0 off end # SD
+ device pci 13.0 on end # SATA
+ device pci 14.0 on end # XHCI
+ device pci 15.0 off end # LPE
+ device pci 17.0 off end # MMC
+ device pci 18.0 off end # SIO_DMA1
+ device pci 18.1 off end # I2C1
+ device pci 18.2 off end # I2C2
+ device pci 18.3 off end # I2C3
+ device pci 18.4 off end # I2C4
+ device pci 18.5 off end # I2C5
+ device pci 18.6 off end # I2C6
+ device pci 18.7 off end # I2C7
+ device pci 1a.0 on end # TXE
+ device pci 1b.0 on end # HDA
+ device pci 1c.0 on end # PCIE_PORT1
+ device pci 1c.1 on end # PCIE_PORT2
+ device pci 1c.2 on end # PCIE_PORT3
+ device pci 1c.3 on end # PCIE_PORT4
+ device pci 1d.0 on end # EHCI
+ device pci 1e.0 off end # SIO_DMA2
+ device pci 1e.1 off end # PWM1
+ device pci 1e.2 off end # PWM2
+ device pci 1e.3 off end # HSUART1
+ device pci 1e.4 off end # HSUART2
+ device pci 1e.5 off end # SPI
+ device pci 1f.0 on # LPC Bridge
+ chip superio/nuvoton/nct6776
+ device pnp 2e.0 off end # Floppy
+ device pnp 2e.1 on # Parallel port
+ io 0x60 = 0x378
+ irq 0x70 = 5
+ drq 0x74 = 3
+ end
+ device pnp 2e.2 on # COM1
+ io 0x60 = 0x3f8
+ irq 0x70 = 4
+ end
+ device pnp 2e.3 off end # COM2, IR
+ device pnp 2e.5 off # Keyboard
+ #io 0x60 = 0x60
+ #io 0x62 = 0x64
+ #irq 0x70 = 1
+ #irq 0x72 = 12
+ end
+ device pnp 2e.6 off end # CIR
+ device pnp 2e.7 off end # GPIO6-9
+ device pnp 2e.8 off end # WDT1, GPIO0, GPIO1, GPIOA
+ device pnp 2e.9 off end # GPIO2-5
+ device pnp 2e.a on # ACPI
+ irq 0xe3 = 0x14
+ irq 0xe6 = 0x4c
+ end
+ device pnp 2e.b on # HWM, LED
+ io 0x60 = 0x0290
+ end
+ device pnp 2e.d on end # VID
+ device pnp 2e.e off end # CIR WAKE-UP
+ device pnp 2e.f off end # GPIO Push-Pull or Open-drain
+ device pnp 2e.14 off end # SVID
+ device pnp 2e.16 on end # Deep Sleep
+ device pnp 2e.17 off end # GPIOA
+ end
+ end
+ device pci 1f.3 on end # SMBus
+ end
+end
diff --git a/src/mainboard/asrock/q1900m/dsdt.asl b/src/mainboard/asrock/q1900m/dsdt.asl
new file mode 100644
index 0000000..2e9de53
--- /dev/null
+++ b/src/mainboard/asrock/q1900m/dsdt.asl
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/* This file is part of the coreboot project. */
+
+#include <arch/acpi.h>
+
+DefinitionBlock(
+ "dsdt.aml",
+ "DSDT",
+ 0x02, // DSDT revision: ACPI v2.0 and up
+ OEM_ID,
+ ACPI_TABLE_CREATOR,
+ 0x20110725 // OEM revision
+)
+{
+ #include <soc/intel/baytrail/acpi/platform.asl>
+ #include <soc/intel/baytrail/acpi/globalnvs.asl>
+ #include <cpu/intel/common/acpi/cpu.asl>
+
+ Scope (\_SB) {
+ Device (PCI0)
+ {
+ //#include <soc/intel/baytrail/acpi/northcluster.asl>
+ #include <soc/intel/baytrail/acpi/southcluster.asl>
+ }
+
+ /* Dynamic Platform Thermal Framework */
+ //#include "acpi/dptf.asl"
+ }
+
+ #include <southbridge/intel/common/acpi/sleepstates.asl>
+}
diff --git a/src/mainboard/asrock/q1900m/fadt.c b/src/mainboard/asrock/q1900m/fadt.c
new file mode 100644
index 0000000..d07d157
--- /dev/null
+++ b/src/mainboard/asrock/q1900m/fadt.c
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/* This file is part of the coreboot project. */
+
+#include <string.h>
+#include <soc/acpi.h>
+#include <version.h>
+
+void acpi_create_fadt(acpi_fadt_t * fadt, acpi_facs_t * facs, void *dsdt)
+{
+ acpi_header_t *header = &(fadt->header);
+
+ memset((void *) fadt, 0, sizeof(acpi_fadt_t));
+ memcpy(header->signature, "FACP", 4);
+ header->length = sizeof(acpi_fadt_t);
+ header->revision = get_acpi_table_revision(FADT);
+ memcpy(header->oem_id, OEM_ID, 6);
+ memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
+ memcpy(header->asl_compiler_id, ASLC, 4);
+ header->asl_compiler_revision = asl_revision;
+
+ fadt->firmware_ctrl = (unsigned long) facs;
+ fadt->dsdt = (unsigned long) dsdt;
+ fadt->reserved = 0;
+ fadt->preferred_pm_profile = PM_DESKTOP;
+
+ fadt->x_firmware_ctl_l = (unsigned long)facs;
+ fadt->x_firmware_ctl_h = 0;
+ fadt->x_dsdt_l = (unsigned long)dsdt;
+ fadt->x_dsdt_h = 0;
+
+ acpi_fill_in_fadt(fadt);
+
+ header->checksum = acpi_checksum((void *) fadt, header->length);
+}
diff --git a/src/mainboard/asrock/q1900m/gpio.c b/src/mainboard/asrock/q1900m/gpio.c
new file mode 100644
index 0000000..c1dfef9
--- /dev/null
+++ b/src/mainboard/asrock/q1900m/gpio.c
@@ -0,0 +1,232 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/* This file is part of the coreboot project. */
+
+#include <stdlib.h>
+#include <soc/gpio.h>
+#include "irqroute.h"
+
+/*
+ * For multiplexed functions, look in EDS:
+ * 10.3 Ball Name and Function by Location
+ *
+ * Note that Pad Number differs from GPIO Number. The pads list is in the BWG Vol2 Rev1p0.
+ * Chapter 35: GPIO Handling
+ * Table 35-2: Pad Number Mapping According to Pad Name
+ */
+
+ #define GPIO_INNC GPIO_INPUT_NOPU
+ #define GPIO_FS GPIO_INPUT_NOPU
+
+/* DDI0 = HDMI; DDI1 = DVI; no backlight used on either pipe */
+
+/* NCORE GPIOs */ /* Map [15..26] to MCSI_GPIO[00..11] */
+static const struct soc_gpio_map gpncore_gpio_map[] = {
+ GPIO_FUNC2, /* [00] - HDMI DDC Detect */ // DDI0_HPD
+ GPIO_FUNC2, /* [01] - HDMI DDC Data */ // DDI0_DDCDATA
+ GPIO_FUNC2, /* [02] - HDMI DDC Clock */ // DDI0_DDCCLK
+ GPIO_INNC, /* [03] - No Connect */ // DDI0_VDDEN
+ GPIO_INNC, /* [04] - No Connect */ // DDI0_BKLTEN
+ GPIO_INNC, /* [05] - No Connect */ // DDI0_BKLTCTL
+ GPIO_FUNC2, /* [06] - DVI DDC Detect */ // DDI1_HPD
+ GPIO_FUNC2, /* [07] - DVI DDC Data */ // DDI1_DDCDATA
+ GPIO_FUNC2, /* [08] - DVI DDC Clock */ // DDI1_DDCCLK
+ GPIO_INNC, /* [09] - No Connect */ // DDI1_VDDEN
+ GPIO_INNC, /* [10] - No Connect */ // DDI1_BKLTEN
+ GPIO_INNC, /* [11] - No Connect */ // DDI1_BKLTCTL
+ GPIO_INNC, /* [12] - No Connect */ // RESERVED
+ GPIO_FS, /* [13] - No Connect */ // RESERVED (removed in EDS_Rev1p5)
+ GPIO_INNC, /* [14] - No Connect */ // RESERVED
+ GPIO_INNC, /* [15] - No Connect */ // OBSFN_C0 (XDP stuff)
+ GPIO_INNC, /* [16] - No Connect */ // XDP stuff
+ GPIO_INNC, /* [17] - No Connect */ // XDP stuff
+ GPIO_INNC, /* [18] - No Connect */ // XDP stuff
+ GPIO_INNC, /* [19] - No Connect */ // XDP stuff
+ GPIO_INNC, /* [20] - No Connect */ // XDP stuff
+ GPIO_INNC, /* [21] - No Connect */ // XDP stuff
+ GPIO_INNC, /* [22] - No Connect */ // XDP stuff
+ GPIO_INNC, /* [23] - No Connect */ // XDP stuff
+ GPIO_INNC, /* [24] - No Connect */ // Still camera 0 reset
+ GPIO_INNC, /* [25] - No Connect */ // Still camera 1 reset
+ GPIO_INNC, /* [26] - No Connect */ // Video camera reset
+ GPIO_END
+};
+
+/* SCORE GPIOs (_XX) */
+static const struct soc_gpio_map gpscore_gpio_map[] = {
+ GPIO_FS, /* [000] - SATA_GP0 */ // SHOULD BE A PULL-UP, BUT READS LOW!
+ GPIO_FS, /* [001] - SATA_GP1 */ // EXTERNAL PULL UP
+ GPIO_FUNC1, /* [002] - SATA_LED_B */ // HDD LED
+ GPIO_FUNC1, /* [003] - PCIE_CLKREQ_0 */ // CLKREQ# FOR TOP PCIE X1
+ GPIO_FUNC1, /* [004] - PCIE_CLKREQ_1 */ // CLKREQ# FOR PCIE X4
+ GPIO_FUNC1, /* [005] - PCIE_CLKREQ_2 */ // CLKREQ# FOR BOTTOM PCIE X1
+ GPIO_FUNC1, /* [006] - PCIE_CLKREQ_3 */ // CLKREQ# FOR LAN
+ GPIO_INNC, /* [007] - SD3_WP */ // NO CONNECT
+ GPIO_FUNC2, /* [008] - No Connect */ // HDA RESET
+ GPIO_FUNC2, /* [009] - No Connect */ // HDA SYNC
+ GPIO_FUNC2, /* [010] - No Connect */ // HDA CLK
+ GPIO_FUNC2, /* [011] - No Connect */ // HDA SDO
+ GPIO_FUNC2, /* [012] - No Connect */ // HDA SDI0
+ GPIO_INNC, /* [013] - No Connect */ // NO CONNECT
+ GPIO_FS, /* [014] - No Connect */ // OTE_GATE1 !!!
+ GPIO_FS, /* [015] - No Connect */ // OTE_GATE2 !!!
+ GPIO_INNC, /* [016] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [017] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [018] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [019] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [020] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [021] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [022] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [023] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [024] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [025] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [026] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [027] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [028] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [029] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [030] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [031] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [032] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [033] - SD3_CLK */ // NO CONNECT
+ GPIO_INNC, /* [034] - SD3_D0 */ // NO CONNECT
+ GPIO_INNC, /* [035] - SD3_D1 */ // NO CONNECT
+ GPIO_INNC, /* [036] - SD3_D2 */ // NO CONNECT
+ GPIO_INNC, /* [037] - SD3_D3 */ // NO CONNECT
+ GPIO_INNC, /* [038] - SD3_CD# */ // NO CONNECT
+ GPIO_INNC, /* [039] - SD3_CMD */ // NO CONNECT
+ GPIO_INNC, /* [040] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [041] - SD3_PWREN */ // NO CONNECT
+ GPIO_FUNC1, /* [042] - No Connect */ // LAD0
+ GPIO_FUNC1, /* [043] - No Connect */ // LAD1
+ GPIO_FUNC1, /* [044] - No Connect */ // LAD2
+ GPIO_FUNC1, /* [045] - No Connect */ // LAD3
+ GPIO_FUNC1, /* [046] - No Connect */ // LFRAME#
+ GPIO_FUNC1, /* [047] - No Connect */ // LPC CLOCK (TPM)
+ GPIO_FUNC1, /* [048] - No Connect */ // LPC CLOCK (SIO)
+ GPIO_FUNC1, /* [049] - No Connect */ // LPC CLKRUN#
+ GPIO_FUNC1, /* [050] - No Connect */ // SERIRQ#
+ GPIO_FUNC1, /* [051] - PCU_SMB_DATA */ // SMBUS DATA
+ GPIO_FUNC1, /* [052] - PCU_SMB_CLK */ // SMBUS CLK
+ GPIO_FUNC1, /* [053] - PCU_SMB_ALERT */ // SMBUS ALERT# (UNUSED? STRAP?)
+ GPIO_FUNC1, /* [054] - ILB_8254_SPKR */ // SPEAKER
+ GPIO_FS, /* [055] - No Connect */ // FRONT PANEL PRESENCE (PIN 4)
+ GPIO_FS, /* [056] - _56 */ // TOP SWAP (DEFEATURE)
+ GPIO_INNC, /* [057] - PCU_UART3_TXD */ // NO CONNECT
+ GPIO_INNC, /* [058] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [059] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [060] - No Connect */ // NO CONNECT
+ GPIO_FS, /* [061] - PCU_UART3_RXD */ // PCIE3_SEL !!!
+ GPIO_INNC, /* [062] - LPE_I2S_CLK */ // NO CONNECT
+ GPIO_FS, /* [063] - LPE_I2S_FRM */ // BOOT SEL STRAP
+ GPIO_INNC, /* [064] - LPE_I2S_DATIN */ // NO CONNECT
+ GPIO_FS, /* [065] - LPE_I2S_DATOUT */ // IFD OVERRIDE STRAP
+ GPIO_INNC, /* [066] - SOC_SIO_SPI_CS1 */ // NO CONNECT
+ GPIO_INNC, /* [067] - SOC_SIO_SPI_MISO */ // NO CONNECT
+ GPIO_INNC, /* [068] - SOC_SIO_SPI_MOSI */ // NO CONNECT
+ GPIO_INNC, /* [069] - SOC_SIO_SPI_CLK */ // NO CONNECT
+ GPIO_INNC, /* [070] - SIO_UART1_RXD */ // NO CONNECT
+ GPIO_INNC, /* [071] - SIO_UART1_TXD */ // NO CONNECT
+ GPIO_INNC, /* [072] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [073] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [074] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [075] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [076] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [077] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [078] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [079] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [080] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [081] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [082] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [083] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [084] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [085] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [086] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [087] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [088] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [089] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [090] - EXP_I2C_SDA */ // NO CONNECT
+ GPIO_INNC, /* [091] - EXP_I2C_SCL */ // NO CONNECT
+ GPIO_FS, /* [092] - 0R GND? */ // PCIE1_SEL !!!
+ GPIO_FS, /* [093] - 0R GND? */ // PCIE2_SEL !!!
+ GPIO_INNC, /* [094] - SOC_PWM0 */ // NO CONNECT
+ GPIO_INNC, /* [095] - SOC_PWM1 */ // NO CONNECT
+ GPIO_FUNC1, /* [096] - No Connect */ // PMC PLT CLK0
+ GPIO_FUNC1, /* [097] - No Connect */ // PMC PLT CLK1
+ GPIO_INNC, /* [098] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [099] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [100] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [101] - No Connect */ // NO CONNECT
+ GPIO_END
+};
+
+/* SSUS GPIOs () */
+static const struct soc_gpio_map gp_ssus_gpio_map[] = {
+ GPIO_FS, /* [00] - No Connect */ // RINGIN# !!!
+ GPIO_INNC, /* [01] - PMC_WAKE_PCIE[1] */ // NO CONNECT
+ GPIO_INNC, /* [02] - PMC_WAKE_PCIE[2] */ // PME# (SIO)
+ GPIO_INNC, /* [03] - PMC_WAKE_PCIE[3] */ // SMI# (SIO)
+ GPIO_INNC, /* [04] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [05] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [06] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [07] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [08] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [09] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [10] - _10_UNLOCK */ // NO CONNECT
+ GPIO_FUNC0, /* [11] - SUSPWRDNACK */ // SUSPWRDNACK
+ GPIO_FS, /* [12] - No Connect */ // NO CONNECT ???
+ GPIO_INNC, /* [13] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [14] - 14_J20 */ // NO CONNECT
+ GPIO_FUNC0, /* [15] - PMC_WAKE_PCIE[0] */ // SOC PCIE WAKE#
+ GPIO_FUNC0, /* [16] - No Connect */ // POWER BUTTON (SIO)
+ GPIO_INNC, /* [17] - No Connect */ // NO CONNECT
+ GPIO_FUNC0, /* [18] - T360 */ // SUS STAT#
+ GPIO_FUNC0, /* [19] - SOC_USB_HOST_OC0 */ // USB OC0#
+ GPIO_FUNC0, /* [20] - SOC_USB_HOST_OC1 */ // USB OC1#
+ GPIO_INNC, /* [21] - SOC_SPI_CS1B */ // NO CONNECT
+ GPIO_OUT_LOW, /* [22] - No Connect */ // MEMORY VR VCCM OV1 !!!
+ GPIO_FS, /* [23] - No Connect */ // MEMORY VR VCCM OV2 !!!
+ GPIO_INNC, /* [24] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [25] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [26] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [27] - SW450-1 */ // MBREV0
+ GPIO_INNC, /* [28] - SW450-2 */ // MBREV1
+ GPIO_INNC, /* [29] - SW450-3 */ // MBREV2
+ GPIO_INNC, /* [30] - SW450-4 */ // MBREV3
+ GPIO_INNC, /* [31] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [32] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [33] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [34] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [35] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [36] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [37] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [38] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [39] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [40] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [41] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [42] - No Connect */ // NO CONNECT
+ GPIO_INNC, /* [43] - No Connect */ // NO CONNECT
+ GPIO_END
+};
+
+/*
+static const u8 core_dedicated_irq[GPIO_MAX_DIRQS] = {
+ [I8042_IRQ_OFFSET] = I8042_IRQ_GPIO,
+};
+
+static const u8 sus_dedicated_irq[GPIO_MAX_DIRQS] = {
+ [CODEC_IRQ_OFFSET] = CODEC_IRQ_GPIO,
+};*/
+
+static struct soc_gpio_config gpio_config = {
+ .ncore = gpncore_gpio_map,
+ .score = gpscore_gpio_map,
+ .ssus = gp_ssus_gpio_map,
+ .core_dirq = NULL,
+ .sus_dirq = NULL,
+ //.core_dirq = &core_dedicated_irq,
+ //.sus_dirq = &sus_dedicated_irq,
+};
+
+struct soc_gpio_config* mainboard_get_gpios(void)
+{
+ return &gpio_config;
+}
diff --git a/src/mainboard/asrock/q1900m/irqroute.c b/src/mainboard/asrock/q1900m/irqroute.c
new file mode 100644
index 0000000..df43ee9
--- /dev/null
+++ b/src/mainboard/asrock/q1900m/irqroute.c
@@ -0,0 +1,6 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/* This file is part of the coreboot project. */
+
+#include "irqroute.h"
+
+DEFINE_IRQ_ROUTES;
diff --git a/src/mainboard/asrock/q1900m/irqroute.h b/src/mainboard/asrock/q1900m/irqroute.h
new file mode 100644
index 0000000..3944c9de
--- /dev/null
+++ b/src/mainboard/asrock/q1900m/irqroute.h
@@ -0,0 +1,48 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/* This file is part of the coreboot project. */
+
+#include <soc/irq.h>
+#include <soc/pci_devs.h>
+#include <soc/pmc.h>
+
+#define PCI_DEV_PIRQ_ROUTES \
+ PCI_DEV_PIRQ_ROUTE(GFX_DEV, A, B, C, D), \
+ PCI_DEV_PIRQ_ROUTE(SDIO_DEV, A, B, C, D), \
+ PCI_DEV_PIRQ_ROUTE(SD_DEV, C, D, E, F), \
+ PCI_DEV_PIRQ_ROUTE(SATA_DEV, A, B, C, D), \
+ PCI_DEV_PIRQ_ROUTE(XHCI_DEV, A, B, C, D), \
+ PCI_DEV_PIRQ_ROUTE(LPE_DEV, A, B, C, D), \
+ PCI_DEV_PIRQ_ROUTE(MMC_DEV, D, E, F, G), \
+ PCI_DEV_PIRQ_ROUTE(SIO1_DEV, A, B, C, D), \
+ PCI_DEV_PIRQ_ROUTE(TXE_DEV, A, B, C, D), \
+ PCI_DEV_PIRQ_ROUTE(HDA_DEV, A, B, C, D), \
+ PCI_DEV_PIRQ_ROUTE(PCIE_DEV, A, B, C, D), \
+ PCI_DEV_PIRQ_ROUTE(EHCI_DEV, A, B, C, D), \
+ PCI_DEV_PIRQ_ROUTE(SIO2_DEV, B, C, D, E), \
+ PCI_DEV_PIRQ_ROUTE(PCU_DEV, A, B, C, D)
+
+#define PIRQ_PIC_ROUTES \
+ PIRQ_PIC(A, DISABLE), \
+ PIRQ_PIC(B, DISABLE), \
+ PIRQ_PIC(C, DISABLE), \
+ PIRQ_PIC(D, DISABLE), \
+ PIRQ_PIC(E, DISABLE), \
+ PIRQ_PIC(F, DISABLE), \
+ PIRQ_PIC(G, DISABLE), \
+ PIRQ_PIC(H, DISABLE)
+
+/* CORE bank DIRQs - up to 16 supported */
+//#define TPAD_IRQ_OFFSET 0
+//#define TOUCH_IRQ_OFFSET 1
+//#define I8042_IRQ_OFFSET 2
+//#define ALS_IRQ_OFFSET 3
+/* Corresponding SCORE GPIO pins */
+//#define TPAD_IRQ_GPIO 55
+//#define TOUCH_IRQ_GPIO 72
+//#define I8042_IRQ_GPIO 101
+//#define ALS_IRQ_GPIO 70
+
+/* SUS bank DIRQs - up to 16 supported */
+//#define CODEC_IRQ_OFFSET 0
+/* Corresponding SUS GPIO pins */
+//#define CODEC_IRQ_GPIO 9
diff --git a/src/mainboard/asrock/q1900m/mainboard.c b/src/mainboard/asrock/q1900m/mainboard.c
new file mode 100644
index 0000000..09d807d
--- /dev/null
+++ b/src/mainboard/asrock/q1900m/mainboard.c
@@ -0,0 +1,129 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/* This file is part of the coreboot project. */
+
+#include <types.h>
+#include <string.h>
+#include <device/device.h>
+#include <device/pci_def.h>
+#include <device/pci_ops.h>
+#include <console/console.h>
+#if CONFIG(VGA_ROM_RUN)
+#include <x86emu/x86emu.h>
+#endif
+#include <arch/acpi.h>
+#include <arch/interrupt.h>
+#include <boot/coreboot_tables.h>
+#include <smbios.h>
+//#include <variant/onboard.h>
+#include <soc/gpio.h>
+#include <bootstate.h>
+#include <vendorcode/google/chromeos/chromeos.h>
+
+void mainboard_suspend_resume(void)
+{
+}
+
+#if CONFIG(VGA_ROM_RUN)
+static int int15_handler(void)
+{
+ int res = 1;
+
+ printk(BIOS_DEBUG, "%s: AX=%04x BX=%04x CX=%04x DX=%04x\n",
+ __func__, X86_AX, X86_BX, X86_CX, X86_DX);
+
+ switch (X86_AX) {
+ case 0x5f34:
+ /*
+ * Set Panel Fitting Hook:
+ * bit 2 = Graphics Stretching
+ * bit 1 = Text Stretching
+ * bit 0 = Centering (do not set with bit1 or bit2)
+ * 0 = video bios default
+ */
+ X86_AX = 0x005f;
+ X86_CX = 0x0001;
+ res = 1;
+ break;
+ case 0x5f35:
+ /*
+ * Boot Display Device Hook:
+ * bit 0 = CRT
+ * bit 1 = TV
+ * bit 2 = EFP (HDMI)
+ * bit 3 = LFP (eDP)*
+ * bit 4 = CRT2
+ * bit 5 = TV2
+ * bit 6 = EFP2
+ * bit 7 = LFP2
+ */
+ X86_AX = 0x005f;
+ X86_CX = 0x0008;
+ res = 1;
+ break;
+ case 0x5f51:
+ /*
+ * Hook to select active LFP configuration:
+ * 00h = No LVDS, VBIOS does not enable LVDS
+ * 01h = Int-LVDS, LFP driven by integrated LVDS decoder
+ * 02h = SVDO-LVDS, LFP driven by SVDO decoder
+ * 03h = eDP, LFP Driven by Int-DisplayPort encoder
+ */
+ X86_AX = 0x005f;
+ X86_CX = 0x0003;
+ res = 1;
+ break;
+ case 0x5f70:
+ switch ((X86_CX >> 8) & 0xff) {
+ case 0:
+ /* Get Mux */
+ X86_AX = 0x005f;
+ X86_CX = 0x0000;
+ res = 1;
+ break;
+ case 1:
+ /* Set Mux */
+ X86_AX = 0x005f;
+ X86_CX = 0x0000;
+ res = 1;
+ break;
+ case 2:
+ /* Get SG/Non-SG mode */
+ X86_AX = 0x005f;
+ X86_CX = 0x0000;
+ res = 1;
+ break;
+ default:
+ /* Interrupt was not handled */
+ printk(BIOS_DEBUG,
+ "Unknown INT15 5f70 function: 0x%02x\n",
+ ((X86_CX >> 8) & 0xff));
+ break;
+ }
+ break;
+
+ default:
+ printk(BIOS_DEBUG, "Unknown INT15 function %04x!\n", X86_AX);
+ break;
+ }
+ return res;
+}
+#endif
+
+//static void mainboard_init(struct device *dev) {}
+
+// mainboard_enable is executed as first thing after
+// enumerate_buses().
+
+static void mainboard_enable(struct device *dev)
+{
+ //dev->ops->init = mainboard_init;
+ dev->ops->acpi_inject_dsdt_generator = chromeos_dsdt_generator;
+#if CONFIG(VGA_ROM_RUN)
+ /* Install custom int15 handler for VGA OPROM */
+ mainboard_interrupt_handlers(0x15, &int15_handler);
+#endif
+}
+
+struct chip_operations mainboard_ops = {
+ .enable_dev = mainboard_enable,
+};
diff --git a/src/mainboard/asrock/q1900m/romstage.c b/src/mainboard/asrock/q1900m/romstage.c
new file mode 100644
index 0000000..7a4d5a6
--- /dev/null
+++ b/src/mainboard/asrock/q1900m/romstage.c
@@ -0,0 +1,39 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/* This file is part of the coreboot project. */
+
+#include <stdint.h>
+#include <string.h>
+#include <cbfs.h>
+#include <console/console.h>
+#include <soc/gpio.h>
+#include <soc/mrc_wrapper.h>
+#include <soc/romstage.h>
+
+void mainboard_romstage_entry(struct romstage_params *rp)
+{
+ /* I'm a bit desperate. */
+ printk(BIOS_EMERG, "AAAAAAAA WE LIVEEEEEEEEEE\n");
+ void *spd;
+ size_t spd_fsize;
+
+ struct mrc_params mp = {
+ .mainboard = {
+ .dram_type = DRAM_DDR3,
+ .dram_info_location = DRAM_INFO_SPD_MEM,
+ .weaker_odt_settings = 1,
+ .dram_is_slotted = 1,
+ .spd_addrs = {0xf0, 0x00}
+ },
+ };
+
+ spd = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD, &spd_fsize);
+
+ if (!spd)
+ die("SPD data not found.");
+
+ mp.mainboard.dram_data[0] = spd;
+ //mp.mainboard.dram_data[1] = spd;
+
+ rp->mrc_params = ∓
+ romstage_common(rp);
+}
diff --git a/src/mainboard/asrock/q1900m/spd/spd0.spd.hex b/src/mainboard/asrock/q1900m/spd/spd0.spd.hex
new file mode 100644
index 0000000..8ced790
--- /dev/null
+++ b/src/mainboard/asrock/q1900m/spd/spd0.spd.hex
@@ -0,0 +1,17 @@
+# Hynix HMT425S6CFR6A-PBA
+92 13 0B 03 04 19 02 02 03 52 01 08 0A 00 FE 00
+69 78 69 3C 69 11 18 81 20 08 3C 3C 01 40 83 01
+00 00 00 00 00 00 00 00 00 88 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 0F 11 62 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 80 AD 01 00 00 00 00 00 00 C9 C0
+48 4D 54 34 32 35 53 36 43 46 52 36 41 2D 50 42
+20 20 4E 30 80 AD 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
diff --git a/src/mainboard/asrock/q1900m/spd/spd1.spd.hex b/src/mainboard/asrock/q1900m/spd/spd1.spd.hex
new file mode 100644
index 0000000..8ced790
--- /dev/null
+++ b/src/mainboard/asrock/q1900m/spd/spd1.spd.hex
@@ -0,0 +1,17 @@
+# Hynix HMT425S6CFR6A-PBA
+92 13 0B 03 04 19 02 02 03 52 01 08 0A 00 FE 00
+69 78 69 3C 69 11 18 81 20 08 3C 3C 01 40 83 01
+00 00 00 00 00 00 00 00 00 88 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 0F 11 62 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 80 AD 01 00 00 00 00 00 00 C9 C0
+48 4D 54 34 32 35 53 36 43 46 52 36 41 2D 50 42
+20 20 4E 30 80 AD 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
+FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
--
To view, visit https://review.coreboot.org/c/coreboot/+/39658
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id029074e4231db231a68bc92a4210dc052bba1c9
Gerrit-Change-Number: 39658
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newchange
8
28
Change in ...coreboot[master]: drivers/apple: Add hybrid graphics driver
by Evgeny Zinoviev (Code Review) Sept. 2, 2026
by Evgeny Zinoviev (Code Review) Sept. 2, 2026
Sept. 2, 2026
Evgeny Zinoviev has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32719
Change subject: drivers/apple: Add hybrid graphics driver
......................................................................
drivers/apple: Add hybrid graphics driver
Hybrid graphics driver for Apple MacBook Pro.
Change-Id: I22b66622cd2da0e9951ee726d650d204fbb8a5bc
Signed-off-by: Evgeny Zinoviev <me(a)ch1p.io>
---
A src/drivers/apple/hybrid_graphics/Kconfig
A src/drivers/apple/hybrid_graphics/Makefile.inc
A src/drivers/apple/hybrid_graphics/chip.h
A src/drivers/apple/hybrid_graphics/gmux.c
A src/drivers/apple/hybrid_graphics/gmux.h
A src/drivers/apple/hybrid_graphics/hybrid_graphics.c
A src/drivers/apple/hybrid_graphics/hybrid_graphics.h
A src/drivers/apple/hybrid_graphics/romstage.c
8 files changed, 417 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/19/32719/1
diff --git a/src/drivers/apple/hybrid_graphics/Kconfig b/src/drivers/apple/hybrid_graphics/Kconfig
new file mode 100644
index 0000000..252373f
--- /dev/null
+++ b/src/drivers/apple/hybrid_graphics/Kconfig
@@ -0,0 +1,3 @@
+config DRIVERS_APPLE_HYBRID_GRAPHICS
+ bool
+ default n
diff --git a/src/drivers/apple/hybrid_graphics/Makefile.inc b/src/drivers/apple/hybrid_graphics/Makefile.inc
new file mode 100644
index 0000000..ea45b45
--- /dev/null
+++ b/src/drivers/apple/hybrid_graphics/Makefile.inc
@@ -0,0 +1,15 @@
+#
+# 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; 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.
+#
+
+romstage-$(CONFIG_DRIVERS_APPLE_HYBRID_GRAPHICS) += gmux.c romstage.c
+ramstage-$(CONFIG_DRIVERS_APPLE_HYBRID_GRAPHICS) += gmux.c hybrid_graphics.c
diff --git a/src/drivers/apple/hybrid_graphics/chip.h b/src/drivers/apple/hybrid_graphics/chip.h
new file mode 100644
index 0000000..39434f8
--- /dev/null
+++ b/src/drivers/apple/hybrid_graphics/chip.h
@@ -0,0 +1,30 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 Evgeny Zinoviev <me(a)ch1p.io>
+ *
+ * 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 _APPLE_HYBRID_GRAPHICS_CHIP_H_
+#define _APPLE_HYBRID_GRAPHICS_CHIP_H_
+
+enum hybrid_graphics_req {
+ HYBRID_GRAPHICS_INTEGRATED = 0,
+ HYBRID_GRAPHICS_DISCRETE = 1
+};
+
+#define HYBRID_GRAPHICS_DEFAULT_GPU HYBRID_GRAPHICS_INTEGRATED
+
+struct drivers_apple_hybrid_graphics_config {
+ unsigned int gmux_indexed;
+};
+
+#endif /* _APPLE_HYBRID_GRAPHICS_CHIP_H_ */
diff --git a/src/drivers/apple/hybrid_graphics/gmux.c b/src/drivers/apple/hybrid_graphics/gmux.c
new file mode 100644
index 0000000..e1f763a
--- /dev/null
+++ b/src/drivers/apple/hybrid_graphics/gmux.c
@@ -0,0 +1,158 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) Canonical Ltd. <seth.forshee(a)canonical.com>
+ * Copyright (C) 2010-2012 Andreas Heider <andreas(a)meetr.de>
+ * Copyright (C) 2015 Lukas Wunner <lukas(a)wunner.de>
+ * Copyright (C) 2019 Evgeny Zinoviev <me(a)ch1p.io>
+ *
+ * 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 <delay.h>
+#include <arch/io.h>
+#include <device/device.h>
+#include "gmux.h"
+#include "chip.h"
+
+static int gmux_index_wait_ready(void)
+{
+ int i = 200;
+ u8 gwr = inb(GMUX_IOSTART + GMUX_PORT_WRITE);
+
+ while (i && (gwr & 0x01)) {
+ inb(GMUX_IOSTART + GMUX_PORT_READ);
+ gwr = inb(GMUX_IOSTART + GMUX_PORT_WRITE);
+ udelay(100);
+ i--;
+ }
+
+ return !!i;
+}
+
+static int gmux_index_wait_complete(void)
+{
+ int i = 200;
+ u8 gwr = inb(GMUX_IOSTART + GMUX_PORT_WRITE);
+
+ while (i && !(gwr & 0x01)) {
+ gwr = inb(GMUX_IOSTART + GMUX_PORT_WRITE);
+ udelay(100);
+ i--;
+ }
+
+ if (gwr & 0x01)
+ inb(GMUX_IOSTART + GMUX_PORT_READ);
+
+ return !!i;
+}
+
+u8 gmux_pio_read8(int port)
+{
+ return inb(GMUX_IOSTART + port);
+}
+
+u8 gmux_index_read8(int port)
+{
+ u8 val;
+
+ gmux_index_wait_ready();
+ outb((port & 0xff), GMUX_IOSTART + GMUX_PORT_READ);
+ gmux_index_wait_complete();
+ val = inb(GMUX_IOSTART + GMUX_PORT_VALUE);
+
+ return val;
+}
+
+void gmux_pio_write8(int port, u8 val)
+{
+ outb(val, GMUX_IOSTART + port);
+}
+
+
+void gmux_index_write8(int port, u8 val)
+{
+ outb(val, GMUX_IOSTART + GMUX_PORT_VALUE);
+ gmux_index_wait_ready();
+ outb(port & 0xff, GMUX_IOSTART + GMUX_PORT_WRITE);
+ gmux_index_wait_complete();
+}
+
+u32 gmux_pio_read32(int port)
+{
+ return inl(GMUX_IOSTART + port);
+}
+
+u32 gmux_index_read32(int port)
+{
+ u32 val;
+
+ gmux_index_wait_ready();
+ outb((port & 0xff), GMUX_IOSTART + GMUX_PORT_READ);
+ gmux_index_wait_complete();
+ val = inl(GMUX_IOSTART + GMUX_PORT_VALUE);
+
+ return val;
+}
+
+u8 gmux_read8(const struct device *dev, int port)
+{
+ const struct drivers_apple_hybrid_graphics_config *config = dev->chip_info;
+ if (config->gmux_indexed) {
+ return gmux_index_read8(port);
+ } else {
+ return gmux_pio_read8(port);
+ }
+}
+
+void gmux_write8(const struct device *dev, int port, u8 val)
+{
+ const struct drivers_apple_hybrid_graphics_config *config = dev->chip_info;
+ if (config->gmux_indexed) {
+ gmux_index_write8(port, val);
+ } else {
+ gmux_pio_write8(port, val);
+ }
+}
+
+u32 gmux_read32(const struct device *dev, int port)
+{
+ const struct drivers_apple_hybrid_graphics_config *config = dev->chip_info;
+ if (config->gmux_indexed) {
+ return gmux_index_read32(port);
+ } else {
+ return gmux_pio_read32(port);
+ }
+}
+
+void gmux_dgpu_power_enable(const struct device *dev, bool enable)
+{
+ if (enable) {
+ gmux_write8(dev, GMUX_PORT_DISCRETE_POWER, 1);
+ gmux_write8(dev, GMUX_PORT_DISCRETE_POWER, 3);
+ } else {
+ gmux_write8(dev, GMUX_PORT_DISCRETE_POWER, 1);
+ gmux_write8(dev, GMUX_PORT_DISCRETE_POWER, 0);
+ }
+}
+
+void gmux_switch(const struct device *dev, bool dgpu)
+{
+ if (dgpu) {
+ gmux_write8(dev, GMUX_PORT_SWITCH_DDC, 2);
+ gmux_write8(dev, GMUX_PORT_SWITCH_DISPLAY, 3);
+ } else {
+ gmux_write8(dev, GMUX_PORT_SWITCH_DDC, 1);
+ gmux_write8(dev, GMUX_PORT_SWITCH_DISPLAY, 2);
+ }
+}
+
+
diff --git a/src/drivers/apple/hybrid_graphics/gmux.h b/src/drivers/apple/hybrid_graphics/gmux.h
new file mode 100644
index 0000000..18f6722
--- /dev/null
+++ b/src/drivers/apple/hybrid_graphics/gmux.h
@@ -0,0 +1,60 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) Canonical Ltd. <seth.forshee(a)canonical.com>
+ * Copyright (C) 2010-2012 Andreas Heider <andreas(a)meetr.de>
+ * Copyright (C) 2015 Lukas Wunner <lukas(a)wunner.de>
+ * Copyright (C) 2019 Evgeny Zinoviev <me(a)ch1p.io>
+ *
+ * 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 EC_APPLE_GMUX_H
+#define EC_APPLE_GMUX_H
+
+#define GMUX_PORT_VERSION_MAJOR 0x04
+#define GMUX_PORT_VERSION_MINOR 0x05
+#define GMUX_PORT_VERSION_RELEASE 0x06
+
+#define GMUX_PORT_SWITCH_DISPLAY 0x10
+#define GMUX_PORT_SWITCH_DDC 0x28
+#define GMUX_PORT_DISCRETE_POWER 0x50
+#define GMUX_PORT_MAX_BRIGHTNESS 0x70
+#define GMUX_PORT_BRIGHTNESS 0x74
+#define GMUX_PORT_VALUE 0xc2
+#define GMUX_PORT_READ 0xd0
+#define GMUX_PORT_WRITE 0xd4
+
+#define GMUX_PORT_INTERRUPT_ENABLE 0x14
+#define GMUX_INTERRUPT_ENABLE 0xff
+#define GMUX_INTERRUPT_DISABLE 0x00
+
+#define GMUX_BRIGHTNESS_MASK 0x00ffffff
+#define GMUX_MAX_BRIGHTNESS GMUX_BRIGHTNESS_MASK
+
+#define GMUX_IOSTART 0x700
+
+u8 gmux_index_read8(int port);
+u8 gmux_pio_read8(int port);
+u8 gmux_read8(const struct device *dev, int port);
+
+void gmux_index_write8(int port, u8 val);
+void gmux_pio_write8(int port, u8 val);
+void gmux_write8(const struct device *dev, int port, u8 val);
+
+u32 gmux_index_read32(int port);
+u32 gmux_pio_read32(int port);
+u32 gmux_read32(const struct device *dev, int port);
+
+void gmux_switch(const struct device *dev, bool dgpu);
+void gmux_dgpu_power_enable(const struct device *dev, bool enable);
+
+#endif /* EC_APPLE_GMUX_H */
diff --git a/src/drivers/apple/hybrid_graphics/hybrid_graphics.c b/src/drivers/apple/hybrid_graphics/hybrid_graphics.c
new file mode 100644
index 0000000..804eb76
--- /dev/null
+++ b/src/drivers/apple/hybrid_graphics/hybrid_graphics.c
@@ -0,0 +1,64 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 Evgeny Zinoviev <me(a)ch1p.io>
+ *
+ * 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 <types.h>
+#include <option.h>
+#include <device/device.h>
+
+#include <southbridge/intel/common/gpio.h>
+#include <console/console.h>
+#include "chip.h"
+#include "gmux.h"
+
+static void enable_dev(struct device *dev)
+{
+ printk(BIOS_INFO, "Hybrid graphics enable_dev\n");
+
+ const struct drivers_lenovo_hybrid_graphics_config *config;
+ enum hybrid_graphics_req mode;
+ u8 ver_major, ver_minor, ver_release;
+ u32 version, max_brightness, brightness;
+
+ /* Don't confuse anyone else and disable the fake device */
+ dev->enabled = 0;
+
+ config = dev->chip_info;
+ if (!config) {
+ printk(BIOS_INFO, "Hybrid graphics: Not installed\n");
+ return;
+ }
+
+ version = gmux_index_read32(GMUX_PORT_VERSION_MAJOR);
+ ver_major = (version >> 24) & 0xff;
+ ver_minor = (version >> 16) & 0xff;
+ ver_release = (version >> 8) & 0xff;
+ max_brightness = gmux_index_read32(GMUX_PORT_MAX_BRIGHTNESS);
+ brightness = gmux_index_read32(GMUX_PORT_BRIGHTNESS) & GMUX_BRIGHTNESS_MASK;
+
+ printk(BIOS_INFO, "gmux version: %d.%d.%d\n",
+ ver_major, ver_minor, ver_release);
+ printk(BIOS_INFO, "gmux max brightness: %d\n", max_brightness);
+ printk(BIOS_INFO, "gmux brightness: %d\n", brightness);
+
+ mode = HYBRID_GRAPHICS_DEFAULT_GPU;
+ get_option(&mode, "hybrid_graphics_mode");
+
+ gmux_switch(dev, mode == HYBRID_GRAPHICS_DISCRETE);
+}
+
+struct chip_operations drivers_apple_hybrid_graphics_ops = {
+ CHIP_NAME("Apple hybrid graphics driver")
+ .enable_dev = enable_dev
+};
diff --git a/src/drivers/apple/hybrid_graphics/hybrid_graphics.h b/src/drivers/apple/hybrid_graphics/hybrid_graphics.h
new file mode 100644
index 0000000..782be44
--- /dev/null
+++ b/src/drivers/apple/hybrid_graphics/hybrid_graphics.h
@@ -0,0 +1,24 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 Evgeny Zinoviev <me(a)ch1p.io>
+ *
+ * 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 _DRIVERS_APPLE_HYBRID_GRAPHICS_H_
+#define _DRIVERS_APPLE_HYBRID_GRAPHICS_H_
+
+#define HYBRID_GRAPHICS_PORT 0xff
+#define HYBRID_GRAPHICS_DEVICE 0xf
+
+void early_hybrid_graphics(bool *enable_igd, bool *enable_peg);
+
+#endif /* _DRIVERS_APPLE_HYBRID_GRAPHICS_CHIP_H_ */
diff --git a/src/drivers/apple/hybrid_graphics/romstage.c b/src/drivers/apple/hybrid_graphics/romstage.c
new file mode 100644
index 0000000..9cd5098
--- /dev/null
+++ b/src/drivers/apple/hybrid_graphics/romstage.c
@@ -0,0 +1,63 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2017 Patrick Rudolph <siro(a)das-labor.org>
+ * Copyright (C) 2019 Evgeny Zinoviev <me(a)ch1p.io>
+ *
+ * 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 <types.h>
+#include <option.h>
+#include <device/device.h>
+#include <console/console.h>
+#include "hybrid_graphics.h"
+#include "chip.h"
+#include "gmux.h"
+
+void early_hybrid_graphics(bool *enable_igd, bool *enable_peg)
+{
+ const struct drivers_apple_hybrid_graphics_config *config;
+ const struct device *dev;
+
+ enum hybrid_graphics_req mode = HYBRID_GRAPHICS_DEFAULT_GPU;
+
+ printk(BIOS_INFO, "Hybrid graphics early_hybrid_graphics\n");
+
+ /* TODO: Use generic device instead of dummy PNP device */
+ dev = dev_find_slot_pnp(HYBRID_GRAPHICS_PORT, HYBRID_GRAPHICS_DEVICE);
+
+ if (!dev || !dev->chip_info) {
+ printk(BIOS_ERR, "Hybrid graphics: ERROR\n");
+ *enable_igd = true;
+ *enable_peg = false;
+ return;
+ }
+
+ config = dev->chip_info;
+
+ get_option(&mode, "hybrid_graphics_mode");
+
+ if (mode == HYBRID_GRAPHICS_DISCRETE) {
+ printk(BIOS_DEBUG, "Hybrid graphics:"
+ " Disabling integrated GPU.\n");
+
+ *enable_igd = false;
+ *enable_peg = true;
+ } else if (mode == HYBRID_GRAPHICS_INTEGRATED) {
+ printk(BIOS_DEBUG, "Hybrid graphics:"
+ " Disabling discrete GPU.\n");
+
+ *enable_igd = true;
+ *enable_peg = false;
+ }
+
+ gmux_dgpu_power_enable(dev, *enable_peg);
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/32719
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I22b66622cd2da0e9951ee726d650d204fbb8a5bc
Gerrit-Change-Number: 32719
Gerrit-PatchSet: 1
Gerrit-Owner: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-MessageType: newchange
9
34
Change in ...coreboot[master]: mb/apple: Add MacBook Pro 10,1 (A1398) support
by Evgeny Zinoviev (Code Review) Sept. 1, 2026
by Evgeny Zinoviev (Code Review) Sept. 1, 2026
Sept. 1, 2026
Evgeny Zinoviev has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32673
Change subject: mb/apple: Add MacBook Pro 10,1 (A1398) support
......................................................................
mb/apple: Add MacBook Pro 10,1 (A1398) support
MacBook Pro Retina 15 (Mid 2012) with Ivy Bridge CPU.
This is WIP. Not for merging.
Change-Id: Ica03aba442493c0d369a3d360ad569ddc16954df
Signed-off-by: Evgeny Zinoviev <me(a)ch1p.io>
---
M 3rdparty/vboot
A src/mainboard/apple/macbookpro10_1/Kconfig
A src/mainboard/apple/macbookpro10_1/Kconfig.name
A src/mainboard/apple/macbookpro10_1/Makefile.inc
A src/mainboard/apple/macbookpro10_1/acpi/ec.asl
A src/mainboard/apple/macbookpro10_1/acpi/platform.asl
A src/mainboard/apple/macbookpro10_1/acpi/superio.asl
A src/mainboard/apple/macbookpro10_1/acpi_tables.c
A src/mainboard/apple/macbookpro10_1/board_info.txt
A src/mainboard/apple/macbookpro10_1/devicetree.cb
A src/mainboard/apple/macbookpro10_1/dsdt.asl
A src/mainboard/apple/macbookpro10_1/gma-mainboard.ads
A src/mainboard/apple/macbookpro10_1/gpio.c
A src/mainboard/apple/macbookpro10_1/hda_verb.c
A src/mainboard/apple/macbookpro10_1/mainboard.c
A src/mainboard/apple/macbookpro10_1/romstage.c
16 files changed, 758 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/73/32673/1
diff --git a/3rdparty/vboot b/3rdparty/vboot
index e7edff6..304aa42 160000
--- a/3rdparty/vboot
+++ b/3rdparty/vboot
@@ -1 +1 @@
-Subproject commit e7edff6653e16ed915c3ad12234d133d1ef4dcc9
+Subproject commit 304aa429c1a04cda3ab2ce37b9e31af84405bfca
diff --git a/src/mainboard/apple/macbookpro10_1/Kconfig b/src/mainboard/apple/macbookpro10_1/Kconfig
new file mode 100644
index 0000000..603f3ee
--- /dev/null
+++ b/src/mainboard/apple/macbookpro10_1/Kconfig
@@ -0,0 +1,46 @@
+if BOARD_APPLE_MACBOOKPRO10_1
+
+config BOARD_SPECIFIC_OPTIONS
+ def_bool y
+ select BOARD_ROMSIZE_KB_8192
+ select EC_ACPI
+ select HAVE_ACPI_RESUME
+ select HAVE_ACPI_TABLES
+ select INTEL_INT15
+ select NORTHBRIDGE_INTEL_IVYBRIDGE
+ select SERIRQ_CONTINUOUS_MODE
+ select SOUTHBRIDGE_INTEL_C216
+ select SYSTEM_TYPE_LAPTOP
+ select USE_NATIVE_RAMINIT
+ select MAINBOARD_HAS_LIBGFXINIT
+ select GFX_GMA_INTERNAL_IS_EDP
+ select SERIRQ_CONTINUOUS_MODE
+
+config MAINBOARD_DIR
+ string
+ default apple/macbookpro10_1
+
+config MAINBOARD_PART_NUMBER
+ string
+ default "MacBookPro10,1"
+
+config VGA_BIOS_FILE
+ string
+ default "pci8086,0166.rom"
+
+config VGA_BIOS_ID
+ string
+ default "8086,0166"
+
+config DRAM_RESET_GATE_GPIO
+ int
+ default 28
+
+config MAX_CPUS
+ int
+ default 8
+
+config USBDEBUG_HCD_INDEX # FIXME: check this
+ int
+ default 2
+endif
diff --git a/src/mainboard/apple/macbookpro10_1/Kconfig.name b/src/mainboard/apple/macbookpro10_1/Kconfig.name
new file mode 100644
index 0000000..c257f7a
--- /dev/null
+++ b/src/mainboard/apple/macbookpro10_1/Kconfig.name
@@ -0,0 +1,2 @@
+config BOARD_APPLE_MACBOOKPRO10_1
+ bool "MacBookPro10,1"
diff --git a/src/mainboard/apple/macbookpro10_1/Makefile.inc b/src/mainboard/apple/macbookpro10_1/Makefile.inc
new file mode 100644
index 0000000..fd60338
--- /dev/null
+++ b/src/mainboard/apple/macbookpro10_1/Makefile.inc
@@ -0,0 +1,7 @@
+romstage-y += gpio.c
+
+cbfs-files-y += spd.bin
+spd.bin-file := spd.bin
+spd.bin-type := spd
+
+ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
diff --git a/src/mainboard/apple/macbookpro10_1/acpi/ec.asl b/src/mainboard/apple/macbookpro10_1/acpi/ec.asl
new file mode 100644
index 0000000..f70cb3d
--- /dev/null
+++ b/src/mainboard/apple/macbookpro10_1/acpi/ec.asl
@@ -0,0 +1,20 @@
+/*
+ * 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; 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.
+ */
+
+Device(EC)
+{
+ Name (_HID, EISAID("PNP0C09"))
+ Name (_UID, 0)
+ Name (_GPE, 23)
+/* FIXME: EC support */
+}
diff --git a/src/mainboard/apple/macbookpro10_1/acpi/platform.asl b/src/mainboard/apple/macbookpro10_1/acpi/platform.asl
new file mode 100644
index 0000000..a17c6ea
--- /dev/null
+++ b/src/mainboard/apple/macbookpro10_1/acpi/platform.asl
@@ -0,0 +1,23 @@
+/*
+ * 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; 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.
+ */
+
+Method(_WAK,1)
+{
+ /* FIXME: EC support */
+ Return(Package(){0,0})
+}
+
+Method(_PTS,1)
+{
+ /* FIXME: EC support */
+}
diff --git a/src/mainboard/apple/macbookpro10_1/acpi/superio.asl b/src/mainboard/apple/macbookpro10_1/acpi/superio.asl
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/src/mainboard/apple/macbookpro10_1/acpi/superio.asl
diff --git a/src/mainboard/apple/macbookpro10_1/acpi_tables.c b/src/mainboard/apple/macbookpro10_1/acpi_tables.c
new file mode 100644
index 0000000..c48f0bd
--- /dev/null
+++ b/src/mainboard/apple/macbookpro10_1/acpi_tables.c
@@ -0,0 +1,33 @@
+/*
+ * 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; 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 <southbridge/intel/bd82x6x/nvs.h>
+
+/* FIXME: check this function. */
+void acpi_create_gnvs(global_nvs_t *gnvs)
+{
+ /* Disable USB ports in S3 by default */
+ gnvs->s3u0 = 0;
+ gnvs->s3u1 = 0;
+
+ /* Disable USB ports in S5 by default */
+ gnvs->s5u0 = 0;
+ gnvs->s5u1 = 0;
+
+ // the lid is open by default.
+ gnvs->lids = 1;
+
+ gnvs->tcrt = 100;
+ gnvs->tpsv = 90;
+}
diff --git a/src/mainboard/apple/macbookpro10_1/board_info.txt b/src/mainboard/apple/macbookpro10_1/board_info.txt
new file mode 100644
index 0000000..81a5134
--- /dev/null
+++ b/src/mainboard/apple/macbookpro10_1/board_info.txt
@@ -0,0 +1,6 @@
+Category: laptop
+ROM protocol: SPI
+Flashrom support: n
+ROM package: SOIC-8
+ROM socketed: n
+Release year: 2012
diff --git a/src/mainboard/apple/macbookpro10_1/devicetree.cb b/src/mainboard/apple/macbookpro10_1/devicetree.cb
new file mode 100644
index 0000000..f9e7eb4
--- /dev/null
+++ b/src/mainboard/apple/macbookpro10_1/devicetree.cb
@@ -0,0 +1,124 @@
+chip northbridge/intel/sandybridge # FIXME: check gfx.ndid and gfx.did
+ #register "gfx.did" = "{ 0x80000100, 0x80000240, 0x80000410 }"
+ register "gfx.did" = "{ 0x80000410, 0x80000320, 0x80000410, 0x80000410, 0x00000005 }"
+ register "gfx.link_frequency_270_mhz" = "0"
+ register "gfx.ndid" = "3"
+ register "gfx.use_spread_spectrum_clock" = "1"
+ register "gpu_cpu_backlight" = "0xffffffff"
+ register "gpu_dp_b_hotplug" = "7"
+ register "gpu_dp_c_hotplug" = "7"
+ register "gpu_dp_d_hotplug" = "7"
+ register "gpu_panel_port_select" = "3"
+ register "gpu_panel_power_backlight_off_delay" = "8191"
+ register "gpu_panel_power_backlight_on_delay" = "8191"
+ register "gpu_panel_power_cycle_delay" = "255"
+ register "gpu_panel_power_down_delay" = "8191"
+ register "gpu_panel_power_up_delay" = "8191"
+ register "gpu_pch_backlight" = "0xffffffff"
+ device cpu_cluster 0x0 on
+ chip cpu/intel/model_206ax # FIXME: check all registers
+ register "c1_acpower" = "1"
+ register "c1_battery" = "1"
+ register "c2_acpower" = "3"
+ register "c2_battery" = "3"
+ register "c3_acpower" = "5"
+ register "c3_battery" = "5"
+ device lapic 0x0 on
+ end
+ device lapic 0xacac off
+ end
+ end
+ end
+ device domain 0x0 on
+ chip southbridge/intel/bd82x6x # Intel Series 6 Cougar Point PCH
+ register "c2_latency" = "0x0065"
+ register "docking_supported" = "0"
+ register "gen1_dec" = "0x000c0681"
+ register "gen2_dec" = "0x000c1641"
+ register "gen3_dec" = "0x001c0301"
+ register "gen4_dec" = "0x00fc0701"
+ register "gpi7_routing" = "2"
+ register "p_cnt_throttling_supported" = "1"
+ register "pcie_hotplug_map" = "{ 0, 0, 0, 0, 0, 0, 0, 0 }"
+ register "pcie_port_coalesce" = "1"
+ register "sata_interface_speed_support" = "0x3"
+ register "sata_port_map" = "0x1"
+ register "spi_lvscc" = "0x0"
+ register "spi_uvscc" = "0x2005"
+ register "superspeed_capable_ports" = "0x0000000f"
+ register "xhci_overcurrent_mapping" = "0x08040201"
+ register "xhci_switchable_ports" = "0x0000000f"
+ device pci 14.0 on # USB 3.0 Controller
+ subsystemid 0x8086 0x7270
+ end
+ device pci 16.0 on # Management Engine Interface 1
+ subsystemid 0x8086 0x7270
+ end
+ device pci 16.1 off # Management Engine Interface 2
+ end
+ device pci 16.2 off # Management Engine IDE-R
+ end
+ device pci 16.3 off # Management Engine KT
+ end
+ device pci 19.0 off # Intel Gigabit Ethernet
+ end
+ device pci 1a.0 on # USB2 EHCI #2
+ subsystemid 0x8086 0x7270
+ end
+ device pci 1b.0 on # High Definition Audio Audio controller
+ subsystemid 0x8086 0x7270
+ end
+ device pci 1c.0 on # PCIe Port #1
+ subsystemid 0x8086 0x7270
+ end
+ device pci 1c.1 on # PCIe Port #2
+ subsystemid 0x8086 0x7270
+ end
+ device pci 1c.2 off # PCIe Port #3
+ end
+ device pci 1c.3 off # PCIe Port #4
+ end
+ device pci 1c.4 off # PCIe Port #5
+ end
+ device pci 1c.5 off # PCIe Port #6
+ end
+ device pci 1c.6 off # PCIe Port #7
+ end
+ device pci 1c.7 off # PCIe Port #8
+ end
+ device pci 1d.0 on # USB2 EHCI #1
+ subsystemid 0x8086 0x7270
+ end
+ device pci 1e.0 off # PCI bridge
+ end
+ device pci 1f.0 on # LPC bridge PCI-LPC bridge
+ subsystemid 0x8086 0x7270
+ end
+ device pci 1f.2 on # SATA Controller 1
+ subsystemid 0x8086 0x7270
+ end
+ device pci 1f.3 on # SMBus
+ subsystemid 0x8086 0x7270
+ end
+ device pci 1f.5 off # SATA Controller 2
+ end
+ device pci 1f.6 off # Thermal
+ end
+ end
+ device pci 00.0 on # Host bridge Host bridge
+ subsystemid 0x106b 0x00f7
+ end
+ device pci 01.0 on # PCIe Bridge for discrete graphics
+ subsystemid 0x106b 0x00f7
+ end
+ device pci 02.0 on # Internal graphics VGA controller
+ subsystemid 0x106b 0x00f7
+ end
+ device pci 01.2 on
+ subsystemid 0x106b 0x00f7
+ end
+ device pci 01.1 on
+ subsystemid 0x106b 0x00f7
+ end
+ end
+end
diff --git a/src/mainboard/apple/macbookpro10_1/dsdt.asl b/src/mainboard/apple/macbookpro10_1/dsdt.asl
new file mode 100644
index 0000000..455ac17
--- /dev/null
+++ b/src/mainboard/apple/macbookpro10_1/dsdt.asl
@@ -0,0 +1,42 @@
+/*
+ * 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; 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.
+ */
+
+#define BRIGHTNESS_UP \_SB.PCI0.GFX0.INCB
+#define BRIGHTNESS_DOWN \_SB.PCI0.GFX0.DECB
+#define ACPI_VIDEO_DEVICE \_SB.PCI0.GFX0
+
+#include <arch/acpi.h>
+DefinitionBlock(
+ "dsdt.aml",
+ "DSDT",
+ 0x02, // DSDT revision: ACPI 2.0 and up
+ OEM_ID,
+ ACPI_TABLE_CREATOR,
+ 0x20141018 // OEM revision
+)
+{
+ /* Some generic macros */
+ #include "acpi/platform.asl"
+ #include <cpu/intel/common/acpi/cpu.asl>
+ #include <southbridge/intel/bd82x6x/acpi/platform.asl>
+ /* global NVS and variables. */
+ #include <southbridge/intel/bd82x6x/acpi/globalnvs.asl>
+ #include <southbridge/intel/bd82x6x/acpi/sleepstates.asl>
+
+ Device (\_SB.PCI0)
+ {
+ #include <northbridge/intel/sandybridge/acpi/sandybridge.asl>
+ #include <drivers/intel/gma/acpi/default_brightness_levels.asl>
+ #include <southbridge/intel/bd82x6x/acpi/pch.asl>
+ }
+}
diff --git a/src/mainboard/apple/macbookpro10_1/gma-mainboard.ads b/src/mainboard/apple/macbookpro10_1/gma-mainboard.ads
new file mode 100644
index 0000000..d4a5d7d
--- /dev/null
+++ b/src/mainboard/apple/macbookpro10_1/gma-mainboard.ads
@@ -0,0 +1,34 @@
+--
+-- 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.
+--
+
+with HW.GFX.GMA;
+with HW.GFX.GMA.Display_Probing;
+
+use HW.GFX.GMA;
+use HW.GFX.GMA.Display_Probing;
+
+private package GMA.Mainboard is
+
+ ports : constant Port_List :=
+ (DP1,
+ DP2,
+ DP3,
+ HDMI1,
+ HDMI2,
+ HDMI3,
+ Analog,
+ Internal,
+ others => Disabled);
+
+end GMA.Mainboard;
diff --git a/src/mainboard/apple/macbookpro10_1/gpio.c b/src/mainboard/apple/macbookpro10_1/gpio.c
new file mode 100644
index 0000000..a445687
--- /dev/null
+++ b/src/mainboard/apple/macbookpro10_1/gpio.c
@@ -0,0 +1,243 @@
+/*
+ * 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; 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 <southbridge/intel/common/gpio.h>
+
+static const struct pch_gpio_set1 pch_gpio_set1_mode = {
+ .gpio0 = GPIO_MODE_GPIO,
+ .gpio1 = GPIO_MODE_GPIO,
+ .gpio2 = GPIO_MODE_GPIO,
+ .gpio3 = GPIO_MODE_GPIO,
+ .gpio4 = GPIO_MODE_GPIO,
+ .gpio5 = GPIO_MODE_GPIO,
+ .gpio6 = GPIO_MODE_GPIO,
+ .gpio7 = GPIO_MODE_GPIO,
+ .gpio8 = GPIO_MODE_GPIO,
+ .gpio9 = GPIO_MODE_NATIVE,
+ .gpio10 = GPIO_MODE_GPIO,
+ .gpio11 = GPIO_MODE_GPIO,
+ .gpio12 = GPIO_MODE_GPIO,
+ .gpio13 = GPIO_MODE_GPIO,
+ .gpio14 = GPIO_MODE_GPIO,
+ .gpio15 = GPIO_MODE_GPIO,
+ .gpio16 = GPIO_MODE_GPIO,
+ .gpio17 = GPIO_MODE_GPIO,
+ .gpio18 = GPIO_MODE_NATIVE,
+ .gpio19 = GPIO_MODE_GPIO,
+ .gpio20 = GPIO_MODE_NATIVE,
+ .gpio21 = GPIO_MODE_GPIO,
+ .gpio22 = GPIO_MODE_GPIO,
+ .gpio23 = GPIO_MODE_GPIO,
+ .gpio24 = GPIO_MODE_GPIO,
+ .gpio25 = GPIO_MODE_NATIVE,
+ .gpio26 = GPIO_MODE_GPIO,
+ .gpio27 = GPIO_MODE_GPIO,
+ .gpio28 = GPIO_MODE_GPIO,
+ .gpio29 = GPIO_MODE_GPIO,
+ .gpio30 = GPIO_MODE_NATIVE,
+ .gpio31 = GPIO_MODE_NATIVE,
+};
+
+static const struct pch_gpio_set1 pch_gpio_set1_direction = {
+ .gpio0 = GPIO_DIR_INPUT,
+ .gpio1 = GPIO_DIR_INPUT,
+ .gpio2 = GPIO_DIR_INPUT,
+ .gpio3 = GPIO_DIR_INPUT,
+ .gpio4 = GPIO_DIR_INPUT,
+ .gpio5 = GPIO_DIR_INPUT,
+ .gpio6 = GPIO_DIR_INPUT,
+ .gpio7 = GPIO_DIR_INPUT,
+ .gpio8 = GPIO_DIR_OUTPUT,
+ .gpio10 = GPIO_DIR_INPUT,
+ .gpio11 = GPIO_DIR_INPUT,
+ .gpio12 = GPIO_DIR_OUTPUT,
+ .gpio13 = GPIO_DIR_INPUT,
+ .gpio14 = GPIO_DIR_INPUT,
+ .gpio15 = GPIO_DIR_OUTPUT,
+ .gpio16 = GPIO_DIR_OUTPUT,
+ .gpio17 = GPIO_DIR_INPUT,
+ .gpio19 = GPIO_DIR_OUTPUT,
+ .gpio21 = GPIO_DIR_OUTPUT,
+ .gpio22 = GPIO_DIR_OUTPUT,
+ .gpio23 = GPIO_DIR_OUTPUT,
+ .gpio24 = GPIO_DIR_OUTPUT,
+ .gpio26 = GPIO_DIR_INPUT,
+ .gpio27 = GPIO_DIR_INPUT,
+ .gpio28 = GPIO_DIR_OUTPUT,
+ .gpio29 = GPIO_DIR_INPUT,
+};
+
+static const struct pch_gpio_set1 pch_gpio_set1_level = {
+ .gpio8 = GPIO_LEVEL_HIGH,
+ .gpio12 = GPIO_LEVEL_LOW,
+ .gpio15 = GPIO_LEVEL_HIGH,
+ .gpio16 = GPIO_LEVEL_LOW,
+ .gpio19 = GPIO_LEVEL_HIGH,
+ .gpio21 = GPIO_LEVEL_LOW,
+ .gpio22 = GPIO_LEVEL_LOW,
+ .gpio23 = GPIO_LEVEL_HIGH,
+ .gpio24 = GPIO_LEVEL_LOW,
+ .gpio28 = GPIO_LEVEL_HIGH,
+};
+
+static const struct pch_gpio_set1 pch_gpio_set1_reset = {
+ .gpio11 = GPIO_RESET_RSMRST,
+ .gpio15 = GPIO_RESET_RSMRST,
+};
+
+static const struct pch_gpio_set1 pch_gpio_set1_invert = {
+ .gpio1 = GPIO_INVERT,
+ .gpio2 = GPIO_INVERT,
+ .gpio4 = GPIO_INVERT,
+ .gpio5 = GPIO_INVERT,
+ .gpio7 = GPIO_INVERT,
+ .gpio14 = GPIO_INVERT,
+};
+
+static const struct pch_gpio_set1 pch_gpio_set1_blink = {
+};
+
+static const struct pch_gpio_set2 pch_gpio_set2_mode = {
+ .gpio32 = GPIO_MODE_NATIVE,
+ .gpio33 = GPIO_MODE_GPIO,
+ .gpio34 = GPIO_MODE_GPIO,
+ .gpio35 = GPIO_MODE_GPIO,
+ .gpio36 = GPIO_MODE_GPIO,
+ .gpio37 = GPIO_MODE_GPIO,
+ .gpio38 = GPIO_MODE_GPIO,
+ .gpio39 = GPIO_MODE_GPIO,
+ .gpio40 = GPIO_MODE_NATIVE,
+ .gpio41 = GPIO_MODE_NATIVE,
+ .gpio42 = GPIO_MODE_NATIVE,
+ .gpio43 = GPIO_MODE_NATIVE,
+ .gpio44 = GPIO_MODE_NATIVE,
+ .gpio45 = GPIO_MODE_NATIVE,
+ .gpio46 = GPIO_MODE_NATIVE,
+ .gpio47 = GPIO_MODE_GPIO,
+ .gpio48 = GPIO_MODE_GPIO,
+ .gpio49 = GPIO_MODE_GPIO,
+ .gpio50 = GPIO_MODE_GPIO,
+ .gpio51 = GPIO_MODE_GPIO,
+ .gpio52 = GPIO_MODE_GPIO,
+ .gpio53 = GPIO_MODE_GPIO,
+ .gpio54 = GPIO_MODE_GPIO,
+ .gpio55 = GPIO_MODE_GPIO,
+ .gpio56 = GPIO_MODE_GPIO,
+ .gpio57 = GPIO_MODE_GPIO,
+ .gpio58 = GPIO_MODE_NATIVE,
+ .gpio59 = GPIO_MODE_NATIVE,
+ .gpio60 = GPIO_MODE_GPIO,
+ .gpio61 = GPIO_MODE_NATIVE,
+ .gpio62 = GPIO_MODE_NATIVE,
+ .gpio63 = GPIO_MODE_NATIVE,
+};
+
+static const struct pch_gpio_set2 pch_gpio_set2_direction = {
+ .gpio33 = GPIO_DIR_INPUT,
+ .gpio34 = GPIO_DIR_OUTPUT,
+ .gpio35 = GPIO_DIR_OUTPUT,
+ .gpio36 = GPIO_DIR_OUTPUT,
+ .gpio37 = GPIO_DIR_INPUT,
+ .gpio38 = GPIO_DIR_INPUT,
+ .gpio39 = GPIO_DIR_INPUT,
+ .gpio47 = GPIO_DIR_INPUT,
+ .gpio48 = GPIO_DIR_OUTPUT,
+ .gpio49 = GPIO_DIR_OUTPUT,
+ .gpio50 = GPIO_DIR_INPUT,
+ .gpio51 = GPIO_DIR_OUTPUT,
+ .gpio52 = GPIO_DIR_OUTPUT,
+ .gpio53 = GPIO_DIR_OUTPUT,
+ .gpio54 = GPIO_DIR_OUTPUT,
+ .gpio55 = GPIO_DIR_OUTPUT,
+ .gpio56 = GPIO_DIR_INPUT,
+ .gpio57 = GPIO_DIR_INPUT,
+ .gpio60 = GPIO_DIR_INPUT,
+};
+
+static const struct pch_gpio_set2 pch_gpio_set2_level = {
+ .gpio34 = GPIO_LEVEL_HIGH,
+ .gpio35 = GPIO_LEVEL_LOW,
+ .gpio36 = GPIO_LEVEL_LOW,
+ .gpio48 = GPIO_LEVEL_HIGH,
+ .gpio49 = GPIO_LEVEL_HIGH,
+ .gpio51 = GPIO_LEVEL_HIGH,
+ .gpio52 = GPIO_LEVEL_LOW,
+ .gpio53 = GPIO_LEVEL_HIGH,
+ .gpio54 = GPIO_LEVEL_LOW,
+ .gpio55 = GPIO_LEVEL_HIGH,
+};
+
+static const struct pch_gpio_set2 pch_gpio_set2_reset = {
+};
+
+static const struct pch_gpio_set3 pch_gpio_set3_mode = {
+ .gpio64 = GPIO_MODE_GPIO,
+ .gpio65 = GPIO_MODE_GPIO,
+ .gpio66 = GPIO_MODE_GPIO,
+ .gpio67 = GPIO_MODE_GPIO,
+ .gpio68 = GPIO_MODE_GPIO,
+ .gpio69 = GPIO_MODE_GPIO,
+ .gpio70 = GPIO_MODE_GPIO,
+ .gpio71 = GPIO_MODE_GPIO,
+ .gpio72 = GPIO_MODE_NATIVE,
+ .gpio73 = GPIO_MODE_GPIO,
+ .gpio74 = GPIO_MODE_GPIO,
+ .gpio75 = GPIO_MODE_NATIVE,
+};
+
+static const struct pch_gpio_set3 pch_gpio_set3_direction = {
+ .gpio64 = GPIO_DIR_OUTPUT,
+ .gpio65 = GPIO_DIR_OUTPUT,
+ .gpio66 = GPIO_DIR_OUTPUT,
+ .gpio67 = GPIO_DIR_OUTPUT,
+ .gpio68 = GPIO_DIR_INPUT,
+ .gpio69 = GPIO_DIR_INPUT,
+ .gpio70 = GPIO_DIR_INPUT,
+ .gpio71 = GPIO_DIR_INPUT,
+ .gpio73 = GPIO_DIR_INPUT,
+ .gpio74 = GPIO_DIR_INPUT,
+};
+
+static const struct pch_gpio_set3 pch_gpio_set3_level = {
+ .gpio64 = GPIO_LEVEL_LOW,
+ .gpio65 = GPIO_LEVEL_LOW,
+ .gpio66 = GPIO_LEVEL_LOW,
+ .gpio67 = GPIO_LEVEL_LOW,
+};
+
+static const struct pch_gpio_set3 pch_gpio_set3_reset = {
+};
+
+const struct pch_gpio_map mainboard_gpio_map = {
+ .set1 = {
+ .mode = &pch_gpio_set1_mode,
+ .direction = &pch_gpio_set1_direction,
+ .level = &pch_gpio_set1_level,
+ .blink = &pch_gpio_set1_blink,
+ .invert = &pch_gpio_set1_invert,
+ .reset = &pch_gpio_set1_reset,
+ },
+ .set2 = {
+ .mode = &pch_gpio_set2_mode,
+ .direction = &pch_gpio_set2_direction,
+ .level = &pch_gpio_set2_level,
+ .reset = &pch_gpio_set2_reset,
+ },
+ .set3 = {
+ .mode = &pch_gpio_set3_mode,
+ .direction = &pch_gpio_set3_direction,
+ .level = &pch_gpio_set3_level,
+ .reset = &pch_gpio_set3_reset,
+ },
+};
diff --git a/src/mainboard/apple/macbookpro10_1/hda_verb.c b/src/mainboard/apple/macbookpro10_1/hda_verb.c
new file mode 100644
index 0000000..b8e4855
--- /dev/null
+++ b/src/mainboard/apple/macbookpro10_1/hda_verb.c
@@ -0,0 +1,58 @@
+/*
+ * 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; 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 <device/azalia_device.h>
+
+const u32 cim_verb_data[] = {
+ 0x10134206, /* Codec Vendor / Device ID: Cirrus */
+ 0x106b2800, /* Subsystem ID */
+
+ 0x0000000b, /* Number of 4 dword sets */
+ /* NID 0x01: Subsystem ID. */
+ AZALIA_SUBVENDOR(0x0, 0x106b2800),
+
+ /* NID 0x09. */
+ AZALIA_PIN_CFG(0x0, 0x09, 0x002b4020),
+
+ /* NID 0x0a. */
+ AZALIA_PIN_CFG(0x0, 0x0a, 0x90100112),
+
+ /* NID 0x0b. */
+ AZALIA_PIN_CFG(0x0, 0x0b, 0x90100110),
+
+ /* NID 0x0c. */
+ AZALIA_PIN_CFG(0x0, 0x0c, 0x400000f0),
+
+ /* NID 0x0d. */
+ AZALIA_PIN_CFG(0x0, 0x0d, 0x400000f0),
+
+ /* NID 0x0e. */
+ AZALIA_PIN_CFG(0x0, 0x0e, 0x90a60100),
+
+ /* NID 0x0f. */
+ AZALIA_PIN_CFG(0x0, 0x0f, 0x400000f0),
+
+ /* NID 0x10. */
+ AZALIA_PIN_CFG(0x0, 0x10, 0x004be030),
+
+ /* NID 0x12. */
+ AZALIA_PIN_CFG(0x0, 0x12, 0x400000f0),
+
+ /* NID 0x15. */
+ AZALIA_PIN_CFG(0x0, 0x15, 0x400000f0),
+};
+
+const u32 pc_beep_verbs[0] = {};
+
+AZALIA_ARRAY_SIZES;
diff --git a/src/mainboard/apple/macbookpro10_1/mainboard.c b/src/mainboard/apple/macbookpro10_1/mainboard.c
new file mode 100644
index 0000000..3910541
--- /dev/null
+++ b/src/mainboard/apple/macbookpro10_1/mainboard.c
@@ -0,0 +1,37 @@
+/*
+ * 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; 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 <device/device.h>
+#include <drivers/intel/gma/int15.h>
+#include <southbridge/intel/bd82x6x/pch.h>
+#include <ec/acpi/ec.h>
+#include <console/console.h>
+
+static void mainboard_init(struct device *dev)
+{
+
+}
+
+static void mainboard_enable(struct device *dev)
+{
+ dev->ops->init = mainboard_init;
+
+ /* FIXME: fix those values*/
+ install_intel_vga_int15_handler(GMA_INT15_ACTIVE_LFP_INT_LVDS,
+ GMA_INT15_PANEL_FIT_DEFAULT,
+ GMA_INT15_BOOT_DISPLAY_DEFAULT, 0);
+}
+
+struct chip_operations mainboard_ops = {
+ .enable_dev = mainboard_enable,
+};
diff --git a/src/mainboard/apple/macbookpro10_1/romstage.c b/src/mainboard/apple/macbookpro10_1/romstage.c
new file mode 100644
index 0000000..c35604b
--- /dev/null
+++ b/src/mainboard/apple/macbookpro10_1/romstage.c
@@ -0,0 +1,82 @@
+/*
+ * 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; 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.
+ */
+
+/* FIXME: Check if all includes are needed. */
+
+#include <stdint.h>
+#include <string.h>
+#include <timestamp.h>
+#include <arch/byteorder.h>
+#include <arch/io.h>
+#include <device/mmio.h>
+#include <device/pci_ops.h>
+#include <device/pnp_ops.h>
+#include <console/console.h>
+#include <northbridge/intel/sandybridge/sandybridge.h>
+#include <northbridge/intel/sandybridge/raminit_native.h>
+#include <southbridge/intel/bd82x6x/pch.h>
+#include <southbridge/intel/common/gpio.h>
+#include <cbfs.h>
+
+void pch_enable_lpc(void)
+{
+ pci_write_config16(PCH_LPC_DEV, 0x82, 0x3f0f);
+ pci_write_config32(PCH_LPC_DEV, 0x84, 0x000c0681);
+ pci_write_config32(PCH_LPC_DEV, 0x88, 0x000c1641);
+ pci_write_config32(PCH_LPC_DEV, 0x8c, 0x001c0301);
+ pci_write_config32(PCH_LPC_DEV, 0x90, 0x00fc0701);
+ pci_write_config16(PCH_LPC_DEV, 0x80, 0x0070);
+}
+
+void mainboard_rcba_config(void)
+{
+}
+
+const struct southbridge_usb_port mainboard_usb_ports[] = {
+ { 1, 0, 0 },
+ { 1, 0, 1 },
+ { 1, 0, 2 },
+ { 1, 0, 3 },
+ { 1, 0, -1 },
+ { 1, 0, -1 },
+ { 1, 0, -1 },
+ { 1, 0, -1 },
+ { 1, 0, -1 },
+ { 1, 0, -1 },
+ { 1, 0, -1 },
+ { 1, 0, -1 },
+ { 1, 0, -1 },
+ { 1, 0, -1 },
+};
+
+void mainboard_early_init(int s3resume)
+{
+}
+
+void mainboard_config_superio(void)
+{
+}
+
+// FIXME
+void mainboard_get_spd(spd_raw_data *spd, bool id_only)
+{
+ void *spd_file;
+ size_t spd_file_len = 0;
+ spd_file = cbfs_boot_map_with_leak("spd.bin", CBFS_TYPE_SPD,
+ &spd_file_len);
+ if (spd_file && spd_file_len >= 128) {
+ memcpy(&spd[0], spd_file, 128);
+ memcpy(&spd[2], spd_file, 128);
+ }
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/32673
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ica03aba442493c0d369a3d360ad569ddc16954df
Gerrit-Change-Number: 32673
Gerrit-PatchSet: 1
Gerrit-Owner: Evgeny Zinoviev <me(a)ch1p.com>
Gerrit-MessageType: newchange
12
81
Change in coreboot[master]: cpu/x86/16bit/entry16.inc: Stop PBET timer on Boot Guard platforms
by Michał Żygowski (Code Review) Aug. 7, 2026
by Michał Żygowski (Code Review) Aug. 7, 2026
Aug. 7, 2026
Michał Żygowski has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/43395 )
Change subject: cpu/x86/16bit/entry16.inc: Stop PBET timer on Boot Guard platforms
......................................................................
cpu/x86/16bit/entry16.inc: Stop PBET timer on Boot Guard platforms
PBET timer has to be stopped before APs are launched and initialized.
Otherwise the platform will reset. The PBET expiration time may be very
low so stop timer as quickly as possible. The expiration time is defined
in Boot Guard manifests.
Signed-off-by: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Change-Id: I545a36d60597fe37a30b8207336ae7fa7831674d
---
M src/cpu/x86/16bit/entry16.inc
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/95/43395/1
diff --git a/src/cpu/x86/16bit/entry16.inc b/src/cpu/x86/16bit/entry16.inc
index babed02..c555c5c 100644
--- a/src/cpu/x86/16bit/entry16.inc
+++ b/src/cpu/x86/16bit/entry16.inc
@@ -29,6 +29,7 @@
#include <cpu/x86/post_code.h>
#define BOOTGUARD_SACM_INFO 0x13a
+#define BOOTGUARD_PBEC 0x139
/* Symbol _start16bit must be aligned to 4kB to start AP CPUs with
* Startup IPI message without RAM.
@@ -118,6 +119,14 @@
andl $0x7FFAFFD1, %ebx /* PG,AM,WP,NE,TS,EM,MP = 0 */
orl $0x60000001, %ebx /* CD, NW, PE = 1 */
#if CONFIG(INTEL_BOOTGUARD)
+ /*
+ * Stop PBET timer. It is recommended to stop the PBET timer
+ * regardless of Boot Guard status.
+ */
+ movl $BOOTGUARD_PBEC, %ecx
+ movl $0, %edx
+ movl $1, %eax
+ wrmsr
/* DO NOT disable cache if Intel BootGuard is supported */
movl $BOOTGUARD_SACM_INFO, %ecx
--
To view, visit https://review.coreboot.org/c/coreboot/+/43395
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I545a36d60597fe37a30b8207336ae7fa7831674d
Gerrit-Change-Number: 43395
Gerrit-PatchSet: 1
Gerrit-Owner: Michał Żygowski <michal.zygowski(a)3mdeb.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newchange
7
9
Change in ...coreboot[master]: Documentation: Update CBFS
by Patrick Rudolph (Code Review) Aug. 6, 2026
by Patrick Rudolph (Code Review) Aug. 6, 2026
Aug. 6, 2026
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33664
Change subject: Documentation: Update CBFS
......................................................................
Documentation: Update CBFS
Update some parts to match current implementation.
Change-Id: I84d07ae1c5c1ded2b9ab5934e2babbbabb749440
---
M Documentation/lib/cbfs.md
M Documentation/lib/payloads/selfboot.md
2 files changed, 46 insertions(+), 34 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/64/33664/1
diff --git a/Documentation/lib/cbfs.md b/Documentation/lib/cbfs.md
index 83d8b44..ce87b78 100644
--- a/Documentation/lib/cbfs.md
+++ b/Documentation/lib/cbfs.md
@@ -7,7 +7,7 @@
## Introduction
-This document describes the coreboot CBFS specification (from here
+This document describes the coreboot filesystem specification (from here
referred to as CBFS). CBFS is a scheme for managing independent chunks
of data in a system ROM. Though not a true filesystem, the style and
concepts are similar.
@@ -15,7 +15,7 @@
## Architecture
-The CBFS architecture looks like the following:
+The CBFS on x86 architecture looks like the following:
```
/---------------\ <-- Start of ROM
@@ -49,11 +49,11 @@
The CBFS architecture consists of a binary associated with a physical
ROM disk referred hereafter as the ROM. A number of independent of
-components, each with a header prepended on to data are located within
-the ROM. The components are nominally arranged sequentially, though they
+components, each with a header prepended on to data are located within
+the ROM. The components are nominally arranged sequentially, though they
are aligned along a pre-defined boundary.
-The bootblock occupies the last 20k of the ROM. Within
+On x86 legacy the bootblock occupies the last 20k of the ROM. Within
the bootblock is a master header containing information about the ROM
including the size, alignment of the components, and the offset of the
start of the first CBFS component within the ROM.
@@ -62,14 +62,13 @@
The master header contains essential information about the ROM that is
used by both the CBFS implementation within coreboot at runtime as well
-as host based utilities to create and manage the ROM. The master header
-will be located somewhere within the bootblock (last 20k of the ROM). A
-pointer to the location of the header will be located at offset
--4 from the end of the ROM. This translates to address 0xFFFFFFFC on a
-normal x86 system. The pointer will be to physical memory somewhere
-between - 0xFFFFB000 and 0xFFFFFFF0. This makes it easier for coreboot
-to locate the header at run time. Build time utilities will
-need to read the pointer and do the appropriate math to locate the header.
+as host based utilities to create and manage the ROM. The master header
+will be located at the start of CBFS. A pointer to the location of the
+header will be located at offset -4 from the end of the ROM.
+This translates to address 0xFFFFFFFC on a normal x86 system.
+This makes it easier for coreboot to locate the header at run time.
+Build time utilities will need to read the pointer and do the appropriate
+math to locate the header.
The following is the structure of the master header:
@@ -114,16 +113,16 @@
for.
## Bootblock
-The bootblock is a mandatory component in the ROM. It is located in the
-last 20k of the ROM space, and contains, among other things, the location of the
-master header and the entry point for the loader firmware. The bootblock
-does not have a component header attached to it.
+The bootblock is a mandatory component in the ROM. On x86 legacy it is located
+at the end of the CBFS, and contains, among other things, the location of the
+master header and the entry point for the loader firmware. On other
+architectures the bootblock might not be part of the CBFS.
## Components
CBFS components are placed in the ROM starting at 'offset' specified in
-the master header and ending at the bootblock. Thus the total size
-available for components in the ROM is (ROM size - 20k - 'offset').
+the master header and ending at the end of the CBFS. Thus the total size
+available for components in the ROM is (ROM size - 'offset').
Each CBFS component is to be aligned according to the 'align' value in the
header.
Thus, if a component of size 1052 is located at offset 0 with an 'align'
@@ -208,10 +207,10 @@
#### Stages
-Stages are code loaded by coreboot during the boot process. They are
-essential to a successful boot. Stages are comprised of a single blob
+Stages are code loaded by coreboot during the boot process. They are
+essential to a successful boot. Stages are comprised of a single blob
of binary data that is to be loaded into a particular location in memory
-and executed. The uncompressed header contains information about how
+and executed. The uncompressed header contains information about how
large the data is, and where it should be placed, and what additional memory
needs to be cleared.
@@ -244,8 +243,8 @@
`compression` is an integer defining how the data is compressed. There
are three compression types defined by this version of the standard:
-none (0x0), lzma (0x1), and nrv2b (0x02, deprecated), though additional
-types may be added assuming that coreboot understands how to handle the scheme.
+none (0x0), lzma (0x1), and lz4 (0x02), though additional types may be
+added assuming that coreboot understands how to handle the scheme.
`entry` is a 64 bit value indicating the location where the program
counter should jump following the loading of the stage. This should be
@@ -271,13 +270,13 @@
#### Payloads
Payloads are loaded by coreboot following the boot process.
+The default payloads supported by coreboot are [SELF] payloads.
-Stages are assigned a component value of 0x20. When coreboot sees this
+[SELF] stages are assigned a component value of 0x20. When coreboot sees this
component type, it knows that it should pass the data to a sub-function
-that will process the payload. Furthermore, other run time applications such
-as 'bayou' may easily index all available payloads
-on the system by searching for the payload type.
-
+that will process the payload. Furthermore, other run time applications such
+as 'bayou' may easily index all available payloads on the system by searching
+for the payload type.
The following is the format of a stage component:
@@ -338,9 +337,9 @@
`compression` is the compression scheme for the segment. Each segment can
be independently compressed. There are three compression types defined by
-this version of the standard: none (0x0), lzma (0x1), and nrv2b
-(0x02, deprecated), though additional types may be added assuming that
-coreboot understands how to handle the scheme.
+this version of the standard: none (0x0), lzma (0x1), and lz4 (0x02), though
+additional types may be added assuming that coreboot understands how to handle
+the scheme.
`offset` is the address of the data within the component, starting from
the component header.
@@ -355,6 +354,13 @@
The data will located immediately following the last segment.
+#### FIT payload
+
+A payload of type [FIT] is supported on some architectures.
+
+[FIT] stages are assigned a component value of 0x21 and do not support
+compressions at all.
+
#### Option ROMS
The third specified component type will be Option ROMs. Option ROMS will
@@ -364,8 +370,11 @@
#### NULL
-There is a 4th component type ,defined as NULL (0xFFFFFFFF). This is
-the "don't care" component type. This can be used when the component
+There is a 4th component type, defined as NULL (0xFFFFFFFF, 0x00000000).
+This is the "don't care" component type. This can be used when the component
type is not necessary (such as when the name of the component is unique.
i.e. option_table). It is recommended that all components be assigned a
unique type, but NULL can be used when the type does not matter.
+
+[FIT]: payloads/fit.md
+[SELF]: payloads/selfboot.md
diff --git a/Documentation/lib/payloads/selfboot.md b/Documentation/lib/payloads/selfboot.md
index 62a4393..791d6c0 100644
--- a/Documentation/lib/payloads/selfboot.md
+++ b/Documentation/lib/payloads/selfboot.md
@@ -18,6 +18,8 @@
address they specify. If it's not possible to load the payload at the specified
address, the system won't boot.
+Implementations details can be found in the [CBFS] documentation.
+
### Calling conventions
The SELF payload is called with a pointer to the coreboot tables as first
argument.
@@ -26,3 +28,4 @@
and a pointer to the *FDT* as arguments.
[RISC-V]: ../../arch/riscv/index.md
+[CBFS]: ../cbfs.md
--
To view, visit https://review.coreboot.org/c/coreboot/+/33664
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I84d07ae1c5c1ded2b9ab5934e2babbbabb749440
Gerrit-Change-Number: 33664
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newchange
4
4
Change in ...coreboot[master]: Documentation: Convert cbfs.txt to markdown
by Patrick Rudolph (Code Review) Aug. 6, 2026
by Patrick Rudolph (Code Review) Aug. 6, 2026
Aug. 6, 2026
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33663
Change subject: Documentation: Convert cbfs.txt to markdown
......................................................................
Documentation: Convert cbfs.txt to markdown
Convert the document to markdown.
Needs to be fixed in a separate commit as it doesn't reflect coreboot v4.
Change-Id: I0fb2713a9cda08e528902ec641dd4a4e0dc148fe
Signed-off-by: Patrick Rudolph <patrick.rudolph(a)9elements.com>
---
A Documentation/lib/cbfs.md
M Documentation/lib/index.md
2 files changed, 372 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/33663/1
diff --git a/Documentation/lib/cbfs.md b/Documentation/lib/cbfs.md
new file mode 100644
index 0000000..83d8b44
--- /dev/null
+++ b/Documentation/lib/cbfs.md
@@ -0,0 +1,371 @@
+# coreboot CBFS Specification
+by Jordan Crouse <jordan(a)cosmicpenguin.net>
+
+**WARNING: This documentation is written against coreboot v1.**
+
+**TODO: Update this document ASAP**
+
+## Introduction
+
+This document describes the coreboot CBFS specification (from here
+referred to as CBFS). CBFS is a scheme for managing independent chunks
+of data in a system ROM. Though not a true filesystem, the style and
+concepts are similar.
+
+
+## Architecture
+
+The CBFS architecture looks like the following:
+
+```
+/---------------\ <-- Start of ROM
+| /-----------\ | --|
+| | Header | | |
+| |-----------| | |
+| | Name | | |-- Component
+| |-----------| | |
+| |Data | | |
+| |.. | | |
+| \-----------/ | --|
+| |
+| /-----------\ |
+| | Header | |
+| |-----------| |
+| | Name | |
+| |-----------| |
+| |Data | |
+| |.. | |
+| \-----------/ |
+| |
+| ... |
+| /-----------\ |
+| | | |
+| | Bootblock | |
+| | --------- | |
+| | Reset | | <- 0xFFFFFFF0
+| \-----------/ |
+\---------------/
+```
+
+The CBFS architecture consists of a binary associated with a physical
+ROM disk referred hereafter as the ROM. A number of independent of
+components, each with a header prepended on to data are located within
+the ROM. The components are nominally arranged sequentially, though they
+are aligned along a pre-defined boundary.
+
+The bootblock occupies the last 20k of the ROM. Within
+the bootblock is a master header containing information about the ROM
+including the size, alignment of the components, and the offset of the
+start of the first CBFS component within the ROM.
+
+## Master Header
+
+The master header contains essential information about the ROM that is
+used by both the CBFS implementation within coreboot at runtime as well
+as host based utilities to create and manage the ROM. The master header
+will be located somewhere within the bootblock (last 20k of the ROM). A
+pointer to the location of the header will be located at offset
+-4 from the end of the ROM. This translates to address 0xFFFFFFFC on a
+normal x86 system. The pointer will be to physical memory somewhere
+between - 0xFFFFB000 and 0xFFFFFFF0. This makes it easier for coreboot
+to locate the header at run time. Build time utilities will
+need to read the pointer and do the appropriate math to locate the header.
+
+The following is the structure of the master header:
+
+```c
+struct cbfs_header {
+ u32 magic;
+ u32 version;
+ u32 romsize;
+ u32 bootblocksize;
+ u32 align;
+ u32 offset;
+ u32 architecture;
+ u32 pad[1];
+} __packed;
+```
+
+The meaning of each member is as follows:
+
+`magic` is a 32 bit number that identifies the ROM as a CBFS type. The
+magic
+number is 0x4F524243, which is 'ORBC' in ASCII.
+
+`version` is a version number for CBFS header. cbfs_header structure may be
+different if version is not matched.
+
+`romsize` is the size of the ROM in bytes. coreboot will subtract 'size' from
+0xFFFFFFFF to locate the beginning of the ROM in memory.
+
+`bootblocksize` is the size of bootblock reserved in firmware image.
+
+`align` is the number of bytes that each component is aligned to within the
+ROM. This is used to make sure that each component is aligned correctly
+with
+regards to the erase block sizes on the ROM - allowing one to replace a
+component at runtime without disturbing the others.
+
+`offset` is the offset of the first CBFS component (from the start of
+the ROM). This is to allow for arbitrary space to be left at the beginning
+of the ROM for things like embedded controller firmware.
+
+`architecture` describes which architecture (x86, arm, ...) this CBFS is created
+for.
+
+## Bootblock
+The bootblock is a mandatory component in the ROM. It is located in the
+last 20k of the ROM space, and contains, among other things, the location of the
+master header and the entry point for the loader firmware. The bootblock
+does not have a component header attached to it.
+
+## Components
+
+CBFS components are placed in the ROM starting at 'offset' specified in
+the master header and ending at the bootblock. Thus the total size
+available for components in the ROM is (ROM size - 20k - 'offset').
+Each CBFS component is to be aligned according to the 'align' value in the
+header.
+Thus, if a component of size 1052 is located at offset 0 with an 'align'
+value of 1024, the next component will be located at offset 2048.
+
+Each CBFS component will be indexed with a unique ASCII string name of
+unlimited size.
+
+Each CBFS component starts with a header:
+
+```c
+struct cbfs_file {
+ char magic[8];
+ unsigned int len;
+ unsigned int type;
+ unsigned int checksum;
+ unsigned int offset;
+};
+```
+
+`magic` is a magic value used to identify the header. During runtime,
+coreboot will scan the ROM looking for this value. The default magic is
+the string 'LARCHIVE'.
+
+`len` is the length of the data, not including the size of the header and
+the size of the name.
+
+`type` is a 32 bit number indicating the type of data that is attached.
+The data type is used in a number of ways, as detailed in the section
+below.
+
+`checksum` is a 32bit checksum of the entire component, including the
+header and name.
+
+`offset` is the start of the component data, based off the start of the
+header.
+The difference between the size of the header and offset is the size of the
+component name.
+
+Immediately following the header will be the name of the component,
+which will null terminated and 16 byte aligned. The following picture shows the
+structure of the header:
+
+```
+/--------\ <- start
+| Header |
+|--------| <- sizeof(struct cbfs_file)
+| Name |
+|--------| <- 'offset'
+| Data |
+| ... |
+\--------/ <- start + 'offset' + 'len'
+```
+
+### Searching Algorithm
+
+To locate a specific component in the ROM, one starts at the 'offset'
+specified in the CBFS master header. For this example, the offset will
+be 0.
+
+From that offset, the code should search for the magic string on the
+component, jumping 'align' bytes each time. So, assuming that 'align' is
+16, the code will search for the string 'LARCHIVE' at offset 0, 16, 32, etc.
+If the offset ever exceeds the allowable range for CBFS components, then no
+component was found.
+
+Upon recognizing a component, the software then has to search for the
+specific name of the component. This is accomplished by comparing the
+desired name with the string on the component located at
+`offset + sizeof(struct cbfs_file)`. If the string matches, then the
+component has been located, otherwise the software should add
+`'offset' + 'len'` to the offset and resume the search for the magic value.
+
+### Data Types
+
+The 'type' member of struct cbfs_file is used to identify the content
+of the component data, and is used by coreboot and other
+run-time entities to make decisions about how to handle the data.
+
+There are three component types that are essential to coreboot, and so
+are defined here.
+
+#### Stages
+
+Stages are code loaded by coreboot during the boot process. They are
+essential to a successful boot. Stages are comprised of a single blob
+of binary data that is to be loaded into a particular location in memory
+and executed. The uncompressed header contains information about how
+large the data is, and where it should be placed, and what additional memory
+needs to be cleared.
+
+Stages are assigned a component value of 0x10. When coreboot sees this
+component type, it knows that it should pass the data to a sub-function
+that will process the stage.
+
+The following is the format of a stage component:
+
+```
+/--------\
+| Header |
+|--------|
+| Binary |
+| .. |
+\--------/
+```
+
+The header is defined as:
+
+```c
+struct cbfs_stage {
+ unsigned int compression;
+ unsigned long long entry;
+ unsigned long long load;
+ unsigned int len;
+ unsigned int memlen;
+};
+```
+
+`compression` is an integer defining how the data is compressed. There
+are three compression types defined by this version of the standard:
+none (0x0), lzma (0x1), and nrv2b (0x02, deprecated), though additional
+types may be added assuming that coreboot understands how to handle the scheme.
+
+`entry` is a 64 bit value indicating the location where the program
+counter should jump following the loading of the stage. This should be
+an absolute physical memory address.
+
+`load` is a 64 bit value indicating where the subsequent data should be
+loaded. This should be an absolute physical memory address.
+
+`len` is the length of the compressed data in the component.
+
+`memlen` is the amount of memory that will be used by the component when
+it is loaded.
+
+The component data will start immediately following the header.
+
+When coreboot loads a stage, it will first zero the memory from 'load' to
+'memlen'. It will then decompress the component data according to the
+specified scheme and place it in memory starting at 'load'. Following that,
+it will jump execution to the address specified by 'entry'.
+Some components are designed to execute directly from the ROM - coreboot
+knows which components must do that and will act accordingly.
+
+#### Payloads
+
+Payloads are loaded by coreboot following the boot process.
+
+Stages are assigned a component value of 0x20. When coreboot sees this
+component type, it knows that it should pass the data to a sub-function
+that will process the payload. Furthermore, other run time applications such
+as 'bayou' may easily index all available payloads
+on the system by searching for the payload type.
+
+
+The following is the format of a stage component:
+
+```
+/-----------\
+| Header |
+| Segment 1 |
+| Segment 2 |
+| ... |
+|-----------|
+| Binary |
+| .. |
+\-----------/
+```
+
+The header is as follows:
+
+```c
+struct cbfs_payload {
+ struct cbfs_payload_segment segments;
+}
+```
+
+The header contains a number of segments corresponding to the segments
+that need to be loaded for the payload.
+
+The following is the structure of each segment header:
+
+```c
+struct cbfs_payload_segment {
+ unsigned int type;
+ unsigned int compression;
+ unsigned int offset;
+ unsigned long long load_addr;
+ unsigned int len;
+ unsigned int mem_len;
+};
+```
+
+`type` is the type of segment, one of the following:
+
+```eval_rst
++----------------------+-------------+---------------------------------------+
+|PAYLOAD_SEGMENT_CODE | 0x45444F43 | The segment contains executable code |
++----------------------+-------------+---------------------------------------+
+|PAYLOAD_SEGMENT_DATA | 0x41544144 | The segment contains data |
++----------------------+-------------+---------------------------------------+
+|PAYLOAD_SEGMENT_BSS | 0x20535342 | The memory specified by the segment |
+| | | should be zeroed |
++----------------------+-------------+---------------------------------------+
+|PAYLOAD_SEGMENT_PARAMS| 0x41524150 | The segment contains information for |
+| | | the payload |
++----------------------+-------------+---------------------------------------+
+|PAYLOAD_SEGMENT_ENTRY | 0x52544E45 | The segment contains the entry point |
+| | | for the payload |
++----------------------+-------------+---------------------------------------+
+```
+
+`compression` is the compression scheme for the segment. Each segment can
+be independently compressed. There are three compression types defined by
+this version of the standard: none (0x0), lzma (0x1), and nrv2b
+(0x02, deprecated), though additional types may be added assuming that
+coreboot understands how to handle the scheme.
+
+`offset` is the address of the data within the component, starting from
+the component header.
+
+`load_addr` is a 64 bit value indicating where the segment should be placed
+in memory.
+
+`len` is a 32 bit value indicating the size of the segment within the
+component.
+
+`mem_len` is the size of the data when it is placed into memory.
+
+The data will located immediately following the last segment.
+
+#### Option ROMS
+
+The third specified component type will be Option ROMs. Option ROMS will
+have component type '0x30'. They will have no additional header, the
+uncompressed binary data will be located in the data portion of the
+component.
+
+#### NULL
+
+There is a 4th component type ,defined as NULL (0xFFFFFFFF). This is
+the "don't care" component type. This can be used when the component
+type is not necessary (such as when the name of the component is unique.
+i.e. option_table). It is recommended that all components be assigned a
+unique type, but NULL can be used when the type does not matter.
diff --git a/Documentation/lib/index.md b/Documentation/lib/index.md
index 99b8061..808bac8 100644
--- a/Documentation/lib/index.md
+++ b/Documentation/lib/index.md
@@ -6,4 +6,5 @@
## Structure and layout
- [Flashmap and Flashmap Descriptor](flashmap.md)
- [ABI data consumption](abi-data-consumption.md)
+- [CBFS](cbfs.md)
- [Timestamps](timestamp.md)
--
To view, visit https://review.coreboot.org/c/coreboot/+/33663
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0fb2713a9cda08e528902ec641dd4a4e0dc148fe
Gerrit-Change-Number: 33663
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newchange
5
5
Change in ...coreboot[master]: Documentation: Explain SimpleELF
by Patrick Rudolph (Code Review) Aug. 6, 2026
by Patrick Rudolph (Code Review) Aug. 6, 2026
Aug. 6, 2026
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33447
Change subject: Documentation: Explain SimpleELF
......................................................................
Documentation: Explain SimpleELF
Explain coreboot's SELF format.
Change-Id: Ia217af7d39505393ed9324fbe53b4ca7f3069e2e
Signed-off-by: Patrick Rudolph <patrick.rudolph(a)9elements.com>
---
M Documentation/lib/payloads/index.md
A Documentation/lib/payloads/selfboot.md
M Documentation/payloads.md
3 files changed, 44 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/47/33447/1
diff --git a/Documentation/lib/payloads/index.md b/Documentation/lib/payloads/index.md
index 44daef1..b8eca8c 100644
--- a/Documentation/lib/payloads/index.md
+++ b/Documentation/lib/payloads/index.md
@@ -6,6 +6,10 @@
coreboot supports multiple payloads, depending on the architecture of the
selected mainboard.
+## SimpleELF
+
+- [SimpleELF format](selfboot.md)
+
## FIT
- [uImage.FIT support](fit.md)
diff --git a/Documentation/lib/payloads/selfboot.md b/Documentation/lib/payloads/selfboot.md
new file mode 100644
index 0000000..62a4393
--- /dev/null
+++ b/Documentation/lib/payloads/selfboot.md
@@ -0,0 +1,28 @@
+# Simple ELF standard
+
+coreboot is able to use static linked ELF binaries as payload.
+To reduce complexity the ELF binaries are converted to coreboot's SimpleELF
+(SELF) format.
+The payload is therefore split into multiple sections by `cbfstool` at
+build time, each having a unique loading address and possible compression.
+
+## SELF loader
+The SELF loader implementation can be found in `src/lib/selfboot.c`.
+It decompresses the SELF sections and places them in memory.
+
+If the payload overlaps with the loading stage (*RAMSTAGE*) and
+`CONFIG_RELOCATABLE_RAMSTAGE` is selected, the loading stage is moved to another
+location in RAM.
+
+SELF payloads are **never** relocatable and will always be placed at the
+address they specify. If it's not possible to load the payload at the specified
+address, the system won't boot.
+
+### Calling conventions
+The SELF payload is called with a pointer to the coreboot tables as first
+argument.
+
+**Note:** The only exception is made on [RISC-V] which does use the *HARTID*
+and a pointer to the *FDT* as arguments.
+
+[RISC-V]: ../../arch/riscv/index.md
diff --git a/Documentation/payloads.md b/Documentation/payloads.md
index b1eae61..650818e 100644
--- a/Documentation/payloads.md
+++ b/Documentation/payloads.md
@@ -7,6 +7,12 @@
There is various software in that space that is either explicitly written as
payload or can be made to work as one.
+## ELF
+
+Executable and linking format (ELF) compatible static linked binaries can be
+loaded as payload.
+ELF binaries are loaded through the [SELF] boot mechanism.
+
## SeaBIOS
[SeaBIOS](https://www.seabios.org) is an open source implementation of
@@ -14,6 +20,7 @@
since. While originally written for emulators such as QEMU, it can be made
to work as a coreboot payload and all the necessary code is in SeaBIOS'
mainline code.
+SeaBIOS is loaded through the [SELF] boot mechanism.
## Tianocore
@@ -40,3 +47,8 @@
firmware project drivers that often reinvent the wheel) and the ability to
define boot policy with familiar tools, no matter if those are shell scripts
or compiled userland programs written in C, Go or other programming languages.
+
+On x86 platforms Linux is loaded through the [SELF] boot mechanism, by adding a
+*tampoline code* at the start of the kernel.
+
+[SELF]: lib/payloads/selfboot.md
--
To view, visit https://review.coreboot.org/c/coreboot/+/33447
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia217af7d39505393ed9324fbe53b4ca7f3069e2e
Gerrit-Change-Number: 33447
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newchange
7
13
Change in coreboot[master]: {cpu,nb}/intel/haswell: Drop unnecessary `UL` suffix
by Angel Pons (Code Review) April 15, 2026
by Angel Pons (Code Review) April 15, 2026
April 15, 2026
Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46720 )
Change subject: {cpu,nb}/intel/haswell: Drop unnecessary `UL` suffix
......................................................................
{cpu,nb}/intel/haswell: Drop unnecessary `UL` suffix
Tested with BUILD_TIMELESS=1, Google Wolf does not change.
Change-Id: I029ab0dccbf7b61d641cccf79b491fabf97ab74a
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M src/cpu/intel/haswell/haswell.h
M src/northbridge/intel/haswell/finalize.c
M src/northbridge/intel/haswell/gma.c
M src/northbridge/intel/haswell/northbridge.c
4 files changed, 8 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/46720/1
diff --git a/src/cpu/intel/haswell/haswell.h b/src/cpu/intel/haswell/haswell.h
index fd1ce9e..e0e1e1c 100644
--- a/src/cpu/intel/haswell/haswell.h
+++ b/src/cpu/intel/haswell/haswell.h
@@ -84,7 +84,7 @@
/* PCODE MMIO communications live in the MCHBAR. */
#define BIOS_MAILBOX_INTERFACE 0x5da4
-#define MAILBOX_RUN_BUSY (1UL << 31)
+#define MAILBOX_RUN_BUSY (1 << 31)
#define MAILBOX_BIOS_CMD_READ_PCS 1
#define MAILBOX_BIOS_CMD_WRITE_PCS 2
#define MAILBOX_BIOS_CMD_READ_CALIBRATION 0x509
diff --git a/src/northbridge/intel/haswell/finalize.c b/src/northbridge/intel/haswell/finalize.c
index 1600a42..b95b3fe 100644
--- a/src/northbridge/intel/haswell/finalize.c
+++ b/src/northbridge/intel/haswell/finalize.c
@@ -22,10 +22,10 @@
MCHBAR32_OR(MMIO_PAVP_MSG, 1 << 0); /* PAVP */
MCHBAR32_OR(PCU_DDR_PTM_CTL, 1 << 5); /* DDR PTM */
- MCHBAR32_OR(DMIVCLIM, 1UL << 31);
+ MCHBAR32_OR(DMIVCLIM, 1 << 31);
MCHBAR32_OR(CRDTLCK, 1 << 0);
MCHBAR32_OR(MCARBLCK, 1 << 0);
- MCHBAR32_OR(REQLIM, 1UL << 31);
+ MCHBAR32_OR(REQLIM, 1 << 31);
MCHBAR32_OR(UMAGFXCTL, 1 << 0); /* UMA GFX */
MCHBAR32_OR(VTDTRKLCK, 1 << 0); /* VTDTRK */
diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c
index 66c8d2d..0bca230 100644
--- a/src/northbridge/intel/haswell/gma.c
+++ b/src/northbridge/intel/haswell/gma.c
@@ -196,7 +196,7 @@
gtt_write_regs(haswell_gt_setup);
/* Wait for Mailbox Ready */
- gtt_poll(0x138124, (1UL << 31), (0UL << 31));
+ gtt_poll(0x138124, (1 << 31), (0 << 31));
/* Mailbox Data - RC6 VIDS */
gtt_write(0x138128, 0x00000000);
@@ -205,7 +205,7 @@
gtt_write(0x138124, 0x80000004);
/* Wait for Mailbox Ready */
- gtt_poll(0x138124, (1UL << 31), (0UL << 31));
+ gtt_poll(0x138124, (1 << 31), (0 << 31));
/* Enable PM Interrupts */
gtt_write(GEN6_PMIER, GEN6_PM_MBOX_EVENT | GEN6_PM_THERMAL_EVENT |
diff --git a/src/northbridge/intel/haswell/northbridge.c b/src/northbridge/intel/haswell/northbridge.c
index 88ccd71..2d19ccd 100644
--- a/src/northbridge/intel/haswell/northbridge.c
+++ b/src/northbridge/intel/haswell/northbridge.c
@@ -31,18 +31,18 @@
switch ((pciexbar_reg >> 1) & 3) {
case 0: /* 256MB */
- mask = (1UL << 31) | (1 << 30) | (1 << 29) | (1 << 28);
+ mask = (1 << 31) | (1 << 30) | (1 << 29) | (1 << 28);
*base = pciexbar_reg & mask;
*len = 256 * 1024 * 1024;
return 1;
case 1: /* 128M */
- mask = (1UL << 31) | (1 << 30) | (1 << 29) | (1 << 28);
+ mask = (1 << 31) | (1 << 30) | (1 << 29) | (1 << 28);
mask |= (1 << 27);
*base = pciexbar_reg & mask;
*len = 128 * 1024 * 1024;
return 1;
case 2: /* 64M */
- mask = (1UL << 31) | (1 << 30) | (1 << 29) | (1 << 28);
+ mask = (1 << 31) | (1 << 30) | (1 << 29) | (1 << 28);
mask |= (1 << 27) | (1 << 26);
*base = pciexbar_reg & mask;
*len = 64 * 1024 * 1024;
--
To view, visit https://review.coreboot.org/c/coreboot/+/46720
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I029ab0dccbf7b61d641cccf79b491fabf97ab74a
Gerrit-Change-Number: 46720
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newchange
2
7
Change in coreboot[master]: cpu/intel/haswell: Clean up CPUID definitions
by Angel Pons (Code Review) April 14, 2026
by Angel Pons (Code Review) April 14, 2026
April 14, 2026
Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46915 )
Change subject: cpu/intel/haswell: Clean up CPUID definitions
......................................................................
cpu/intel/haswell: Clean up CPUID definitions
The `mobile` suffix is misleading, since desktop CPUs share the same
CPUIDs. Remove unused stepping IDs and add the full CPUIDs instead.
Finally, add Broadwell CPUIDs in preparation for merging CPU code.
Note that steppings for Haswell in various comments are incorrect.
Tested with BUILD_TIMELESS=1, Asrock B85M Pro4 remains identical.
Change-Id: I19e56b8826b1514550ae95e6363b0df2d08e3cb7
Signed-off-by: Angel Pons <th3fanbus(a)gmail.com>
---
M src/cpu/intel/haswell/haswell.h
M src/cpu/intel/haswell/haswell_init.c
2 files changed, 31 insertions(+), 18 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/15/46915/1
diff --git a/src/cpu/intel/haswell/haswell.h b/src/cpu/intel/haswell/haswell.h
index 284ff01..b23fbac 100644
--- a/src/cpu/intel/haswell/haswell.h
+++ b/src/cpu/intel/haswell/haswell.h
@@ -5,19 +5,32 @@
#include <stdint.h>
-/* Haswell CPU types */
-#define HASWELL_FAMILY_MOBILE 0x306c0
-#define HASWELL_FAMILY_ULT 0x40650
+/* CPU types without stepping */
+#define HASWELL_FAMILY_TRAD 0x306c0
+#define HASWELL_FAMILY_ULT 0x40650
+#define CRYSTALWELL_FAMILY 0x306c0
+#define BROADWELL_FAMILY_ULT 0x306d0
-/* Haswell CPU steppings */
-#define HASWELL_STEPPING_MOBILE_A0 1
-#define HASWELL_STEPPING_MOBILE_B0 2
-#define HASWELL_STEPPING_MOBILE_C0 3
-#define HASWELL_STEPPING_MOBILE_D0 4
-#define HASWELL_STEPPING_ULT_B0 0
-#define HASWELL_STEPPING_ULT_C0 1
+/* Haswell CPUIDs */
+#define CPUID_HASWELL_A0 0x306c1
+#define CPUID_HASWELL_B0 0x306c2
+#define CPUID_HASWELL_C0 0x306c3
-/* Haswell bus clock is fixed at 100MHz */
+#define CPUID_HASWELL_ULT_B0 0x40650
+#define CPUID_HASWELL_ULT_C0 0x40651
+
+/* Crystalwell CPUIDs */
+#define CPUID_CRYSTALWELL_B0 0x40660
+#define CPUID_CRYSTALWELL_C0 0x40661
+
+/* Broadwell CPUIDs */
+#define CPUID_BROADWELL_C0 0x40671
+
+#define CPUID_BROADWELL_ULT_C0 0x306d2
+#define CPUID_BROADWELL_ULT_D0 0x306d3
+#define CPUID_BROADWELL_ULT_E0 0x306d4
+
+/* Haswell and Broadwell bus clock is fixed at 100MHz */
#define CPU_BCLK 100
#define MSR_CORE_THREAD_COUNT 0x35
diff --git a/src/cpu/intel/haswell/haswell_init.c b/src/cpu/intel/haswell/haswell_init.c
index 44bbbfd..438a317 100644
--- a/src/cpu/intel/haswell/haswell_init.c
+++ b/src/cpu/intel/haswell/haswell_init.c
@@ -694,13 +694,13 @@
};
static const struct cpu_device_id cpu_table[] = {
- { X86_VENDOR_INTEL, 0x306c1 }, /* Intel Haswell 4+2 A0 */
- { X86_VENDOR_INTEL, 0x306c2 }, /* Intel Haswell 4+2 B0 */
- { X86_VENDOR_INTEL, 0x306c3 }, /* Intel Haswell C0 */
- { X86_VENDOR_INTEL, 0x40650 }, /* Intel Haswell ULT B0 */
- { X86_VENDOR_INTEL, 0x40651 }, /* Intel Haswell ULT B1 */
- { X86_VENDOR_INTEL, 0x40660 }, /* Intel Crystal Well C0 */
- { X86_VENDOR_INTEL, 0x40661 }, /* Intel Crystal Well C1 */
+ { X86_VENDOR_INTEL, CPUID_HASWELL_A0 },
+ { X86_VENDOR_INTEL, CPUID_HASWELL_B0 },
+ { X86_VENDOR_INTEL, CPUID_HASWELL_C0 },
+ { X86_VENDOR_INTEL, CPUID_HASWELL_ULT_B0 },
+ { X86_VENDOR_INTEL, CPUID_HASWELL_ULT_C0 },
+ { X86_VENDOR_INTEL, CPUID_CRYSTALWELL_B0 },
+ { X86_VENDOR_INTEL, CPUID_CRYSTALWELL_C0 },
{ 0, 0 },
};
--
To view, visit https://review.coreboot.org/c/coreboot/+/46915
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I19e56b8826b1514550ae95e6363b0df2d08e3cb7
Gerrit-Change-Number: 46915
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newchange
3
5
Change in coreboot[master]: mainboard/dell: Add Latitude E7440
by Pablo Stebler (Code Review) March 10, 2026
by Pablo Stebler (Code Review) March 10, 2026
March 10, 2026
Pablo Stebler has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46540 )
Change subject: mainboard/dell: Add Latitude E7440
......................................................................
mainboard/dell: Add Latitude E7440
Based on autoport output.
Untested for now.
Signed-off-by: Pablo Stebler <pablo(a)stebler.xyz>
Change-Id: I9459d8dac9552529fc90633eaadd89f5118b237e
---
M src/mainboard/dell/latitude_e7x40/Kconfig
M src/mainboard/dell/latitude_e7x40/Kconfig.name
A src/mainboard/dell/latitude_e7x40/variants/latitude_e7440/board_info.txt
A src/mainboard/dell/latitude_e7x40/variants/latitude_e7440/gpio.c
A src/mainboard/dell/latitude_e7x40/variants/latitude_e7440/hda_verb.c
A src/mainboard/dell/latitude_e7x40/variants/latitude_e7440/overridetree.cb
6 files changed, 152 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/40/46540/1
diff --git a/src/mainboard/dell/latitude_e7x40/Kconfig b/src/mainboard/dell/latitude_e7x40/Kconfig
index 05ed643..9b9bae7 100644
--- a/src/mainboard/dell/latitude_e7x40/Kconfig
+++ b/src/mainboard/dell/latitude_e7x40/Kconfig
@@ -23,10 +23,12 @@
config VARIANT_DIR
string
default "latitude_e7240" if BOARD_DELL_LATITUDE_E7240
+ default "latitude_e7440" if BOARD_DELL_LATITUDE_E7440
config MAINBOARD_PART_NUMBER
string
default "Latitude E7240" if BOARD_DELL_LATITUDE_E7240
+ default "Latitude E7440" if BOARD_DELL_LATITUDE_E7440
config VGA_BIOS_FILE
string
diff --git a/src/mainboard/dell/latitude_e7x40/Kconfig.name b/src/mainboard/dell/latitude_e7x40/Kconfig.name
index 5eefdf7..4532758 100644
--- a/src/mainboard/dell/latitude_e7x40/Kconfig.name
+++ b/src/mainboard/dell/latitude_e7x40/Kconfig.name
@@ -4,3 +4,8 @@
bool "Latitude E7240"
select BOARD_DELL_LATITUDE_E7x40
+
+config BOARD_DELL_LATITUDE_E7440
+ bool "Latitude E7440"
+
+ select BOARD_DELL_LATITUDE_E7x40
diff --git a/src/mainboard/dell/latitude_e7x40/variants/latitude_e7440/board_info.txt b/src/mainboard/dell/latitude_e7x40/variants/latitude_e7440/board_info.txt
new file mode 100644
index 0000000..6d6a545
--- /dev/null
+++ b/src/mainboard/dell/latitude_e7x40/variants/latitude_e7440/board_info.txt
@@ -0,0 +1 @@
+Board URL: https://www.dell.com/support/home/en-us/product-support/product/latitude-e7…
diff --git a/src/mainboard/dell/latitude_e7x40/variants/latitude_e7440/gpio.c b/src/mainboard/dell/latitude_e7x40/variants/latitude_e7440/gpio.c
new file mode 100644
index 0000000..89531a3
--- /dev/null
+++ b/src/mainboard/dell/latitude_e7x40/variants/latitude_e7440/gpio.c
@@ -0,0 +1,112 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <southbridge/intel/lynxpoint/lp_gpio.h>
+
+const struct pch_lp_gpio_map mainboard_gpio_map[] = {
+ [0] = LP_GPIO_OUT_LOW,
+ [1] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_IRQ_LEVEL },
+ [2] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT | GPIO_IRQ_LEVEL },
+ [3] = LP_GPIO_OUT_LOW,
+ [4] = LP_GPIO_NATIVE,
+ [5] = LP_GPIO_NATIVE,
+ [6] = LP_GPIO_NATIVE,
+ [7] = LP_GPIO_NATIVE,
+ [8] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT | GPIO_IRQ_LEVEL,
+ .pirq = GPIO_PIRQ_APIC_ROUTE },
+ [9] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_IRQ_LEVEL,
+ .pirq = GPIO_PIRQ_APIC_ROUTE },
+ [10] = LP_GPIO_OUT_LOW,
+ [11] = LP_GPIO_NATIVE,
+ [12] = LP_GPIO_NATIVE,
+ [13] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT | GPIO_IRQ_LEVEL,
+ .pirq = GPIO_PIRQ_APIC_ROUTE },
+ [14] = LP_GPIO_OUT_LOW,
+ [15] = LP_GPIO_OUT_LOW,
+ [16] = LP_GPIO_OUT_HIGH,
+ [17] = LP_GPIO_OUT_LOW,
+ [18] = LP_GPIO_NATIVE,
+ [19] = LP_GPIO_NATIVE,
+ [20] = LP_GPIO_NATIVE,
+ [21] = LP_GPIO_NATIVE,
+ [22] = LP_GPIO_NATIVE,
+ [23] = LP_GPIO_NATIVE,
+ [24] = LP_GPIO_OUT_LOW,
+ [25] = LP_GPIO_OUT_LOW,
+ [26] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT },
+ [27] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT | GPIO_IRQ_LEVEL },
+ [28] = LP_GPIO_OUT_LOW,
+ [29] = LP_GPIO_NATIVE,
+ [30] = LP_GPIO_NATIVE,
+ [31] = LP_GPIO_NATIVE,
+ [32] = LP_GPIO_NATIVE,
+ [33] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT | GPIO_IRQ_LEVEL },
+ [34] = LP_GPIO_OUT_HIGH,
+ [35] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT | GPIO_IRQ_LEVEL },
+ [36] = LP_GPIO_OUT_LOW,
+ [37] = LP_GPIO_NATIVE,
+ [38] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT | GPIO_IRQ_LEVEL },
+ [39] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT | GPIO_IRQ_LEVEL },
+ [40] = LP_GPIO_NATIVE,
+ [41] = LP_GPIO_NATIVE,
+ [42] = LP_GPIO_NATIVE,
+ [43] = LP_GPIO_NATIVE,
+ [44] = LP_GPIO_OUT_LOW,
+ [45] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT | GPIO_IRQ_LEVEL,
+ .route = GPIO_ROUTE_SMI,
+ .pirq = GPIO_PIRQ_APIC_ROUTE },
+ [46] = LP_GPIO_OUT_LOW,
+ [47] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT,
+ .pirq = GPIO_PIRQ_APIC_ROUTE },
+ [48] = LP_GPIO_OUT_LOW,
+ [49] = LP_GPIO_OUT_LOW,
+ [50] = LP_GPIO_OUT_HIGH,
+ [51] = LP_GPIO_OUT_LOW,
+ [52] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_IRQ_LEVEL,
+ .pirq = GPIO_PIRQ_APIC_ROUTE },
+ [53] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT,
+ .pirq = GPIO_PIRQ_APIC_ROUTE },
+ [54] = LP_GPIO_OUT_LOW,
+ [55] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT,
+ .pirq = GPIO_PIRQ_APIC_ROUTE },
+ [56] = LP_GPIO_OUT_HIGH,
+ [57] = LP_GPIO_OUT_HIGH,
+ [58] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT },
+ [59] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT | GPIO_IRQ_LEVEL },
+ [60] = LP_GPIO_OUT_LOW,
+ [61] = LP_GPIO_NATIVE,
+ [62] = LP_GPIO_NATIVE,
+ [63] = LP_GPIO_NATIVE,
+ [64] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT | GPIO_IRQ_LEVEL },
+ [65] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT | GPIO_IRQ_LEVEL },
+ [66] = LP_GPIO_OUT_LOW,
+ [67] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_IRQ_LEVEL },
+ [68] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_IRQ_LEVEL },
+ [69] = LP_GPIO_OUT_HIGH,
+ [70] = LP_GPIO_OUT_LOW,
+ [71] = LP_GPIO_NATIVE,
+ [72] = LP_GPIO_NATIVE,
+ [73] = LP_GPIO_OUT_LOW,
+ [74] = LP_GPIO_NATIVE,
+ [75] = LP_GPIO_NATIVE,
+ [76] = LP_GPIO_OUT_HIGH,
+ [77] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT | GPIO_IRQ_LEVEL },
+ [78] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_IRQ_LEVEL,
+ .route = GPIO_ROUTE_SMI },
+ [79] = LP_GPIO_NATIVE,
+ [80] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_IRQ_LEVEL },
+ [81] = LP_GPIO_NATIVE,
+ [82] = LP_GPIO_NATIVE,
+ [83] = LP_GPIO_OUT_HIGH,
+ [84] = LP_GPIO_OUT_HIGH,
+ [85] = LP_GPIO_OUT_HIGH,
+ [86] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_IRQ_LEVEL },
+ [87] = LP_GPIO_OUT_LOW,
+ [88] = LP_GPIO_OUT_LOW,
+ [89] = LP_GPIO_OUT_HIGH,
+ [90] = LP_GPIO_OUT_HIGH,
+ [91] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT | GPIO_IRQ_LEVEL },
+ [92] = { .conf0 = GPIO_MODE_GPIO | GPIO_DIR_INPUT | GPIO_INVERT | GPIO_IRQ_LEVEL },
+ [93] = LP_GPIO_OUT_LOW,
+ [94] = LP_GPIO_OUT_LOW,
+ LP_GPIO_END
+};
diff --git a/src/mainboard/dell/latitude_e7x40/variants/latitude_e7440/hda_verb.c b/src/mainboard/dell/latitude_e7x40/variants/latitude_e7440/hda_verb.c
new file mode 100644
index 0000000..e358006
--- /dev/null
+++ b/src/mainboard/dell/latitude_e7x40/variants/latitude_e7440/hda_verb.c
@@ -0,0 +1,25 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <device/azalia_device.h>
+
+const u32 cim_verb_data[] = {
+ 0x10ec0292, /* Codec Vendor / Device ID: Realtek */
+ 0x102805cb, /* Subsystem ID */
+ 12, /* Number of 4 dword sets */
+ AZALIA_SUBVENDOR(0, 0x102805cb),
+ AZALIA_PIN_CFG(0, 0x12, 0x90a60140),
+ AZALIA_PIN_CFG(0, 0x13, 0x411111f0),
+ AZALIA_PIN_CFG(0, 0x14, 0x90170110),
+ AZALIA_PIN_CFG(0, 0x15, 0x0221401f),
+ AZALIA_PIN_CFG(0, 0x16, 0x01014020),
+ AZALIA_PIN_CFG(0, 0x18, 0x411111f0),
+ AZALIA_PIN_CFG(0, 0x19, 0x01a19030),
+ AZALIA_PIN_CFG(0, 0x1a, 0x411111f0),
+ AZALIA_PIN_CFG(0, 0x1b, 0x411111f0),
+ AZALIA_PIN_CFG(0, 0x1d, 0x40700001),
+ AZALIA_PIN_CFG(0, 0x1e, 0x411111f0),
+};
+
+const u32 pc_beep_verbs[0] = {};
+
+AZALIA_ARRAY_SIZES;
diff --git a/src/mainboard/dell/latitude_e7x40/variants/latitude_e7440/overridetree.cb b/src/mainboard/dell/latitude_e7x40/variants/latitude_e7440/overridetree.cb
new file mode 100644
index 0000000..cc31dc8
--- /dev/null
+++ b/src/mainboard/dell/latitude_e7x40/variants/latitude_e7440/overridetree.cb
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+chip northbridge/intel/haswell
+ device domain 0x0 on
+ subsystemid 0x1028 0x05cb inherit
+ end
+end
--
To view, visit https://review.coreboot.org/c/coreboot/+/46540
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I9459d8dac9552529fc90633eaadd89f5118b237e
Gerrit-Change-Number: 46540
Gerrit-PatchSet: 1
Gerrit-Owner: Pablo Stebler <pablo(a)stebler.xyz>
Gerrit-MessageType: newchange
5
6