Subversion Repositories HelenOS

Rev

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

Rev 3908 Rev 3940
Line 41... Line 41...
41
#include <arch/exception.h>
41
#include <arch/exception.h>
42
#include <typedefs.h>
42
#include <typedefs.h>
43
#include <arch/types.h>
43
#include <arch/types.h>
44
#include <interrupt.h>
44
#include <interrupt.h>
45
#include <arch/mm/frame.h>
45
#include <arch/mm/frame.h>
-
 
46
#include <ddi/ddi.h>
-
 
47
 
-
 
48
/** Physical memory area for devices. */
-
 
49
static parea_t dev_area;
46
 
50
 
47
/** Initializes page tables.
51
/** Initializes page tables.
48
 *
52
 *
49
 * 1:1 virtual-physical mapping is created in kernel address space. Mapping
53
 * 1:1 virtual-physical mapping is created in kernel address space. Mapping
50
 * for table with exception vectors is also created.
54
 * for table with exception vectors is also created.
Line 104... Line 108...
104
 
108
 
105
    last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE);
109
    last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE);
106
    return virtaddr;
110
    return virtaddr;
107
}
111
}
108
 
112
 
109
void hw_area(uintptr_t *physaddr, pfn_t *frames)
113
void hw_area(void)
110
{
114
{
111
    *physaddr = end_frame;
115
    dev_area.pbase = end_frame;
112
    *frames = ADDR2PFN(0xffffffff - end_frame);
116
    dev_area.frames = SIZE2FRAMES(0xffffffff - end_frame);
-
 
117
    ddi_parea_register(&dev_area);
113
}
118
}
114
 
119
 
115
/** @}
120
/** @}
116
 */
121
 */