Subversion Repositories HelenOS-historic

Rev

Rev 400 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 400 Rev 401
Line 40... Line 40...
40
#define VALUE1  0x89abcdef
40
#define VALUE1  0x89abcdef
41
 
41
 
42
void test(void)
42
void test(void)
43
{
43
{
44
    __address frame0, frame1;
44
    __address frame0, frame1;
45
    volatile __u32 v0, v1;
45
    __u32 v0, v1;
46
 
46
 
47
    printf("Memory management test mapping #1\n");
47
    printf("Memory management test mapping #1\n");
48
 
48
 
49
    frame0 = frame_alloc(FRAME_KA);
49
    frame0 = frame_alloc(FRAME_KA);
50
    frame1 = frame_alloc(FRAME_KA);
50
    frame1 = frame_alloc(FRAME_KA);
Line 71... Line 71...
71
    *((__u32 *) PAGE1) = 0;
71
    *((__u32 *) PAGE1) = 0;
72
 
72
 
73
    v0 = *((__u32 *) PAGE0);
73
    v0 = *((__u32 *) PAGE0);
74
    v1 = *((__u32 *) PAGE1);
74
    v1 = *((__u32 *) PAGE1);
75
   
75
   
76
    printf("Value at virtual address %P is %X.\n", PAGE0, v0 = *((__u32 *) PAGE0));
76
    printf("Value at virtual address %P is %X.\n", PAGE0, *((__u32 *) PAGE0)); 
77
    printf("Value at virtual address %P is %X.\n", PAGE1, v1 = *((__u32 *) PAGE1));
77
    printf("Value at virtual address %P is %X.\n", PAGE1, *((__u32 *) PAGE1));
78
 
78
 
79
    ASSERT(v0 == 0);
79
    ASSERT(v0 == 0);
80
    ASSERT(v1 == 0);
80
    ASSERT(v1 == 0);
81
   
81
   
82
    printf("Test passed.\n");
82
    printf("Test passed.\n");