Changeset cf85e24c in mainline for test/mm/mapping1/test.c
- Timestamp:
- 2006-04-22T23:00:26Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 12c7f27
- Parents:
- e692a27
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/mm/mapping1/test.c
re692a27 rcf85e24c 51 51 frame1 = PA2KA(PFN2ADDR(frame_alloc(ONE_FRAME, FRAME_KA))); 52 52 53 printf("Writing %# X to physical address %P.\n", VALUE0, KA2PA(frame0));53 printf("Writing %#x to physical address %p.\n", VALUE0, KA2PA(frame0)); 54 54 *((__u32 *) frame0) = VALUE0; 55 printf("Writing %# X to physical address %P.\n", VALUE1, KA2PA(frame1));55 printf("Writing %#x to physical address %p.\n", VALUE1, KA2PA(frame1)); 56 56 *((__u32 *) frame1) = VALUE1; 57 57 58 printf("Mapping virtual address % P to physical address %P.\n", PAGE0, KA2PA(frame0));58 printf("Mapping virtual address %p to physical address %p.\n", PAGE0, KA2PA(frame0)); 59 59 page_mapping_insert(AS_KERNEL, PAGE0, KA2PA(frame0), PAGE_PRESENT | PAGE_WRITE); 60 printf("Mapping virtual address % P to physical address %P.\n", PAGE1, KA2PA(frame1));60 printf("Mapping virtual address %p to physical address %p.\n", PAGE1, KA2PA(frame1)); 61 61 page_mapping_insert(AS_KERNEL, PAGE1, KA2PA(frame1), PAGE_PRESENT | PAGE_WRITE); 62 62 63 printf("Value at virtual address % P is %#X.\n", PAGE0, v0 = *((__u32 *) PAGE0));64 printf("Value at virtual address % P is %#X.\n", PAGE1, v1 = *((__u32 *) PAGE1));63 printf("Value at virtual address %p is %#x.\n", PAGE0, v0 = *((__u32 *) PAGE0)); 64 printf("Value at virtual address %p is %#x.\n", PAGE1, v1 = *((__u32 *) PAGE1)); 65 65 66 66 ASSERT(v0 == VALUE0); 67 67 ASSERT(v1 == VALUE1); 68 68 69 printf("Writing %# X to virtual address %P.\n", 0, PAGE0);69 printf("Writing %#x to virtual address %p.\n", 0, PAGE0); 70 70 *((__u32 *) PAGE0) = 0; 71 printf("Writing %# X to virtual address %P.\n", 0, PAGE1);71 printf("Writing %#x to virtual address %p.\n", 0, PAGE1); 72 72 *((__u32 *) PAGE1) = 0; 73 73 … … 75 75 v1 = *((__u32 *) PAGE1); 76 76 77 printf("Value at virtual address % P is %#X.\n", PAGE0, *((__u32 *) PAGE0));78 printf("Value at virtual address % P is %#X.\n", PAGE1, *((__u32 *) PAGE1));77 printf("Value at virtual address %p is %#x.\n", PAGE0, *((__u32 *) PAGE0)); 78 printf("Value at virtual address %p is %#x.\n", PAGE1, *((__u32 *) PAGE1)); 79 79 80 80 ASSERT(v0 == 0);
Note:
See TracChangeset
for help on using the changeset viewer.