ACPI: Drop redundant CONSOLE_CBMEM setup in GNVS

Already done from common gnvs_get_or_create() implementation
after gnvs_cbmc_ptr() is defined.

Change-Id: I77c292cd9590d7fc54d8b21ea62717a2d77e5ba4
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48702
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kyösti Mälkki 2020-06-17 08:54:20 +03:00 committed by Nico Huber
parent 3139c8dc05
commit 81b8472237
16 changed files with 5 additions and 67 deletions

View File

@ -396,10 +396,6 @@ unsigned long southbridge_write_acpi_tables(const struct device *device,
void acpi_create_gnvs(struct global_nvs *gnvs)
{
if (CONFIG(CONSOLE_CBMEM))
gnvs->cbmc = (uintptr_t)cbmem_find(CBMEM_ID_CONSOLE);
if (CONFIG(CHROMEOS)) {
/* Initialize Verified Boot data */
chromeos_init_chromeos_acpi(&gnvs->chromeos);

View File

@ -164,10 +164,6 @@ unsigned long southbridge_write_acpi_tables(const struct device *device,
void acpi_create_gnvs(struct global_nvs *gnvs)
{
if (CONFIG(CONSOLE_CBMEM))
gnvs->cbmc = (uintptr_t)cbmem_find(CBMEM_ID_CONSOLE);
if (CONFIG(CHROMEOS)) {
/* Initialize Verified Boot data */
chromeos_init_chromeos_acpi(&gnvs->chromeos);

View File

@ -289,10 +289,6 @@ void acpi_create_gnvs(struct global_nvs *gnvs)
/* CPU core count */
gnvs->pcnt = dev_count_cpu();
if (CONFIG(CONSOLE_CBMEM))
/* Update the mem console pointer. */
gnvs->cbmc = (uintptr_t)cbmem_find(CBMEM_ID_CONSOLE);
if (CONFIG(CHROMEOS)) {
/* Initialize Verified Boot data */
chromeos_init_chromeos_acpi(&(gnvs->chromeos));

View File

@ -77,10 +77,6 @@ void acpi_create_gnvs(struct global_nvs *gnvs)
struct soc_intel_apollolake_config *cfg;
cfg = config_of_soc();
if (CONFIG(CONSOLE_CBMEM))
gnvs->cbmc = (uintptr_t) cbmem_find(CBMEM_ID_CONSOLE);
if (CONFIG(CHROMEOS)) {
/* Initialize Verified Boot data */
chromeos_init_chromeos_acpi(&gnvs->chromeos);

View File

@ -70,11 +70,6 @@ void acpi_init_gnvs(struct global_nvs *gnvs)
/* Top of Low Memory (start of resource allocation) */
gnvs->tolm = nc_read_top_of_low_memory();
#if CONFIG(CONSOLE_CBMEM)
/* Update the mem console pointer. */
gnvs->cbmc = (u32)cbmem_find(CBMEM_ID_CONSOLE);
#endif
if (CONFIG(CHROMEOS)) {
/* Initialize Verified Boot data */
chromeos_init_chromeos_acpi(&(gnvs->chromeos));

View File

@ -73,11 +73,6 @@ void acpi_init_gnvs(struct global_nvs *gnvs)
/* Top of Low Memory (start of resource allocation) */
gnvs->tolm = nc_read_top_of_low_memory();
#if CONFIG(CONSOLE_CBMEM)
/* Update the mem console pointer. */
gnvs->cbmc = (u32)cbmem_find(CBMEM_ID_CONSOLE);
#endif
if (CONFIG(CHROMEOS)) {
/* Initialize Verified Boot data */
chromeos_init_chromeos_acpi(&(gnvs->chromeos));

View File

@ -618,11 +618,6 @@ static void southcluster_inject_dsdt(const struct device *device)
/* CPU core count */
gnvs->pcnt = dev_count_cpu();
#if CONFIG(CONSOLE_CBMEM)
/* Update the mem console pointer. */
gnvs->cbmc = (u32)cbmem_find(CBMEM_ID_CONSOLE);
#endif
if (CONFIG(CHROMEOS)) {
/* Initialize Verified Boot data */
chromeos_init_chromeos_acpi(&(gnvs->chromeos));

View File

@ -194,10 +194,6 @@ void acpi_create_gnvs(struct global_nvs *gnvs)
/* CPU core count */
gnvs->pcnt = dev_count_cpu();
/* Update the mem console pointer. */
if (CONFIG(CONSOLE_CBMEM))
gnvs->cbmc = (uintptr_t)cbmem_find(CBMEM_ID_CONSOLE);
if (CONFIG(CHROMEOS)) {
/* Initialize Verified Boot data */
chromeos_init_chromeos_acpi(&(gnvs->chromeos));

View File

@ -68,11 +68,6 @@ void acpi_init_gnvs(struct global_nvs *gnvs)
/* Top of Low Memory (start of resource allocation) */
gnvs->tolm = (uintptr_t)cbmem_top();
#if CONFIG(CONSOLE_CBMEM)
/* Update the mem console pointer. */
gnvs->cbmc = (u32)cbmem_find(CBMEM_ID_CONSOLE);
#endif
/* MMIO Low/High & TSEG base and length */
gnvs->mmiob = (u32)get_top_of_low_memory();
gnvs->mmiol = (u32)(get_pciebase() - 1);

View File

@ -257,10 +257,6 @@ void acpi_create_gnvs(struct global_nvs *gnvs)
/* CPU core count */
gnvs->pcnt = dev_count_cpu();
if (CONFIG(CONSOLE_CBMEM))
/* Update the mem console pointer. */
gnvs->cbmc = (uintptr_t)cbmem_find(CBMEM_ID_CONSOLE);
if (CONFIG(CHROMEOS)) {
/* Initialize Verified Boot data */
chromeos_init_chromeos_acpi(&(gnvs->chromeos));

View File

@ -189,10 +189,6 @@ void acpi_create_gnvs(struct global_nvs *gnvs)
/* CPU core count */
gnvs->pcnt = dev_count_cpu();
if (CONFIG(CONSOLE_CBMEM))
/* Update the mem console pointer. */
gnvs->cbmc = (uintptr_t)cbmem_find(CBMEM_ID_CONSOLE);
if (CONFIG(CHROMEOS)) {
/* Initialize Verified Boot data */
chromeos_init_chromeos_acpi(&(gnvs->chromeos));

View File

@ -284,10 +284,6 @@ void acpi_create_gnvs(struct global_nvs *gnvs)
/* CPU core count */
gnvs->pcnt = dev_count_cpu();
if (CONFIG(CONSOLE_CBMEM))
/* Update the mem console pointer. */
gnvs->cbmc = (uintptr_t)cbmem_find(CBMEM_ID_CONSOLE);
if (CONFIG(CHROMEOS)) {
/* Initialize Verified Boot data */
chromeos_init_chromeos_acpi(&(gnvs->chromeos));

View File

@ -168,11 +168,6 @@ void acpi_create_gnvs(struct global_nvs *gnvs)
/* CPU core count */
gnvs->pcnt = dev_count_cpu();
#if CONFIG(CONSOLE_CBMEM)
/* Update the mem console pointer. */
gnvs->cbmc = (u32)(uintptr_t)cbmem_find(CBMEM_ID_CONSOLE);
#endif
if (CONFIG(CHROMEOS)) {
/* Initialize Verified Boot data */
chromeos_init_chromeos_acpi(&(gnvs->chromeos));

View File

@ -284,10 +284,6 @@ void acpi_create_gnvs(struct global_nvs *gnvs)
/* CPU core count */
gnvs->pcnt = dev_count_cpu();
if (CONFIG(CONSOLE_CBMEM))
/* Update the mem console pointer. */
gnvs->cbmc = (uintptr_t)cbmem_find(CBMEM_ID_CONSOLE);
if (CONFIG(CHROMEOS)) {
/* Initialize Verified Boot data */
chromeos_init_chromeos_acpi(&(gnvs->chromeos));

View File

@ -33,10 +33,6 @@ void acpi_init_gnvs(struct global_nvs *gnvs)
/* CPU core count */
gnvs->pcnt = dev_count_cpu();
printk(BIOS_DEBUG, "%s gnvs->pcnt: %d\n", __func__, gnvs->pcnt);
/* Update the mem console pointer. */
if (CONFIG(CONSOLE_CBMEM))
gnvs->cbmc = (uint32_t)cbmem_find(CBMEM_ID_CONSOLE);
}
int soc_madt_sci_irq_polarity(int sci)

View File

@ -685,6 +685,11 @@ size_t gnvs_size_of_array(void)
return sizeof(struct global_nvs);
}
uint32_t *gnvs_cbmc_ptr(struct global_nvs *gnvs)
{
return &gnvs->cbmc;
}
void southbridge_inject_dsdt(const struct device *dev)
{
struct global_nvs *gnvs;
@ -702,8 +707,6 @@ void southbridge_inject_dsdt(const struct device *dev)
chromeos_init_chromeos_acpi(&(gnvs->chromeos));
#endif
/* Update the mem console pointer. */
gnvs->cbmc = (u32)cbmem_find(CBMEM_ID_CONSOLE);
/* Add it to DSDT. */