Attention is currently required from: Furquan Shaikh, Maulik V Vaghela, Tim Wawrzynczak, Subrata Banik, Meera Ravindranath, Angel Pons, Patrick Rudolph.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56168 )
Change subject: drivers/intel/gma: Restructure Opregion version info code
......................................................................
Patch Set 6:
(1 comment)
File src/drivers/intel/gma/opregion.c:
https://review.coreboot.org/c/coreboot/+/56168/comment/ac0ae211_19a80e34
PS6, Line 261: 2
> if you are interested to use version number generic enough, i would recommend to implement something […]
Given that OpRegion versions have subfields, I'd rather fill in the version numbers in C code. Otherwise, we would need to repeat the Kconfig options three times, once for each of the subfields: `major`, `minor`, `revision`.
--
To view, visit https://review.coreboot.org/c/coreboot/+/56168
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I93a9f2df186002a4e38caa910f867bce0b97ac2b
Gerrit-Change-Number: 56168
Gerrit-PatchSet: 6
Gerrit-Owner: Meera Ravindranath <meera.ravindranath(a)intel.com>
Gerrit-Reviewer: Angel Pons <angel.pons(a)9elements.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Furquan Shaikh <furquan(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Furquan Shaikh <furquan(a)google.com>
Gerrit-Attention: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Attention: Meera Ravindranath <meera.ravindranath(a)intel.com>
Gerrit-Attention: Angel Pons <angel.pons(a)9elements.com>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Comment-Date: Mon, 12 Jul 2021 08:18:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-MessageType: comment
Attention is currently required from: Furquan Shaikh, Maulik V Vaghela, Tim Wawrzynczak, Meera Ravindranath, Angel Pons, Patrick Rudolph.
Subrata Banik has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56168 )
Change subject: drivers/intel/gma: Restructure Opregion version info code
......................................................................
Patch Set 6:
(1 comment)
File src/drivers/intel/gma/opregion.c:
https://review.coreboot.org/c/coreboot/+/56168/comment/e22473e0_a9412bd2
PS6, Line 261: 2
if you are interested to use version number generic enough, i would recommend to implement something similar to this
https://github.com/coreboot/coreboot/blob/master/src/vendorcode/intel/Kconf…
UDK_VERSION => OPREGION_VERSION
UDK_2015_VERSION => OPREGION_2_0_VERSION
UEFI_2_4_BINDING => INTEL_GMA_OPREGION_2_0
--
To view, visit https://review.coreboot.org/c/coreboot/+/56168
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I93a9f2df186002a4e38caa910f867bce0b97ac2b
Gerrit-Change-Number: 56168
Gerrit-PatchSet: 6
Gerrit-Owner: Meera Ravindranath <meera.ravindranath(a)intel.com>
Gerrit-Reviewer: Angel Pons <angel.pons(a)9elements.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Furquan Shaikh <furquan(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Furquan Shaikh <furquan(a)google.com>
Gerrit-Attention: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Meera Ravindranath <meera.ravindranath(a)intel.com>
Gerrit-Attention: Angel Pons <angel.pons(a)9elements.com>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Comment-Date: Mon, 12 Jul 2021 07:58:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Attention is currently required from: Furquan Shaikh, Maulik V Vaghela, Tim Wawrzynczak, Meera Ravindranath, Subrata Banik, Angel Pons, Patrick Rudolph.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/56168 )
Change subject: drivers/intel/gma: Restructure Opregion version info code
......................................................................
Patch Set 6: Code-Review+1
(2 comments)
File src/drivers/intel/gma/opregion.h:
https://review.coreboot.org/c/coreboot/+/56168/comment/724d6fcf_f27c99e7
PS6, Line 37: #define IGD_OPREGION_VERSION 2
Please drop this macro, it is no longer used.
File src/drivers/intel/gma/opregion.c:
https://review.coreboot.org/c/coreboot/+/56168/comment/b86a243f_ad7054a0
PS6, Line 259: static void opregion_set_version(opregion_header_t *opheader)
Looks like my comment on https://review.coreboot.org/c/coreboot/+/52758/comment/03016642_bb98db26/ was missed:
> Another approach is to return a struct, but one needs to expose the struct type:
>
> struct __packed opregion_version {
> u8 rsvd;
> u8 revision;
> u8 minor;
> u8 major;
> };
>
> One would then declare `over` in the mailbox 0 struct as follows:
>
> struct opregion_version over;
>
> And the resulting function would then be:
>
> static struct opregion_version opregion_get_version(void)
> {
> return (struct opregion_version) { .major = 2, .minor = 0 };
> }
>
> This function would then be used as follows:
>
> opregion->header.over = opregion_get_version();
Thoughts?
--
To view, visit https://review.coreboot.org/c/coreboot/+/56168
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I93a9f2df186002a4e38caa910f867bce0b97ac2b
Gerrit-Change-Number: 56168
Gerrit-PatchSet: 6
Gerrit-Owner: Meera Ravindranath <meera.ravindranath(a)intel.com>
Gerrit-Reviewer: Angel Pons <angel.pons(a)9elements.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Furquan Shaikh <furquan(a)google.com>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-CC: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Furquan Shaikh <furquan(a)google.com>
Gerrit-Attention: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Meera Ravindranath <meera.ravindranath(a)intel.com>
Gerrit-Attention: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Attention: Angel Pons <angel.pons(a)9elements.com>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Comment-Date: Mon, 12 Jul 2021 07:54:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/56003 )
Change subject: acpi: Add function to simplify If (CondRefOf (..)) sequences
......................................................................
acpi: Add function to simplify If (CondRefOf (..)) sequences
The new function is called acpigen_write_if_cond_refof(), and it must
be paired with a following acpigen_write_if_end() call.
Change-Id: I6e192a569f550ecb77ad264275d52f219eacaca1
Signed-off-by: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56003
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
---
M src/acpi/acpigen.c
M src/include/acpi/acpigen.h
2 files changed, 17 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Patrick Georgi: Looks good to me, approved
diff --git a/src/acpi/acpigen.c b/src/acpi/acpigen.c
index 9818dc2..8320b6c 100644
--- a/src/acpi/acpigen.c
+++ b/src/acpi/acpigen.c
@@ -1501,6 +1501,21 @@
acpigen_write_integer(val);
}
+/*
+ * Generates ACPI code to check at runtime if an object named `namestring`
+ * exists, and leaves the If scope open to continue execute code when this
+ * is true. NOTE: Requires matching acpigen_write_if_end().
+ *
+ * If (CondRefOf (NAME))
+ */
+void acpigen_write_if_cond_ref_of(const char *namestring)
+{
+ acpigen_write_if();
+ acpigen_emit_ext_op(COND_REFOF_OP);
+ acpigen_emit_namestring(namestring);
+ acpigen_emit_byte(ZERO_OP); /* ignore COND_REFOF_OP destination */
+}
+
/* Closes previously opened if statement and generates ACPI code for else statement. */
void acpigen_write_else(void)
{
diff --git a/src/include/acpi/acpigen.h b/src/include/acpi/acpigen.h
index 2d0bb77..09ec4bc 100644
--- a/src/include/acpi/acpigen.h
+++ b/src/include/acpi/acpigen.h
@@ -415,6 +415,8 @@
{
acpigen_pop_len();
}
+/* Emits If (CondRefOf(NAME)) */
+void acpigen_write_if_cond_ref_of(const char *namestring);
void acpigen_write_else(void);
void acpigen_write_shiftleft_op_int(uint8_t src_result, uint64_t count);
void acpigen_write_to_buffer(uint8_t src, uint8_t dst);
--
To view, visit https://review.coreboot.org/c/coreboot/+/56003
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6e192a569f550ecb77ad264275d52f219eacaca1
Gerrit-Change-Number: 56003
Gerrit-PatchSet: 4
Gerrit-Owner: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Cliff Huang <cliff.huang(a)intel.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Karthik Ramasubramanian <kramasub(a)google.com>
Gerrit-Reviewer: Lance Zhao
Gerrit-Reviewer: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: merged