hv: modularization: avoid dependency of multiboot on zeropage.h.

Split off definition of "struct efi_info" into a separate header
file lib/efi.h.

Tracked-On: #5661
Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
This commit is contained in:
Liang Yi 2021-01-19 02:17:14 +08:00 committed by wenlingz
parent 7c02dc0801
commit 1de396363f
4 changed files with 24 additions and 12 deletions

View File

@ -10,6 +10,7 @@
#include <trampoline.h>
#include <reloc.h>
#include <ld_sym.h>
#include <e820.h>
static uint64_t trampoline_start16_paddr;

View File

@ -41,7 +41,7 @@
#ifndef ASSEMBLER
#include <zeropage.h>
#include <efi.h>
#include <vm_configurations.h>
struct multiboot_mmap {

View File

@ -7,17 +7,7 @@
#ifndef ZEROPAGE_H
#define ZEROPAGE_H
#include <e820.h>
struct efi_info {
uint32_t efi_loader_signature; /* 0x1d0 */
uint32_t efi_systab; /* 0x1c4 */
uint32_t efi_memdesc_size; /* 0x1c8 */
uint32_t efi_memdesc_version; /* 0x1cc */
uint32_t efi_memmap; /* 0x1d0 */
uint32_t efi_memmap_size; /* 0x1d4 */
uint32_t efi_systab_hi; /* 0x1d8 */
uint32_t efi_memmap_hi; /* 0x1dc */
} __packed;
#include <efi.h>
struct zero_page {
uint8_t pad0[0x1c0]; /* 0x000 */

View File

@ -0,0 +1,21 @@
/*
* Copyright (C) 2020 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef EFI_H
#define EFI_H
struct efi_info {
uint32_t efi_loader_signature; /* 0x1c0 */
uint32_t efi_systab; /* 0x1c4 */
uint32_t efi_memdesc_size; /* 0x1c8 */
uint32_t efi_memdesc_version; /* 0x1cc */
uint32_t efi_memmap; /* 0x1d0 */
uint32_t efi_memmap_size; /* 0x1d4 */
uint32_t efi_systab_hi; /* 0x1d8 */
uint32_t efi_memmap_hi; /* 0x1dc */
} __packed;
#endif