Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13351
-gerrit
commit f376122b190c6f9e0d676f0f3be63a773330d865
Author: Andrey Petrov <andrey.petrov(a)intel.com>
Date: Thu Nov 5 14:43:14 2015 -0800
soc/apollolake: Reserve FSP memory in CBMEM
FSP needs to reserve some space in DRAM which may not be touched
by coreboot. We initialize cbmem in such a way that this memory
is added as first element.
Change-Id: I9a9b7c9e9132acd2f341d72f7e34e78299815acd
Signed-off-by: Andrey Petrov <andrey.petrov(a)intel.com>
---
src/soc/intel/apollolake/romstage/romstage.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/src/soc/intel/apollolake/romstage/romstage.c b/src/soc/intel/apollolake/romstage/romstage.c
index 88d872e..b7ffd3a 100644
--- a/src/soc/intel/apollolake/romstage/romstage.c
+++ b/src/soc/intel/apollolake/romstage/romstage.c
@@ -18,6 +18,8 @@
#include <cpu/x86/msr.h>
#include <device/pci_def.h>
#include <fsp/api.h>
+#include <fsp/util.h>
+#include <device/resource.h>
#include <soc/iomap.h>
#include <soc/romstage.h>
#include <soc/uart.h>
@@ -74,6 +76,8 @@ static void *alloc_stack_in_ram(void)
asmlinkage void* romstage_entry(void)
{
void *hob_list_ptr;
+ struct resource fsp_mem;
+
/* Be careful. Bootblock might already have initialized the console */
if (!IS_ENABLED(CONFIG_BOOTBLOCK_CONSOLE)) {
lpss_console_uart_init();
@@ -86,7 +90,16 @@ asmlinkage void* romstage_entry(void)
fsp_memory_init(&hob_list_ptr);
- cbmem_initialize_empty();
+ fsp_find_reserved_memory(&fsp_mem, hob_list_ptr);
+
+ /* initialize cbmem by adding FSP reserved memory first thing */
+ cbmem_initialize_empty_id_size(CBMEM_ID_FSP_RESERVED_MEMORY,
+ fsp_mem.size);
+
+ /* make sure FSP memory is reserved in cbmem */
+ if (fsp_mem.base != (uintptr_t)cbmem_find(CBMEM_ID_FSP_RESERVED_MEMORY))
+ die("Failed to accommodate FSP reserved memory request");
+
return alloc_stack_in_ram();
}
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13348
-gerrit
commit 9138dba726f620986f6c5ceaedbc8381389ede5f
Author: Lance Zhao <lijian.zhao(a)intel.com>
Date: Mon Nov 9 17:06:34 2015 -0800
soc/apollolake: Add skelton ACPI entry
Change-Id: Ib127af5392ca2b349480f5b21fad2186b444d7e6
Signed-off-by: Lance Zhao <lijian.zhao(a)intel.com>
---
src/mainboard/intel/apollolake_rvp/Kconfig | 1 +
src/mainboard/intel/apollolake_rvp/acpi_tables.c | 18 +++++++++++++++
src/mainboard/intel/apollolake_rvp/dsdt.asl | 28 ++++++++++++++++++++++++
src/soc/intel/apollolake/Makefile.inc | 1 +
src/soc/intel/apollolake/acpi.c | 22 +++++++++++++++++++
5 files changed, 70 insertions(+)
diff --git a/src/mainboard/intel/apollolake_rvp/Kconfig b/src/mainboard/intel/apollolake_rvp/Kconfig
index 5e6c4f0..ec71e96 100755
--- a/src/mainboard/intel/apollolake_rvp/Kconfig
+++ b/src/mainboard/intel/apollolake_rvp/Kconfig
@@ -4,6 +4,7 @@ config BOARD_SPECIFIC_OPTIONS
def_bool y
select SOC_INTEL_APOLLOLAKE
select BOARD_ROMSIZE_KB_8192
+ select HAVE_ACPI_TABLES
config MAINBOARD_DIR
string
diff --git a/src/mainboard/intel/apollolake_rvp/acpi_tables.c b/src/mainboard/intel/apollolake_rvp/acpi_tables.c
new file mode 100644
index 0000000..d21b743
--- /dev/null
+++ b/src/mainboard/intel/apollolake_rvp/acpi_tables.c
@@ -0,0 +1,18 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2015 Intel Corp.
+ * (Written by Lance Zhao <lijian.zhao(a)intel.com> for Intel Corp.)
+ *
+ * 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.
+ */
+
+#include <arch/acpi.h>
+
+void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
+{
+}
+
diff --git a/src/mainboard/intel/apollolake_rvp/dsdt.asl b/src/mainboard/intel/apollolake_rvp/dsdt.asl
new file mode 100644
index 0000000..d9322e5
--- /dev/null
+++ b/src/mainboard/intel/apollolake_rvp/dsdt.asl
@@ -0,0 +1,28 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2015 Intel Corp.
+ * (Written by Lance Zhao <lijian.zhao(a)intel.com> for Intel Corp.)
+ *
+ * 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.
+ */
+
+DefinitionBlock(
+ "dsdt.aml",
+ "DSDT",
+ 0x02, // DSDT revision: ACPI v2.0
+ "COREv4", // OEM id
+ "COREBOOT", // OEM table id
+ 0x20110725 // OEM revision
+)
+{
+ Scope (\_SB) {
+ Device (PCI0)
+ {
+ }
+ }
+
+}
diff --git a/src/soc/intel/apollolake/Makefile.inc b/src/soc/intel/apollolake/Makefile.inc
index 59d13e3..7efb3ba 100644
--- a/src/soc/intel/apollolake/Makefile.inc
+++ b/src/soc/intel/apollolake/Makefile.inc
@@ -23,6 +23,7 @@ romstage-y += romstage/romstage.c
romstage-y += tsc_freq.c
romstage-y += uart_early.c
+ramstage-$(CONFIG_HAVE_ACPI_TABLES) += acpi.c
ramstage-y += chip.c
ramstage-y += cpu.c
ramstage-y += gpio.c
diff --git a/src/soc/intel/apollolake/acpi.c b/src/soc/intel/apollolake/acpi.c
new file mode 100644
index 0000000..4246f40
--- /dev/null
+++ b/src/soc/intel/apollolake/acpi.c
@@ -0,0 +1,22 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2015 Intel Corp.
+ * (Written by Lance Zhao <lijian.zhao(a)intel.com> for Intel Corp.)
+ *
+ * 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.
+ */
+
+#include <arch/acpi.h>
+unsigned long acpi_fill_mcfg(unsigned long current)
+{
+ return 0;
+}
+unsigned long acpi_fill_madt(unsigned long current)
+{
+ return 0;
+}
+
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13346
-gerrit
commit 26faf51ae60b0536b5d2de0a958266feb88353af
Author: Andrey Petrov <andrey.petrov(a)intel.com>
Date: Thu Nov 5 14:40:23 2015 -0800
soc/apollolake: Call FSP Silicon Init as part of chip init
Change-Id: Ic1ed0dccefe4130195ab91792f0844e696e0746f
Signed-off-by: Andrey Petrov <andrey.petrov(a)intel.com>
---
src/soc/intel/apollolake/chip.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c
index 2b6384a..34d6d3a 100644
--- a/src/soc/intel/apollolake/chip.c
+++ b/src/soc/intel/apollolake/chip.c
@@ -3,6 +3,7 @@
*
* Copyright (C) 2015 Intel Corp.
* (Written by Alexandru Gagniuc <alexandrux.gagniuc(a)intel.com> for Intel Corp.)
+ * (Written by Andrey Petrov <andrey.petrov(a)intel.com> for Intel Corp.)
*
* 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
@@ -13,6 +14,7 @@
#include <cpu/cpu.h>
#include <device/device.h>
#include <device/pci.h>
+#include <fsp/api.h>
static struct device_operations pci_domain_ops = {
.read_resources = pci_domain_read_resources,
@@ -46,7 +48,13 @@ static void enable_dev(device_t dev)
}
}
+static void soc_init(void *data)
+{
+ fsp_silicon_init();
+}
+
struct chip_operations soc_intel_apollolake_ops = {
CHIP_NAME("Intel Apollolake SOC")
.enable_dev = &enable_dev,
+ .init = &soc_init
};
Alexandru Gagniuc (mr.nuke.me(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13347
-gerrit
commit 8170723cc1f065c3a9a692dd29a6fd3d0a1c2725
Author: Lance Zhao <lijian.zhao(a)intel.com>
Date: Thu Nov 5 14:58:46 2015 -0800
intel/apollolake_rvp: Fill pci tree to match silicon.
Follow Bxt-P Pci configuration matrix to fufill the device tree.
Change-Id: I228fe7383e052f1b78dc6ab0edb6e78eeb5bc234
Signed-off-by: Lance Zhao <lijian.zhao(a)intel.com>
---
src/mainboard/intel/apollolake_rvp/devicetree.cb | 40 ++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/src/mainboard/intel/apollolake_rvp/devicetree.cb b/src/mainboard/intel/apollolake_rvp/devicetree.cb
index 741d88e..639d293 100755
--- a/src/mainboard/intel/apollolake_rvp/devicetree.cb
+++ b/src/mainboard/intel/apollolake_rvp/devicetree.cb
@@ -4,5 +4,45 @@ chip soc/intel/apollolake
device lapic 0 on end
end
device domain 0 on
+ device pci 00.0 on end # - Host Bridge
+ device pci 00.1 on end # - DPTF
+ device pci 00.2 on end # - NPK
+ device pci 02.0 on end # - Gen
+ device pci 03.0 on end # - Iunit
+ device pci 0d.0 on end # - P2SB
+ device pci 0d.1 on end # - PMC
+ device pci 0d.2 on end # - SPI
+ device pci 0d.3 on end # - Shared SRAM
+ device pci 0e.0 on end # - Audio
+ device pci 11.0 on end # - ISH
+ device pci 12.0 on end # - SATA
+ device pci 13.0 on end # - PCIe-A 0
+ device pci 13.2 on end # - Onboard Lan
+ device pci 13.3 on end # - PCIe-A 3
+ device pci 14.0 on end # - PCIe-B 0
+ device pci 14.1 on end # - Onboard M2 Slot(Wifi/BT)
+ device pci 15.0 on end # - XHCI
+ device pci 15.1 on end # - XDCI
+ device pci 16.0 on end # - I2C 0
+ device pci 16.1 on end # - I2C 1
+ device pci 16.2 on end # - I2C 2
+ device pci 16.3 on end # - I2C 3
+ device pci 17.0 on end # - I2C 4
+ device pci 17.1 on end # - I2C 5
+ device pci 17.2 on end # - I2C 6
+ device pci 17.3 on end # - I2C 7
+ device pci 18.0 on end # - UART 0
+ device pci 18.1 on end # - UART 1
+ device pci 18.2 on end # - UART 2
+ device pci 18.3 on end # - UART 3
+ device pci 19.0 on end # - SPI 0
+ device pci 19.1 on end # - SPI 1
+ device pci 19.2 on end # - SPI 2
+ device pci 1a.0 on end # - PWM
+ device pci 1b.0 on end # - SDCARD
+ device pci 1c.0 on end # - eMMC
+ device pci 1e.0 on end # - SDIO
+ device pci 1f.0 on end # - LPC
+ device pci 1f.1 on end # - SMBUS
end
end