Changeset ba519f7 in mainline for kernel/test/mm/mapping1.c


Ignore:
Timestamp:
2010-12-02T17:21:30Z (13 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3bd76491
Parents:
8ad673a (diff), 41a7f62 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from mainline

File:
1 edited

Legend:

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

    r8ad673a rba519f7  
    3939#define PAGE1  (PAGE0 + PAGE_SIZE)
    4040
    41 #define VALUE0  0x01234567
    42 #define VALUE1  0x89abcdef
     41#define VALUE0  UINT32_C(0x01234567)
     42#define VALUE1  UINT32_C(0x89abcdef)
    4343
    4444const char *test_mapping1(void)
     
    5050        frame1 = (uintptr_t) frame_alloc(ONE_FRAME, FRAME_KA);
    5151       
    52         TPRINTF("Writing %#x to physical address %p.\n", VALUE0, KA2PA(frame0));
     52        TPRINTF("Writing %#" PRIx32 " to physical address %p.\n",
     53            (uint32_t) VALUE0, (void *) KA2PA(frame0));
    5354        *((uint32_t *) frame0) = VALUE0;
    5455       
    55         TPRINTF("Writing %#x to physical address %p.\n", VALUE1, KA2PA(frame1));
     56        TPRINTF("Writing %#" PRIx32 " to physical address %p.\n",
     57            (uint32_t) VALUE1, (void *) KA2PA(frame1));
    5658        *((uint32_t *) frame1) = VALUE1;
    5759       
    58         TPRINTF("Mapping virtual address %p to physical address %p.\n", PAGE0, KA2PA(frame0));
     60        TPRINTF("Mapping virtual address %p to physical address %p.\n",
     61            (void *) PAGE0, (void *) KA2PA(frame0));
    5962        page_mapping_insert(AS_KERNEL, PAGE0, KA2PA(frame0), PAGE_PRESENT | PAGE_WRITE);
    6063       
    61         TPRINTF("Mapping virtual address %p to physical address %p.\n", PAGE1, KA2PA(frame1));
     64        TPRINTF("Mapping virtual address %p to physical address %p.\n",
     65            (void *) PAGE1, (void *) KA2PA(frame1));
    6266        page_mapping_insert(AS_KERNEL, PAGE1, KA2PA(frame1), PAGE_PRESENT | PAGE_WRITE);
    6367       
    6468        v0 = *((uint32_t *) PAGE0);
    6569        v1 = *((uint32_t *) PAGE1);
    66         TPRINTF("Value at virtual address %p is %#x.\n", PAGE0, v0);
    67         TPRINTF("Value at virtual address %p is %#x.\n", PAGE1, v1);
     70        TPRINTF("Value at virtual address %p is %#" PRIx32 ".\n",
     71            (void *) PAGE0, v0);
     72        TPRINTF("Value at virtual address %p is %#" PRIx32 ".\n",
     73            (void *) PAGE1, v1);
    6874       
    6975        if (v0 != VALUE0)
     
    7278                return "Value at v1 not equal to VALUE1";
    7379       
    74         TPRINTF("Writing %#x to virtual address %p.\n", 0, PAGE0);
     80        TPRINTF("Writing %#" PRIx32 " to virtual address %p.\n",
     81            (uint32_t) 0, (void *) PAGE0);
    7582        *((uint32_t *) PAGE0) = 0;
    7683       
    77         TPRINTF("Writing %#x to virtual address %p.\n", 0, PAGE1);
     84        TPRINTF("Writing %#" PRIx32 " to virtual address %p.\n",
     85            (uint32_t) 0, (void *) PAGE1);
    7886        *((uint32_t *) PAGE1) = 0;
    7987       
     
    8189        v1 = *((uint32_t *) PAGE1);
    8290       
    83         TPRINTF("Value at virtual address %p is %#x.\n", PAGE0, *((uint32_t *) PAGE0));
    84         TPRINTF("Value at virtual address %p is %#x.\n", PAGE1, *((uint32_t *) PAGE1));
     91        TPRINTF("Value at virtual address %p is %#" PRIx32 ".\n",
     92            (void *) PAGE0, *((uint32_t *) PAGE0));
     93        TPRINTF("Value at virtual address %p is %#" PRIx32 ".\n",
     94            (void *) PAGE1, *((uint32_t *) PAGE1));
    8595       
    8696        if (v0 != 0)
Note: See TracChangeset for help on using the changeset viewer.