Subversion Repositories HelenOS

Rev

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

Rev 3908 Rev 3940
Line 35... Line 35...
35
#include <genarch/mm/page_pt.h>
35
#include <genarch/mm/page_pt.h>
36
#include <mm/frame.h>
36
#include <mm/frame.h>
37
#include <mm/as.h>
37
#include <mm/as.h>
38
#include <align.h>
38
#include <align.h>
39
#include <config.h>
39
#include <config.h>
-
 
40
#include <ddi/ddi.h>
-
 
41
 
-
 
42
/** Physical memory area for devices. */
-
 
43
static parea_t dev_area;
40
 
44
 
41
void page_arch_init(void)
45
void page_arch_init(void)
42
{
46
{
43
    if (config.cpu_active == 1)
47
    if (config.cpu_active == 1)
44
        page_mapping_operations = &pt_mapping_operations;
48
        page_mapping_operations = &pt_mapping_operations;
Line 61... Line 65...
61
    last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE);
65
    last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE);
62
   
66
   
63
    return virtaddr;
67
    return virtaddr;
64
}
68
}
65
 
69
 
66
void hw_area(uintptr_t *physaddr, pfn_t *frames)
70
void hw_area(void)
67
{
71
{
68
    *physaddr = end_frame;
72
    dev_area.pbase = end_frame;
69
    *frames = ADDR2PFN(0xffffffff - end_frame);
73
    dev_area.frames = SIZE2FRAMES(0xffffffff - end_frame);
-
 
74
    ddi_parea_register(&dev_area);
70
}
75
}
71
 
76
 
72
/** @}
77
/** @}
73
 */
78
 */