Subversion Repositories HelenOS

Rev

Rev 3193 | Rev 3940 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3193 Rev 3790
Line 47... Line 47...
47
 
47
 
48
uintptr_t hw_map(uintptr_t physaddr, size_t size)
48
uintptr_t hw_map(uintptr_t physaddr, size_t size)
49
{
49
{
50
    if (last_frame + ALIGN_UP(size, PAGE_SIZE) >
50
    if (last_frame + ALIGN_UP(size, PAGE_SIZE) >
51
        KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH))
51
        KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH))
52
        panic("Unable to map physical memory %p (%" PRIs " bytes)",
52
        panic("Unable to map physical memory %p (%" PRIs " bytes).",
53
            physaddr, size)
53
            physaddr, size)
54
   
54
   
55
    uintptr_t virtaddr = PA2KA(last_frame);
55
    uintptr_t virtaddr = PA2KA(last_frame);
56
    pfn_t i;
56
    pfn_t i;
57
    for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++)
57
    for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++)