summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2013-10-03 20:07:40 (GMT)
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2013-10-04 17:35:37 (GMT)
commit69bd775003fc65bb6f30d8804847373a865e5e70 (patch)
treeaa25d0be876397b3af62f489adb13f574cc99c9f
parent970882a3a3668389ac11003fe3c110e46b40299a (diff)
downloaddepthcharge-factory-samus-4788.B.tar.gz
depthcharge-factory-samus-4788.B.tar.xz
samus: Add board configurationfactory-samus-4788.B
BUG=chrome-os-partner:22996 BRANCH=samus TEST=emerge-samus depthcharge Change-Id: I5d085dd061b82cc5a0243a484ade9ff4ad2b7f00 Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/171679 Reviewed-by: Gabe Black <gabeblack@chromium.org>
-rw-r--r--board/samus/defconfig33
-rw-r--r--board/samus/fmap.dts314
-rw-r--r--src/board/Kconfig5
-rw-r--r--src/board/Makefile.inc1
-rw-r--r--src/board/samus/Kconfig17
-rw-r--r--src/board/samus/Makefile.inc20
-rw-r--r--src/board/samus/board.c72
7 files changed, 462 insertions, 0 deletions
diff --git a/board/samus/defconfig b/board/samus/defconfig
new file mode 100644
index 0000000..0b4f0d2
--- /dev/null
+++ b/board/samus/defconfig
@@ -0,0 +1,33 @@
+# Arch
+CONFIG_ARCH_X86=y
+
+# Board
+CONFIG_BOARD_SAMUS=y
+
+# Image
+CONFIG_FMAP_OFFSET=0x610000
+
+# Vboot
+CONFIG_EC_SOFTWARE_SYNC=y
+CONFIG_OPROM_MATTERS=y
+CONFIG_RO_NORMAL_SUPPORT=y
+CONFIG_VIRTUAL_DEV_SWITCH=y
+
+CONFIG_CROSSYSTEM_ACPI=y
+CONFIG_NV_STORAGE_CMOS=y
+
+# Kernel format
+CONFIG_KERNEL_ZIMAGE=y
+
+# Drivers
+CONFIG_DRIVER_AHCI=y
+CONFIG_DRIVER_EC_CROS=y
+CONFIG_DRIVER_EC_CROS_LPC=y
+CONFIG_DRIVER_FLASH_MEMMAPPED=y
+CONFIG_DRIVER_GPIO_LYNXPOINT_LP=y
+CONFIG_DRIVER_INPUT_PS2=y
+CONFIG_DRIVER_INPUT_USB=y
+CONFIG_DRIVER_LYNXPOINT_NO_EHCI=y
+CONFIG_DRIVER_NET_ASIX=y
+CONFIG_DRIVER_POWER_PCH=y
+CONFIG_DRIVER_TPM_LPC=y
diff --git a/board/samus/fmap.dts b/board/samus/fmap.dts
new file mode 100644
index 0000000..0ad80fc
--- /dev/null
+++ b/board/samus/fmap.dts
@@ -0,0 +1,314 @@
+/dts-v1/;
+
+/ {
+ model = "Google Samus";
+ config {
+ hwid = "X86 SAMUS TEST 2567";
+ };
+ chromeos-config {
+ /* Enable factory-friendly features. */
+ gbb-flag-dev-screen-short-delay;
+ gbb-flag-force-dev-switch-on;
+ gbb-flag-force-dev-boot-usb;
+ gbb-flag-disable-fw-rollback-check;
+ };
+ flash@ff800000 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "chromeos,flashmap";
+ reg = <0xff800000 0x00800000>;
+
+ /*
+ * Non-BIOS section of the Intel Firmware Descriptor image.
+ * This section covers the all the parts that are not shown
+ * to the CPU right below 4G.
+ */
+ si-all {
+ label = "si-all";
+ reg = <0x00000000 0x00200000>;
+ type = "ifd";
+ };
+
+ /*
+ * Firmware Descriptor section of the Intel Firmware Descriptor
+ * image.
+ */
+ si-desc {
+ label = "si-desc";
+ reg = <0x00000000 0x00001000>;
+ };
+
+ /*
+ * Intel Management Engine section of the Intel Firmware
+ * Descriptor image.
+ */
+ si-me {
+ label = "si-me";
+ reg = <0x00001000 0x001ff000>;
+ };
+
+ /*
+ * "BIOS" section of the Intel Firmware Descriptor image.
+ * This section covers the complete image as shown to the
+ * CPU right below 4G.
+ */
+ si-bios {
+ label ="si-bios";
+ reg = <0x00200000 0x00600000>;
+ };
+
+ /* ---- Section: Rewritable slot A ---- */
+ rw-a {
+ label = "rw-section-a";
+ /* Alignment: 4k (for updating) */
+ reg = <0x00200000 0x000f0000>;
+ };
+ rw-a-vblock {
+ label = "vblock-a";
+ /*
+ * Alignment: 4k (for updating) and must be in start of
+ * each RW_SECTION.
+ */
+ reg = <0x00200000 0x00010000>;
+ type = "keyblock boot,ecrwhash,ramstage";
+ with_index;
+ keyblock = "firmware.keyblock";
+ signprivate = "firmware_data_key.vbprivk";
+ version = <1>;
+ kernelkey = "kernel_subkey.vbpubk";
+ preamble-flags = <0>;
+ };
+ rw-a-boot {
+ /* Alignment: no requirement (yet). */
+ label = "fw-main-a";
+ reg = <0x00210000 0x000c0000>;
+ type = "blob boot,ecrwhash,ramstage";
+ with_index;
+ };
+ rw-a-ec-boot {
+ label = "ec-main-a";
+ type = "blob ecbin";
+ reg = <0x002d0000 0x0001ffc0>;
+ with_index;
+ };
+ rw-a-firmware-id {
+ /* Alignment: no requirement. */
+ label = "rw-fwid-a";
+ reg = <0x002effc0 0x00000040>;
+ read-only;
+ type = "blobstring fwid";
+ };
+
+ /* ---- Section: Rewritable slot B ---- */
+ rw-b {
+ label = "rw-section-b";
+ /* Alignment: 4k (for updating) */
+ reg = <0x002f0000 0x000f0000>;
+ };
+ rw-b-vblock {
+ label = "vblock-b";
+ /*
+ * Alignment: 4k (for updating) and must be in start of
+ * each RW_SECTION.
+ */
+ reg = <0x002f0000 0x00010000>;
+ type = "keyblock boot,ecrwhash,ramstage";
+ with_index;
+ keyblock = "firmware.keyblock";
+ signprivate = "firmware_data_key.vbprivk";
+ version = <1>;
+ kernelkey = "kernel_subkey.vbpubk";
+ preamble-flags = <0>;
+ };
+ rw-b-boot {
+ label = "fw-main-b";
+ /* Alignment: no requirement (yet). */
+ reg = <0x00300000 0x000c0000>;
+ type = "blob boot,ecrwhash,ramstage";
+ with_index;
+ };
+ rw-b-ec-boot {
+ label = "ec-main-b";
+ type = "blob ecbin";
+ reg = <0x003c0000 0x0001ffc0>;
+ with_index;
+ };
+ rw-b-firmware-id {
+ label = "rw-fwid-b";
+ /* Alignment: no requirement. */
+ reg = <0x003dffc0 0x00000040>;
+ read-only;
+ type = "blobstring fwid";
+ };
+
+ /* ---- Section: Rewritable MRC cache 64KB ---- */
+ rw-mrc-cache {
+ label = "rw-mrc-cache";
+ /* Alignment: 4k (for updating) */
+ reg = <0x003e0000 0x00010000>;
+ type = "wiped";
+ wipe-value = [ff];
+ };
+
+ /* ---- Section: Rewritable Event Log 16KB ---- */
+ rw-elog {
+ label = "rw-elog";
+ /* Alignment: 4k (for updating) */
+ reg = <0x003f0000 0x00004000>;
+ type = "wiped";
+ wipe-value = [ff];
+ };
+
+ /* ---- Section: Rewritable shared 16 KB---- */
+ shared-section {
+ /*
+ * Alignment: 4k (for updating).
+ * Anything in this range may be updated in recovery.
+ */
+ label = "rw-shared";
+ reg = <0x003f4000 0x00004000>;
+ };
+ shared-data {
+ label = "shared-data";
+ /*
+ * Alignment: 4k (for random read/write).
+ * RW firmware can put calibration data here.
+ */
+ reg = <0x003f4000 0x00002000>;
+ type = "wiped";
+ wipe-value = [00];
+ };
+
+ rw-vblock-dev {
+ label = "vblock-dev";
+ /*
+ * Alignment: 4k (for random read/write).
+ * Reserve space for an optional user-installed
+ * vblock to validate dev-mode kernels.
+ * See crosbug.com/p/11216.
+ */
+ reg = <0x003f6000 0x00002000>;
+ type = "wiped";
+ wipe-value = [ff];
+ };
+
+ /* ---- Section: Rewritable private 16 KB---- */
+
+ /* ---- Section: Rewritable VPD 8 KB ---- */
+ rw-vpd {
+ label = "rw-vpd";
+ /* Alignment: 4k (for updating) */
+ reg = <0x003f8000 0x00002000>;
+ type = "wiped";
+ wipe-value = [ff];
+ };
+
+ /*
+ * This space is currently unused and reserved for future
+ * extensions. cros_bundle_firmware dislikes holes in the
+ * FMAP, so we cover all empty space here.
+ */
+ rw-unused {
+ label = "rw-unused";
+ reg = <0x003fa000 0x00006000>;
+ type = "wiped";
+ wipe-value = [ff];
+ };
+
+ rw-legacy {
+ label = "rw-legacy";
+ reg = <0x00400000 0x00200000>;
+ type = "blob legacy";
+ read-only;
+ };
+
+ /*
+ * This describes the portion of the image that will be
+ * write-protected in the factory.
+ */
+ wp-ro {
+ label = "wp-ro";
+ reg = <0x00600000 0x00200000>;
+ read-only;
+ };
+
+ /* ---- Section: Vital-product data (VPD) ---- */
+ ro-vpd {
+ label = "ro-vpd";
+
+ /* VPD offset must be aligned to 4K bytes */
+ reg = <0x00600000 0x00004000>;
+ read-only;
+ type = "wiped";
+ wipe-value = [ff];
+ };
+
+ /*
+ * This space is currently unused and reserved for future
+ * extensions. cros_bundle_firmware dislikes holes in the
+ * FMAP, so we cover all empty space here.
+ */
+ ro-unused {
+ label = "ro-unused";
+ reg = <0x00604000 0x0000c000>;
+ type = "wiped";
+ wipe-value = [ff];
+ };
+
+ /* ---- Section: Read-only ---- */
+ ro-section {
+ label = "ro-section";
+ reg = <0x00610000 0x001f0000>;
+ read-only;
+ };
+ ro-fmap {
+ label = "fmap";
+
+ /*
+ * We encourage to align FMAP partition in as large
+ * block as possible so that flashrom can find it soon.
+ * For example, aligning to 512KB is better than to
+ * 256KB.
+ */
+
+ reg = <0x00610000 0x00000800>;
+ read-only;
+ type = "fmap";
+ ver-major = <1>;
+ ver-minor = <0>;
+ };
+ ro-firmware-id {
+ label = "ro-frid";
+ reg = <0x00610800 0x00000040>;
+ read-only;
+ type = "blobstring fwid";
+ };
+
+ /*
+ * Padding after FRID so the next section is 4K aligned. This
+ * is only needed to avoid gaps in the FMAP and to keep the
+ * next section aligned; FRID itself doesn't care.
+ */
+ ro-firmware-id-pad {
+ label = "ro-frid-pad";
+ reg = <0x00610840 0x000007c0>;
+ type = "wiped";
+ wipe-value = [ff];
+ };
+ ro-gbb {
+ label = "gbb";
+
+ /* GBB offset must be aligned to 4K bytes */
+ reg = <0x00611000 0x000ef000>;
+ read-only;
+ type = "blob gbb";
+ };
+ ro-boot {
+ label = "boot-stub";
+ reg = <0x00700000 0x00100000>; /* 1 MB */
+ read-only;
+ type = "blob coreboot";
+ required;
+ };
+ };
+};
diff --git a/src/board/Kconfig b/src/board/Kconfig
index 6a922f6..0034888 100644
--- a/src/board/Kconfig
+++ b/src/board/Kconfig
@@ -46,6 +46,8 @@ config BOARD_PEACH_PIT
bool "peach pit"
config BOARD_PEPPY
bool "peppy"
+config BOARD_SAMUS
+ bool "samus"
config BOARD_SLIPPY
bool "slippy"
@@ -90,6 +92,9 @@ endif
if BOARD_PEPPY
source src/board/peppy/Kconfig
endif
+if BOARD_SAMUS
+source src/board/samus/Kconfig
+endif
if BOARD_SLIPPY
source src/board/slippy/Kconfig
endif
diff --git a/src/board/Makefile.inc b/src/board/Makefile.inc
index a5cbe69..44afcc5 100644
--- a/src/board/Makefile.inc
+++ b/src/board/Makefile.inc
@@ -30,4 +30,5 @@ subdirs-$(CONFIG_BOARD_NYAN) += nyan
subdirs-$(CONFIG_BOARD_PEACH_KIRBY) += peach_kirby
subdirs-$(CONFIG_BOARD_PEACH_PIT) += peach_pit
subdirs-$(CONFIG_BOARD_PEPPY) += peppy
+subdirs-$(CONFIG_BOARD_SAMUS) += samus
subdirs-$(CONFIG_BOARD_SLIPPY) += slippy
diff --git a/src/board/samus/Kconfig b/src/board/samus/Kconfig
new file mode 100644
index 0000000..82c5df5
--- /dev/null
+++ b/src/board/samus/Kconfig
@@ -0,0 +1,17 @@
+## This file is part of the coreboot project.
+##
+## Copyright 2013 Google Inc. All rights reserved.
+##
+## 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.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
diff --git a/src/board/samus/Makefile.inc b/src/board/samus/Makefile.inc
new file mode 100644
index 0000000..29d640d
--- /dev/null
+++ b/src/board/samus/Makefile.inc
@@ -0,0 +1,20 @@
+##
+## This file is part of the depthcharge project.
+##
+## Copyright 2013 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.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+depthcharge-y += board.c
diff --git a/src/board/samus/board.c b/src/board/samus/board.c
new file mode 100644
index 0000000..0fed23b
--- /dev/null
+++ b/src/board/samus/board.c
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2013 Google Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <pci.h>
+
+#include "base/init_funcs.h"
+#include "base/list.h"
+#include "drivers/ec/cros/lpc.h"
+#include "drivers/flash/flash.h"
+#include "drivers/flash/memmapped.h"
+#include "drivers/gpio/lynxpoint_lp.h"
+#include "drivers/gpio/sysinfo.h"
+#include "drivers/power/pch.h"
+#include "drivers/storage/ahci.h"
+#include "drivers/storage/blockdev.h"
+#include "drivers/tpm/lpc.h"
+#include "drivers/tpm/tpm.h"
+#include "vboot/util/flag.h"
+
+static int board_setup(void)
+{
+ if (sysinfo_install_flags())
+ return 1;
+
+ LpPchGpio *ec_in_rw = new_lp_pch_gpio_input(25);
+ if (!ec_in_rw || flag_install(FLAG_ECINRW, &ec_in_rw->ops))
+ return 1;
+
+ CrosEcLpcBus *cros_ec_lpc_bus = new_cros_ec_lpc_bus();
+ if (!cros_ec_lpc_bus)
+ return 1;
+ cros_ec_set_bus(&cros_ec_lpc_bus->ops);
+
+ MemMappedFlash *flash = new_mem_mapped_flash(0xff800000, 0x800000);
+ if (!flash || flash_set_ops(&flash->ops))
+ return 1;
+
+ AhciCtrlr *ahci = new_ahci_ctrlr(PCI_DEV(0, 31, 2));
+ if (!ahci)
+ return 1;
+ list_insert_after(&ahci->ctrlr.list_node, &fixed_block_dev_controllers);
+
+ if (power_set_ops(&pch_power_ops))
+ return 1;
+
+ LpcTpm *tpm = new_lpc_tpm((void *)(uintptr_t)0xfed40000);
+ if (!tpm || tpm_set_ops(&tpm->ops))
+ return 1;
+
+ return 0;
+}
+
+INIT_FUNC(board_setup);