fixed possible wrap-around in tlb_flush functions

This commit is contained in:
Steffen Vogel 2013-11-20 12:04:55 +01:00
parent aa1730919e
commit af5fa15d8d

View file

@ -273,7 +273,7 @@ int ipi_tlb_flush(void);
/** @brief Flush a specific page entry in TLB
* @param addr The (virtual) address of the page to flush
*/
static inline void tlb_flush_one_page(uint32_t addr)
static inline void tlb_flush_one_page(size_t addr)
{
asm volatile("invlpg (%0)" : : "r"(addr) : "memory");
#if MAX_CORES > 1
@ -293,7 +293,7 @@ static inline void tlb_flush_one_page(uint32_t addr)
*/
static inline void tlb_flush(void)
{
uint32_t val = read_cr3();
size_t val = read_cr3();
if (val)
write_cr3(val);