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:
Shiqing Gao 2018-12-03 09:41:18 +08:00 committed by wenlingz
parent 0f766ca6b8
commit dd43f3ba0a
4 changed files with 4 additions and 6 deletions

View File

@ -95,7 +95,7 @@ static inline bool get_monitor_cap(void)
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)

View File

@ -38,9 +38,6 @@
#ifndef CPU_H
#define CPU_H
/* Define page size */
#define CPU_PAGE_MASK 0xFFFFFFFFFFFFF000UL
/* Define CPU stack alignment */
#define CPU_STACK_ALIGN 16UL

View File

@ -55,12 +55,12 @@
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)
{
return (addr & CPU_PAGE_MASK);
return (addr & PAGE_MASK);
}
/**

View File

@ -9,6 +9,7 @@
#define PAGE_SHIFT 12U
#define PAGE_SIZE (1U << PAGE_SHIFT)
#define PAGE_MASK 0xFFFFFFFFFFFFF000UL
/* size of the low MMIO address space: 2GB */
#define PLATFORM_LO_MMIO_SIZE 0x80000000UL