mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-12 18:34:24 +00:00
cleanup arch folder, only include some necessary, doesn't include hypervisor.h Tracked-On: #1842 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com> modified: arch/x86/configs/apl-mrb/pt_dev.c modified: arch/x86/configs/apl-mrb/ve820.c modified: arch/x86/configs/dnv-cb2/pt_dev.c modified: arch/x86/configs/dnv-cb2/ve820.c modified: arch/x86/configs/partition_config.c modified: arch/x86/configs/sharing_config.c modified: arch/x86/cpu.c modified: arch/x86/cpu_state_tbl.c modified: arch/x86/e820.c modified: arch/x86/gdt.c modified: arch/x86/init.c modified: arch/x86/ioapic.c modified: arch/x86/irq.c modified: arch/x86/lapic.c modified: arch/x86/mmu.c modified: arch/x86/notify.c modified: arch/x86/page.c modified: arch/x86/pagetable.c modified: arch/x86/static_checks.c modified: arch/x86/timer.c modified: arch/x86/trampoline.c modified: arch/x86/vmx.c modified: arch/x86/vtd.c modified: boot/include/acpi.h modified: include/arch/x86/e820.h modified: include/arch/x86/ioapic.h
55 lines
1.4 KiB
C
55 lines
1.4 KiB
C
/*
|
|
* Copyright (C) 2018 Intel Corporation. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef E820_H
|
|
#define E820_H
|
|
#include <types.h>
|
|
|
|
/* E820 memory types */
|
|
#define E820_TYPE_RAM 1U /* EFI 1, 2, 3, 4, 5, 6, 7 */
|
|
#define E820_TYPE_RESERVED 2U
|
|
/* EFI 0, 11, 12, 13 (everything not used elsewhere) */
|
|
#define E820_TYPE_ACPI_RECLAIM 3U /* EFI 9 */
|
|
#define E820_TYPE_ACPI_NVS 4U /* EFI 10 */
|
|
#define E820_TYPE_UNUSABLE 5U /* EFI 8 */
|
|
|
|
#define E820_MAX_ENTRIES 32U
|
|
|
|
/** Defines a single entry in an E820 memory map. */
|
|
struct e820_entry {
|
|
/** The base address of the memory range. */
|
|
uint64_t baseaddr;
|
|
/** The length of the memory range. */
|
|
uint64_t length;
|
|
/** The type of memory region. */
|
|
uint32_t type;
|
|
} __packed;
|
|
|
|
struct e820_mem_params {
|
|
uint64_t mem_bottom;
|
|
uint64_t mem_top;
|
|
uint64_t total_mem_size;
|
|
};
|
|
|
|
extern const struct e820_entry ve820_entry[E820_MAX_ENTRIES];
|
|
|
|
/* HV read multiboot header to get e820 entries info and calc total RAM info */
|
|
void init_e820(void);
|
|
|
|
/* get some RAM below 1MB in e820 entries, hide it from sos_vm, return its start address */
|
|
uint64_t e820_alloc_low_memory(uint32_t size_arg);
|
|
|
|
/* get total number of the e820 entries */
|
|
uint32_t get_e820_entries_count(void);
|
|
|
|
/* get the e802 entiries */
|
|
const struct e820_entry *get_e820_entry(void);
|
|
|
|
/* get the e820 total memory info */
|
|
const struct e820_mem_params *get_e820_mem_info(void);
|
|
|
|
#endif
|