Changeset 39539da in mainline


Ignore:
Timestamp:
2005-11-21T22:15:05Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8cd20b70
Parents:
db79676
Message:

Rename map_page_to_frame() to page_mapping_insert() and find_mapping() to page_mapping_find().
New names should make it more apparent that these two belong together.

Files:
10 edited

Legend:

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

    rdb79676 r39539da  
    5454                 */
    5555                for (i = 0; i < config.memory_size/FRAME_SIZE; i++) {
    56                         map_page_to_frame(PA2KA(i * PAGE_SIZE), i * PAGE_SIZE, PAGE_CACHEABLE | PAGE_EXEC, KA2PA(dba));
     56                        page_mapping_insert(PA2KA(i * PAGE_SIZE), i * PAGE_SIZE, PAGE_CACHEABLE | PAGE_EXEC, KA2PA(dba));
    5757                }
    5858
  • arch/ia32/src/drivers/ega.c

    rdb79676 r39539da  
    5050        __u8 hi, lo;
    5151
    52         map_page_to_frame(PA2KA(VIDEORAM), VIDEORAM, PAGE_NOT_CACHEABLE, 0);
     52        page_mapping_insert(PA2KA(VIDEORAM), VIDEORAM, PAGE_NOT_CACHEABLE, 0);
    5353        outb(0x3d4,0xe);
    5454        hi = inb(0x3d5);
  • arch/ia32/src/mm/page.c

    rdb79676 r39539da  
    5757                 */
    5858                for (i = 0; i < config.memory_size/PAGE_SIZE; i++)
    59                         map_page_to_frame(PA2KA(i * PAGE_SIZE), i * PAGE_SIZE, PAGE_CACHEABLE, KA2PA(dba));
     59                        page_mapping_insert(PA2KA(i * PAGE_SIZE), i * PAGE_SIZE, PAGE_CACHEABLE, KA2PA(dba));
    6060
    6161                trap_register(14, page_fault);
  • arch/ia32/src/smp/smp.c

    rdb79676 r39539da  
    6464
    6565        if (config.cpu_count > 1) {             
    66                 map_page_to_frame((__address)l_apic, (__address)l_apic,
     66                page_mapping_insert((__address)l_apic, (__address)l_apic,
    6767                                  PAGE_NOT_CACHEABLE, 0);
    68                 map_page_to_frame((__address) io_apic,
     68                page_mapping_insert((__address) io_apic,
    6969                                  (__address) io_apic,
    7070                                  PAGE_NOT_CACHEABLE, 0);
  • arch/mips32/src/mm/tlb.c

    rdb79676 r39539da  
    367367         * Handler cannot succeed if badvaddr has no mapping.
    368368         */
    369         pte = find_mapping(badvaddr, 0);
     369        pte = page_mapping_find(badvaddr, 0);
    370370        if (!pte) {
    371371                printf("No such mapping.\n");
  • genarch/src/acpi/acpi.c

    rdb79676 r39539da  
    8080static void map_sdt(struct acpi_sdt_header *sdt)
    8181{
    82         map_page_to_frame((__address) sdt, (__address) sdt, PAGE_NOT_CACHEABLE, 0);
     82        page_mapping_insert((__address) sdt, (__address) sdt, PAGE_NOT_CACHEABLE, 0);
    8383        map_structure((__address) sdt, sdt->length);
    8484}
  • generic/include/mm/page.h

    rdb79676 r39539da  
    108108
    109109extern void page_init(void);
    110 extern void map_page_to_frame(__address page, __address frame, int flags, __address root);
    111 extern pte_t *find_mapping(__address page, __address root);
     110extern void page_mapping_insert(__address page, __address frame, int flags, __address root);
     111extern pte_t *page_mapping_find(__address page, __address root);
    112112extern void map_structure(__address s, size_t size);
    113113
  • generic/src/mm/page.c

    rdb79676 r39539da  
    3838{
    3939        page_arch_init();
    40         map_page_to_frame(0x0, 0x0, PAGE_NOT_PRESENT, 0);
     40        page_mapping_insert(0x0, 0x0, PAGE_NOT_PRESENT, 0);
    4141}
    4242
     
    5858
    5959        for (i = 0; i < cnt; i++)
    60                 map_page_to_frame(s + i*PAGE_SIZE, s + i*PAGE_SIZE, PAGE_NOT_CACHEABLE, 0);
     60                page_mapping_insert(s + i*PAGE_SIZE, s + i*PAGE_SIZE, PAGE_NOT_CACHEABLE, 0);
    6161
    6262}
     
    7272 * @param root Explicit PTL0 address.
    7373 */
    74 void map_page_to_frame(__address page, __address frame, int flags, __address root)
     74void page_mapping_insert(__address page, __address frame, int flags, __address root)
    7575{
    7676        pte_t *ptl0, *ptl1, *ptl2, *ptl3;
     
    119119 * @return NULL if there is no such mapping; entry from PTL3 describing the mapping otherwise.
    120120 */
    121 pte_t *find_mapping(__address page, __address root)
     121pte_t *page_mapping_find(__address page, __address root)
    122122{
    123123        pte_t *ptl0, *ptl1, *ptl2, *ptl3;
  • generic/src/mm/vm.c

    rdb79676 r39539da  
    162162        ASSERT(m->ptl0);
    163163        for (i=0; i<a->size; i++)
    164                 map_page_to_frame(a->address + i*PAGE_SIZE, a->mapping[i], flags, (__address) m->ptl0);
     164                page_mapping_insert(a->address + i*PAGE_SIZE, a->mapping[i], flags, (__address) m->ptl0);
    165165               
    166166        spinlock_unlock(&a->lock);
     
    180180        ASSERT(m->ptl0);
    181181        for (i=0; i<a->size; i++)               
    182                 map_page_to_frame(a->address + i*PAGE_SIZE, 0, PAGE_NOT_PRESENT, (__address) m->ptl0);
     182                page_mapping_insert(a->address + i*PAGE_SIZE, 0, PAGE_NOT_PRESENT, (__address) m->ptl0);
    183183       
    184184        spinlock_unlock(&a->lock);
  • test/mm/mapping1/test.c

    rdb79676 r39539da  
    5656       
    5757        printf("Mapping virtual address %P to physical address %P.\n", PAGE0, KA2PA(frame0));
    58         map_page_to_frame(PAGE0, KA2PA(frame0), PAGE_PRESENT | PAGE_WRITE, 0);
     58        page_mapping_insert(PAGE0, KA2PA(frame0), PAGE_PRESENT | PAGE_WRITE, 0);
    5959        printf("Mapping virtual address %P to physical address %P.\n", PAGE1, KA2PA(frame1));   
    60         map_page_to_frame(PAGE1, KA2PA(frame1), PAGE_PRESENT | PAGE_WRITE, 0);
     60        page_mapping_insert(PAGE1, KA2PA(frame1), PAGE_PRESENT | PAGE_WRITE, 0);
    6161       
    6262        printf("Value at virtual address %P is %L.\n", PAGE0, v0 = *((__u32 *) PAGE0));
Note: See TracChangeset for help on using the changeset viewer.