Now makes use of sMaxVirtualAddress to calm down gcc.
arch_cpu.h no longer includes kernel.h, so we have to do this for the ROUNDUP()/ROUNDOWN() macros. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9441 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
#include <boot/stage2.h>
|
#include <boot/stage2.h>
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <arch_kernel.h>
|
#include <arch_kernel.h>
|
||||||
|
#include <kernel.h>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -113,7 +114,7 @@ map_page(addr_t virtualAddress, addr_t physicalAddress, uint32 flags)
|
|||||||
{
|
{
|
||||||
TRACE(("map_page: vaddr 0x%lx, paddr 0x%lx\n", virtualAddress, physicalAddress));
|
TRACE(("map_page: vaddr 0x%lx, paddr 0x%lx\n", virtualAddress, physicalAddress));
|
||||||
|
|
||||||
if (virtualAddress < KERNEL_BASE || virtualAddress >= (KERNEL_BASE + 4096*1024))
|
if (virtualAddress < KERNEL_BASE || virtualAddress >= sMaxVirtualAddress)
|
||||||
panic("map_page: asked to map invalid page %p!\n", (void *)virtualAddress);
|
panic("map_page: asked to map invalid page %p!\n", (void *)virtualAddress);
|
||||||
|
|
||||||
physicalAddress &= ~(B_PAGE_SIZE - 1);
|
physicalAddress &= ~(B_PAGE_SIZE - 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user