Changeset ac5d02b in mainline for arch/ia32/src/drivers/ega.c


Ignore:
Timestamp:
2005-06-03T13:17:05Z (20 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
70527f1
Parents:
dcbc8be
Message:

IA-32 fixes.
Use kernel addresses instead of physical addresses in map_page_to_frame().
Physical addresses are supposed to only be exported to mm hardware.
Because of this fix, userspace is functional again.

Remap EGA videoram to (0x80000000 + videoram) and change the ega driver to work with the new address.

Minor cosmetics through out the code.
Changes in linker scripts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • arch/ia32/src/drivers/ega.c

    rdcbc8be rac5d02b  
    4848        __u8 hi, lo;
    4949
    50         map_page_to_frame(VIDEORAM, VIDEORAM, PAGE_NOT_CACHEABLE, 0);
     50        map_page_to_frame(PA2KA(VIDEORAM), VIDEORAM, PAGE_NOT_CACHEABLE, 0);
    5151        outb(0x3d4,0xe);
    5252        hi = inb(0x3d5);
     
    5959void ega_display_char(char ch)
    6060{
    61         __u8 *vram = (__u8 *) VIDEORAM;
     61        __u8 *vram = (__u8 *) PA2KA(VIDEORAM);
    6262       
    6363        vram[ega_cursor*2] = ch;
     
    7272            return;
    7373
    74         memcopy(VIDEORAM + ROW*2, VIDEORAM, (SCREEN - ROW)*2);
    75         memsetw(VIDEORAM + (SCREEN - ROW)*2, ROW, 0x0720);
     74        memcopy(PA2KA(VIDEORAM) + ROW*2, PA2KA(VIDEORAM), (SCREEN - ROW)*2);
     75        memsetw(PA2KA(VIDEORAM) + (SCREEN - ROW)*2, ROW, 0x0720);
    7676        ega_cursor = ega_cursor - ROW;
    7777}
Note: See TracChangeset for help on using the changeset viewer.