Changeset 8cbf1c3 in mainline for kernel/test


Ignore:
Timestamp:
2013-09-09T23:13:10Z (12 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
e2a0d76
Parents:
c67dbd6
Message:

prepare the public API of the frame allocator for the new backend
remove FRAME_KA (can be easily implemented explicitly)

Location:
kernel/test/mm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • kernel/test/mm/falloc1.c

    rc67dbd6 r8cbf1c3  
    5858                        unsigned int allocated = 0;
    5959                        for (unsigned int i = 0; i < (MAX_FRAMES >> order); i++) {
    60                                 frames[allocated] = (uintptr_t)
    61                                     frame_alloc(order, FRAME_ATOMIC | FRAME_KA);
     60                                frames[allocated] =
     61                                    PA2KA(frame_alloc(order, FRAME_ATOMIC, 0));
    6262                               
    6363                                if (ALIGN_UP(frames[allocated], FRAME_SIZE << order) !=
  • kernel/test/mm/falloc2.c

    rc67dbd6 r8cbf1c3  
    5353        uint8_t val = THREAD->tid % THREADS;
    5454       
    55         void **frames = (void **)
    56             malloc(MAX_FRAMES * sizeof(void *), FRAME_ATOMIC);
     55        uintptr_t *frames = (uintptr_t *)
     56            malloc(MAX_FRAMES * sizeof(uintptr_t), FRAME_ATOMIC);
    5757        if (frames == NULL) {
    5858                TPRINTF("Thread #%" PRIu64 " (cpu%u): "
     
    7474                        for (unsigned int i = 0; i < (MAX_FRAMES >> order); i++) {
    7575                                frames[allocated] =
    76                                     frame_alloc(order, FRAME_ATOMIC | FRAME_KA);
     76                                    PA2KA(frame_alloc(order, FRAME_ATOMIC, 0));
    7777                                if (frames[allocated]) {
    78                                         memsetb(frames[allocated], FRAME_SIZE << order, val);
     78                                        memsetb((void *) frames[allocated], FRAME_SIZE << order, val);
    7979                                        allocated++;
    8080                                } else
     
    9393                                        if (((uint8_t *) frames[i])[k] != val) {
    9494                                                TPRINTF("Thread #%" PRIu64 " (cpu%u): "
    95                                                     "Unexpected data (%c) in block %p offset %zu\n",
     95                                                    "Unexpected data (%c) in block %zu offset %zu\n",
    9696                                                    THREAD->tid, CPU->id, ((char *) frames[i])[k],
    9797                                                    frames[i], k);
  • kernel/test/mm/mapping1.c

    rc67dbd6 r8cbf1c3  
    4242{
    4343        uintptr_t page0, page1;
    44         uintptr_t frame;
    4544        uint32_t v;
    4645        int i;
    4746       
    48         frame = (uintptr_t) frame_alloc(ONE_FRAME, FRAME_NONE);
    49 
     47        uintptr_t frame = frame_alloc(ONE_FRAME, FRAME_NONE, 0);
     48       
    5049        page0 = km_map(frame, FRAME_SIZE,
    5150            PAGE_READ | PAGE_WRITE | PAGE_CACHEABLE);
Note: See TracChangeset for help on using the changeset viewer.