Martin Roth has posted comments on this change. ( https://review.coreboot.org/27517 )
Change subject: vboot: fix typo
......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/#/c/27517/1//COMMIT_MSG
Commit Message:
https://review.coreboot.org/#/c/27517/1//COMMIT_MSG@7
PS1, Line 7: vboot
This should probably be "security/vboot:" Typically we want to start with a path.
--
To view, visit https://review.coreboot.org/27517
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7027abee66ccdf9b2d37df60ca7f4dbbbae2f9e4
Gerrit-Change-Number: 27517
Gerrit-PatchSet: 1
Gerrit-Owner: Raul Rangel <rrangel(a)chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 17 Jul 2018 20:35:25 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Philipp Deppenwiese has submitted this change and it was merged. ( https://review.coreboot.org/24904 )
Change subject: security/vboot: Add interface for FSP 2.0 mrc caching
......................................................................
security/vboot: Add interface for FSP 2.0 mrc caching
* Move vboot/tpm specific implementation to vboot.
* Only call functions if CONFIG_FSP2_0_USES_TPM_MRC_HASH is set.
* Preparation for software hash function support, no logic changed.
Change-Id: I41a458186c7981adaf3fea8974adec2ca8668f14
Signed-off-by: Philipp Deppenwiese <zaolin(a)das-labor.org>
Reviewed-on: https://review.coreboot.org/24904
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
A src/drivers/intel/fsp2_0/include/fsp/memory_init.h
M src/drivers/intel/fsp2_0/memory_init.c
M src/security/vboot/Makefile.inc
A src/security/vboot/mrc_cache_hash_tpm.c
4 files changed, 155 insertions(+), 99 deletions(-)
Approvals:
build bot (Jenkins): Verified
Aaron Durbin: Looks good to me, approved
Philipp Deppenwiese: Looks good to me, approved
diff --git a/src/drivers/intel/fsp2_0/include/fsp/memory_init.h b/src/drivers/intel/fsp2_0/include/fsp/memory_init.h
new file mode 100644
index 0000000..05ea440
--- /dev/null
+++ b/src/drivers/intel/fsp2_0/include/fsp/memory_init.h
@@ -0,0 +1,32 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Facebook 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.
+ */
+
+#ifndef _FSP2_0_MEMORY_INIT_H_
+#define _FSP2_0_MEMORY_INIT_H_
+
+#include <types.h>
+
+/*
+ * Updates mrc cache hash if it differs.
+ */
+void mrc_cache_update_hash(const uint8_t *data, size_t size);
+
+/*
+ * Verifies mrc cache hash which is stored somewhere.
+ * return 1 verification was successful and 0 for error.
+ */
+int mrc_cache_verify_hash(const uint8_t *data, size_t size);
+
+#endif /* _FSP2_0_MEMORY_INIT_H_ */
diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c
index 1ca5208..cf033d7 100644
--- a/src/drivers/intel/fsp2_0/memory_init.c
+++ b/src/drivers/intel/fsp2_0/memory_init.c
@@ -31,63 +31,10 @@
#include <string.h>
#include <symbols.h>
#include <timestamp.h>
-#include <security/tpm/tspi.h>
#include <security/vboot/vboot_common.h>
+#include <security/tpm/tspi.h>
#include <vb2_api.h>
-
-static void mrc_cache_update_tpm_hash(const uint8_t *data, size_t size)
-{
- uint8_t data_hash[VB2_SHA256_DIGEST_SIZE];
- static const uint8_t dead_hash[VB2_SHA256_DIGEST_SIZE] = {
- 0xba, 0xad, 0xda, 0x1a, /* BAADDA1A */
- 0xde, 0xad, 0xde, 0xad, /* DEADDEAD */
- 0xde, 0xad, 0xda, 0x1a, /* DEADDA1A */
- 0xba, 0xad, 0xba, 0xad, /* BAADBAAD */
- 0xba, 0xad, 0xda, 0x1a, /* BAADDA1A */
- 0xde, 0xad, 0xde, 0xad, /* DEADDEAD */
- 0xde, 0xad, 0xda, 0x1a, /* DEADDA1A */
- 0xba, 0xad, 0xba, 0xad, /* BAADBAAD */
- };
- const uint8_t *hash_ptr = data_hash;
-
- /* We do not store normal mode data hash in TPM. */
- if (!vboot_recovery_mode_enabled())
- return;
-
- /* Bail out early if no mrc hash space is supported in TPM. */
- if (!IS_ENABLED(CONFIG_FSP2_0_USES_TPM_MRC_HASH))
- return;
-
- /* Initialize TPM driver. */
- if (tlcl_lib_init() != VB2_SUCCESS) {
- printk(BIOS_ERR, "MRC: TPM driver initialization failed.\n");
- return;
- }
-
- /* Calculate hash of data generated by MRC. */
- if (vb2_digest_buffer(data, size, VB2_HASH_SHA256, data_hash,
- sizeof(data_hash))) {
- printk(BIOS_ERR, "MRC: SHA-256 calculation failed for data. "
- "Not updating TPM hash space.\n");
- /*
- * Since data is being updated in recovery cache, the hash
- * currently stored in TPM recovery hash space is no longer
- * valid. If we are not able to calculate hash of the data being
- * updated, reset all the bits in TPM recovery hash space to
- * pre-defined hash pattern.
- */
- hash_ptr = dead_hash;
- }
-
- /* Write hash of data to TPM space. */
- if (antirollback_write_space_rec_hash(hash_ptr, VB2_SHA256_DIGEST_SIZE)
- != TPM_SUCCESS) {
- printk(BIOS_ERR, "MRC: Could not save hash to TPM.\n");
- return;
- }
-
- printk(BIOS_INFO, "MRC: TPM MRC hash updated successfully.\n");
-}
+#include <fsp/memory_init.h>
static void save_memory_training_data(bool s3wake, uint32_t fsp_version)
{
@@ -113,7 +60,8 @@
mrc_data_size) < 0)
printk(BIOS_ERR, "Failed to stash MRC data\n");
- mrc_cache_update_tpm_hash(mrc_data, mrc_data_size);
+ if (IS_ENABLED(CONFIG_FSP2_0_USES_TPM_MRC_HASH))
+ mrc_cache_update_hash(mrc_data, mrc_data_size);
}
static void do_fsp_post_memory_init(bool s3wake, uint32_t fsp_version)
@@ -156,48 +104,6 @@
tpm_setup(s3wake);
}
-static int mrc_cache_verify_tpm_hash(const uint8_t *data, size_t size)
-{
- uint8_t data_hash[VB2_SHA256_DIGEST_SIZE];
- uint8_t tpm_hash[VB2_SHA256_DIGEST_SIZE];
-
- /* We do not store normal mode data hash in TPM. */
- if (!vboot_recovery_mode_enabled())
- return 1;
-
- if (!IS_ENABLED(CONFIG_FSP2_0_USES_TPM_MRC_HASH))
- return 1;
-
- /* Calculate hash of data read from RECOVERY_MRC_CACHE. */
- if (vb2_digest_buffer(data, size, VB2_HASH_SHA256, data_hash,
- sizeof(data_hash))) {
- printk(BIOS_ERR, "MRC: SHA-256 calculation failed for data.\n");
- return 0;
- }
-
- /* Initialize TPM driver. */
- if (tlcl_lib_init() != VB2_SUCCESS) {
- printk(BIOS_ERR, "MRC: TPM driver initialization failed.\n");
- return 0;
- }
-
- /* Read hash of MRC data saved in TPM. */
- if (antirollback_read_space_rec_hash(tpm_hash, sizeof(tpm_hash))
- != TPM_SUCCESS) {
- printk(BIOS_ERR, "MRC: Could not read hash from TPM.\n");
- return 0;
- }
-
- if (memcmp(tpm_hash, data_hash, sizeof(tpm_hash))) {
- printk(BIOS_ERR, "MRC: Hash comparison failed.\n");
- return 0;
- }
-
- printk(BIOS_INFO, "MRC: Hash comparison successful. "
- "Using data from RECOVERY_MRC_CACHE\n");
- return 1;
-}
-
static void fsp_fill_mrc_cache(FSPM_ARCH_UPD *arch_upd, uint32_t fsp_version)
{
struct region_device rdev;
@@ -230,7 +136,8 @@
if (data == NULL)
return;
- if (!mrc_cache_verify_tpm_hash(data, region_device_sz(&rdev)))
+ if (IS_ENABLED(CONFIG_FSP2_0_USES_TPM_MRC_HASH) &&
+ !mrc_cache_verify_hash(data, region_device_sz(&rdev)))
return;
/* MRC cache found */
diff --git a/src/security/vboot/Makefile.inc b/src/security/vboot/Makefile.inc
index 75c2a9e..b542425 100644
--- a/src/security/vboot/Makefile.inc
+++ b/src/security/vboot/Makefile.inc
@@ -78,6 +78,8 @@
ramstage-y += common.c
postcar-y += common.c
+romstage-$(CONFIG_FSP2_0_USES_TPM_MRC_HASH) += mrc_cache_hash_tpm.c
+
ifeq ($(CONFIG_VBOOT_SEPARATE_VERSTAGE),y)
VB_FIRMWARE_ARCH := $(ARCHDIR-$(ARCH-verstage-y))
else
diff --git a/src/security/vboot/mrc_cache_hash_tpm.c b/src/security/vboot/mrc_cache_hash_tpm.c
new file mode 100644
index 0000000..d54f8f4
--- /dev/null
+++ b/src/security/vboot/mrc_cache_hash_tpm.c
@@ -0,0 +1,115 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2018 Facebook Inc
+ * Copyright (C) 2015-2016 Intel Corp.
+ * (Written by Andrey Petrov <andrey.petrov(a)intel.com> for 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; 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 <security/vboot/antirollback.h>
+#include <program_loading.h>
+#include <security/vboot/vboot_common.h>
+#include <vb2_api.h>
+#include <security/tpm/tss.h>
+#include <fsp/memory_init.h>
+#include <console/console.h>
+#include <string.h>
+
+void mrc_cache_update_hash(const uint8_t *data, size_t size)
+{
+ uint8_t data_hash[VB2_SHA256_DIGEST_SIZE];
+ static const uint8_t dead_hash[VB2_SHA256_DIGEST_SIZE] = {
+ 0xba, 0xad, 0xda, 0x1a, /* BAADDA1A */
+ 0xde, 0xad, 0xde, 0xad, /* DEADDEAD */
+ 0xde, 0xad, 0xda, 0x1a, /* DEADDA1A */
+ 0xba, 0xad, 0xba, 0xad, /* BAADBAAD */
+ 0xba, 0xad, 0xda, 0x1a, /* BAADDA1A */
+ 0xde, 0xad, 0xde, 0xad, /* DEADDEAD */
+ 0xde, 0xad, 0xda, 0x1a, /* DEADDA1A */
+ 0xba, 0xad, 0xba, 0xad, /* BAADBAAD */
+ };
+ const uint8_t *hash_ptr = data_hash;
+
+ /* We do not store normal mode data hash in TPM. */
+ if (!vboot_recovery_mode_enabled())
+ return;
+
+ /* Initialize TPM driver. */
+ if (tlcl_lib_init() != VB2_SUCCESS) {
+ printk(BIOS_ERR, "MRC: TPM driver initialization failed.\n");
+ return;
+ }
+
+ /* Calculate hash of data generated by MRC. */
+ if (vb2_digest_buffer(data, size, VB2_HASH_SHA256, data_hash,
+ sizeof(data_hash))) {
+ printk(BIOS_ERR, "MRC: SHA-256 calculation failed for data. "
+ "Not updating TPM hash space.\n");
+ /*
+ * Since data is being updated in recovery cache, the hash
+ * currently stored in TPM recovery hash space is no longer
+ * valid. If we are not able to calculate hash of the data being
+ * updated, reset all the bits in TPM recovery hash space to
+ * pre-defined hash pattern.
+ */
+ hash_ptr = dead_hash;
+ }
+
+ /* Write hash of data to TPM space. */
+ if (antirollback_write_space_rec_hash(hash_ptr, VB2_SHA256_DIGEST_SIZE)
+ != TPM_SUCCESS) {
+ printk(BIOS_ERR, "MRC: Could not save hash to TPM.\n");
+ return;
+ }
+
+ printk(BIOS_INFO, "MRC: TPM MRC hash updated successfully.\n");
+}
+
+int mrc_cache_verify_hash(const uint8_t *data, size_t size)
+{
+ uint8_t data_hash[VB2_SHA256_DIGEST_SIZE];
+ uint8_t tpm_hash[VB2_SHA256_DIGEST_SIZE];
+
+ /* We do not store normal mode data hash in TPM. */
+ if (!vboot_recovery_mode_enabled())
+ return 1;
+
+ /* Calculate hash of data read from RECOVERY_MRC_CACHE. */
+ if (vb2_digest_buffer(data, size, VB2_HASH_SHA256, data_hash,
+ sizeof(data_hash))) {
+ printk(BIOS_ERR, "MRC: SHA-256 calculation failed for data.\n");
+ return 0;
+ }
+
+ /* Initialize TPM driver. */
+ if (tlcl_lib_init() != VB2_SUCCESS) {
+ printk(BIOS_ERR, "MRC: TPM driver initialization failed.\n");
+ return 0;
+ }
+
+ /* Read hash of MRC data saved in TPM. */
+ if (antirollback_read_space_rec_hash(tpm_hash, sizeof(tpm_hash))
+ != TPM_SUCCESS) {
+ printk(BIOS_ERR, "MRC: Could not read hash from TPM.\n");
+ return 0;
+ }
+
+ if (memcmp(tpm_hash, data_hash, sizeof(tpm_hash))) {
+ printk(BIOS_ERR, "MRC: Hash comparison failed.\n");
+ return 0;
+ }
+
+ printk(BIOS_INFO, "MRC: Hash comparison successful. "
+ "Using data from RECOVERY_MRC_CACHE\n");
+ return 1;
+}
--
To view, visit https://review.coreboot.org/24904
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I41a458186c7981adaf3fea8974adec2ca8668f14
Gerrit-Change-Number: 24904
Gerrit-PatchSet: 13
Gerrit-Owner: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Philipp Deppenwiese <zaolin.daisuki(a)gmail.com>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Patrick Rudolph <siro(a)das-labor.org>
Justin TerAvest has uploaded this change for review. ( https://review.coreboot.org/27516
Change subject: mb/google/octopus: Create meep variant
......................................................................
mb/google/octopus: Create meep variant
This creates a meep variant for octopus.
The devicetree overrides are copied from yorp, otherwise everything
just defaults to baseboard settings.
BUG=b:111543000
TEST=None
Change-Id: I791f8d1589d7323fbe884dddf0f9d7362a41b9ac
Signed-off-by: Justin TerAvest <teravest(a)chromium.org>
---
M src/mainboard/google/octopus/Kconfig
M src/mainboard/google/octopus/Kconfig.name
A src/mainboard/google/octopus/variants/meep/include/variant/acpi/dptf.asl
A src/mainboard/google/octopus/variants/meep/include/variant/ec.h
A src/mainboard/google/octopus/variants/meep/include/variant/gpio.h
A src/mainboard/google/octopus/variants/meep/overridetree.cb
6 files changed, 127 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/27516/1
diff --git a/src/mainboard/google/octopus/Kconfig b/src/mainboard/google/octopus/Kconfig
index 34ca725..dc58ec8 100644
--- a/src/mainboard/google/octopus/Kconfig
+++ b/src/mainboard/google/octopus/Kconfig
@@ -43,6 +43,7 @@
default "phaser" if BOARD_GOOGLE_PHASER
default "fleex" if BOARD_GOOGLE_FLEEX
default "bobba" if BOARD_GOOGLE_BOBBA
+ default "meep" if BOARD_GOOGLE_MEEP
default "octopus" if BOARD_GOOGLE_OCTOPUS
config DEVICETREE
@@ -60,6 +61,7 @@
default "Phaser" if BOARD_GOOGLE_PHASER
default "Fleex" if BOARD_GOOGLE_FLEEX
default "Bobba" if BOARD_GOOGLE_BOBBA
+ default "Meep" if BOARD_GOOGLE_MEEP
default "Octopus" if BOARD_GOOGLE_OCTOPUS
config MAINBOARD_FAMILY
@@ -74,6 +76,7 @@
default "PHASER TEST 7167" if BOARD_GOOGLE_PHASER
default "FLEEX TEST 7423" if BOARD_GOOGLE_FLEEX
default "BOBBA TEST 4516" if BOARD_GOOGLE_BOBBA
+ default "MEEP TEST 1118" if BOARD_GOOGLE_MEEP
default "OCTOPUS TEST 6859" if BOARD_GOOGLE_OCTOPUS
config MAX_CPUS
diff --git a/src/mainboard/google/octopus/Kconfig.name b/src/mainboard/google/octopus/Kconfig.name
index cfe051c..4f6e5a5 100644
--- a/src/mainboard/google/octopus/Kconfig.name
+++ b/src/mainboard/google/octopus/Kconfig.name
@@ -37,3 +37,10 @@
select BOARD_GOOGLE_BASEBOARD_OCTOPUS
select GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC if CHROMEOS
select NHLT_DA7219 if INCLUDE_NHLT_BLOBS
+
+config BOARD_GOOGLE_MEEP
+ bool "-> Meep"
+ select BASEBOARD_OCTOPUS_LAPTOP
+ select BOARD_GOOGLE_BASEBOARD_OCTOPUS
+ select GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC if CHROMEOS
+ select NHLT_DA7219 if INCLUDE_NHLT_BLOBS
diff --git a/src/mainboard/google/octopus/variants/meep/include/variant/acpi/dptf.asl b/src/mainboard/google/octopus/variants/meep/include/variant/acpi/dptf.asl
new file mode 100644
index 0000000..cc17d56
--- /dev/null
+++ b/src/mainboard/google/octopus/variants/meep/include/variant/acpi/dptf.asl
@@ -0,0 +1,16 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2018 Google 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.
+ */
+
+#include <baseboard/acpi/dptf.asl>
diff --git a/src/mainboard/google/octopus/variants/meep/include/variant/ec.h b/src/mainboard/google/octopus/variants/meep/include/variant/ec.h
new file mode 100644
index 0000000..16f931b
--- /dev/null
+++ b/src/mainboard/google/octopus/variants/meep/include/variant/ec.h
@@ -0,0 +1,21 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2018 Google 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.
+ */
+
+#ifndef MAINBOARD_EC_H
+#define MAINBOARD_EC_H
+
+#include <baseboard/ec.h>
+
+#endif
diff --git a/src/mainboard/google/octopus/variants/meep/include/variant/gpio.h b/src/mainboard/google/octopus/variants/meep/include/variant/gpio.h
new file mode 100644
index 0000000..1fd1e11
--- /dev/null
+++ b/src/mainboard/google/octopus/variants/meep/include/variant/gpio.h
@@ -0,0 +1,21 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2018 Google 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.
+ */
+
+#ifndef MAINBOARD_GPIO_H
+#define MAINBOARD_GPIO_H
+
+#include <baseboard/gpio.h>
+
+#endif /* MAINBOARD_GPIO_H */
diff --git a/src/mainboard/google/octopus/variants/meep/overridetree.cb b/src/mainboard/google/octopus/variants/meep/overridetree.cb
new file mode 100644
index 0000000..d29e6c1
--- /dev/null
+++ b/src/mainboard/google/octopus/variants/meep/overridetree.cb
@@ -0,0 +1,59 @@
+chip soc/intel/apollolake
+
+ device domain 0 on
+ device pci 16.0 on
+ chip drivers/i2c/hid
+ register "generic.hid" = ""WCOM50C1""
+ register "generic.desc" = ""WCOM Digitizer""
+ register "generic.irq" = "ACPI_IRQ_LEVEL_LOW(GPIO_139_IRQ)"
+ register "generic.reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_140)"
+ register "generic.has_power_resource" = "1"
+ register "hid_desc_reg_offset" = "0x1"
+ device i2c 0x9 on end
+ end
+ end # - I2C 0
+ device pci 17.1 on
+ chip drivers/i2c/da7219
+ register "irq" = "ACPI_IRQ_LEVEL_LOW(GPIO_137_IRQ)"
+ register "btn_cfg" = "50"
+ register "mic_det_thr" = "500"
+ register "jack_ins_deb" = "20"
+ register "jack_det_rate" = ""32ms_64ms""
+ register "jack_rem_deb" = "1"
+ register "a_d_btn_thr" = "0xa"
+ register "d_b_btn_thr" = "0x16"
+ register "b_c_btn_thr" = "0x21"
+ register "c_mic_btn_thr" = "0x3e"
+ register "btn_avg" = "4"
+ register "adc_1bit_rpt" = "1"
+ register "micbias_lvl" = "2600"
+ register "mic_amp_in_sel" = ""diff""
+ device i2c 1a on end
+ end
+ end # - I2C 5
+ device pci 17.2 on
+ chip drivers/i2c/generic
+ register "hid" = ""ELAN0000""
+ register "desc" = ""ELAN Touchpad""
+ register "irq" = "ACPI_IRQ_EDGE_LOW(GPIO_135_IRQ)"
+ register "wake" = "GPE0_DW2_02"
+ register "probed" = "1"
+ device i2c 15 on end
+ end
+ end # - I2C 6
+ device pci 17.3 on
+ chip drivers/i2c/generic
+ register "hid" = ""ELAN0001""
+ register "desc" = ""ELAN Touchscreen""
+ register "irq" = "ACPI_IRQ_EDGE_LOW(GPIO_212_IRQ)"
+ register "probed" = "1"
+ register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_105)"
+ register "reset_delay_ms" = "20"
+ register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPIO_213)"
+ register "enable_delay_ms" = "1"
+ register "has_power_resource" = "1"
+ device i2c 10 on end
+ end
+ end # - I2C 7
+ end
+end
--
To view, visit https://review.coreboot.org/27516
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I791f8d1589d7323fbe884dddf0f9d7362a41b9ac
Gerrit-Change-Number: 27516
Gerrit-PatchSet: 1
Gerrit-Owner: Justin TerAvest <teravest(a)chromium.org>
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/27514
Change subject: mb/packardbell/ms2290: Allow use of libgfxinit
......................................................................
mb/packardbell/ms2290: Allow use of libgfxinit
Untested but expected to work.
Change-Id: I5a77b7a4343f108f46cf1f97a94e61e88eecb417
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/mainboard/packardbell/ms2290/Kconfig
M src/mainboard/packardbell/ms2290/Makefile.inc
A src/mainboard/packardbell/ms2290/gma-mainboard.ads
3 files changed, 37 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/14/27514/1
diff --git a/src/mainboard/packardbell/ms2290/Kconfig b/src/mainboard/packardbell/ms2290/Kconfig
index ca25a14..4fcb8e0 100644
--- a/src/mainboard/packardbell/ms2290/Kconfig
+++ b/src/mainboard/packardbell/ms2290/Kconfig
@@ -14,6 +14,7 @@
select HAVE_ACPI_TABLES
select HAVE_ACPI_RESUME
select MAINBOARD_HAS_NATIVE_VGA_INIT
+ select MAINBOARD_HAS_LIBGFXINIT
select INTEL_INT15
select EC_ACPI
diff --git a/src/mainboard/packardbell/ms2290/Makefile.inc b/src/mainboard/packardbell/ms2290/Makefile.inc
index 3196fa6..b8681b9 100644
--- a/src/mainboard/packardbell/ms2290/Makefile.inc
+++ b/src/mainboard/packardbell/ms2290/Makefile.inc
@@ -14,3 +14,5 @@
##
smm-$(CONFIG_HAVE_SMI_HANDLER) += smihandler.c
+
+ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
\ No newline at end of file
diff --git a/src/mainboard/packardbell/ms2290/gma-mainboard.ads b/src/mainboard/packardbell/ms2290/gma-mainboard.ads
new file mode 100644
index 0000000..d4a5d7d
--- /dev/null
+++ b/src/mainboard/packardbell/ms2290/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;
--
To view, visit https://review.coreboot.org/27514
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a77b7a4343f108f46cf1f97a94e61e88eecb417
Gerrit-Change-Number: 27514
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/27513
Change subject: mb/lenovo/x201: Allow use of libgfxinit
......................................................................
mb/lenovo/x201: Allow use of libgfxinit
Tested on LVDS(internal),VGA and HDMI output with both native resolution and
textmode.
Change-Id: Ibfcb586d7b4cac7f1d22540bb96c288704a277a0
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/mainboard/lenovo/x201/Kconfig
M src/mainboard/lenovo/x201/Makefile.inc
A src/mainboard/lenovo/x201/gma-mainboard.ads
3 files changed, 33 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/13/27513/1
diff --git a/src/mainboard/lenovo/x201/Kconfig b/src/mainboard/lenovo/x201/Kconfig
index 398677e..3165ce1 100644
--- a/src/mainboard/lenovo/x201/Kconfig
+++ b/src/mainboard/lenovo/x201/Kconfig
@@ -15,6 +15,7 @@
select INTEL_INT15
select HAVE_ACPI_RESUME
select MAINBOARD_HAS_NATIVE_VGA_INIT
+ select MAINBOARD_HAS_LIBGFXINIT
select SUPERIO_NSC_PC87382
select DRIVERS_LENOVO_WACOM
select MAINBOARD_HAS_LPC_TPM
diff --git a/src/mainboard/lenovo/x201/Makefile.inc b/src/mainboard/lenovo/x201/Makefile.inc
index b0e116f..f7ff93b 100644
--- a/src/mainboard/lenovo/x201/Makefile.inc
+++ b/src/mainboard/lenovo/x201/Makefile.inc
@@ -18,3 +18,5 @@
romstage-y += dock.c
ramstage-y += dock.c
romstage-y += gpio.c
+
+ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
diff --git a/src/mainboard/lenovo/x201/gma-mainboard.ads b/src/mainboard/lenovo/x201/gma-mainboard.ads
new file mode 100644
index 0000000..92702b2
--- /dev/null
+++ b/src/mainboard/lenovo/x201/gma-mainboard.ads
@@ -0,0 +1,30 @@
+--
+-- 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 :=
+ (DP2,
+ HDMI2,
+ Analog,
+ Internal,
+ others => Disabled);
+
+end GMA.Mainboard;
--
To view, visit https://review.coreboot.org/27513
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibfcb586d7b4cac7f1d22540bb96c288704a277a0
Gerrit-Change-Number: 27513
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>