soc/intel/braswell: Save/restore GMA OpRegion address
Add global/ACPI nvs variables required for IGD OpRegion. Add functions necessary to save the ACPI OpRegion table address in ASLB, and restore table address upon S3 resume. Implementation modeled on existing Baytrail code. Test: boot Windows 10 on google/edgar with Tianocore payload and GOP display init, observe display driver loaded and functional, display not black screen when resuming from S3 suspend. Change-Id: I7c1fbf818510949420f70e93ed4780e94e598508 Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/25197 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
committed by
Martin Roth
parent
c7edf18f7c
commit
132bbe6be5
@ -20,8 +20,10 @@
|
||||
#include <device/device.h>
|
||||
#include <device/pci.h>
|
||||
#include <device/pci_ids.h>
|
||||
#include <drivers/intel/gma/opregion.h>
|
||||
#include <reg_script.h>
|
||||
#include <soc/gfx.h>
|
||||
#include <soc/nvs.h>
|
||||
#include <soc/pci_devs.h>
|
||||
#include <soc/ramstage.h>
|
||||
|
||||
@ -73,6 +75,21 @@ static void gfx_init(device_t dev)
|
||||
|
||||
/* Post VBIOS Init */
|
||||
gfx_post_vbios_init(dev);
|
||||
|
||||
intel_gma_restore_opregion();
|
||||
}
|
||||
|
||||
uintptr_t gma_get_gnvs_aslb(const void *gnvs)
|
||||
{
|
||||
const global_nvs_t *gnvs_ptr = gnvs;
|
||||
return (uintptr_t)(gnvs_ptr ? gnvs_ptr->aslb : 0);
|
||||
}
|
||||
|
||||
void gma_set_gnvs_aslb(void *gnvs, uintptr_t aslb)
|
||||
{
|
||||
global_nvs_t *gnvs_ptr = gnvs;
|
||||
if (gnvs_ptr)
|
||||
gnvs_ptr->aslb = aslb;
|
||||
}
|
||||
|
||||
static struct device_operations gfx_device_ops = {
|
||||
|
Reference in New Issue
Block a user