coreboot-kgpe-d16/src/drivers/intel
Maulik V Vaghela a6b60ebedb drivers/intel/gma: Move extended VBT just below opregion
Currently the flow for opregion init is as below:
1. Allocate memory for opregion first (cbmem_add(opregion))
2. Check if VBT size > 6 KiB (this requires extended VBT support)
3. In case of extended VBT requirement, we allocate another chunk
   of memory which is equal to size of VBT (cbmem_add(extended_vbt))
4. Pass physical address pointer to OS via RVDA

We can optimize the above flow to allocate single chunk of memory by
checking VBT size in earlier step. The new optimized flow for opregion
init is as below:
1. Check if VBT size > 6 KiB (this requires extended VBT support)
2. In case of extended VBT requirement, total memory to be allocated
   is calculated as sizeof(opregion) + sizeof (extended_vbt)
   In case where VBT size is < 6 KiB, total memory requirement would
   be equal to sizeof(opregion)
3. Based on above calculation, allocate single chunk of memory based on
   total size.

This will also be helpful for the case of virtualization where guest
users don't have access to physical address and when it needs relative
address of VBT compared to absolute address.

In case of opregion 2.1 spec, we need to pass relative address of
VBT from opregion base in RVDA. This optimization will help in meeting
this requirement since relative address of extended VBT is easy to get.
This change will ensure that it meets opregion specification
requirement and will be compatible with future versions as well.

BUG=b:190019970
BRANCH=None
TEST=check the address of extended VBT region and address is coming
correctly.

Change-Id: Ic0e255df63145409096b0b9312c6c51c05f49931
Signed-off-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55341
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-07-01 16:36:47 +00:00
..
dptf drivers/intel/dptf: Add OEM variables support 2021-07-01 12:12:33 +00:00
fsp1_1 drivers/intel/fsp1_1: Drop empty weak functions 2021-05-27 15:42:14 +00:00
fsp2_0 intel/fsp2_0: Add FSP_ARRAY_LOAD macro 2021-06-18 06:03:16 +00:00
gma drivers/intel/gma: Move extended VBT just below opregion 2021-07-01 16:36:47 +00:00
i210 drivers/intel/i210: Request Bus Master in .final ops 2020-11-30 07:58:13 +00:00
ish acpi: Call acpi_fill_ssdt() only for enabled devices 2020-11-09 07:24:13 +00:00
mipi_camera drivers/intel/mipi_camera: Change type for gpio_num to uint16_t 2021-06-21 05:34:58 +00:00
pmc_mux intel/common/block: Move mainboard api to tcss common block 2021-06-04 12:36:07 +00:00
ptt src: Remove unused 'include <stdint.h> 2020-07-14 16:11:10 +00:00
soundwire acpi: Call acpi_fill_ssdt() only for enabled devices 2020-11-09 07:24:13 +00:00
usb4/retimer drivers/intel/usb4: Update driver to support Retimer firmware upgrade 2021-05-18 21:58:45 +00:00