ACPI: Drop typedef global_nvs_t

Bring all GNVS related initialisation function to global
scope to force identical signatures. Followup work is
likely to remove some as duplicates.

Change-Id: Id4299c41d79c228f3d35bc7cb9bf427ce1e82ba1
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42489
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kyösti Mälkki 2020-06-17 23:37:49 +03:00 committed by Patrick Georgi
parent bc1cb38ce1
commit 0c1dd9c841
189 changed files with 402 additions and 319 deletions

View File

@ -16,4 +16,21 @@ size_t gnvs_size_of_array(void);
uint32_t *gnvs_cbmc_ptr(void);
void *gnvs_chromeos_ptr(void);
/*
* Creates acpi gnvs and adds it to the DSDT table.
* GNVS creation is chipset specific and is done in soc specific acpi.c file.
*/
struct device;
void southbridge_inject_dsdt(const struct device *device);
/*
* This function populates the gnvs structure in acpi table.
* Defined as weak in common acpi as gnvs structure definition is
* chipset specific.
*/
struct global_nvs;
void acpi_create_gnvs(struct global_nvs *gnvs);
void acpi_init_gnvs(struct global_nvs *gnvs);
#endif

View File

@ -86,6 +86,7 @@ struct smm_module_params {
typedef asmlinkage void (*smm_handler_t)(void *);
/* SMM Runtime helpers. */
struct global_nvs *smm_get_gnvs(void);
/* Entry point for SMM modules. */
asmlinkage void smm_handler_start(void *params);

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801gx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Enable both COM ports */
gnvs->cmap = 0x01;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Disable USB ports in S3 by default */
gnvs->s3u0 = 0;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->tcrt = 100;
gnvs->tpsv = 90;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/lynxpoint/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->tcrt = 100;
gnvs->tpsv = 90;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801gx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->pwrs = 1; /* Power state (AC = 1) */
gnvs->cmap = 0x01; /* Enable COM 1 port */

View File

@ -1,7 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/lynxpoint/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
}

View File

@ -1,7 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
}

View File

@ -1,7 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
}

View File

@ -1,7 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801gx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
}

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801jx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->pwrs = 1; /* Power state (AC = 1) */
gnvs->osys = 2002; /* At least WINXP SP2 (HPET fix) */

View File

@ -1,9 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpigen.h>
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801jx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->pwrs = 1; /* Power state (AC = 1) */
gnvs->osys = 2002; /* At least WINXP SP2 (HPET fix) */

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801gx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->pwrs = 1; /* Power state (AC = 1) */
gnvs->cmap = 0x01; /* Enable COM 1 port */

View File

@ -1,7 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
}

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->tcrt = 100;
gnvs->tpsv = 90;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->tcrt = 100;
gnvs->tpsv = 90;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* critical temp that will shutdown the pc == 95C degrees */
gnvs->tcrt = 95;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->tcrt = 100;
gnvs->tpsv = 90;

View File

@ -1,9 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
/* FIXME: check this function. */
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->tcrt = 100;
gnvs->tpsv = 90;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->tcrt = 100;
gnvs->tpsv = 90;

View File

@ -3,6 +3,7 @@
#include <types.h>
#include <string.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <arch/ioapic.h>
#include <arch/smp/mpspec.h>
#include <device/device.h>
@ -13,7 +14,7 @@
#include "../qemu-i440fx/acpi.h"
#include <southbridge/intel/i82801ix/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->apic = 1;
gnvs->mpen = 1; /* Enable Multi Processing */

View File

@ -1,11 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <arch/ioapic.h>
#include <soc/acpi.h>
#include <soc/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
acpi_init_gnvs(gnvs);

View File

@ -1,7 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801gx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
}

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801gx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->pwrs = 1; /* Power state (AC = 1) */
gnvs->cmap = 1; /* COM 1 port */

View File

@ -4,12 +4,13 @@
#include <string.h>
#include <console/console.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <device/device.h>
#include <southbridge/intel/i82801gx/nvs.h>
#include "mainboard.h"
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Enable COM port(s) */
gnvs->cmap = 0x01;

View File

@ -14,7 +14,7 @@
/* The southbridge SMI handler checks whether gnvs has a
* valid pointer before calling the trap handler
*/
extern global_nvs_t *gnvs;
extern struct global_nvs *gnvs;
int mainboard_io_trap_handler(int smif)
{

View File

@ -1,7 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801gx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
}

View File

@ -1,9 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->tcrt = CRITICAL_TEMPERATURE;
gnvs->tpsv = PASSIVE_TEMPERATURE;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801gx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->pwrs = 1; /* Power state (AC = 1) */
gnvs->lptp = 0; /* LPT port */

View File

@ -1,7 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
}

View File

@ -2,11 +2,12 @@
#include <arch/ioapic.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <soc/acpi.h>
#include <soc/nvs.h>
#include <variant/thermal.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
acpi_init_gnvs(gnvs);

View File

@ -2,6 +2,7 @@
#include <types.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <device/device.h>
#include <ec/google/chromeec/ec.h>
#include <southbridge/intel/lynxpoint/nvs.h>
@ -9,7 +10,7 @@
#include <vendorcode/google/chromeos/gnvs.h>
#include <variant/thermal.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Enable USB ports in S3 */
gnvs->s3u0 = 1;

View File

@ -1,10 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
#include <vendorcode/google/chromeos/gnvs.h>
#include "thermal.h"
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Disable USB ports in S3 by default */
gnvs->s3u0 = 0;

View File

@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <console/console.h>
#include <cpu/x86/smm.h>
#include <southbridge/intel/bd82x6x/nvs.h>

View File

@ -1,11 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <arch/ioapic.h>
#include <soc/acpi.h>
#include <soc/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
acpi_init_gnvs(gnvs);

View File

@ -2,13 +2,14 @@
#include <types.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <arch/ioapic.h>
#include <device/device.h>
#include <soc/acpi.h>
#include <soc/nvs.h>
#include <variant/thermal.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
acpi_init_gnvs(gnvs);

View File

@ -163,7 +163,7 @@ static void kahlee_enable(struct device *dev)
static void mainboard_final(void *chip_info)
{
struct global_nvs_t *gnvs;
struct global_nvs *gnvs;
gnvs = acpi_get_gnvs();

View File

@ -1,11 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
#include <ec/google/chromeec/ec.h>
#include <vendorcode/google/chromeos/gnvs.h>
#include "thermal.h"
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Disable USB ports in S3 by default */
gnvs->s3u0 = 0;

View File

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <console/console.h>
#include <cpu/x86/smm.h>
#include <southbridge/intel/bd82x6x/nvs.h>

View File

@ -2,6 +2,7 @@
#include <types.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <device/device.h>
#include <vendorcode/google/chromeos/gnvs.h>
#include <ec/compal/ene932/ec.h>
@ -12,7 +13,7 @@
#include "thermal.h"
#include "onboard.h"
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Disable USB ports in S3 by default */
gnvs->s3u0 = 0;

View File

@ -2,13 +2,14 @@
#include <types.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <arch/ioapic.h>
#include <device/device.h>
#include <soc/acpi.h>
#include <soc/nvs.h>
#include <soc/iomap.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
acpi_init_gnvs(gnvs);

View File

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <arch/io.h>
#include <console/console.h>
#include <cpu/x86/smm.h>

View File

@ -2,6 +2,7 @@
#include <types.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <device/device.h>
#include <vendorcode/google/chromeos/gnvs.h>
#include <ec/google/chromeec/ec.h>
@ -10,7 +11,7 @@
#include "thermal.h"
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Enable USB ports in S3 */
gnvs->s3u0 = 1;

View File

@ -2,6 +2,7 @@
#include <types.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <device/device.h>
#include <vendorcode/google/chromeos/gnvs.h>
#include <bootmode.h>
@ -13,7 +14,7 @@
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Disable USB ports in S3 by default */
gnvs->s3u0 = 0;

View File

@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <device/pci_ops.h>
#include <console/console.h>
#include <cpu/x86/smm.h>

View File

@ -194,7 +194,7 @@ static void reset_backlight_gpio(void *unused)
static void mainboard_final(void *chip_info)
{
struct global_nvs_t *gnvs;
struct global_nvs *gnvs;
gnvs = acpi_get_gnvs();

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->tcrt = 100;
gnvs->tpsv = 90;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
// the lid is open by default.
gnvs->lids = 1;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->tcrt = 100;
gnvs->tpsv = 90;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801gx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Enable both COM ports */
gnvs->cmap = 0x01;

View File

@ -2,6 +2,7 @@
#include <types.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <device/device.h>
#include <vendorcode/google/chromeos/gnvs.h>
#include <southbridge/intel/lynxpoint/pch.h>
@ -9,7 +10,7 @@
#include "thermal.h"
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Enable USB ports in S3 */
gnvs->s3u0 = 1;

View File

@ -1,7 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801gx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
}

View File

@ -1,7 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801gx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
}

View File

@ -1,9 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Enable USB ports in S3 by default */
gnvs->s3u0 = 1;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801gx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->pwrs = 1; /* Power state (AC = 1) */
gnvs->cmap = 0x01; /* Enable COM 1 port */

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801jx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->pwrs = 1; /* Power state (AC = 1) */
gnvs->osys = 2002; /* At least WINXP SP2 (HPET fix) */

View File

@ -2,13 +2,14 @@
#include <types.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <device/device.h>
#include <vendorcode/google/chromeos/gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Enable USB ports in S3 */
gnvs->s3u0 = 1;

View File

@ -2,6 +2,7 @@
#include <types.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <device/device.h>
#include <cpu/x86/msr.h>
@ -11,7 +12,7 @@
extern const unsigned char AmlCode[];
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
acpi_init_gnvs(gnvs);

View File

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <arch/ioapic.h>
#include <device/device.h>
#include <soc/acpi.h>
@ -10,7 +11,7 @@
#include <boardid.h>
#include "onboard.h"
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
acpi_init_gnvs(gnvs);

View File

@ -2,13 +2,14 @@
#include <types.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <arch/ioapic.h>
#include <device/device.h>
#include <soc/acpi.h>
#include <soc/nvs.h>
#include "thermal.h"
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
acpi_init_gnvs(gnvs);

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801gx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Enable both COM ports */
gnvs->cmap = 0x01;

View File

@ -1,9 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->tcrt = CRITICAL_TEMPERATURE;
gnvs->tpsv = PASSIVE_TEMPERATURE;

View File

@ -1,9 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* The lid is open by default */
gnvs->lids = 1;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* The lid is open by default */
gnvs->lids = 1;

View File

@ -2,11 +2,12 @@
#include <arch/ioapic.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <arch/smp/mpspec.h>
#include <device/device.h>
#include <southbridge/intel/i82801ix/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->apic = 1;
gnvs->mpen = 1; /* Enable Multi Processing */

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/ibexpeak/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* The lid is open by default */
gnvs->lids = 1;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* The lid is open by default */
gnvs->lids = 1;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* The lid is open by default */
gnvs->lids = 1;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* The lid is open by default */
gnvs->lids = 1;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* The lid is open by default */
gnvs->lids = 1;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/lynxpoint/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* The lid is open by default. */
gnvs->lids = 1;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* The lid is open by default */
gnvs->lids = 1;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* The lid is open by default */
gnvs->lids = 1;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801gx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Enable both COM ports */
gnvs->cmap = 0x01;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801gx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->pwrs = 1; /* Power state (AC = 1) */
gnvs->cmap = 0x01; /* Enable COM 1 port */

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* The lid is open by default */
gnvs->lids = 1;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* The lid is open by default */
gnvs->lids = 1;

View File

@ -2,11 +2,12 @@
#include <arch/ioapic.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <arch/smp/mpspec.h>
#include <device/device.h>
#include <southbridge/intel/i82801ix/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->apic = 1;
gnvs->mpen = 1; /* Enable Multi Processing */

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/ibexpeak/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* The lid is open by default */
gnvs->lids = 1;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* The lid is open by default */
gnvs->lids = 1;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* The lid is open by default */
gnvs->lids = 1;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801gx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Enable both COM ports */
gnvs->cmap = 0x01;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->tcrt = 100;
gnvs->tpsv = 90;

View File

@ -1,11 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <intelblocks/acpi.h>
#include <soc/acpi.h>
extern const unsigned char AmlCode[];
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
acpi_init_gnvs(gnvs);
}

View File

@ -1,7 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/ibexpeak/nvs.h>
void acpi_create_gnvs(global_nvs_t * gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
}

View File

@ -1,11 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <arch/ioapic.h>
#include <soc/acpi.h>
#include <soc/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
acpi_init_gnvs(gnvs);

View File

@ -1,10 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <acpi/acpi_gnvs.h>
#include <arch/ioapic.h>
#include <soc/acpi.h>
#include <string.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
memset(gnvs, 0, sizeof(*gnvs));

View File

@ -1,11 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <arch/ioapic.h>
#include <soc/acpi.h>
#include <soc/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
acpi_init_gnvs(gnvs);
}

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/i82801gx/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Enable both COM ports */
gnvs->cmap = 0x01;

View File

@ -2,11 +2,12 @@
#include <arch/ioapic.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <arch/smp/mpspec.h>
#include <device/device.h>
#include <southbridge/intel/i82801ix/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->apic = 1;
gnvs->mpen = 1; /* Enable Multi Processing */

View File

@ -1,10 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
#include <variant/thermal.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* The lid is open by default */
gnvs->lids = 1;

View File

@ -2,6 +2,7 @@
#include <types.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <device/device.h>
#include <ec/acpi/ec.h>
#if CONFIG(CHROMEOS)
@ -11,7 +12,7 @@
#include "thermal.h"
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/*
* Disable 3G in suspend by default.

View File

@ -2,13 +2,14 @@
#include <types.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <device/device.h>
#include <vendorcode/google/chromeos/gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
#include "thermal.h"
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Enable Front USB ports in S3 by default */
gnvs->s3u0 = 1;

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->tcrt = 100;
gnvs->tpsv = 90;

View File

@ -2,6 +2,7 @@
#include <types.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <device/device.h>
#include <cpu/x86/msr.h>
@ -11,7 +12,7 @@
extern const unsigned char AmlCode[];
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
acpi_init_gnvs(gnvs);

View File

@ -1,7 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/lynxpoint/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
}

View File

@ -1,8 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <southbridge/intel/bd82x6x/nvs.h>
void acpi_create_gnvs(global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
gnvs->tcrt = 100;
gnvs->tpsv = 90;

View File

@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_gnvs.h>
#include <cbmem.h>
#include <console/console.h>
#include <device/device.h>
@ -91,7 +92,7 @@ static void lpc_init(struct device *dev)
static void lpc_read_resources(struct device *dev)
{
struct resource *res;
global_nvs_t *gnvs;
struct global_nvs *gnvs;
/* Get the normal pci resources of this device */
pci_dev_read_resources(dev);
@ -127,7 +128,7 @@ static void lpc_read_resources(struct device *dev)
compact_resources(dev);
/* Allocate ACPI NVS in CBMEM */
gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(global_nvs_t));
gnvs = cbmem_add(CBMEM_ID_ACPI_GNVS, sizeof(struct global_nvs));
printk(BIOS_DEBUG, "ACPI GNVS at %p\n", gnvs);
}

View File

@ -7,6 +7,7 @@
#include <string.h>
#include <console/console.h>
#include <acpi/acpi.h>
#include <acpi/acpi_gnvs.h>
#include <acpi/acpigen.h>
#include <device/pci_ops.h>
#include <arch/ioapic.h>
@ -244,7 +245,7 @@ unsigned long southbridge_write_acpi_tables(const struct device *device,
return acpi_write_hpet(device, current, rsdp);
}
static void acpi_create_gnvs(struct global_nvs_t *gnvs)
void acpi_create_gnvs(struct global_nvs *gnvs)
{
/* Clear out GNVS. */
memset(gnvs, 0, sizeof(*gnvs));
@ -268,7 +269,7 @@ static void acpi_create_gnvs(struct global_nvs_t *gnvs)
void southbridge_inject_dsdt(const struct device *device)
{
struct global_nvs_t *gnvs;
struct global_nvs *gnvs;
gnvs = cbmem_find(CBMEM_ID_ACPI_GNVS);

Some files were not shown because too many files have changed in this diff Show More