Lijian Zhao has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32286
Change subject: soc/intel/common: Inject SMBIOS type 16 table
......................................................................
soc/intel/common: Inject SMBIOS type 16 table
Add SMBIOS type 16 table for physical memory array, there's two item had
been left over.ECC and max capacity, as of now we set it to fixed value
as all the platform support by Intel common code don't support ECC
memory and so far the biggest capicity is 32GB.
TEST=Boot up with Sarien platform and check with dmidecode, the
following is the result:
Handle 0x000D, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 32 GB
Error Information Handle: Not Provided
Number Of Devices: 2
Signed-off-by: Lijian Zhao <lijian.zhao(a)intel.com>
Change-Id: If9c5831956ef273c84d831a2b1572b3442eed961
---
M src/soc/intel/common/block/systemagent/systemagent.c
1 file changed, 37 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/86/32286/1
diff --git a/src/soc/intel/common/block/systemagent/systemagent.c b/src/soc/intel/common/block/systemagent/systemagent.c
index d95a4eb..c66eb0a 100644
--- a/src/soc/intel/common/block/systemagent/systemagent.c
+++ b/src/soc/intel/common/block/systemagent/systemagent.c
@@ -14,6 +14,7 @@
* GNU General Public License for more details.
*/
+#include <console/console.h>
#include <device/pci_ops.h>
#include <cbmem.h>
#include <device/device.h>
@@ -21,6 +22,8 @@
#include <device/pci_ids.h>
#include <intelblocks/acpi.h>
#include <intelblocks/systemagent.h>
+#include <smbios.h>
+#include <memory_info.h>
#include <soc/iomap.h>
#include <soc/pci_devs.h>
#include <soc/systemagent.h>
@@ -275,6 +278,37 @@
sa_add_imr_resources(dev, &index);
}
+#if CONFIG(GENERATE_SMBIOS_TABLES)
+static int sa_smbios_write_type_16(struct device *dev, int *handle,
+ unsigned long *current)
+{
+ struct smbios_type16 *t = (struct smbios_type16 *)*current;
+ int len = sizeof(struct smbios_type16);
+
+ struct memory_info *meminfo;
+ meminfo = cbmem_find(CBMEM_ID_MEMINFO);
+ if (meminfo == NULL)
+ return 0; /* can't find mem info in cbmem */
+
+ memset(t, 0, sizeof(struct smbios_type16));
+ t->type = SMBIOS_PHYS_MEMORY_ARRAY;
+ t->handle = *handle;
+ t->length = len - 2;
+ t->location = MEMORY_ARRAY_LOCATION_SYSTEM_BOARD;
+ t->use = MEMORY_ARRAY_USE_SYSTEM;
+ /* TBD, meminfo hob have information about ECC */
+ t->memory_error_correction = MEMORY_ARRAY_ECC_NONE;
+ /* no error information handle available */
+ t->memory_error_information_handle = 0xFFFE;
+ t->maximum_capacity = 32 * (GiB / KiB); /* 32GB as default */
+ t->number_of_memory_devices = meminfo->dimm_cnt;
+
+ *current += len;
+ *handle += 1;
+ return len;
+}
+#endif
+
void enable_power_aware_intr(void)
{
uint8_t pair;
@@ -295,6 +329,9 @@
#if CONFIG(HAVE_ACPI_TABLES)
.write_acpi_tables = sa_write_acpi_tables,
#endif
+#if CONFIG(GENERATE_SMBIOS_TABLES)
+ .get_smbios_data = sa_smbios_write_type_16,
+#endif
};
static const unsigned short systemagent_ids[] = {
--
To view, visit https://review.coreboot.org/c/coreboot/+/32286
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If9c5831956ef273c84d831a2b1572b3442eed961
Gerrit-Change-Number: 32286
Gerrit-PatchSet: 1
Gerrit-Owner: Lijian Zhao <lijian.zhao(a)intel.com>
Gerrit-MessageType: newchange
Okashi Odayakana has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/11791 )
Change subject: [WIP]mainboard/lenovo/t410: Add new port
......................................................................
Patch Set 13:
Can't seem to get this one to boot. Anything in particular I should be doing?
--
To view, visit https://review.coreboot.org/c/coreboot/+/11791
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id9d872e643dd242e925bfb46d18076e6ad100995
Gerrit-Change-Number: 11791
Gerrit-PatchSet: 13
Gerrit-Owner: Nicolas Reinecke <nr(a)das-labor.org>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Nicolas Reinecke <nr(a)das-labor.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Eloy
Gerrit-CC: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-CC: Okashi Odayakana <brianblevins316(a)gmail.com>
Gerrit-CC: Okashi Odayakana <okashi(a)okashi.me>
Gerrit-CC: Peter Lemenkov <lemenkov(a)gmail.com>
Gerrit-Comment-Date: Fri, 19 Apr 2019 01:27:20 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Duncan Laurie has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32276
Change subject: ec/google/wilco: Support board_id with EC provided ID
......................................................................
ec/google/wilco: Support board_id with EC provided ID
The EC can return a board ID value similar to the Chrome EC.
In order to use this for the board version returned by SMBIOS
this commit implements the board_id() function for mainboards
that use this EC.
BUG=b:123261132
TEST=Check /sys/class/dmi/id/board_version to see that it
is reflecting the value that the EC provides.
Change-Id: I3fbe0dc886701f37d2424fe7a2867fd860fa1ec0
Signed-off-by: Duncan Laurie <dlaurie(a)google.com>
---
M src/ec/google/wilco/Makefile.inc
A src/ec/google/wilco/boardid.c
M src/ec/google/wilco/commands.c
M src/ec/google/wilco/commands.h
4 files changed, 54 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/32276/1
diff --git a/src/ec/google/wilco/Makefile.inc b/src/ec/google/wilco/Makefile.inc
index fe8910c..3a7790c 100644
--- a/src/ec/google/wilco/Makefile.inc
+++ b/src/ec/google/wilco/Makefile.inc
@@ -1,8 +1,8 @@
ifeq ($(CONFIG_EC_GOOGLE_WILCO),y)
bootblock-y += bootblock.c
-romstage-y += commands.c mailbox.c romstage.c
-ramstage-y += chip.c commands.c mailbox.c
-smm-y += commands.c mailbox.c smihandler.c
+romstage-y += commands.c mailbox.c romstage.c boardid.c
+ramstage-y += chip.c commands.c mailbox.c boardid.c
+smm-y += commands.c mailbox.c smihandler.c boardid.c
endif
diff --git a/src/ec/google/wilco/boardid.c b/src/ec/google/wilco/boardid.c
new file mode 100644
index 0000000..4ed15bb
--- /dev/null
+++ b/src/ec/google/wilco/boardid.c
@@ -0,0 +1,32 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright 2019 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 <boardid.h>
+#include "commands.h"
+
+uint32_t board_id(void)
+{
+ MAYBE_STATIC uint32_t id = BOARD_ID_INIT;
+
+ if (id == BOARD_ID_INIT) {
+ uint8_t ec_id;
+ if (wilco_ec_get_board_id(&ec_id) < 0)
+ id = BOARD_ID_UNKNOWN;
+ else
+ id = ec_id;
+ }
+
+ return id;
+}
diff --git a/src/ec/google/wilco/commands.c b/src/ec/google/wilco/commands.c
index da04e27..d0d572d 100644
--- a/src/ec/google/wilco/commands.c
+++ b/src/ec/google/wilco/commands.c
@@ -135,6 +135,12 @@
return !!(pm.state[0] & EC_PM1_LID_OPEN);
}
+int wilco_ec_get_board_id(uint8_t *id)
+{
+ return wilco_ec_mailbox(WILCO_EC_MSG_RAW, KB_BOARD_ID,
+ NULL, 0, id, sizeof(*id));
+}
+
void wilco_ec_slp_en(void)
{
/* EC does not respond to this command */
diff --git a/src/ec/google/wilco/commands.h b/src/ec/google/wilco/commands.h
index 85f5feb..3077eee 100644
--- a/src/ec/google/wilco/commands.h
+++ b/src/ec/google/wilco/commands.h
@@ -38,6 +38,8 @@
KB_EC_INFO = 0x38,
/* Set ACPI mode on or off */
KB_ACPI = 0x3a,
+ /* Board ID */
+ KB_BOARD_ID = 0x3d,
/* Change ACPI wake up source */
KB_ACPI_WAKEUP_CHANGE = 0x4a,
/* Manage the EC power button passthru to the host */
@@ -267,6 +269,17 @@
*/
int wilco_ec_get_lid_state(void);
+/**
+ * wilco_ec_get_board_id
+ *
+ * Retrieve the board ID value from the EC.
+ * @id: Pointer to variable to store the ID read from the EC.
+ *
+ * Returns number of bytes transferred from the EC
+ * Returns -1 if the EC command failed
+ */
+int wilco_ec_get_board_id(uint8_t *id);
+
enum ec_wake_change {
WAKE_OFF = 0,
WAKE_ON
--
To view, visit https://review.coreboot.org/c/coreboot/+/32276
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3fbe0dc886701f37d2424fe7a2867fd860fa1ec0
Gerrit-Change-Number: 32276
Gerrit-PatchSet: 1
Gerrit-Owner: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-MessageType: newchange
Duncan Laurie has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32348
Change subject: ec/google/wilco: Send "logo displayed" progress code
......................................................................
ec/google/wilco: Send "logo displayed" progress code
This progress code enables keyboard backlight control that
otherwise would only work 30 seconds after boot. This code
is already defined but it was not being sent by coreboot.
It is run in the "post device" step between the other defined
progress codes.
BUG=b:130754032
Change-Id: Ica6c622e568cb236c17bf3edb6639d0177510846
Signed-off-by: Duncan Laurie <dlaurie(a)google.com>
---
M src/ec/google/wilco/chip.c
1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/32348/1
diff --git a/src/ec/google/wilco/chip.c b/src/ec/google/wilco/chip.c
index 0858e1c..9b0be19 100644
--- a/src/ec/google/wilco/chip.c
+++ b/src/ec/google/wilco/chip.c
@@ -46,6 +46,13 @@
BOOT_STATE_INIT_ENTRY(BS_DEV_INIT, BS_ON_EXIT,
wilco_ec_post_video_init, NULL);
+static void wilco_ec_post_logo_displayed(void *unused)
+{
+ wilco_ec_send(KB_BIOS_PROGRESS, BIOS_PROGRESS_LOGO_DISPLAYED);
+}
+BOOT_STATE_INIT_ENTRY(BS_POST_DEVICE, BS_ON_EXIT,
+ wilco_ec_post_logo_displayed, NULL);
+
static void wilco_ec_resume(void *unused)
{
wilco_ec_send_noargs(KB_RESTORE);
--
To view, visit https://review.coreboot.org/c/coreboot/+/32348
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ica6c622e568cb236c17bf3edb6639d0177510846
Gerrit-Change-Number: 32348
Gerrit-PatchSet: 1
Gerrit-Owner: Duncan Laurie <dlaurie(a)chromium.org>
Gerrit-MessageType: newchange