Changeset 666773c in mainline for kernel/arch/ia64/src/mm/page.c


Ignore:
Timestamp:
2008-12-31T15:33:29Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9805cde
Parents:
d8c0dc5
Message:

Humanitarian facelift for ia64.

File:
1 edited

Legend:

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

    rd8c0dc5 r666773c  
    124124 * Interrupts must be disabled.
    125125 *
    126  * @param page Address of virtual page including VRN bits.
    127  * @param asid Address space identifier.
    128  *
    129  * @return VHPT entry address.
     126 * @param page          Address of virtual page including VRN bits.
     127 * @param asid          Address space identifier.
     128 *
     129 * @return              VHPT entry address.
    130130 */
    131131vhpt_entry_t *vhpt_hash(uintptr_t page, asid_t asid)
     
    168168 * Interrupts must be disabled.
    169169 *
    170  * @param page Address of virtual page including VRN bits.
    171  * @param asid Address space identifier.
    172  *
    173  * @return True if page and asid match the page and asid of t, false otherwise.
     170 * @param page          Address of virtual page including VRN bits.
     171 * @param asid          Address space identifier.
     172 *
     173 * @return              True if page and asid match the page and asid of t,
     174 *                      false otherwise.
    174175 */
    175176bool vhpt_compare(uintptr_t page, asid_t asid, vhpt_entry_t *v)
     
    212213 *
    213214 * @param v VHPT entry to be set up.
    214  * @param page Virtual address of the page mapped by the entry.
    215  * @param asid Address space identifier of the address space to which page belongs.
    216  * @param frame Physical address of the frame to wich page is mapped.
    217  * @param flags Different flags for the mapping.
    218  */
    219 void vhpt_set_record(vhpt_entry_t *v, uintptr_t page, asid_t asid, uintptr_t frame, int flags)
     215 * @param page          Virtual address of the page mapped by the entry.
     216 * @param asid          Address space identifier of the address space to which
     217 *                      page belongs.
     218 * @param frame         Physical address of the frame to wich page is mapped.
     219 * @param flags         Different flags for the mapping.
     220 */
     221void
     222vhpt_set_record(vhpt_entry_t *v, uintptr_t page, asid_t asid, uintptr_t frame,
     223    int flags)
    220224{
    221225        region_register rr_save, rr;   
     
    251255       
    252256        v->present.p = true;
    253         v->present.ma = (flags & PAGE_CACHEABLE) ? MA_WRITEBACK : MA_UNCACHEABLE;
     257        v->present.ma = (flags & PAGE_CACHEABLE) ?
     258            MA_WRITEBACK : MA_UNCACHEABLE;
    254259        v->present.a = false;   /* not accessed */
    255260        v->present.d = false;   /* not dirty */
     
    266271extern uintptr_t last_frame;
    267272
    268 
    269273uintptr_t hw_map(uintptr_t physaddr, size_t size)
    270274{
    271         if (last_frame + ALIGN_UP(size, PAGE_SIZE) > KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH))
    272                 panic("Unable to map physical memory %p (%d bytes)", physaddr, size)
     275        if (last_frame + ALIGN_UP(size, PAGE_SIZE) >
     276            KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH))
     277                panic("Unable to map physical memory %p (%d bytes)", physaddr,
     278                    size)
    273279       
    274280        uintptr_t virtaddr = PA2KA(last_frame);
     
    276282        for (i = 0; i < ADDR2PFN(ALIGN_UP(size, PAGE_SIZE)); i++) {
    277283                uintptr_t addr = PFN2ADDR(i);
    278                 page_mapping_insert(AS_KERNEL, virtaddr + addr, physaddr + addr, PAGE_NOT_CACHEABLE | PAGE_WRITE);
     284                page_mapping_insert(AS_KERNEL, virtaddr + addr, physaddr + addr,
     285                    PAGE_NOT_CACHEABLE | PAGE_WRITE);
    279286        }
    280287       
     
    284291}
    285292
    286 
    287 
    288293/** @}
    289294 */
Note: See TracChangeset for help on using the changeset viewer.