HV: remove efi support for SOS

Provide EFI support for SOS could cause weird issues. For example, hypervisor
works based on E820 table whereras it's possible that the memory map from EFI
table is not aligned with E820 table. The SOS kernel kaslr will try to find the
random address for extracted kernel image in EFI table first. So it's possible
that none-RAM in E820 is picked for extracted kernel image. This will make
kernel boot fail.

This patch removes EFI support for SOS by not passing struct boot_efi_info to
SOS kernel zeropage, and reserve a memory to store RSDP table for SOS and pass
the RSDP address to SOS kernel zeropage for SOS to locate ACPI table.

The patch requires SOS kernel version be high than 4.20, otherwise the kernel
might fail to find the RSDP.

Tracked-On: #5626

Signed-off-by: Victor Sun <victor.sun@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
Victor Sun
2021-02-09 15:48:03 +08:00
committed by wenlingz
parent ae7eb25a7f
commit ce9d5e8779
14 changed files with 54 additions and 114 deletions

View File

@@ -7,14 +7,13 @@
#ifndef ZEROPAGE_H
#define ZEROPAGE_H
#include <e820.h>
#include <efi.h>
struct zero_page {
uint8_t pad0[0x1c0]; /* 0x000 */
uint8_t pad0[0x70]; /* 0x000 */
struct efi_info boot_efi_info;
uint64_t acpi_rsdp_addr; /* 0x070 */
uint8_t pad1[0x8]; /* 0x1e0 */
uint8_t pad1[0x170]; /* 0x78 */
uint8_t e820_nentries; /* 0x1e8 */
uint8_t pad2[0x8]; /* 0x1e9 */