ACPI GNVS: Replace uses of smm_get_gnvs()

Change-Id: I7b657750b10f98524f011f5254e533217fe94fd8
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42849
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Kyösti Mälkki
2020-06-28 12:12:01 +03:00
committed by Patrick Georgi
parent 6bed1c47f6
commit 239abaf759
30 changed files with 50 additions and 116 deletions

View File

@@ -17,12 +17,6 @@
#include "pch.h"
#include "nvs.h"
static struct global_nvs *gnvs;
struct global_nvs *smm_get_gnvs(void)
{
return gnvs;
}
int southbridge_io_trap_handler(int smif)
{
switch (smif) {
@@ -186,7 +180,7 @@ void southbridge_smi_monitor(void)
void southbridge_smm_xhci_sleep(u8 slp_type)
{
if (smm_get_gnvs()->xhci)
if (gnvs->xhci)
xhci_sleep(slp_type);
}

View File

@@ -21,9 +21,6 @@
u16 pmbase = DEFAULT_PMBASE;
u8 smm_initialized = 0;
/* GNVS needs to be updated by an 0xEA PM Trap (B2) after it has been located by coreboot. */
struct global_nvs *gnvs = (struct global_nvs *)0x0;
void southbridge_update_gnvs(u8 apm_cnt, int *smm_done)
{
gnvs = *(struct global_nvs **)0x500;

View File

@@ -9,10 +9,11 @@
#include "nvs.h"
/* GNVS needs to be updated by an 0xEA PM Trap (B2) after it has been located
* by coreboot.
*/
struct global_nvs *gnvs = (struct global_nvs *)0x0;
#if !CONFIG(SMM_TSEG)
/* For qemu/x86-q35 to build properly. */
struct global_nvs *gnvs;
#endif
void *tcg = (void *)0x0;
void *smi1 = (void *)0x0;

View File

@@ -15,10 +15,6 @@
u16 pmbase = DEFAULT_PMBASE;
u8 smm_initialized = 0;
/* GNVS needs to be updated by an 0xEA PM Trap (B2) after it has been located
* by coreboot.
*/
struct global_nvs *gnvs = (struct global_nvs *)0x0;
void *tcg = (void *)0x0;
void *smi1 = (void *)0x0;

View File

@@ -23,15 +23,6 @@
#include <southbridge/intel/common/gpio.h>
#include <southbridge/intel/common/pmutil.h>
/* GNVS needs to be updated by an 0xEA PM Trap (B2) after it has been located
* by coreboot.
*/
static struct global_nvs *gnvs;
struct global_nvs *smm_get_gnvs(void)
{
return gnvs;
}
int southbridge_io_trap_handler(int smif)
{
switch (smif) {

View File

@@ -21,15 +21,6 @@
static u8 smm_initialized = 0;
/* GNVS needs to be updated by an 0xEA PM Trap (B2) after it has been located
* by coreboot.
*/
static struct global_nvs *gnvs;
struct global_nvs *smm_get_gnvs(void)
{
return gnvs;
}
int southbridge_io_trap_handler(int smif)
{
switch (smif) {