David Hendricks (dhendrix(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14523
-gerrit
commit b307f755b38bfcd7b1d39b716d6f5d0aabea18ef
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Tue Apr 26 14:07:42 2016 -0700
board_status: Allow for parsing longopts
This converts the argument parsing to allow us to add longopts so
that we can keep the shortopts to relatively generic script behavior.
Longopts can be used for tweaking specific behaviors. For example, we
might wish to change SSH port, timeout, and authentication parameters
with "--ssh-port", "--ssh-timeout", "--ssh-identity", etc.
This is virtuall untested, it would be nice if someone else can
hijack this patch to test and clean it up where necessary.
Change-Id: Idee5579079dbbb7296ad98f5d6025b01aab55452
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
---
util/board_status/board_status.sh | 42 +++++++++++++++++++++++++++------------
1 file changed, 29 insertions(+), 13 deletions(-)
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index b315be1..0bb0864 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -188,31 +188,47 @@ Options
"
}
-while getopts "Chi:r:s:S:u" opt; do
- case "$opt" in
- h)
+# TODO: add longopts in the quotes after -l
+ARGS=$(getopt -o Chi:r:s:S:u -l "" -n "$0" -- "$@");
+if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
+eval set -- "$ARGS"
+while true ; do
+ case "$1" in
+ -h)
show_help
exit $EXIT_SUCCESS
;;
- C)
+ -C)
CLOBBER_OUTPUT=1
;;
- i)
- COREBOOT_IMAGE="$OPTARG"
+ -i)
+ shift
+ COREBOOT_IMAGE="$1"
;;
- r)
- REMOTE_HOST="$OPTARG"
+ -r)
+ shift
+ REMOTE_HOST="$1"
;;
- s)
- SERIAL_DEVICE="$OPTARG"
+ -s)
+ shift
+ SERIAL_DEVICE="$1"
;;
- S)
- SERIAL_PORT_SPEED="$OPTARG"
+ -S)
+ shift
+ SERIAL_PORT_SPEED="$1"
;;
- u)
+ -u)
UPLOAD_RESULTS=1
;;
+ --)
+ shift
+ break
+ ;;
+ *)
+ echo "error processing options"
+ exit $EXIT_FAILURE
esac
+ shift
done
grep -rH 'coreboot.org' .git/config >/dev/null 2>&1
Jonathan Neuschäfer (j.neuschaefer(a)gmx.net) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14526
-gerrit
commit 858fa2404ecf7a571142824d8611b26e960fb3b4
Author: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
Date: Wed Apr 27 04:13:33 2016 +0200
payloads/nvramcui: Make the makefile non-executable
Change-Id: Id584cbf02c9d3ecb89fcf2a3190f0a73816954a8
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer(a)gmx.net>
---
payloads/nvramcui/Makefile | 0
1 file changed, 0 insertions(+), 0 deletions(-)
diff --git a/payloads/nvramcui/Makefile b/payloads/nvramcui/Makefile
old mode 100755
new mode 100644
Andrey Petrov (andrey.petrov(a)intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14471
-gerrit
commit b0e71a8f39d88c60da75257550a1fd97951a119c
Author: Lance Zhao <lijian.zhao(a)intel.com>
Date: Tue Apr 19 18:04:21 2016 -0700
soc/intel/apollolake: Add handling of GNVS ACPI entry fo CHROMES builds
Add chromeos required GNVS feature. The GNVS table stays in both CBMEM
and ACPI DSDT tables.
Change-Id: I4db0eb18d2de62917a94704318a7896c04e4777f
Signed-off-by: Andrey Petrov <andrey.petrov(a)intel.com>
---
src/soc/intel/apollolake/acpi.c | 29 ++++++++++++++++++++++
src/soc/intel/apollolake/acpi/globalnvs.asl | 35 +++++++++++++++++++++++++++
src/soc/intel/apollolake/chip.c | 6 +++++
src/soc/intel/apollolake/include/soc/acpi.h | 2 ++
src/soc/intel/apollolake/include/soc/nvs.h | 37 +++++++++++++++++++++++++++++
src/soc/intel/apollolake/lpc.c | 1 +
6 files changed, 110 insertions(+)
diff --git a/src/soc/intel/apollolake/acpi.c b/src/soc/intel/apollolake/acpi.c
index 7d28313..a5d1dfa 100644
--- a/src/soc/intel/apollolake/acpi.c
+++ b/src/soc/intel/apollolake/acpi.c
@@ -16,12 +16,15 @@
*/
#include <arch/acpi.h>
+#include <arch/acpigen.h>
#include <arch/ioapic.h>
#include <arch/smp/mpspec.h>
+#include <cbmem.h>
#include <cpu/x86/smm.h>
#include <soc/acpi.h>
#include <soc/iomap.h>
#include <soc/pm.h>
+#include <soc/nvs.h>
unsigned long acpi_fill_mcfg(unsigned long current)
{
@@ -125,3 +128,29 @@ unsigned long southbridge_write_acpi_tables(device_t device,
{
return acpi_write_hpet(device, current, rsdp);
}
+
+static void acpi_create_gnvs(struct global_nvs_t *gnvs)
+{
+ if (IS_ENABLED(CONFIG_CHROMEOS)) {
+ /* Initialize Verified Boot data */
+ chromeos_init_vboot(&gnvs->chromeos);
+ gnvs->chromeos.vbt2 = ACTIVE_ECFW_RO;
+ }
+}
+
+void southbridge_inject_dsdt(device_t device)
+{
+ struct global_nvs_t *gnvs;
+
+ gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS);
+
+ if (gnvs) {
+ acpi_create_gnvs(gnvs);
+ acpi_save_gnvs((uintptr_t)gnvs);
+
+ /* Add it to DSDT. */
+ acpigen_write_scope("\\");
+ acpigen_write_name_dword("NVSA", (uintptr_t)gnvs);
+ acpigen_pop_len();
+ }
+}
diff --git a/src/soc/intel/apollolake/acpi/globalnvs.asl b/src/soc/intel/apollolake/acpi/globalnvs.asl
new file mode 100644
index 0000000..2ef5031
--- /dev/null
+++ b/src/soc/intel/apollolake/acpi/globalnvs.asl
@@ -0,0 +1,35 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 Intel Corp.
+ * (Written by Alexandru Gagniuc <alexandrux.gagniuc(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.
+ *
+ * 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.
+ */
+
+/*
+ * NOTE: The layout of the GNVS structure below must match the layout in
+ * soc/intel/apollolake/include/soc/nvs.h !!!
+ *
+ */
+
+External (NVSA)
+
+OperationRegion (GNVS, SystemMemory, NVSA, 0x1000)
+Field (GNVS, ByteAcc, NoLock, Preserve)
+{
+ /* Nothing here yet, folks */
+ Offset (0x00),
+
+ /* ChromeOS stuff (0x100 -> 0xfff, size 0xeff) */
+ Offset (0x100),
+ #include <vendorcode/google/chromeos/acpi/gnvs.asl>
+}
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c
index d2a1e0d..6e0a90f 100644
--- a/src/soc/intel/apollolake/chip.c
+++ b/src/soc/intel/apollolake/chip.c
@@ -17,6 +17,7 @@
*/
#include <bootstate.h>
+#include <cbmem.h>
#include <console/console.h>
#include <cpu/cpu.h>
#include <device/device.h>
@@ -26,6 +27,7 @@
#include <memrange.h>
#include <soc/iomap.h>
#include <soc/cpu.h>
+#include <soc/nvs.h>
#include <soc/pci_devs.h>
#include "chip.h"
@@ -65,11 +67,15 @@ static void enable_dev(device_t dev)
static void soc_init(void *data)
{
struct range_entry range;
+ struct global_nvs_t *gnvs;
/* TODO: tigten this resource range */
/* TODO: fix for S3 resume, as this would corrupt OS memory */
range_entry_init(&range, 0x200000, 4ULL*GiB, 0);
fsp_silicon_init(&range);
+
+ /* Allocate ACPI NVS in CBMEM */
+ gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(*gnvs));
}
void platform_fsp_silicon_init_params_cb(struct FSPS_UPD *silupd)
diff --git a/src/soc/intel/apollolake/include/soc/acpi.h b/src/soc/intel/apollolake/include/soc/acpi.h
index 2d20805..3605cc3 100644
--- a/src/soc/intel/apollolake/include/soc/acpi.h
+++ b/src/soc/intel/apollolake/include/soc/acpi.h
@@ -25,4 +25,6 @@ void soc_fill_common_fadt(acpi_fadt_t * fadt);
unsigned long southbridge_write_acpi_tables(device_t device,
unsigned long current, struct acpi_rsdp *rsdp);
+void southbridge_inject_dsdt(device_t device);
+
#endif /* _SOC_APOLLOLAKE_ACPI_H_ */
diff --git a/src/soc/intel/apollolake/include/soc/nvs.h b/src/soc/intel/apollolake/include/soc/nvs.h
new file mode 100644
index 0000000..8b3a3af
--- /dev/null
+++ b/src/soc/intel/apollolake/include/soc/nvs.h
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * NOTE: The layout of the global_nvs_t structure below must match the layout
+ * in soc/intel/apollolake/acpi/globalnvs.asl !!!
+ *
+ */
+
+#ifndef _SOC_APOLLOLAKE_NVS_H_
+#define _SOC_APOLLOLAKE_NVS_H_
+
+#include <vendorcode/google/chromeos/gnvs.h>
+
+struct global_nvs_t {
+ /* Miscellaneous */
+ uint8_t unused[256];
+
+ /* ChromeOS specific (0x100 - 0xfff) */
+ chromeos_acpi_t chromeos;
+} __attribute__((packed));
+
+#endif /* _SOC_APOLLOLAKE_NVS_H_ */
diff --git a/src/soc/intel/apollolake/lpc.c b/src/soc/intel/apollolake/lpc.c
index 6e366e0..06ca0db 100644
--- a/src/soc/intel/apollolake/lpc.c
+++ b/src/soc/intel/apollolake/lpc.c
@@ -86,6 +86,7 @@ static struct device_operations device_ops = {
.set_resources = &pci_dev_set_resources,
.enable_resources = &pci_dev_enable_resources,
.write_acpi_tables = southbridge_write_acpi_tables,
+ .acpi_inject_dsdt_generator = southbridge_inject_dsdt,
.init = &lpc_init
};
David Hendricks (dhendrix(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14523
-gerrit
commit df71ca282339b97bfab99b0b130aaeb4e879328c
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Tue Apr 26 14:07:42 2016 -0700
board_status: Allow for parsing longopts
This converts the argument parsing to allow us to add longopts so
that we can keep the shortopts to relatively generic script behavior.
Longopts can be used for tweaking specific behaviors. For example, we
might wish to change SSH port, timeout, and authentication parameters
with "--ssh-port", "--ssh-timeout", "--ssh-identity", etc.
This is virtually untested. It would be nice if someone else can
hijack this patch to test and clean it up where necessary.
Change-Id: Idee5579079dbbb7296ad98f5d6025b01aab55452
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
---
util/board_status/board_status.sh | 41 ++++++++++++++++++++++++++-------------
1 file changed, 28 insertions(+), 13 deletions(-)
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index b315be1..4807ce7 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -188,30 +188,45 @@ Options
"
}
-while getopts "Chi:r:s:S:u" opt; do
- case "$opt" in
- h)
+# TODO: add longopts in the quotes after -l
+ARGS=$(getopt -o Chi:r:s:S:u -l "" -n "$0" -- "$@");
+if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
+eval set -- "$ARGS"
+while true ; do
+ case "$1" in
+ -h)
show_help
exit $EXIT_SUCCESS
;;
- C)
+ -C)
CLOBBER_OUTPUT=1
;;
- i)
- COREBOOT_IMAGE="$OPTARG"
+ -i)
+ shift
+ COREBOOT_IMAGE="$1"
;;
- r)
- REMOTE_HOST="$OPTARG"
+ -r)
+ shift
+ REMOTE_HOST="$1"
;;
- s)
- SERIAL_DEVICE="$OPTARG"
+ -s)
+ shift
+ SERIAL_DEVICE="$1"
;;
- S)
- SERIAL_PORT_SPEED="$OPTARG"
+ -S)
+ shift
+ SERIAL_PORT_SPEED="$1"
;;
- u)
+ -u)
UPLOAD_RESULTS=1
;;
+ --)
+ shift
+ break
+ ;;
+ *)
+ echo "error processing options"
+ exit $EXIT_FAILURE
esac
done
David Hendricks (dhendrix(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14523
-gerrit
commit 0262bd8f6de1d98d203573a45643608b79d59f12
Author: David Hendricks <dhendrix(a)chromium.org>
Date: Tue Apr 26 14:07:42 2016 -0700
board_status: Allow for parsing longopts
This converts the argument parsing to allow us to add longopts so
that we can keep the shortopts to relatively generic script behavior.
Longopts can be used for tweaking specific behaviors. For example, we
might wish to change SSH port, timeout, and authentication parameters
with "--ssh-port", "--ssh-timeout", "--ssh-identity", etc.
This is virtuall untested, it would be nice if someone else can
hijack this patch to test and clean it up where necessary.
Change-Id: Idee5579079dbbb7296ad98f5d6025b01aab55452
Signed-off-by: David Hendricks <dhendrix(a)chromium.org>
---
util/board_status/board_status.sh | 41 ++++++++++++++++++++++++++-------------
1 file changed, 28 insertions(+), 13 deletions(-)
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index b315be1..4807ce7 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -188,30 +188,45 @@ Options
"
}
-while getopts "Chi:r:s:S:u" opt; do
- case "$opt" in
- h)
+# TODO: add longopts in the quotes after -l
+ARGS=$(getopt -o Chi:r:s:S:u -l "" -n "$0" -- "$@");
+if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi
+eval set -- "$ARGS"
+while true ; do
+ case "$1" in
+ -h)
show_help
exit $EXIT_SUCCESS
;;
- C)
+ -C)
CLOBBER_OUTPUT=1
;;
- i)
- COREBOOT_IMAGE="$OPTARG"
+ -i)
+ shift
+ COREBOOT_IMAGE="$1"
;;
- r)
- REMOTE_HOST="$OPTARG"
+ -r)
+ shift
+ REMOTE_HOST="$1"
;;
- s)
- SERIAL_DEVICE="$OPTARG"
+ -s)
+ shift
+ SERIAL_DEVICE="$1"
;;
- S)
- SERIAL_PORT_SPEED="$OPTARG"
+ -S)
+ shift
+ SERIAL_PORT_SPEED="$1"
;;
- u)
+ -u)
UPLOAD_RESULTS=1
;;
+ --)
+ shift
+ break
+ ;;
+ *)
+ echo "error processing options"
+ exit $EXIT_FAILURE
esac
done