Changeset f9425006 in mainline for generic/src/mm/as.c


Ignore:
Timestamp:
2006-01-13T16:29:20Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
214e89e3
Parents:
20d50a1
Message:

Make various mips32 tlb manipulation functions preserve EntryHi register.

Cleanup and more precise comments for previous commit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/mm/as.c

    r20d50a1 rf9425006  
    5959
    6060/*
    61  * Here we assume that PFN (Physical Frame Numbers) space
     61 * Here we assume that PFN (Physical Frame Number) space
    6262 * is smaller than the width of index_t. UNALLOCATED_PFN
    6363 * can be then used to mark mappings wich were not
    64  * allocated a physical frame.
     64 * yet allocated a physical frame.
    6565 */
    6666#define UNALLOCATED_PFN         ((index_t) -1)
     
    142142                        /*
    143143                         * Frames will be allocated on-demand by
    144                          * as_page_fault().
     144                         * as_page_fault() or preloaded by
     145                         * as_area_load_mapping().
    145146                         */
    146147                        a->mapping[i] = UNALLOCATED_PFN;
     
    160161        spinlock_unlock(&as->lock);
    161162        interrupts_restore(ipl);
    162        
     163
    163164        return a;
    164165}
     
    181182        for (i = 0; i < a->size; i++) {
    182183                ASSERT(a->mapping[i] == UNALLOCATED_PFN);
     184                ASSERT(pfn[i] != UNALLOCATED_PFN);
    183185                a->mapping[i] = pfn[i];
    184186        }
     
    195197 * @param page Faulting page.
    196198 *
    197  * @return 0 on page fault, 1 if address space operation
     199 * @return 0 on page fault, 1 on success.
    198200 */
    199201int as_page_fault(__address page)
     
    251253                memsetb(frame, FRAME_SIZE, 0);
    252254                area->mapping[vpn] = frame / FRAME_SIZE;
     255                ASSERT(area->mapping[vpn] != UNALLOCATED_PFN);
    253256        } else {
    254257                frame = area->mapping[vpn] * FRAME_SIZE;
Note: See TracChangeset for help on using the changeset viewer.