mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-22 05:30:24 +00:00
hv: replace CPU_PAGE_MASK with PAGE_MASK
replace CPU_PAGE_MASK with PAGE_MASK These two MACROs are duplicated and PAGE_MASK is a more reasonable name. Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
0f766ca6b8
commit
dd43f3ba0a
@ -95,7 +95,7 @@ static inline bool get_monitor_cap(void)
|
|||||||
|
|
||||||
static uint64_t get_address_mask(uint8_t limit)
|
static uint64_t get_address_mask(uint8_t limit)
|
||||||
{
|
{
|
||||||
return ((1UL << limit) - 1UL) & CPU_PAGE_MASK;
|
return ((1UL << limit) - 1UL) & PAGE_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void get_cpu_capabilities(void)
|
static void get_cpu_capabilities(void)
|
||||||
|
@ -38,9 +38,6 @@
|
|||||||
#ifndef CPU_H
|
#ifndef CPU_H
|
||||||
#define CPU_H
|
#define CPU_H
|
||||||
|
|
||||||
/* Define page size */
|
|
||||||
#define CPU_PAGE_MASK 0xFFFFFFFFFFFFF000UL
|
|
||||||
|
|
||||||
/* Define CPU stack alignment */
|
/* Define CPU stack alignment */
|
||||||
#define CPU_STACK_ALIGN 16UL
|
#define CPU_STACK_ALIGN 16UL
|
||||||
|
|
||||||
|
@ -55,12 +55,12 @@
|
|||||||
|
|
||||||
static inline uint64_t round_page_up(uint64_t addr)
|
static inline uint64_t round_page_up(uint64_t addr)
|
||||||
{
|
{
|
||||||
return (((addr + (uint64_t)PAGE_SIZE) - 1UL) & CPU_PAGE_MASK);
|
return (((addr + (uint64_t)PAGE_SIZE) - 1UL) & PAGE_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint64_t round_page_down(uint64_t addr)
|
static inline uint64_t round_page_down(uint64_t addr)
|
||||||
{
|
{
|
||||||
return (addr & CPU_PAGE_MASK);
|
return (addr & PAGE_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
#define PAGE_SHIFT 12U
|
#define PAGE_SHIFT 12U
|
||||||
#define PAGE_SIZE (1U << PAGE_SHIFT)
|
#define PAGE_SIZE (1U << PAGE_SHIFT)
|
||||||
|
#define PAGE_MASK 0xFFFFFFFFFFFFF000UL
|
||||||
|
|
||||||
/* size of the low MMIO address space: 2GB */
|
/* size of the low MMIO address space: 2GB */
|
||||||
#define PLATFORM_LO_MMIO_SIZE 0x80000000UL
|
#define PLATFORM_LO_MMIO_SIZE 0x80000000UL
|
||||||
|
Loading…
Reference in New Issue
Block a user