dm: add BIOS/ROM image loading support at High BIOS region

Generic infrastructure for loading BIOS/ROM and providing EPT pages at
High BIOS region.

The size of High BIOS is rounded up to a multiple of 2MB.

v2 -> v3:
- refine mmap_hugetlbfs* to reduce code replication

v1 -> v2:
- make this code generic instead of OVMF-specific

Tracked-On: #1832
Signed-off-by: Peter Fang <peter.fang@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Peter Fang
2018-12-12 01:39:42 -08:00
committed by wenlingz
parent 653a57958b
commit 9e97fd0680
5 changed files with 138 additions and 58 deletions

View File

@@ -53,10 +53,11 @@ struct vmctx {
int ioreq_client;
uint32_t lowmem_limit;
size_t lowmem;
size_t biosmem;
size_t highmem;
char *baseaddr;
char *name;
uuid_t vm_uuid;
uuid_t vm_uuid;
/* fields to track virtual devices */
void *atkbdc_base;