dm: build vRTCT of Software SRAM for Post-launch RTVM

This patch prepares vRTCT for post-RTVM instead of
  pass-thru native RTCT:
   - Configurations are based on Service VM native RTCT.
   - Remap vLAPIC IDs in vRTCT.
   - Remap base address of SW SRAM memory regions
     from HPA to GPA.
   - HPA base of Software SRAM shall be parsed from PTCT
     instead of hardcoding.

Tracked-On: #5649
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Fei Li <fei1.li@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
Yonghua Huang
2021-01-26 15:16:25 +08:00
committed by wenlingz
parent 3005d074f0
commit 154a446c5c
8 changed files with 450 additions and 7 deletions

View File

@@ -39,6 +39,27 @@
#define IO_PMTMR 0x0 /* PM Timer is disabled in ACPI */
struct acpi_table_hdr {
/* ASCII table signature */
char signature[4];
/* Length of table in bytes, including this header */
uint32_t length;
/* ACPI Specification minor version number */
uint8_t revision;
/* To make sum of entire table == 0 */
uint8_t checksum;
/* ASCII OEM identification */
char oem_id[6];
/* ASCII OEM table identification */
char oem_table_id[8];
/* OEM revision number */
uint32_t oem_revision;
/* ASCII ASL compiler vendor ID */
char asl_compiler_id[4];
/* ASL compiler version */
uint32_t asl_compiler_revision;
} __packed;
/* All dynamic table entry no. */
#define NHLT_ENTRY_NO 8