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


Ignore:
Timestamp:
2006-02-01T00:02:16Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
071a8ae6
Parents:
fc1e4f6
Message:

Memory management work.
Remove the last (i.e. 'root') argument from page_mapping_insert() and page_mapping_find().
Page table address is now extracted from the first (i.e. 'as') argument.
Add a lot of infrastructure to make the above possible.
sparc64 is now broken, most likely because of insufficient identity mapping of physical memory.

File:
1 edited

Legend:

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

    rfc1e4f6 ref67bab  
    4343#include <interrupt.h>
    4444
    45 static __address bootstrap_dba;
    46 
    4745void page_arch_init(void)
    4846{
    49         __address dba;
    5047        __address cur;
    5148
     
    5350                page_operations = &page_pt_operations;
    5451       
    55                 dba = frame_alloc(FRAME_KA | FRAME_PANIC, ONE_FRAME, NULL);
    56                 memsetb(dba, PAGE_SIZE, 0);
    57 
    58                 bootstrap_dba = dba;
    59                
    6052                /*
    6153                 * PA2KA(identity) mapping for all frames until last_frame.
    6254                 */
    6355                for (cur = 0; cur < last_frame; cur += FRAME_SIZE)
    64                         page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, PAGE_CACHEABLE, KA2PA(dba));
     56                        page_mapping_insert(AS_KERNEL, PA2KA(cur), cur, PAGE_CACHEABLE);
    6557
    6658                exc_register(14, "page_fault", page_fault);
    67                 write_cr3(KA2PA(dba));
     59                write_cr3((__address) AS_KERNEL->page_table);
    6860        }
    6961        else {
    70                 write_cr3(KA2PA(bootstrap_dba));
     62                write_cr3((__address) AS_KERNEL->page_table);
    7163        }
    7264
Note: See TracChangeset for help on using the changeset viewer.