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 32... | Line 32... | ||
32 | /** @file |
32 | /** @file |
33 | */ |
33 | */ |
34 | 34 | ||
35 | #include <arch/mm/page.h> |
35 | #include <arch/mm/page.h> |
36 | #include <genarch/mm/page_pt.h> |
36 | #include <genarch/mm/page_pt.h> |
- | 37 | #include <genarch/drivers/ega/ega.h> |
|
- | 38 | #include <genarch/drivers/legacy/ia32/io.h> |
|
37 | #include <arch/mm/frame.h> |
39 | #include <arch/mm/frame.h> |
38 | #include <mm/page.h> |
40 | #include <mm/page.h> |
39 | #include <mm/frame.h> |
41 | #include <mm/frame.h> |
40 | #include <mm/as.h> |
42 | #include <mm/as.h> |
41 | #include <arch/interrupt.h> |
43 | #include <arch/interrupt.h> |
Line 44... | Line 46... | ||
44 | #include <memstr.h> |
46 | #include <memstr.h> |
45 | #include <interrupt.h> |
47 | #include <interrupt.h> |
46 | #include <print.h> |
48 | #include <print.h> |
47 | #include <panic.h> |
49 | #include <panic.h> |
48 | #include <align.h> |
50 | #include <align.h> |
- | 51 | #include <ddi/ddi.h> |
|
- | 52 | ||
- | 53 | /** Physical memory area for devices. */ |
|
- | 54 | static parea_t dev_area; |
|
- | 55 | static parea_t ega_area; |
|
49 | 56 | ||
50 | /* Definitions for identity page mapper */ |
57 | /* Definitions for identity page mapper */ |
51 | pte_t helper_ptl1[512] __attribute__((aligned (PAGE_SIZE))); |
58 | pte_t helper_ptl1[512] __attribute__((aligned (PAGE_SIZE))); |
52 | pte_t helper_ptl2[512] __attribute__((aligned (PAGE_SIZE))); |
59 | pte_t helper_ptl2[512] __attribute__((aligned (PAGE_SIZE))); |
53 | pte_t helper_ptl3[512] __attribute__((aligned (PAGE_SIZE))); |
60 | pte_t helper_ptl3[512] __attribute__((aligned (PAGE_SIZE))); |
Line 212... | Line 219... | ||
212 | last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE); |
219 | last_frame = ALIGN_UP(last_frame + size, FRAME_SIZE); |
213 | 220 | ||
214 | return virtaddr; |
221 | return virtaddr; |
215 | } |
222 | } |
216 | 223 | ||
217 | void hw_area(uintptr_t *physaddr, pfn_t *frames) |
224 | void hw_area(void) |
218 | { |
225 | { |
219 | *physaddr = end_frame; |
226 | dev_area.pbase = end_frame; |
220 | *frames = ADDR2PFN(0xfffffffffffff - end_frame); |
227 | dev_area.frames = SIZE2FRAMES(0xfffffffffffff - end_frame); |
- | 228 | ddi_parea_register(&dev_area); |
|
- | 229 | ||
- | 230 | ega_area.pbase = EGA_VIDEORAM; |
|
- | 231 | ega_area.frames = SIZE2FRAMES(EGA_VRAM_SIZE); |
|
- | 232 | ddi_parea_register(&ega_area); |
|
221 | } |
233 | } |
222 | 234 | ||
223 | /** @} |
235 | /** @} |
224 | */ |
236 | */ |