mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-16 12:19:42 +00:00
mmu: refine function map_mem_region
function map_mem_region should return mapped_size, if something wrong, it return 0. the change is valid for release version, as at that time ASSERT() in map_mem_region is empty. Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
59dea38ee8
commit
22948c2af0
@ -173,6 +173,7 @@ static uint32_t map_mem_region(void *vaddr, void *paddr,
|
||||
|| request_type >= PAGING_REQUEST_TYPE_UNKNOWN) {
|
||||
/* Shouldn't go here */
|
||||
ASSERT(false, "Incorrect Arguments. Failed to map region");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* switch based on of table */
|
||||
@ -280,8 +281,8 @@ static uint32_t map_mem_region(void *vaddr, void *paddr,
|
||||
break;
|
||||
}
|
||||
default:
|
||||
ASSERT("Bad memory map request type" == 0, "");
|
||||
break;
|
||||
ASSERT(0, "Bad memory map request type");
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user