Changeset ac5d02b in mainline for arch/ia32/src/mm/page.c


Ignore:
Timestamp:
2005-06-03T13:17:05Z (19 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/mm/page.c

    rdcbc8be rac5d02b  
    3636#include <arch/asm.h>
    3737#include <synch/spinlock.h>
     38#include <debug.h>
    3839
    3940/*
     
    5455
    5556        if (config.cpu_active == 1) {
    56                 dba = KA2PA(frame_alloc(FRAME_KA | FRAME_PANIC));
     57                dba = frame_alloc(FRAME_KA | FRAME_PANIC);
    5758                memsetb(dba, PAGE_SIZE, 0);
    5859           
     
    6970
    7071                trap_register(14, page_fault);
    71                 cpu_write_dba(dba);             
     72                cpu_write_dba(KA2PA(dba));
    7273        }
    7374        else {
     
    8283                dba = frame_alloc(FRAME_KA | FRAME_PANIC);
    8384                memcopy(bootstrap_dba, dba, PAGE_SIZE);
    84                 cpu_write_dba(dba);
     85                cpu_write_dba(KA2PA(dba));
    8586        }
    8687
     
    122123                 * frame for the page table and clean it.
    123124                 */
    124                 newpt = KA2PA(frame_alloc(FRAME_KA));
    125                 pd[pde].frame_address = newpt >> 12;
     125                newpt = frame_alloc(FRAME_KA);
     126                pd[pde].frame_address = KA2PA(newpt) >> 12;
    126127                memsetb(newpt, PAGE_SIZE, 0);
    127128                pd[pde].present = 1;
     
    129130        }
    130131        if (copy) {
    131                 newpt = KA2PA(frame_alloc(FRAME_KA));
     132                newpt = frame_alloc(FRAME_KA);
    132133                memcopy(pd[pde].frame_address << 12, newpt, PAGE_SIZE);
    133                 pd[pde].frame_address = newpt >> 12;
     134                pd[pde].frame_address = KA2PA(newpt) >> 12;
    134135        }
    135136       
Note: See TracChangeset for help on using the changeset viewer.