the following patch was just integrated into master:
commit 246051c22ce598db0bcf7dc93399cbdc380ddaad
Author: Paul Menzel <paulepanter(a)users.sourceforge.net>
Date: Thu Oct 27 08:28:55 2016 +0200
util/xcompile/xcompile: Add a space before `&&`
Change-Id: I07fd4d6f6db220e23da8daced6014ce39894c604
Signed-off-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/17159
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See https://review.coreboot.org/17159 for details.
-gerrit
Lijian Zhao (lijian.zhao(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17181
-gerrit
commit 92f203fcad9592337f619ce5633e7a61f93da45c
Author: Lijian Zhao <lijian.zhao(a)intel.com>
Date: Fri Oct 28 11:01:09 2016 -0700
soc/intel/apollolake: Add pmc_ipc device support
A dedicated pmc_ipc DSDT entry is required for pmc_ipc kernel driver.
The ACPI mode entry includes resources for PMC_IPC1, SRAM, ACPI IO and
Punit Mailbox. Also optimize the asl sequence to have SB.PCI0 blocks
together.
BRANCH=None
BUG=chrome-os-partner:57364
TEST=Boot up into OS successfully and check with dmesg to see the
driver has been loaded successfully without errors.
Change-Id: Ib0a300febe1e7fc1796bfeca1a04493f932640e1
Signed-off-by: Lijian Zhao <lijian.zhao(a)intel.com>
---
src/soc/intel/apollolake/acpi/pmc_ipc.asl | 61 +++++++++++++++++++++++++++
src/soc/intel/apollolake/acpi/southbridge.asl | 8 ++--
2 files changed, 66 insertions(+), 3 deletions(-)
diff --git a/src/soc/intel/apollolake/acpi/pmc_ipc.asl b/src/soc/intel/apollolake/acpi/pmc_ipc.asl
new file mode 100644
index 0000000..d5c1ceb
--- /dev/null
+++ b/src/soc/intel/apollolake/acpi/pmc_ipc.asl
@@ -0,0 +1,61 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 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; 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 <soc/iomap.h>
+
+#define MAILBOX_DATA 0x7080
+#define MAILBOX_INTF 0x7084
+#define PMIO_LENGTH 0x80
+
+scope (\_SB) {
+
+ Device (IPC1)
+ {
+ Name (_HID, "INT34D2")
+ Name (_CID, "INT34D2")
+ Name (_DDN, "Intel(R) IPC1 Controller")
+ Name (RBUF, ResourceTemplate ()
+ {
+ Memory32Fixed (ReadWrite, 0x0, 0x2000, IBAR)
+ Memory32Fixed (ReadWrite, 0x0, 0x4, MDAT)
+ Memory32Fixed (ReadWrite, 0x0, 0x4, MINF)
+ IO (Decode16, ACPI_PMIO_BASE, ACPI_PMIO_BASE + PMIO_LENGTH,
+ 0x04, PMIO_LENGTH)
+ Memory32Fixed (ReadWrite, 0x0, 0x2000, SBAR)
+ Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive, , , )
+ {
+ PMC_INT
+ }
+ })
+
+ Method (_CRS, 0x0, NotSerialized)
+ {
+ CreateDwordField (^RBUF, ^IBAR._BAS, IBAS)
+ Store (PMC_BAR0, IBAS)
+
+ CreateDwordField (^RBUF, ^MDAT._BAS, MDBA)
+ Store (MCH_BASE_ADDR + MAILBOX_DATA, MDBA)
+ CreateDwordField (^RBUF, ^MINF._BAS, MIBA)
+ Store (MCH_BASE_ADDR + MAILBOX_INTF, MIBA)
+
+ CreateDwordField (^RBUF, ^SBAR._BAS, SBAS)
+ Store (PMC_SRAM_BASE_0, SBAS)
+
+ Return (^RBUF)
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/src/soc/intel/apollolake/acpi/southbridge.asl b/src/soc/intel/apollolake/acpi/southbridge.asl
index 1c10f1a..11e333d 100644
--- a/src/soc/intel/apollolake/acpi/southbridge.asl
+++ b/src/soc/intel/apollolake/acpi/southbridge.asl
@@ -35,9 +35,6 @@ Scope (\_SB)
/* PCI IRQ assignment */
#include "pci_irqs.asl"
-/* GPIO controller */
-#include "gpio.asl"
-
#include "xhci.asl"
/* LPC */
@@ -46,5 +43,10 @@ Scope (\_SB)
/* eMMC */
#include "scs.asl"
+/* GPIO controller */
+#include "gpio.asl"
+
+/* PMC IPC controller */
+#include "pmc_ipc.asl"
/* PCI _OSC */
#include <soc/intel/common/acpi/pci_osc.asl>
Ronald G. Minnich (rminnich(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17132
-gerrit
commit ca3c5cb1bc2f5a809d5bbdb4bd3673208e3368ca
Author: Ronald G. Minnich <rminnich(a)gmail.com>
Date: Tue Oct 25 19:11:07 2016 -0700
riscv: add the lowrisc/nexys4ddr mainboard
This was tested at the coreboot meeting in Berlin.
The uart programming may still not be right but when used with
the lowrisc bitstream for the board we were able to load
and start linux, although it does not yet get far due to
PTE version issues with lowrisc.
Change-Id: Ia1de1a92762631c9d7bb3d41b04f95296144caa3
Signed-off-by: Ronald G. Minnich <rminnich(a)gmail.com>
---
src/mainboard/lowrisc/Kconfig | 16 ++++
src/mainboard/lowrisc/Kconfig.name | 2 +
src/mainboard/lowrisc/nexys4ddr/Kconfig | 38 +++++++++
src/mainboard/lowrisc/nexys4ddr/Kconfig.name | 2 +
src/mainboard/lowrisc/nexys4ddr/Makefile.inc | 28 +++++++
src/mainboard/lowrisc/nexys4ddr/board_info.txt | 3 +
src/mainboard/lowrisc/nexys4ddr/devicetree.cb | 20 +++++
src/mainboard/lowrisc/nexys4ddr/mainboard.c | 36 +++++++++
src/mainboard/lowrisc/nexys4ddr/memlayout.ld | 31 ++++++++
src/mainboard/lowrisc/nexys4ddr/rom_media.c | 30 +++++++
src/mainboard/lowrisc/nexys4ddr/romstage.c | 23 ++++++
src/mainboard/lowrisc/nexys4ddr/uart.c | 40 ++++++++++
src/mainboard/lowrisc/nexys4ddr/util.c | 103 +++++++++++++++++++++++++
13 files changed, 372 insertions(+)
diff --git a/src/mainboard/lowrisc/Kconfig b/src/mainboard/lowrisc/Kconfig
new file mode 100644
index 0000000..ba0fbe7
--- /dev/null
+++ b/src/mainboard/lowrisc/Kconfig
@@ -0,0 +1,16 @@
+if VENDOR_LOWRISC
+
+choice
+ prompt "Mainboard model"
+
+source "src/mainboard/lowrisc/*/Kconfig.name"
+
+endchoice
+
+source "src/mainboard/lowrisc/*/Kconfig"
+
+config MAINBOARD_VENDOR
+ string
+ default "lowrisc"
+
+endif # VENDOR_LOWRISC
diff --git a/src/mainboard/lowrisc/Kconfig.name b/src/mainboard/lowrisc/Kconfig.name
new file mode 100644
index 0000000..4c992fc
--- /dev/null
+++ b/src/mainboard/lowrisc/Kconfig.name
@@ -0,0 +1,2 @@
+config VENDOR_LOWRISC
+ bool "lowrisc"
diff --git a/src/mainboard/lowrisc/nexys4ddr/Kconfig b/src/mainboard/lowrisc/nexys4ddr/Kconfig
new file mode 100644
index 0000000..f0a3637
--- /dev/null
+++ b/src/mainboard/lowrisc/nexys4ddr/Kconfig
@@ -0,0 +1,38 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2016 Google Inc.
+##
+## This software is licensed under the terms of the GNU General Public
+## License version 2, as published by the Free Software Foundation, and
+## may be copied, distributed, and modified under those terms.
+##
+## 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.
+
+if BOARD_LOWRISC_NEXYS4DDR
+
+config BOARD_SPECIFIC_OPTIONS # dummy
+ def_bool y
+ select SOC_LOWRISC_LOWRISC
+ select BOARD_ROMSIZE_KB_4096
+ select DRIVERS_UART_8250MEM
+ select BOOT_DEVICE_NOT_SPI_FLASH
+ select UART_OVERRIDE_REFCLK
+ select UART_OVERRIDE_INPUT_CLOCK_DIVIDER
+
+config MAINBOARD_DIR
+ string
+ default lowrisc/nexys4ddr
+
+config MAINBOARD_PART_NUMBER
+ string
+ default "LOWRISC NEXYS4DDR"
+
+config MAX_CPUS
+ int
+ default 1
+
+endif # BOARD_LOWRISC_NEXYS4DDR
diff --git a/src/mainboard/lowrisc/nexys4ddr/Kconfig.name b/src/mainboard/lowrisc/nexys4ddr/Kconfig.name
new file mode 100644
index 0000000..f99b3cc
--- /dev/null
+++ b/src/mainboard/lowrisc/nexys4ddr/Kconfig.name
@@ -0,0 +1,2 @@
+config BOARD_LOWRISC_NEXYS4DDR
+ bool "nexys4ddr"
diff --git a/src/mainboard/lowrisc/nexys4ddr/Makefile.inc b/src/mainboard/lowrisc/nexys4ddr/Makefile.inc
new file mode 100644
index 0000000..69519b1
--- /dev/null
+++ b/src/mainboard/lowrisc/nexys4ddr/Makefile.inc
@@ -0,0 +1,28 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2016 Google Inc.
+##
+## This software is licensed under the terms of the GNU General Public
+## License version 2, as published by the Free Software Foundation, and
+## may be copied, distributed, and modified under those terms.
+##
+## 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.
+
+bootblock-y += uart.c
+bootblock-y += util.c
+bootblock-y += rom_media.c
+romstage-y += romstage.c
+romstage-y += uart.c
+romstage-y += util.c
+romstage-y += rom_media.c
+ramstage-y += uart.c
+ramstage-y += util.c
+ramstage-y += rom_media.c
+
+bootblock-y += memlayout.ld
+romstage-y += memlayout.ld
+ramstage-y += memlayout.ld
diff --git a/src/mainboard/lowrisc/nexys4ddr/board_info.txt b/src/mainboard/lowrisc/nexys4ddr/board_info.txt
new file mode 100644
index 0000000..a305030
--- /dev/null
+++ b/src/mainboard/lowrisc/nexys4ddr/board_info.txt
@@ -0,0 +1,3 @@
+Board name: lowrisc nexys4ddr
+Category: eval
+Board URL: https://www.google.com/search?q=Tutorial+for+the+debug+preview+of+lowRISC&o…
diff --git a/src/mainboard/lowrisc/nexys4ddr/devicetree.cb b/src/mainboard/lowrisc/nexys4ddr/devicetree.cb
new file mode 100644
index 0000000..e857276
--- /dev/null
+++ b/src/mainboard/lowrisc/nexys4ddr/devicetree.cb
@@ -0,0 +1,20 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2016 Google, Inc.
+##
+## This software is licensed under the terms of the GNU General Public
+## License version 2, as published by the Free Software Foundation, and
+## may be copied, distributed, and modified under those terms.
+##
+## 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.
+
+chip soc/ucb/riscv
+ device cpu_cluster 0 on end
+ chip drivers/generic/generic # I2C0 controller
+ device i2c 6 on end # Fake component for testing
+ end
+end
diff --git a/src/mainboard/lowrisc/nexys4ddr/mainboard.c b/src/mainboard/lowrisc/nexys4ddr/mainboard.c
new file mode 100644
index 0000000..8c3ea1a
--- /dev/null
+++ b/src/mainboard/lowrisc/nexys4ddr/mainboard.c
@@ -0,0 +1,36 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 Google, Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * 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 <console/console.h>
+#include <device/device.h>
+#include <cbmem.h>
+#include <symbols.h>
+
+static void mainboard_enable(device_t dev)
+{
+ /*
+ * TODO: Get this size from the hardware-supplied configuration string.
+ */
+ const size_t ram_size = 1*GiB;
+
+ if (!dev)
+ die("No dev0; die\n");
+
+ ram_resource(dev, 0, (uintptr_t)_dram / KiB, ram_size / KiB);
+}
+
+struct chip_operations mainboard_ops = {
+ .enable_dev = mainboard_enable,
+};
diff --git a/src/mainboard/lowrisc/nexys4ddr/memlayout.ld b/src/mainboard/lowrisc/nexys4ddr/memlayout.ld
new file mode 100644
index 0000000..0348c47
--- /dev/null
+++ b/src/mainboard/lowrisc/nexys4ddr/memlayout.ld
@@ -0,0 +1,31 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2016 Google Inc.
+ *
+ * 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 <memlayout.h>
+
+#include <arch/header.ld>
+
+#define START 0x80000000
+
+SECTIONS
+{
+ DRAM_START(START)
+ BOOTBLOCK(START, 64K)
+ STACK(START + 8M, 64K)
+ ROMSTAGE(START + 8M + 64K, 128K)
+ PRERAM_CBMEM_CONSOLE(START + 8M + 192k, 8K)
+ PAGETABLES(START + 8M + 200K, 56K)
+ RAMSTAGE(START + 8M + 256K, 256K)
+}
diff --git a/src/mainboard/lowrisc/nexys4ddr/rom_media.c b/src/mainboard/lowrisc/nexys4ddr/rom_media.c
new file mode 100644
index 0000000..7d4ed00
--- /dev/null
+++ b/src/mainboard/lowrisc/nexys4ddr/rom_media.c
@@ -0,0 +1,30 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2015 Google Inc.
+ * Copyright 2016 Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
+ *
+ * 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 <boot_device.h>
+#include <symbols.h>
+
+/*
+ * _dram is the start of RAM. We currently need to load coreboot.rom into
+ * RAM. The actual "rom" code on the FPGAs is in a block ram.
+ */
+static const struct mem_region_device boot_dev =
+ MEM_REGION_DEV_RO_INIT(_dram, CONFIG_ROM_SIZE);
+
+const struct region_device *boot_device_ro(void)
+{
+ return &boot_dev.rdev;
+}
diff --git a/src/mainboard/lowrisc/nexys4ddr/romstage.c b/src/mainboard/lowrisc/nexys4ddr/romstage.c
new file mode 100644
index 0000000..1509efb
--- /dev/null
+++ b/src/mainboard/lowrisc/nexys4ddr/romstage.c
@@ -0,0 +1,23 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 Google, Inc.
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * 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 <program_loading.h>
+#include <console/console.h>
+
+void main(void)
+{
+ console_init();
+ run_ramstage();
+}
diff --git a/src/mainboard/lowrisc/nexys4ddr/uart.c b/src/mainboard/lowrisc/nexys4ddr/uart.c
new file mode 100644
index 0000000..e3c233f80
--- /dev/null
+++ b/src/mainboard/lowrisc/nexys4ddr/uart.c
@@ -0,0 +1,40 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2016 Google Inc.
+ *
+ * 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 <console/uart.h>
+#include <arch/io.h>
+#include <boot/coreboot_tables.h>
+#include <spike_util.h>
+
+uintptr_t uart_platform_base(int idx)
+{
+ return (uintptr_t) 0x42000000;
+}
+
+/* these are currently not quite right but they are here for reference
+ * and will be fixed when lowrisc gives us a standard clock
+ * and set of values. */
+// divisor = clk_freq / (16 * Baud)
+unsigned int uart_input_clock_divider(void)
+{
+ return (25 * 1000 * 1000u / (16u * 115200u)) % 0x100;
+}
+
+// System clock 25 MHz, 115200 baud rate
+unsigned int uart_platform_refclk(void)
+{
+ return (25 * 1000 * 1000u / (16u * 115200u)) >> 8;
+}
diff --git a/src/mainboard/lowrisc/nexys4ddr/util.c b/src/mainboard/lowrisc/nexys4ddr/util.c
new file mode 100644
index 0000000..32cdb6d
--- /dev/null
+++ b/src/mainboard/lowrisc/nexys4ddr/util.c
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2013, The Regents of the University of California (Regents).
+ * All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the Regents nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT,
+ * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
+ * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
+ * DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE POSSIBILITY
+ * OF SUCH DAMAGE.
+ *
+ * REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING
+ * DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS
+ * IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,
+ * UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+ */
+
+#include <arch/barrier.h>
+#include <arch/errno.h>
+#include <atomic.h>
+#include <console/console.h>
+#include <spike_util.h>
+#include <string.h>
+#include <vm.h>
+
+uintptr_t mcall_query_memory(uintptr_t id, memory_block_info *info)
+{
+ if (id == 0) {
+ mprv_write_ulong(&info->base, 2U*GiB);
+
+ /* TODO: Return the correct value */
+ mprv_write_ulong(&info->size, 1*GiB);
+ return 0;
+ }
+
+ return -1;
+}
+
+uintptr_t mcall_send_ipi(uintptr_t recipient)
+{
+ die("mcall_send_ipi is currently not implemented");
+ return 0;
+}
+
+uintptr_t mcall_clear_ipi(void)
+{
+ // only clear SSIP if no other events are pending
+ if (HLS()->device_response_queue_head == NULL) {
+ clear_csr(mip, MIP_SSIP);
+ /* Ensure the other hart sees it. */
+ mb();
+ }
+
+ return atomic_swap(&HLS()->ipi_pending, 0);
+}
+
+uintptr_t mcall_shutdown(void)
+{
+ die("mcall_shutdown is currently not implemented");
+ return 0;
+}
+
+uintptr_t mcall_set_timer(unsigned long long when)
+{
+ printk(BIOS_DEBUG, "mcall_set_timer is currently not implemented, ignoring\n");
+ return 0;
+}
+
+uintptr_t mcall_dev_req(sbi_device_message *m)
+{
+ die("mcall_dev_req is currently not implemented");
+ return 0;
+}
+
+uintptr_t mcall_dev_resp(void)
+{
+ die("mcall_dev_resp is currently not implemented");
+ return 0;
+}
+
+void hls_init(uint32_t hart_id)
+{
+ memset(HLS(), 0, sizeof(*HLS()));
+ HLS()->hart_id = hart_id;
+}
+
+uintptr_t mcall_console_putchar(uint8_t ch)
+{
+ do_putchar(ch);
+ return 0;
+}
Marc Jones (marc(a)marcjonesconsulting.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17139
-gerrit
commit de61c88574753c1c2d698172daa88075755a23f7
Author: Marc Jones <marcj303(a)gmail.com>
Date: Tue Sep 20 20:06:43 2016 -0600
cpu/amd: Copy 00660F01 to 00670F00
Prepare for new 00670F00 (StoneyRidge) support.
Original-Signed-off-by: Marc Jones <marcj303(a)gmail.com>
Original-Reviewed-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Original-Tested-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
(cherry picked from commit 87d26e05189247685df0ca6492dc3181a1bad5e8)
Change-Id: Ib296ad32a061669b28dae742cac08bb75fdd0de4
Signed-off-by: Marc Jones <marcj303(a)gmail.com>
---
src/cpu/amd/pi/00670F00/Kconfig | 52 ++++++++++++
src/cpu/amd/pi/00670F00/Makefile.inc | 27 ++++++
src/cpu/amd/pi/00670F00/acpi/cpu.asl | 78 ++++++++++++++++++
src/cpu/amd/pi/00670F00/chip_name.c | 20 +++++
src/cpu/amd/pi/00670F00/fixme.c | 94 +++++++++++++++++++++
src/cpu/amd/pi/00670F00/model_15_init.c | 141 ++++++++++++++++++++++++++++++++
6 files changed, 412 insertions(+)
diff --git a/src/cpu/amd/pi/00670F00/Kconfig b/src/cpu/amd/pi/00670F00/Kconfig
new file mode 100644
index 0000000..de74d3c
--- /dev/null
+++ b/src/cpu/amd/pi/00670F00/Kconfig
@@ -0,0 +1,52 @@
+#
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2015 Advanced Micro Devices, Inc.
+#
+# 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.
+#
+
+config CPU_AMD_PI_00660F01
+ bool
+ select PCI_IO_CFG_EXT
+ select X86_AMD_FIXED_MTRRS
+
+if CPU_AMD_PI_00660F01
+
+config CPU_ADDR_BITS
+ int
+ default 48
+
+config EXT_CONF_SUPPORT
+ bool
+ default n
+
+config CBB
+ hex
+ default 0x0
+
+config CDB
+ hex
+ default 0x18
+
+config XIP_ROM_SIZE
+ hex
+ default 0x100000
+
+config HAVE_INIT_TIMER
+ bool
+ default y
+
+config HIGH_SCRATCH_MEMORY_SIZE
+ hex
+ # Assume the maximum size of stack as (0xA0000 - 0x30000 + 0x1000)
+ default 0xA1000
+
+endif
diff --git a/src/cpu/amd/pi/00670F00/Makefile.inc b/src/cpu/amd/pi/00670F00/Makefile.inc
new file mode 100644
index 0000000..6c6a2b8
--- /dev/null
+++ b/src/cpu/amd/pi/00670F00/Makefile.inc
@@ -0,0 +1,27 @@
+#
+# This file is part of the coreboot project.
+#
+# Copyright (C) 2015 Advanced Micro Devices, Inc.
+#
+# 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-y += fixme.c
+ramstage-y += fixme.c
+ramstage-y += chip_name.c
+ramstage-y += model_15_init.c
+
+subdirs-y += ../../mtrr
+subdirs-y += ../../../x86/tsc
+subdirs-y += ../../../x86/lapic
+subdirs-y += ../../../x86/cache
+subdirs-y += ../../../x86/mtrr
+subdirs-y += ../../../x86/pae
+subdirs-y += ../../../x86/smm
diff --git a/src/cpu/amd/pi/00670F00/acpi/cpu.asl b/src/cpu/amd/pi/00670F00/acpi/cpu.asl
new file mode 100644
index 0000000..aae3287
--- /dev/null
+++ b/src/cpu/amd/pi/00670F00/acpi/cpu.asl
@@ -0,0 +1,78 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2013 Sage Electronic Engineering, LLC
+ *
+ * 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.
+ */
+
+/*
+ * Processor Object
+ *
+ */
+Scope (\_PR) { /* define processor scope */
+ Processor(
+ P000, /* name space name */
+ 0, /* Unique number for this processor */
+ 0x810, /* PBLK system I/O address !hardcoded! */
+ 0x06 /* PBLKLEN for boot processor */
+ ) {
+ }
+
+ Processor(
+ P001, /* name space name */
+ 1, /* Unique number for this processor */
+ 0x0810, /* PBLK system I/O address !hardcoded! */
+ 0x06 /* PBLKLEN for boot processor */
+ ) {
+ }
+ Processor(
+ P002, /* name space name */
+ 2, /* Unique number for this processor */
+ 0x0810, /* PBLK system I/O address !hardcoded! */
+ 0x06 /* PBLKLEN for boot processor */
+ ) {
+ }
+ Processor(
+ P003, /* name space name */
+ 3, /* Unique number for this processor */
+ 0x0810, /* PBLK system I/O address !hardcoded! */
+ 0x06 /* PBLKLEN for boot processor */
+ ) {
+ }
+ Processor(
+ P004, /* name space name */
+ 4, /* Unique number for this processor */
+ 0x0810, /* PBLK system I/O address !hardcoded! */
+ 0x06 /* PBLKLEN for boot processor */
+ ) {
+ }
+ Processor(
+ P005, /* name space name */
+ 5, /* Unique number for this processor */
+ 0x0810, /* PBLK system I/O address !hardcoded! */
+ 0x06 /* PBLKLEN for boot processor */
+ ) {
+ }
+ Processor(
+ P006, /* name space name */
+ 6, /* Unique number for this processor */
+ 0x0810, /* PBLK system I/O address !hardcoded! */
+ 0x06 /* PBLKLEN for boot processor */
+ ) {
+ }
+ Processor(
+ P007, /* name space name */
+ 7, /* Unique number for this processor */
+ 0x0810, /* PBLK system I/O address !hardcoded! */
+ 0x06 /* PBLKLEN for boot processor */
+ ) {
+ }
+} /* End _PR scope */
diff --git a/src/cpu/amd/pi/00670F00/chip_name.c b/src/cpu/amd/pi/00670F00/chip_name.c
new file mode 100644
index 0000000..ff2bc06
--- /dev/null
+++ b/src/cpu/amd/pi/00670F00/chip_name.c
@@ -0,0 +1,20 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2015 Advanced Micro Devices, Inc.
+ *
+ * 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>
+
+struct chip_operations cpu_amd_pi_00660F01_ops = {
+ CHIP_NAME("AMD CPU Family 15h")
+};
diff --git a/src/cpu/amd/pi/00670F00/fixme.c b/src/cpu/amd/pi/00670F00/fixme.c
new file mode 100644
index 0000000..9a38bd8
--- /dev/null
+++ b/src/cpu/amd/pi/00670F00/fixme.c
@@ -0,0 +1,94 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2011 - 2012 Advanced Micro Devices, Inc.
+ *
+ * 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 <cpu/x86/mtrr.h>
+#include <northbridge/amd/pi/agesawrapper.h>
+#include "amdlib.h"
+
+void amd_initcpuio(void)
+{
+ UINT64 MsrReg;
+ UINT32 PciData;
+ PCI_ADDR PciAddress;
+ AMD_CONFIG_PARAMS StdHeader;
+
+ /* Enable legacy video routing: D18F1xF4 VGA Enable */
+ PciAddress.AddressValue = MAKE_SBDFO (0, 0, 0x18, 1, 0xF4);
+ PciData = 1;
+ LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
+
+ /* The platform BIOS needs to ensure the memory ranges of SB800 legacy
+ * devices (TPM, HPET, BIOS RAM, Watchdog Timer, I/O APIC and ACPI) are
+ * set to non-posted regions.
+ */
+ PciAddress.AddressValue = MAKE_SBDFO (0, 0, 0x18, 1, 0x84);
+ PciData = 0x00FEDF00; /* last address before processor local APIC at FEE00000 */
+ PciData |= 1 << 7; /* set NP (non-posted) bit */
+ LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
+ PciAddress.AddressValue = MAKE_SBDFO (0, 0, 0x18, 1, 0x80);
+ PciData = (0xFED00000 >> 8) | 3; /* lowest NP address is HPET at FED00000 */
+ LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
+
+ /* Map the remaining PCI hole as posted MMIO */
+ PciAddress.AddressValue = MAKE_SBDFO (0, 0, 0x18, 1, 0x8C);
+ PciData = 0x00FECF00; /* last address before non-posted range */
+ LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
+ LibAmdMsrRead (0xC001001A, &MsrReg, &StdHeader);
+ MsrReg = (MsrReg >> 8) | 3;
+ PciAddress.AddressValue = MAKE_SBDFO (0, 0, 0x18, 1, 0x88);
+ PciData = (UINT32)MsrReg;
+ LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
+
+ /* Send all IO (0000-FFFF) to southbridge. */
+ PciAddress.AddressValue = MAKE_SBDFO (0, 0, 0x18, 1, 0xC4);
+ PciData = 0x0000F000;
+ LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
+ PciAddress.AddressValue = MAKE_SBDFO (0, 0, 0x18, 1, 0xC0);
+ PciData = 0x00000003;
+ LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
+}
+
+void amd_initmmio(void)
+{
+ UINT64 MsrReg;
+ UINT32 PciData;
+ PCI_ADDR PciAddress;
+ AMD_CONFIG_PARAMS StdHeader;
+
+ /*
+ Set the MMIO Configuration Base Address and Bus Range onto MMIO configuration base
+ Address MSR register.
+ */
+ MsrReg = CONFIG_MMCONF_BASE_ADDRESS | (LibAmdBitScanReverse (CONFIG_MMCONF_BUS_NUMBER) << 2) | 1;
+ LibAmdMsrWrite (0xC0010058, &MsrReg, &StdHeader);
+
+ /*
+ Set the NB_CFG MSR register. Enable CF8 extended configuration cycles.
+ */
+ LibAmdMsrRead (0xC001001F, &MsrReg, &StdHeader);
+ MsrReg = MsrReg | 0x0000400000000000;
+ LibAmdMsrWrite (0xC001001F, &MsrReg, &StdHeader);
+
+ /* For serial port */
+ PciData = 0xFF03FFD5;
+ PciAddress.AddressValue = MAKE_SBDFO (0, 0, 0x14, 0x3, 0x44);
+ LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
+
+ /* Set ROM cache onto WP to decrease post time */
+ MsrReg = (0x0100000000ull - CACHE_ROM_SIZE) | 5ull;
+ LibAmdMsrWrite (0x20C, &MsrReg, &StdHeader);
+ MsrReg = ((1ULL << CONFIG_CPU_ADDR_BITS) - CACHE_ROM_SIZE) | 0x800ull;
+ LibAmdMsrWrite (0x20D, &MsrReg, &StdHeader);
+}
diff --git a/src/cpu/amd/pi/00670F00/model_15_init.c b/src/cpu/amd/pi/00670F00/model_15_init.c
new file mode 100644
index 0000000..e252c3d
--- /dev/null
+++ b/src/cpu/amd/pi/00670F00/model_15_init.c
@@ -0,0 +1,141 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2015 Advanced Micro Devices, Inc.
+ *
+ * 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 <console/console.h>
+#include <cpu/x86/msr.h>
+#include <cpu/amd/mtrr.h>
+#include <device/device.h>
+#include <device/pci.h>
+#include <string.h>
+#include <cpu/x86/msr.h>
+#include <cpu/x86/pae.h>
+#include <pc80/mc146818rtc.h>
+#include <cpu/x86/lapic.h>
+
+#include <cpu/cpu.h>
+#include <cpu/x86/cache.h>
+#include <cpu/x86/mtrr.h>
+#include <cpu/amd/amdfam15.h>
+#include <arch/acpi.h>
+#include <cpu/amd/pi/s3_resume.h>
+
+#include <amdlib.h>
+#include <PspBaseLib.h>
+
+void PSPProgBar3Msr(void *Buffer);
+
+void PSPProgBar3Msr(void *Buffer)
+{
+ u32 Bar3Addr;
+ u64 Tmp64;
+ /* Get Bar3 Addr */
+ Bar3Addr = PspLibPciReadPspConfig (0x20);
+ Tmp64 = Bar3Addr;
+ printk(BIOS_DEBUG, "Bar3=%llx\n", Tmp64);
+ LibAmdMsrWrite (0xC00110A2, &Tmp64, NULL);
+ LibAmdMsrRead (0xC00110A2, &Tmp64, NULL);
+}
+
+static void model_15_init(device_t dev)
+{
+ printk(BIOS_DEBUG, "Model 15 Init.\n");
+
+ u8 i;
+ msr_t msr;
+ int msrno;
+#if CONFIG_LOGICAL_CPUS
+ u32 siblings;
+#endif
+
+ disable_cache ();
+ /* Enable access to AMD RdDram and WrDram extension bits */
+ msr = rdmsr(SYSCFG_MSR);
+ msr.lo |= SYSCFG_MSR_MtrrFixDramModEn;
+ msr.lo &= ~SYSCFG_MSR_MtrrFixDramEn;
+ wrmsr(SYSCFG_MSR, msr);
+
+ // BSP: make a0000-bffff UC, c0000-fffff WB
+ msr.lo = msr.hi = 0;
+ wrmsr (0x259, msr);
+ msr.lo = msr.hi = 0x1e1e1e1e;
+ wrmsr(0x250, msr);
+ wrmsr(0x258, msr);
+ for (msrno = 0x268; msrno <= 0x26f; msrno++)
+ wrmsr (msrno, msr);
+
+ msr = rdmsr(SYSCFG_MSR);
+ msr.lo &= ~SYSCFG_MSR_MtrrFixDramModEn;
+ msr.lo |= SYSCFG_MSR_MtrrFixDramEn;
+ wrmsr(SYSCFG_MSR, msr);
+
+ if (acpi_is_wakeup())
+ restore_mtrr();
+
+ x86_mtrr_check();
+ x86_enable_cache();
+
+ /* zero the machine check error status registers */
+ msr.lo = 0;
+ msr.hi = 0;
+ for (i = 0; i < 6; i++) {
+ wrmsr(MCI_STATUS + (i * 4), msr);
+ }
+
+
+ /* Enable the local CPU APICs */
+ setup_lapic();
+
+#if CONFIG_LOGICAL_CPUS
+ siblings = cpuid_ecx(0x80000008) & 0xff;
+
+ if (siblings > 0) {
+ msr = rdmsr_amd(CPU_ID_FEATURES_MSR);
+ msr.lo |= 1 << 28;
+ wrmsr_amd(CPU_ID_FEATURES_MSR, msr);
+
+ msr = rdmsr_amd(CPU_ID_EXT_FEATURES_MSR);
+ msr.hi |= 1 << (33 - 32);
+ wrmsr_amd(CPU_ID_EXT_FEATURES_MSR, msr);
+ }
+ printk(BIOS_DEBUG, "siblings = %02d, ", siblings);
+#endif
+ PSPProgBar3Msr(NULL);
+
+ /* DisableCf8ExtCfg */
+ msr = rdmsr(NB_CFG_MSR);
+ msr.hi &= ~(1 << (46 - 32));
+ wrmsr(NB_CFG_MSR, msr);
+
+
+ /* Write protect SMM space with SMMLOCK. */
+ msr = rdmsr(HWCR_MSR);
+ msr.lo |= (1 << 0);
+ wrmsr(HWCR_MSR, msr);
+}
+
+static struct device_operations cpu_dev_ops = {
+ .init = model_15_init,
+};
+
+static struct cpu_device_id cpu_table[] = {
+ { X86_VENDOR_AMD, 0x660f00 },
+ { X86_VENDOR_AMD, 0x660f01 },
+ { 0, 0 },
+};
+
+static const struct cpu_driver model_15 __cpu_driver = {
+ .ops = &cpu_dev_ops,
+ .id_table = cpu_table,
+};
Marc Jones (marc(a)marcjonesconsulting.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17141
-gerrit
commit 243170fb430813d0bc251b35d90ae40020354639
Author: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Date: Fri Oct 14 22:30:15 2016 -0400
pci_ids.h: Add ID for amd/00670F00 northbridge
Add the D18F0 device ID for the Stoney APU.
Original-Signed-off-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
(cherry picked from commit c0fd7f70527c273bcbdce5655a21ca4de4854428)
Change-Id: Ib599fc6119a3cef53f4f179c2fcd0e45905d81a4
Signed-off-by: Marc Jones <marcj303(a)gmail.com>
---
src/include/device/pci_ids.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/include/device/pci_ids.h b/src/include/device/pci_ids.h
index 72f1ece..cd0a66e 100644
--- a/src/include/device/pci_ids.h
+++ b/src/include/device/pci_ids.h
@@ -290,6 +290,7 @@
#define PCI_DEVICE_ID_AMD_16H_MODEL_000F_NB_HT 0x1536
#define PCI_DEVICE_ID_AMD_16H_MODEL_003F_NB_HT 0x1566
#define PCI_DEVICE_ID_AMD_15H_MODEL_006F_NB_HT 0x1570
+#define PCI_DEVICE_ID_AMD_15H_MODEL_707F_NB_HT 0x15B0
#define PCI_DEVICE_ID_AMD_10H_NB_HT 0x1200
#define PCI_DEVICE_ID_AMD_15H_NB_IOMMU 0x1419
#define PCI_DEVICE_ID_AMD_15H_MODEL_303F_NB_IOMMU 0x1423
Marc Jones (marc(a)marcjonesconsulting.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17143
-gerrit
commit 845a54b1a743dc0beb70e5ee598f837021bf67ac
Author: Marc Jones <marcj303(a)gmail.com>
Date: Tue Sep 20 20:30:17 2016 -0600
northbridge/amd: Update all names and IDs for 00670F00
Modify the new Stoney support files to match the APU's IDs and codename.
Original-Signed-off-by: Marc Jones <marcj303(a)gmail.com>
Original-Signed-off-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
(cherry picked from commit de626730758def76e558294762a06d8ec9950cb9)
Change-Id: Idc914bc80a27ac13426fdf00fc3f578ce072086f
Signed-off-by: Marc Jones <marcj303(a)gmail.com>
---
src/northbridge/amd/pi/00670F00/Kconfig | 10 +++++-----
src/northbridge/amd/pi/00670F00/chip.h | 6 +++---
src/northbridge/amd/pi/00670F00/dimmSpd.c | 4 ++--
src/northbridge/amd/pi/00670F00/northbridge.c | 12 ++++++------
src/northbridge/amd/pi/00670F00/northbridge.h | 6 +++---
src/northbridge/amd/pi/Kconfig | 3 ++-
src/northbridge/amd/pi/Makefile.inc | 3 ++-
7 files changed, 23 insertions(+), 21 deletions(-)
diff --git a/src/northbridge/amd/pi/00670F00/Kconfig b/src/northbridge/amd/pi/00670F00/Kconfig
index f5d234d..e349635 100644
--- a/src/northbridge/amd/pi/00670F00/Kconfig
+++ b/src/northbridge/amd/pi/00670F00/Kconfig
@@ -1,7 +1,7 @@
##
## This file is part of the coreboot project.
##
-## Copyright (C) 2015 Advanced Micro Devices, Inc.
+## Copyright (C) 2015 - 2016 Advanced Micro Devices, Inc.
##
## 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
@@ -12,11 +12,11 @@
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
-config NORTHBRIDGE_AMD_PI_00660F01
+config NORTHBRIDGE_AMD_PI_00670F00
bool
select MMCONF_SUPPORT
-if NORTHBRIDGE_AMD_PI_00660F01
+if NORTHBRIDGE_AMD_PI_00670F00
config HW_MEM_HOLE_SIZEK
hex
@@ -36,13 +36,13 @@ config MMCONF_BUS_NUMBER
config VGA_BIOS_ID
string
- default "1002,9870"
+ default "1002,98e4"
help
The default VGA BIOS PCI vendor/device ID should be set to the
result of the map_oprom_vendev() function in northbridge.c.
config VGA_BIOS_FILE
string
- default "3rdparty/blobs/northbridge/amd/00660F01/VBIOS.bin"
+ default "3rdparty/blobs/northbridge/amd/00670F00/VBIOS.bin"
endif
diff --git a/src/northbridge/amd/pi/00670F00/chip.h b/src/northbridge/amd/pi/00670F00/chip.h
index ab0e3d2..917bc65 100644
--- a/src/northbridge/amd/pi/00670F00/chip.h
+++ b/src/northbridge/amd/pi/00670F00/chip.h
@@ -13,10 +13,10 @@
* GNU General Public License for more details.
*/
-#ifndef _PI_FAM15CZ_CHIP_H_
-#define _PI_FAM15CZ_CHIP_H_
+#ifndef _PI_FAM15ST_CHIP_H_
+#define _PI_FAM15ST_CHIP_H_
-struct northbridge_amd_pi_00660F01_config
+struct northbridge_amd_pi_00670F00_config
{
u8 spdAddrLookup[2][2][4];
};
diff --git a/src/northbridge/amd/pi/00670F00/dimmSpd.c b/src/northbridge/amd/pi/00670F00/dimmSpd.c
index 5c81f36..e0d67d7 100644
--- a/src/northbridge/amd/pi/00670F00/dimmSpd.c
+++ b/src/northbridge/amd/pi/00670F00/dimmSpd.c
@@ -1,7 +1,7 @@
/*
* This file is part of the coreboot project.
*
- * Copyright (C) 2015 Advanced Micro Devices, Inc.
+ * Copyright (C) 2015 - 2016 Advanced Micro Devices, Inc.
*
* 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
@@ -28,7 +28,7 @@ AGESA_STATUS AmdMemoryReadSPD (UINT32 unused1, UINT32 unused2, AGESA_READ_SPD_PA
{
int spdAddress;
ROMSTAGE_CONST struct device *dev = dev_find_slot(0, PCI_DEVFN(0x18, 2));
- ROMSTAGE_CONST struct northbridge_amd_pi_00660F01_config *config = dev->chip_info;
+ ROMSTAGE_CONST struct northbridge_amd_pi_00670F00_config *config = dev->chip_info;
if ((dev == 0) || (config == 0))
return AGESA_ERROR;
diff --git a/src/northbridge/amd/pi/00670F00/northbridge.c b/src/northbridge/amd/pi/00670F00/northbridge.c
index 1caecf9..040b90c 100644
--- a/src/northbridge/amd/pi/00670F00/northbridge.c
+++ b/src/northbridge/amd/pi/00670F00/northbridge.c
@@ -1,7 +1,7 @@
/*
* This file is part of the coreboot project.
*
- * Copyright (C) 2015 Advanced Micro Devices, Inc.
+ * Copyright (C) 2015 -2016 Advanced Micro Devices, Inc.
*
* 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
@@ -582,7 +582,7 @@ static struct device_operations northbridge_operations = {
static const struct pci_driver family15_northbridge __pci_driver = {
.ops = &northbridge_operations,
.vendor = PCI_VENDOR_ID_AMD,
- .device = PCI_DEVICE_ID_AMD_15H_MODEL_006F_NB_HT,
+ .device = PCI_DEVICE_ID_AMD_15H_MODEL_707F_NB_HT,
};
static void fam15_finalize(void *chip_info)
@@ -600,7 +600,7 @@ static void fam15_finalize(void *chip_info)
pci_write_config32(dev, 0x60, value);
}
-struct chip_operations northbridge_amd_pi_00660F01_ops = {
+struct chip_operations northbridge_amd_pi_00670F00_ops = {
CHIP_NAME("AMD FAM15 Northbridge")
.enable_dev = 0,
.final = fam15_finalize,
@@ -1140,8 +1140,8 @@ static void root_complex_enable_dev(struct device *dev)
}
}
-struct chip_operations northbridge_amd_pi_00660F01_root_complex_ops = {
- CHIP_NAME("AMD FAM16 Root Complex")
+struct chip_operations northbridge_amd_pi_00670F00_root_complex_ops = {
+ CHIP_NAME("AMD FAM15 Root Complex")
.enable_dev = root_complex_enable_dev,
};
@@ -1152,7 +1152,7 @@ u32 map_oprom_vendev(u32 vendev)
{
u32 new_vendev;
new_vendev =
- ((0x10029870 <= vendev) && (vendev <= 0x1002987F)) ? 0x10029870 : vendev;
+ ((0x100298E0 <= vendev) && (vendev <= 0x100298EF)) ? 0x100298E0 : vendev;
if (vendev != new_vendev)
printk(BIOS_NOTICE, "Mapping PCI device %8x to %8x\n", vendev, new_vendev);
diff --git a/src/northbridge/amd/pi/00670F00/northbridge.h b/src/northbridge/amd/pi/00670F00/northbridge.h
index e095f9a..8ac116c 100644
--- a/src/northbridge/amd/pi/00670F00/northbridge.h
+++ b/src/northbridge/amd/pi/00670F00/northbridge.h
@@ -13,10 +13,10 @@
* GNU General Public License for more details.
*/
-#ifndef NORTHBRIDGE_AMD_AGESA_FAM16H_H
-#define NORTHBRIDGE_AMD_AGESA_FAM16H_H
+#ifndef NORTHBRIDGE_AMD_AGESA_FAM15H_H
+#define NORTHBRIDGE_AMD_AGESA_FAM15H_H
static struct device_operations pci_domain_ops;
static struct device_operations cpu_bus_ops;
-#endif /* NORTHBRIDGE_AMD_AGESA_FAM16H_H */
+#endif /* NORTHBRIDGE_AMD_AGESA_FAM15H_H */
diff --git a/src/northbridge/amd/pi/Kconfig b/src/northbridge/amd/pi/Kconfig
index cb72416..122b0e6 100644
--- a/src/northbridge/amd/pi/Kconfig
+++ b/src/northbridge/amd/pi/Kconfig
@@ -1,7 +1,7 @@
#
# This file is part of the coreboot project.
#
-# Copyright (C) 2011 - 2012 Advanced Micro Devices, Inc.
+# Copyright (C) 2011 - 2016 Advanced Micro Devices, Inc.
#
# 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
@@ -30,6 +30,7 @@ config S3_VGA_ROM_RUN
source src/northbridge/amd/pi/00630F01/Kconfig
source src/northbridge/amd/pi/00730F01/Kconfig
+source src/northbridge/amd/pi/00670F00/Kconfig
source src/northbridge/amd/pi/00660F01/Kconfig
config HW_MEM_HOLE_SIZEK
diff --git a/src/northbridge/amd/pi/Makefile.inc b/src/northbridge/amd/pi/Makefile.inc
index 5c2d8e0..09bc2ad 100644
--- a/src/northbridge/amd/pi/Makefile.inc
+++ b/src/northbridge/amd/pi/Makefile.inc
@@ -1,7 +1,7 @@
#
# This file is part of the coreboot project.
#
-# Copyright (C) 2011 - 2012 Advanced Micro Devices, Inc.
+# Copyright (C) 2011 - 2016 Advanced Micro Devices, Inc.
#
# 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
@@ -17,6 +17,7 @@ ifeq ($(CONFIG_NORTHBRIDGE_AMD_PI),y)
subdirs-$(CONFIG_NORTHBRIDGE_AMD_PI_00630F01) += 00630F01
subdirs-$(CONFIG_NORTHBRIDGE_AMD_PI_00730F01) += 00730F01
+subdirs-$(CONFIG_NORTHBRIDGE_AMD_PI_00670F00) += 00670F00
subdirs-$(CONFIG_NORTHBRIDGE_AMD_PI_00660F01) += 00660F01
romstage-y += agesawrapper.c
Marc Jones (marc(a)marcjonesconsulting.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17145
-gerrit
commit a6e7c897a415188d9b65dbd2b05f48f8c0c89f3d
Author: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Date: Sat Oct 8 09:12:27 2016 -0600
northbridge/amd: Modify 00670F00 chip.h to match DCT
The Stoney device supports only a single channel of DRAM with
two DIMMs. Correct the dimmensions of the SPD lookup array.
Original-Signed-off-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Original-Reviewed-by: <marcj303(a)gmail.com>
(cherry picked from commit 54a5e4a7092b77cca90894e86387f719fa3aa2c8)
Change-Id: Ib776133e411d483bb5b7e3c070199befc631d209
Signed-off-by: Marc Jones <marcj303(a)gmail.com>
---
src/northbridge/amd/pi/00670F00/chip.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/northbridge/amd/pi/00670F00/chip.h b/src/northbridge/amd/pi/00670F00/chip.h
index 917bc65..d11d7a4 100644
--- a/src/northbridge/amd/pi/00670F00/chip.h
+++ b/src/northbridge/amd/pi/00670F00/chip.h
@@ -2,6 +2,7 @@
* This file is part of the coreboot project.
*
* Copyright (C) 2013 Sage Electronic Engineering, LLC
+ * Copyright (C) 2016 Advanced Micro Devices, Inc.
*
* 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
@@ -18,7 +19,7 @@
struct northbridge_amd_pi_00670F00_config
{
- u8 spdAddrLookup[2][2][4];
+ u8 spdAddrLookup[1][1][2];
};
#endif