mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-31 15:30:56 +00:00
HV: re-arch boot component header
The patch re-arch boot component header files by: - moving multiboot.h from include/arch/x86/ to boot/include/ and keep this header for multiboot1 protocol data struct only; - moving multiboot related MACROs in cpu_primary.S to multiboot.h; - creating an independent boot.h to store acrn specific boot information for other files' reference; Tracked-On: #4419 Signed-off-by: Victor Sun <victor.sun@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
708cae7c88
commit
520a0222d3
@ -21,9 +21,9 @@
|
||||
* the macros involved are changed.
|
||||
*/
|
||||
|
||||
#include <multiboot.h>
|
||||
/* MULTIBOOT HEADER */
|
||||
#define MULTIBOOT_HEADER_MAGIC 0x1badb002
|
||||
#define MULTIBOOT_HEADER_FLAGS 0x00000002 /*flags bit 1 : enable mem_*, mmap_**/
|
||||
#define MULTIBOOT_HEADER_FLAGS MULTIBOOT_HEADER_NEED_MEMINFO
|
||||
|
||||
.extern cpu_primary_save32
|
||||
.extern cpu_primary_save64
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <page.h>
|
||||
#include <e820.h>
|
||||
#include <mmu.h>
|
||||
#include <multiboot.h>
|
||||
#include <boot.h>
|
||||
#include <logmsg.h>
|
||||
|
||||
/*
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <sprintf.h>
|
||||
#include <ept.h>
|
||||
#include <logmsg.h>
|
||||
#include <multiboot.h>
|
||||
#include <boot.h>
|
||||
#include <crypto_api.h>
|
||||
#include <seed.h>
|
||||
#include "seed_abl.h"
|
||||
|
@ -6,11 +6,10 @@
|
||||
|
||||
#include <types.h>
|
||||
#include <errno.h>
|
||||
#include <multiboot.h>
|
||||
#include <boot.h>
|
||||
#include <pgtable.h>
|
||||
#include <dbg_cmd.h>
|
||||
#include <logmsg.h>
|
||||
#include <vboot.h>
|
||||
|
||||
void parse_hv_cmdline(void)
|
||||
{
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <lapic.h>
|
||||
#include <per_cpu.h>
|
||||
#include <guest/vm.h>
|
||||
#include <multiboot.h>
|
||||
#include <boot.h>
|
||||
#include <deprivilege_boot.h>
|
||||
|
||||
static struct depri_boot_context depri_boot_ctx;
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <per_cpu.h>
|
||||
#include <irq.h>
|
||||
#include <boot_context.h>
|
||||
#include <multiboot.h>
|
||||
#include <boot.h>
|
||||
#include <pgtable.h>
|
||||
#include <zeropage.h>
|
||||
#include <seed.h>
|
||||
|
@ -4,11 +4,11 @@
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#include <multiboot.h>
|
||||
#include <vm.h>
|
||||
#include <types.h>
|
||||
#include <pgtable.h>
|
||||
#include <acpi.h>
|
||||
#include <boot.h>
|
||||
#include <vboot.h>
|
||||
#include <direct_boot.h>
|
||||
#include <deprivilege_boot.h>
|
||||
|
17
hypervisor/boot/include/boot.h
Normal file
17
hypervisor/boot/include/boot.h
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
#ifndef BOOT_H_
|
||||
#define BOOT_H_
|
||||
|
||||
#include <multiboot.h>
|
||||
|
||||
#define MAX_BOOTARGS_SIZE 2048U
|
||||
|
||||
/* boot_regs store the multiboot info magic and address */
|
||||
extern uint32_t boot_regs[2];
|
||||
|
||||
#endif /* BOOT_H_ */
|
@ -7,16 +7,20 @@
|
||||
#ifndef MULTIBOOT_H
|
||||
#define MULTIBOOT_H
|
||||
|
||||
#include <types.h>
|
||||
#define MULTIBOOT_HEADER_MAGIC 0x1BADB002
|
||||
#define MULTIBOOT_INFO_MAGIC 0x2BADB002U
|
||||
|
||||
/* MULTIBOOT HEADER FLAGS */
|
||||
#define MULTIBOOT_HEADER_NEED_MEMINFO 0x00000002
|
||||
|
||||
/* MULTIBOOT INFO FLAGS */
|
||||
#define MULTIBOOT_INFO_HAS_CMDLINE 0x00000004U
|
||||
#define MULTIBOOT_INFO_HAS_MODS 0x00000008U
|
||||
#define MULTIBOOT_INFO_HAS_MMAP 0x00000040U
|
||||
#define MULTIBOOT_INFO_HAS_DRIVES 0x00000080U
|
||||
#define MULTIBOOT_INFO_HAS_LOADER_NAME 0x00000200U
|
||||
|
||||
/* maximum lengt of the guest OS' command line parameter string */
|
||||
#define MAX_BOOTARGS_SIZE 2048U
|
||||
#ifndef ASSEMBLER
|
||||
|
||||
struct multiboot_info {
|
||||
uint32_t mi_flags;
|
||||
@ -83,6 +87,6 @@ struct multiboot_module {
|
||||
uint32_t mm_reserved;
|
||||
};
|
||||
|
||||
/* boot_regs store the multiboot header address */
|
||||
extern uint32_t boot_regs[2];
|
||||
#endif
|
||||
#endif /* ASSEMBLER */
|
||||
|
||||
#endif /* MULTIBOOT_H */
|
@ -9,7 +9,7 @@
|
||||
|
||||
#include <types.h>
|
||||
#include <pci.h>
|
||||
#include <multiboot.h>
|
||||
#include <boot.h>
|
||||
#include <acrn_common.h>
|
||||
#include <vm_configurations.h>
|
||||
#include <sgx.h>
|
||||
|
Loading…
Reference in New Issue
Block a user