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


Ignore:
Timestamp:
2005-06-03T19:37:31Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d47f0e1
Parents:
673104e
Message:

Discard 'copy' parameter of map_page_to_frame().
Introduce 'root' parameter of map_page_to_frame().
If 'root' is zero, page directory address is read from CPU.
Otherwise 'root' is used as page directory address.

Add missing word to new doxygen-style comments in scheduler.c.

File:
1 edited

Legend:

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

    r673104e rd1a184f  
    6565                 */
    6666                for (i = 1; i < frames; i++) {
    67                         map_page_to_frame(i * PAGE_SIZE, i * PAGE_SIZE, PAGE_CACHEABLE, 0);
    68                         map_page_to_frame(PA2KA(i * PAGE_SIZE), i * PAGE_SIZE, PAGE_CACHEABLE, 0);                     
     67                        map_page_to_frame(i * PAGE_SIZE, i * PAGE_SIZE, PAGE_CACHEABLE, dba);
     68                        map_page_to_frame(PA2KA(i * PAGE_SIZE), i * PAGE_SIZE, PAGE_CACHEABLE, dba);
    6969                }
    7070
     
    9595 * care of it and allocate the necessary frame.
    9696 *
    97  * When the copy parameter is positive, map_page_to_frame will not overwrite
    98  * the current mapping. It will allocate a new frame and do the mapping on it
    99  * instead.
    100  *
    10197 * PAGE_CACHEABLE flag: when set, it turns caches for that page on
    10298 * PAGE_NOT_PRESENT flag: when set, it marks the page not present
    10399 * PAGE_USER flag: when set, the page is accessible from userspace
     100 *
     101 * When the root parameter is non-zero, it is used as the page directory address.
     102 * Otherwise, the page directory address is read from CPU.
    104103 */
    105 void map_page_to_frame(__address page, __address frame, int flags, int copy)
     104void map_page_to_frame(__address page, __address frame, int flags, __address root)
    106105{
    107106        struct page_specifier *pd, *pt;
     
    109108        int pde, pte;
    110109
    111 //      TODO: map_page_to_frame should take dba as a parameter
    112 //      dba = cpu_read_dba();
    113         dba = bootstrap_dba;
     110        if (root) dba = root;
     111        else dba = cpu_read_dba();
    114112
    115113        pde = page >> 22;               /* page directory entry */
     
    129127                pd[pde].uaccessible = 1;
    130128        }
    131         if (copy) {
    132                 newpt = frame_alloc(FRAME_KA);
    133                 memcopy(pd[pde].frame_address << 12, newpt, PAGE_SIZE);
    134                 pd[pde].frame_address = KA2PA(newpt) >> 12;
    135         }
    136129       
    137130        pt = (struct page_specifier *) (pd[pde].frame_address << 12);
Note: See TracChangeset for help on using the changeset viewer.