Changeset 9979acb in mainline for kernel/arch/ia32/src/mm/page.c


Ignore:
Timestamp:
2009-02-20T17:19:03Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c9b550b
Parents:
5c06c1c
Message:

make hw_area API more generic
this allows mapping of EGA VRAM on ia32/amd64

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/mm/page.c

    r5c06c1c r9979acb  
    3535#include <arch/mm/page.h>
    3636#include <genarch/mm/page_pt.h>
     37#include <genarch/drivers/ega/ega.h>
     38#include <genarch/drivers/legacy/ia32/io.h>
    3739#include <arch/mm/frame.h>
    3840#include <mm/frame.h>
     
    4951#include <print.h>
    5052#include <interrupt.h>
     53#include <ddi/ddi.h>
     54
     55/** Physical memory area for devices. */
     56static parea_t dev_area;
     57static parea_t ega_area;
    5158
    5259void page_arch_init(void)
     
    94101}
    95102
    96 void hw_area(uintptr_t *physaddr, pfn_t *frames)
     103void hw_area(void)
    97104{
    98         *physaddr = end_frame;
    99         *frames = ADDR2PFN(0xffffffff - end_frame);
     105        dev_area.pbase = end_frame;
     106        dev_area.frames = SIZE2FRAMES(0xffffffff - end_frame);
     107        ddi_parea_register(&dev_area);
     108       
     109        ega_area.pbase = EGA_VIDEORAM;
     110        ega_area.frames = SIZE2FRAMES(EGA_VRAM_SIZE);
     111        ddi_parea_register(&ega_area);
    100112}
    101113
Note: See TracChangeset for help on using the changeset viewer.