Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/28067
to look at the new patch set (#2).
Change subject: soc/intel/common: add more msr defines
......................................................................
soc/intel/common: add more msr defines
This change adds some MSRs that are needed in a subsequent change to add
support for Continuous Performance Control.
Change-Id: Id4ecff1bc5eedaa90b41de526b9a2e61992ac296
Signed-off-by: Matt Delco <delco(a)chromium.org>
---
M src/soc/intel/common/block/include/intelblocks/msr.h
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/28067/2
--
To view, visit https://review.coreboot.org/28067
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Id4ecff1bc5eedaa90b41de526b9a2e61992ac296
Gerrit-Change-Number: 28067
Gerrit-PatchSet: 2
Gerrit-Owner: Matt Delco <delco(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Matt Delco has uploaded this change for review. ( https://review.coreboot.org/28066
Change subject: arch/x86/acpigen: add methods for cppc
......................................................................
arch/x86/acpigen: add methods for cppc
This change adds 2 methods for Conginuous Performance Control that was
added in ACPI 5.0 and expanded twice in later versions. One function
will create a global table based on a provided struct, while the other
function is used to add a _CPC method in each processor object.
Change-Id: I8798a4c72c681b960087ed65668f01b2ca77d2ce
Signed-off-by: Matt Delco <delco(a)chromium.org>
---
M src/arch/x86/acpigen.c
M src/arch/x86/include/arch/acpigen.h
2 files changed, 107 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/66/28066/1
diff --git a/src/arch/x86/acpigen.c b/src/arch/x86/acpigen.c
index a614efb..06702ce 100644
--- a/src/arch/x86/acpigen.c
+++ b/src/arch/x86/acpigen.c
@@ -1339,6 +1339,54 @@
acpigen_pop_len(); /* Method _DSM */
}
+#define CPPC_PACKAGE_NAME "\\GCPC"
+
+void acpigen_write_CPPC_package(const struct cppc_config *config)
+{
+ u32 i;
+ u32 max;
+ switch (config->version) {
+ case 1:
+ max = CPPC_MAX_FIELDS_VER_1;
+ break;
+ case 2:
+ max = CPPC_MAX_FIELDS_VER_2;
+ break;
+ case 3:
+ max = CPPC_MAX_FIELDS_VER_3;
+ break;
+ default:
+ printk(BIOS_ERR, "ERROR: CPPC version %u is not implemented\n",
+ config->version);
+ return;
+ }
+ acpigen_write_name(CPPC_PACKAGE_NAME);
+ acpigen_write_package(max);
+
+ acpigen_write_dword(max);
+ acpigen_write_byte(config->version);
+
+ for (i = 0; i < max; ++i) {
+ const acpi_addr_t *reg = &(config->regs[i]);
+ if (reg->space_id == ACPI_ADDRESS_SPACE_MEMORY &&
+ reg->bit_width == 32 && reg->access_size == 0) {
+ acpigen_write_dword(reg->addrl);
+ } else {
+ acpigen_write_register_resource(reg);
+ }
+ }
+ acpigen_pop_len();
+}
+
+void acpigen_write_CPPC_method(void)
+{
+ acpigen_write_method("_CPC", 0);
+ acpigen_emit_byte(RETURN_OP);
+ acpigen_emit_namestring(CPPC_PACKAGE_NAME);
+ acpigen_pop_len();
+}
+
+
/*
* Generate ACPI AML code for _ROM method.
* This function takes as input ROM data and ROM length.
diff --git a/src/arch/x86/include/arch/acpigen.h b/src/arch/x86/include/arch/acpigen.h
index 042c797..775339a 100644
--- a/src/arch/x86/include/arch/acpigen.h
+++ b/src/arch/x86/include/arch/acpigen.h
@@ -167,6 +167,56 @@
void *arg;
};
+/*version 1 has 15 fields, version 2 has 19, and version 3 has 21 */
+enum cppc_fields {
+ CPPC_HIGHEST_PERF, /* can be DWORD */
+ CPPC_NOMINAL_PERF, /* can be DWORD */
+ CPPC_LOWEST_NONL_PERF, /* can be DWORD */
+ CPPC_LOWEST_PERF, /* can be DWORD */
+ CPPC_GUARANTEED_PERF,
+ CPPC_DESIRED_PERF,
+ CPPC_MIN_PERF,
+ CPPC_MAX_PERF,
+ CPPC_PERF_REDUCE_TOLERANCE,
+ CPPC_TIME_WINDOW,
+ CPPC_COUNTER_WRAP, /* can be DWORD */
+ CPPC_REF_PERF_COUNTER,
+ CPPC_DELIVERED_PERF_COUNTER,
+ CPPC_PERF_LIMITED,
+ CPPC_ENABLE, /* can be System I/O */
+ CPPC_MAX_FIELDS_VER_1,
+ CPPC_AUTO_SELECT = /* can be DWORD */
+ CPPC_MAX_FIELDS_VER_1,
+ CPPC_AUTO_ACTIVITY_WINDOW,
+ CPPC_PERF_PREF,
+ CPPC_REF_PERF, /* can be DWORD */
+ CPPC_MAX_FIELDS_VER_2,
+ CPPC_LOWEST_FREQ = /* can be DWORD */
+ CPPC_MAX_FIELDS_VER_2,
+ CPPC_NOMINAL_FREQ, /* can be DWORD */
+ CPPC_MAX_FIELDS_VER_3,
+};
+
+struct cppc_config {
+ u32 version; /* must be 1, 2, or 3 */
+ /*
+ * The generic acpi_addr_t structure is being used, though
+ * anything besides PPC or FFIXED generally requires checking
+ * if the OS has advertised support for it (via _OSC).
+ *
+ * NOTE: some fields permit DWORDs to be used. If you
+ * provide a System Memory register with all zeros (which
+ * represents unsupported) then this will be used as-is.
+ * Otherwise, a System Memory register with a 32-bit
+ * width will be converted into a DWORD field (the value
+ * of which will be the value of 'addrl'. Any other use
+ * of System Memory register is currently undefined.
+ * (i.e., if you have an actual need for System Memory
+ * then you'll need to adjust this kludge).
+ */
+ acpi_addr_t regs[CPPC_MAX_FIELDS_VER_3];
+};
+
void acpigen_write_return_integer(uint64_t arg);
void acpigen_write_return_string(const char *arg);
void acpigen_write_len_f(void);
@@ -269,6 +319,15 @@
void acpigen_write_dsm_uuid_arr(struct dsm_uuid *ids, size_t count);
/*
+ * Generate ACPI AML code for _CPC (Continuous Perfmance Control).
+ * Execute the package function once to create a global table, then
+ * execute the method function within each processor object to
+ * create a method that points to the global table.
+ */
+void acpigen_write_CPPC_package(const struct cppc_config *config);
+void acpigen_write_CPPC_method(void);
+
+/*
* Generate ACPI AML code for _ROM method.
* This function takes as input ROM data and ROM length.
* The ROM length has to be multiple of 4096 and has to be less
--
To view, visit https://review.coreboot.org/28066
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: I8798a4c72c681b960087ed65668f01b2ca77d2ce
Gerrit-Change-Number: 28066
Gerrit-PatchSet: 1
Gerrit-Owner: Matt Delco <delco(a)chromium.org>
AndreX Andraos has posted comments on this change. ( https://review.coreboot.org/28060 )
Change subject: intel/common/block: Fix issues found by klockwork
......................................................................
Patch Set 2:
> Only somewhat related, we've just added scan-build checking for
> coreboot as well.
>
> There are a number of issues reported in soc/intel in the yorp
> build.
>
> https://www.coreboot.org/scan-build/GOOGLE_YORP-scanbuild.chromeos/
Martin, What tool are you using for this code scan - we're not getting these "soc issues" flagged, using Klocwork Static Code Analysis tool?
We are getting different "warnings" in chip.c and gspi.c files.
--
To view, visit https://review.coreboot.org/28060
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: I5e7caa15a3911e05ff346d338493673af5318a51
Gerrit-Change-Number: 28060
Gerrit-PatchSet: 2
Gerrit-Owner: John Zhao <john.zhao(a)intel.com>
Gerrit-Reviewer: John Zhao <john.zhao(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: AndreX Andraos <andrex.andraos(a)intel.com>
Gerrit-CC: Martin Roth <martinroth(a)google.com>
Gerrit-Comment-Date: Mon, 13 Aug 2018 19:23:18 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
John Zhao has posted comments on this change. ( https://review.coreboot.org/28060 )
Change subject: intel/common/block: Fix issues found by klockwork
......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/#/c/28060/1/src/soc/intel/common/block/cpu/mp_i…
File src/soc/intel/common/block/cpu/mp_init.c:
https://review.coreboot.org/#/c/28060/1/src/soc/intel/common/block/cpu/mp_i…
PS1, Line 137: assert
> Note that asserts are typically non-fatal in coreboot, so this may not fix your issue.
Links are downstream buses attached to the device as:
DEVTREE_CONST struct bus *link_list
assert(dev->link_list != NULL) would avoid NULL pointer to be dereferenced.
--
To view, visit https://review.coreboot.org/28060
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: I5e7caa15a3911e05ff346d338493673af5318a51
Gerrit-Change-Number: 28060
Gerrit-PatchSet: 2
Gerrit-Owner: John Zhao <john.zhao(a)intel.com>
Gerrit-Reviewer: John Zhao <john.zhao(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Martin Roth <martinroth(a)google.com>
Gerrit-Comment-Date: Mon, 13 Aug 2018 18:18:23 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/28060
to look at the new patch set (#2).
Change subject: intel/common/block: Fix issues found by klockwork
......................................................................
intel/common/block: Fix issues found by klockwork
src/soc/intel/common/block/cpu/mp_init.c
Function init_cpus: Pointer dev checked for NULL may be
dereferenced.
src/soc/intel/common/block/graphics/graphics.c
Function graphics_get_bar: Pointer dev returned from
call may be NULL and will be dereferenced.
BRANCH=None
TEST=Built & booted Yorp board.
Change-Id: I5e7caa15a3911e05ff346d338493673af5318a51
Signed-off-by: John Zhao <john.zhao(a)intel.com>
---
M src/soc/intel/common/block/cpu/mp_init.c
M src/soc/intel/common/block/graphics/graphics.c
2 files changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/28060/2
--
To view, visit https://review.coreboot.org/28060
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I5e7caa15a3911e05ff346d338493673af5318a51
Gerrit-Change-Number: 28060
Gerrit-PatchSet: 2
Gerrit-Owner: John Zhao <john.zhao(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Martin Roth <martinroth(a)google.com>