Attention is currently required from: Sean Rhodes, Andy Pont, Paul Menzel, Felix Held.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/58343 )
Change subject: ec/starlabs: Add standardised ITE EC support
......................................................................
Patch Set 43: Code-Review+1
(22 comments)
File src/ec/starlabs/merlin/Makefile.inc:
https://review.coreboot.org/c/coreboot/+/58343/comment/74ee936d_5e6b7e11
PS42, Line 7: $(CONFIG_EC_VARIANT_DIR)
I'm pretty sure you need to use `strip_quotes` here, in CB:29447 I ran into the same issue:
EC_VARIANT_DIR := $(call strip_quotes, $(CONFIG_EC_VARIANT_DIR))
CPPFLAGS_common += -I$(src)/ec/starlabs/merlin/variants/$(EC_VARIANT_DIR)
https://review.coreboot.org/c/coreboot/+/58343/comment/8a77e12d_7fe632ed
PS42, Line 9: ifeq ($(CONFIG_EC_STARLABS_ITE),y)
This should also guard the lines above, this file is unconditionally included.
https://review.coreboot.org/c/coreboot/+/58343/comment/e01709ac_def8d011
PS42, Line 11: smm-$(CONFIG_DEBUG_SMI) += ec.c
I'm pretty sure this isn't needed, and causes build errors when `DEBUG_SMI` is enabled. I'd remove it.
https://review.coreboot.org/c/coreboot/+/58343/comment/6cd6ddb3_223ab2c6
PS42, Line 18: files_added:: warn_no_ite_fw
:
: PHONY+=warn_no_ite_fw
: warn_no_ite_fw:
: printf "\n\t** WARNING **\n"
: printf "coreboot has been built without the ITE EC Firmware.\n"
: printf "Do not flash this image. Your laptop's power button\n"
: printf "may not respond when you press it.\n\n"
Shouldn't this be in the `else` branch of `ifeq ($(CONFIG_EC_STARLABS_IT_BIN),y)`? Currently, the warning is only printed when `EC_STARLABS_IT_BIN` is set but `EC_STARLABS_IT_BIN_PATH` is completely empty (which I think never happens).
File src/ec/starlabs/merlin/ec.c:
https://review.coreboot.org/c/coreboot/+/58343/comment/71991a51_d9cd8918
PS42, Line 47: u8 chipid1 = pnp_read_index(dev->path.pnp.port, ITE_CHIPID1);
: u8 chipid2 = pnp_read_index(dev->path.pnp.port, ITE_CHIPID2);
nit: `chipid1` and `chipid2` can be const.
Alternatively, why not combine the two bytes as in `it_get_version()`?
static u16 ite_get_chip_id(unsigned int port)
{
return (pnp_read_index(port, ITE_CHIPID1) << 8) |
pnp_read_index(port, ITE_CHIPID2);
}
I've used the `unsigned int` type for the `port` parameter because it's the type of `dev->path.pnp.port` (c.f. `struct pnp_path` in `src/include/device/path.h`), even though `pnp_read_index()` expects an `u16`.
In any case, this would be used as follows:
const u16 chip_id = ite_get_chip_id(dev->path.pnp.port);
if (chip_id != ITE_CHIPID_VAL) {
printk(BIOS_ERR, "ITE: Device not found.\n");
return;
}
The chip ID defines would need to be adapted as follows:
#define ITE_CHIPID_VAL 0x8987
I'd also remove the preceding comments (several of which are wrong, I commented about it). I'm pretty sure you can see that this ID corresponds to the ITE IT8987 😜
https://review.coreboot.org/c/coreboot/+/58343/comment/f513a716_d0f90b95
PS42, Line 50: printk(BIOS_ERR, "ITE: Device not found.\n");
Idea: print the expected and actual IDs?
printk(BIOS_ERR, "ITE: Expected chip ID 0x%04x, but got 0x%04x instead.\n", ITE_CHIPID_VAL, chip_id);
https://review.coreboot.org/c/coreboot/+/58343/comment/6c4fcf7e_6ff57bc4
PS42, Line 54: printk(BIOS_DEBUG, "ITE: Initializing keyboard.\n");
Strictly speaking, coreboot only does keyboard init if `DRIVERS_PS2_KEYBOARD` is set, which is only needed when the payload doesn't do keyboard init.
To avoid potential confusion, I'd remove this log message. `pc_keyboard_init()` already prints stuff when doing keyboard init.
File src/ec/starlabs/merlin/variants/apl/ecdefs.h:
https://review.coreboot.org/c/coreboot/+/58343/comment/7594e63c_4cea90b3
PS42, Line 13: IT5570
Looks like IT8987
File src/ec/starlabs/merlin/variants/apl/emem.asl:
https://review.coreboot.org/c/coreboot/+/58343/comment/c862f081_badbc145
PS42, Line 3: 0xFF
This makes the OperationRegion 0xff = 255 bytes long. Shouldn't it be 256?
https://review.coreboot.org/c/coreboot/+/58343/comment/573f137a_26869e45
PS42, Line 172: // TODO:
: // Causes build failure, but 0xff is in range
: // EJ8E, 8, // EJ898A Error
See comment on OperationRegion declaration at the start of the file
File src/ec/starlabs/merlin/variants/cml/ecdefs.h:
https://review.coreboot.org/c/coreboot/+/58343/comment/315c3ef0_1dede964
PS42, Line 10: IT5570
Looks like IT8987
File src/ec/starlabs/merlin/variants/cml/emem.asl:
https://review.coreboot.org/c/coreboot/+/58343/comment/581b1222_6cdb17e3
PS42, Line 3: 0xFF
This makes the OperationRegion 0xff = 255 bytes long. Shouldn't it be 256?
File src/ec/starlabs/merlin/variants/glk/ecdefs.h:
https://review.coreboot.org/c/coreboot/+/58343/comment/3c835239_9e5091c5
PS42, Line 13: IT5570
Looks like IT8987
File src/ec/starlabs/merlin/variants/glk/emem.asl:
https://review.coreboot.org/c/coreboot/+/58343/comment/0439802b_62b30ba2
PS42, Line 3: 0xFF
This makes the OperationRegion 0xff = 255 bytes long. Shouldn't it be 256?
https://review.coreboot.org/c/coreboot/+/58343/comment/cc2d2872_5550c621
PS42, Line 172: // TODO:
: // Causes build failure, but 0xff is in range
: // EJ8E, 8, // EJ898A Error
See comment on OperationRegion declaration at the start of the file
File src/ec/starlabs/merlin/variants/kbl/ecdefs.h:
https://review.coreboot.org/c/coreboot/+/58343/comment/c79075a3_ed2034f7
PS42, Line 10: IT5570
Looks like IT8987
File src/ec/starlabs/merlin/variants/kbl/emem.asl:
https://review.coreboot.org/c/coreboot/+/58343/comment/cfd954c5_76bd6fba
PS42, Line 3: 0xFF
This makes the OperationRegion 0xff = 255 bytes long. Shouldn't it be 256?
https://review.coreboot.org/c/coreboot/+/58343/comment/c2ee76ee_7a4ac92a
PS42, Line 159: // TODO:
: // Causes build failure, but 0xff is in range
: // EJ8E, 8, // EJ898A Error
See comment on OperationRegion declaration at the start of the file
File src/ec/starlabs/merlin/variants/merlin/emem.asl:
https://review.coreboot.org/c/coreboot/+/58343/comment/ada869ae_4f3230c2
PS42, Line 3: 0xFF
This makes the OperationRegion 0xff = 255 bytes long. Shouldn't it be 256?
https://review.coreboot.org/c/coreboot/+/58343/comment/3d1566e1_0a42dd0c
PS42, Line 160: H
nit: lowercase `h`
File src/ec/starlabs/merlin/variants/tgl/emem.asl:
https://review.coreboot.org/c/coreboot/+/58343/comment/2e3a8ffe_a6d47f64
PS42, Line 3: 0xFF
This makes the OperationRegion 0xff = 255 bytes long. Shouldn't it be 256?
https://review.coreboot.org/c/coreboot/+/58343/comment/6d63438f_0a5e06ff
PS42, Line 167: H
nit: lowercase `h`
--
To view, visit https://review.coreboot.org/c/coreboot/+/58343
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I8023c26de23c874c84106fda96e64dcfa0c5ba32
Gerrit-Change-Number: 58343
Gerrit-PatchSet: 43
Gerrit-Owner: Sean Rhodes <admin(a)starlabs.systems>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Andy Pont <andy.pont(a)sdcsystems.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Sean Rhodes <admin(a)starlabs.systems>
Gerrit-Attention: Andy Pont <andy.pont(a)sdcsystems.com>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Comment-Date: Wed, 17 Nov 2021 10:22:53 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Julius Werner.
Lean Sheng Tan has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59312 )
Change subject: cbfs: Add helper functions to look up size and type of a file
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://review.coreboot.org/c/coreboot/+/59312
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I8092d8f6e04bdfb4df6c626dc7d42b402fe0a8ba
Gerrit-Change-Number: 59312
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Jakub Czapiga <jacz(a)semihalf.com>
Gerrit-Reviewer: Lean Sheng Tan <lean.sheng.tan(a)intel.com>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Julius Werner <jwerner(a)chromium.org>
Gerrit-Comment-Date: Wed, 17 Nov 2021 10:20:06 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: Martin Roth, Angel Pons.
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/59313 )
Change subject: util/sconfig: Expose apic devices
......................................................................
Patch Set 2:
(3 comments)
File util/sconfig/main.c:
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-133608):
https://review.coreboot.org/c/coreboot/+/59313/comment/95fb6049_9c0a6a4d
PS2, Line 1371: fprintf(head, "extern DEVTREE_CONST void *const __apic_%04x_%d_config;\n",
line over 96 characters
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-133608):
https://review.coreboot.org/c/coreboot/+/59313/comment/5f70aa04_f2343a4c
PS2, Line 1373: fprintf(fil, "DEVTREE_CONST void *const __apic_%04x_%d_config = &%s_info_%d;\n",
line over 96 characters
Robot Comment from checkpatch (run ID jenkins-coreboot-checkpatch-133608):
https://review.coreboot.org/c/coreboot/+/59313/comment/ca894b07_02b4d555
PS2, Line 1374: ptr->path_a, ptr->path_b, chip_ins->chip->name_underscore, chip_ins->id);
line over 96 characters
--
To view, visit https://review.coreboot.org/c/coreboot/+/59313
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I800f089998f4a9be2216ed997cec5cedeb63f3db
Gerrit-Change-Number: 59313
Gerrit-PatchSet: 2
Gerrit-Owner: Arthur Heymans <arthur.heymans(a)9elements.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Attention: Martin Roth <martinroth(a)google.com>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Comment-Date: Wed, 17 Nov 2021 10:01:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Andy Pont, Paul Menzel, Angel Pons, Felix Held.
Hello build bot (Jenkins), Patrick Georgi, Angel Pons, Felix Held,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/58343
to look at the new patch set (#43).
Change subject: ec/starlabs: Add standardised ITE EC support
......................................................................
ec/starlabs: Add standardised ITE EC support
Add EC support that supports different Q Events and EC memory.
Created from the ITE IT5570E and IT8987E datasheets, all using
data port 0x4e.
Tested with Ubuntu 20.04.3 and Windows 10 on:
* StarBook Mk V (TGL + IT5570E):
* ITE Firmware 1.00
* Merlin Firmware 1.00
* LabTop Mk IV (CML + IT8987E):
* ITE Firmware 1.04
* LabTop Mk III (KBL + IT8987E):
* ITE Firmware 3.12
Signed-off-by: Sean Rhodes <sean(a)starlabs.systems>
Change-Id: I8023c26de23c874c84106fda96e64dcfa0c5ba32
---
A src/ec/starlabs/merlin/Kconfig
A src/ec/starlabs/merlin/Makefile.inc
A src/ec/starlabs/merlin/acpi/ac.asl
A src/ec/starlabs/merlin/acpi/battery.asl
A src/ec/starlabs/merlin/acpi/cmos.asl
A src/ec/starlabs/merlin/acpi/ec.asl
A src/ec/starlabs/merlin/acpi/hid.asl
A src/ec/starlabs/merlin/acpi/keyboard.asl
A src/ec/starlabs/merlin/acpi/lid.asl
A src/ec/starlabs/merlin/acpi/suspend.asl
A src/ec/starlabs/merlin/ec.c
A src/ec/starlabs/merlin/ec.h
A src/ec/starlabs/merlin/variants/apl/ecdefs.h
A src/ec/starlabs/merlin/variants/apl/emem.asl
A src/ec/starlabs/merlin/variants/apl/events.asl
A src/ec/starlabs/merlin/variants/cml/ecdefs.h
A src/ec/starlabs/merlin/variants/cml/emem.asl
A src/ec/starlabs/merlin/variants/cml/events.asl
A src/ec/starlabs/merlin/variants/glk/ecdefs.h
A src/ec/starlabs/merlin/variants/glk/emem.asl
A src/ec/starlabs/merlin/variants/glk/events.asl
A src/ec/starlabs/merlin/variants/kbl/ecdefs.h
A src/ec/starlabs/merlin/variants/kbl/emem.asl
A src/ec/starlabs/merlin/variants/kbl/events.asl
A src/ec/starlabs/merlin/variants/merlin/ecdefs.h
A src/ec/starlabs/merlin/variants/merlin/emem.asl
A src/ec/starlabs/merlin/variants/merlin/events.asl
A src/ec/starlabs/merlin/variants/tgl/ecdefs.h
A src/ec/starlabs/merlin/variants/tgl/emem.asl
A src/ec/starlabs/merlin/variants/tgl/events.asl
30 files changed, 3,537 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/43/58343/43
--
To view, visit https://review.coreboot.org/c/coreboot/+/58343
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I8023c26de23c874c84106fda96e64dcfa0c5ba32
Gerrit-Change-Number: 58343
Gerrit-PatchSet: 43
Gerrit-Owner: Sean Rhodes <admin(a)starlabs.systems>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Patrick Georgi <patrick(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Andy Pont <andy.pont(a)sdcsystems.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Andy Pont <andy.pont(a)sdcsystems.com>
Gerrit-Attention: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Attention: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-MessageType: newpatchset