Changeset b0c2075 in mainline for kernel/test/mm/mapping1.c
- Timestamp:
- 2013-09-10T17:48:57Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 85147f3
- Parents:
- 86733f3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/mm/mapping1.c
r86733f3 rb0c2075 41 41 const char *test_mapping1(void) 42 42 { 43 uintptr_t page0, page1; 44 uint32_t v; 43 uintptr_t frame = frame_alloc(1, FRAME_NONE, 0); 45 44 46 uintptr_t frame = frame_alloc(ONE_FRAME, FRAME_NONE, 0); 47 48 page0 = km_map(frame, FRAME_SIZE, 45 uintptr_t page0 = km_map(frame, FRAME_SIZE, 49 46 PAGE_READ | PAGE_WRITE | PAGE_CACHEABLE); 50 47 TPRINTF("Virtual address %p mapped to physical address %p.\n", 51 48 (void *) page0, (void *) frame); 52 page1 = km_map(frame, FRAME_SIZE, 49 50 uintptr_t page1 = km_map(frame, FRAME_SIZE, 53 51 PAGE_READ | PAGE_WRITE | PAGE_CACHEABLE); 54 52 TPRINTF("Virtual address %p mapped to physical address %p.\n", … … 62 60 TPRINTF("Reading magic using the second virtual address.\n"); 63 61 64 v = *((uint32_t *) page1);62 uint32_t v = *((uint32_t *) page1); 65 63 66 64 if (v != TEST_MAGIC) {
Note:
See TracChangeset
for help on using the changeset viewer.