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:
Axel Dörfler 2004-10-21 02:35:37 +00:00
parent 8a37c740eb
commit a17b2346d0

View File

@ -15,6 +15,7 @@
#include <boot/stage2.h>
#include <arch/cpu.h>
#include <arch_kernel.h>
#include <kernel.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));
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);
physicalAddress &= ~(B_PAGE_SIZE - 1);