Changeset ae318d3 in mainline for kernel/arch/ia32/src


Ignore:
Timestamp:
2009-02-16T18:50:48Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
06da55b
Parents:
17f168e
Message:

overhaul pareas: use one single physical area for the physical address space not belonging to physical memory

Location:
kernel/arch/ia32/src/mm
Files:
2 edited

Legend:

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

    r17f168e rae318d3  
    5151
    5252uintptr_t last_frame = 0;
     53uintptr_t end_frame = 0;
    5354
    5455static void init_e820_memory(pfn_t minconf)
     
    7475                                last_frame =
    7576                                    ALIGN_UP(e820table[i].base_address + e820table[i].size, FRAME_SIZE);
    76                 }                       
     77                }
    7778        }
     79       
     80        end_frame = last_frame;
    7881}
    7982
     
    114117        if (config.cpu_active == 1) {
    115118                minconf = 1;
     119               
    116120#ifdef CONFIG_SMP
    117121                minconf = max(minconf,
     
    120124#endif
    121125                init_e820_memory(minconf);
    122 
     126               
    123127                /* Reserve frame 0 (BIOS data) */
    124128                frame_mark_unavailable(0, 1);
  • kernel/arch/ia32/src/mm/page.c

    r17f168e rae318d3  
    9494}
    9595
     96void hw_area(uintptr_t *physaddr, pfn_t *frames)
     97{
     98        *physaddr = end_frame;
     99        *frames = ADDR2PFN(0xffffffff - end_frame);
     100}
     101
    96102void page_fault(int n __attribute__((unused)), istate_t *istate)
    97103{
     
    103109        if (istate->error_word & PFERR_CODE_RSVD)
    104110                panic("Reserved bit set in page directory.");
    105 
     111       
    106112        if (istate->error_word & PFERR_CODE_RW)
    107113                access = PF_ACCESS_WRITE;
Note: See TracChangeset for help on using the changeset viewer.