mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-22 21:47:22 +00:00
hv:merge MACROs E820_MAX_ENTRIES and NUM_E820_ENTRIES
merge E820_MAX_ENTRIES and NUM_E820_ENTRIES to E820_MAX_ENTRIES. Tracked-On: #1842 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com> Reviewed-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
fb92d55bb5
commit
ac7a8a7249
@ -7,7 +7,7 @@
|
|||||||
#include <hypervisor.h>
|
#include <hypervisor.h>
|
||||||
#include <e820.h>
|
#include <e820.h>
|
||||||
|
|
||||||
const struct e820_entry ve820_entry[NUM_E820_ENTRIES] = {
|
const struct e820_entry ve820_entry[E820_MAX_ENTRIES] = {
|
||||||
{ /* 0 to mptable */
|
{ /* 0 to mptable */
|
||||||
.baseaddr = 0x0U,
|
.baseaddr = 0x0U,
|
||||||
.length = 0xEFFFFU,
|
.length = 0xEFFFFU,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include <hypervisor.h>
|
#include <hypervisor.h>
|
||||||
#include <e820.h>
|
#include <e820.h>
|
||||||
|
|
||||||
const struct e820_entry ve820_entry[NUM_E820_ENTRIES] = {
|
const struct e820_entry ve820_entry[E820_MAX_ENTRIES] = {
|
||||||
{ /* 0 to mptable */
|
{ /* 0 to mptable */
|
||||||
.baseaddr = 0x0U,
|
.baseaddr = 0x0U,
|
||||||
.length = 0xEFFFFU,
|
.length = 0xEFFFFU,
|
||||||
|
@ -126,7 +126,7 @@ uint16_t get_vm_pcpu_nums(struct acrn_vm_config *vm_config)
|
|||||||
*/
|
*/
|
||||||
static void create_prelaunched_vm_e820(struct acrn_vm *vm)
|
static void create_prelaunched_vm_e820(struct acrn_vm *vm)
|
||||||
{
|
{
|
||||||
vm->e820_entry_num = NUM_E820_ENTRIES;
|
vm->e820_entry_num = E820_MAX_ENTRIES;
|
||||||
vm->e820_entries = (struct e820_entry *)ve820_entry;
|
vm->e820_entries = (struct e820_entry *)ve820_entry;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -33,6 +33,8 @@ struct e820_mem_params {
|
|||||||
uint64_t total_mem_size;
|
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 */
|
/* HV read multiboot header to get e820 entries info and calc total RAM info */
|
||||||
void init_e820(void);
|
void init_e820(void);
|
||||||
|
|
||||||
|
@ -281,15 +281,6 @@ typedef int32_t (*vm_sw_loader_t)(struct acrn_vm *vm);
|
|||||||
extern vm_sw_loader_t vm_sw_loader;
|
extern vm_sw_loader_t vm_sw_loader;
|
||||||
|
|
||||||
#ifdef CONFIG_PARTITION_MODE
|
#ifdef CONFIG_PARTITION_MODE
|
||||||
/*
|
|
||||||
* Default e820 mem map:
|
|
||||||
*
|
|
||||||
* Assumption is every VM launched by ACRN in partition mode uses 2G of RAM.
|
|
||||||
* there is reserved memory of 64K for MPtable and PCI hole of 512MB
|
|
||||||
*/
|
|
||||||
#define NUM_E820_ENTRIES 5U
|
|
||||||
extern const struct e820_entry ve820_entry[NUM_E820_ENTRIES];
|
|
||||||
|
|
||||||
uint16_t get_vm_pcpu_nums(struct acrn_vm_config *vm_config);
|
uint16_t get_vm_pcpu_nums(struct acrn_vm_config *vm_config);
|
||||||
void vrtc_init(struct acrn_vm *vm);
|
void vrtc_init(struct acrn_vm *vm);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user