Rev 3684 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3684 | Rev 4377 | ||
---|---|---|---|
Line 79... | Line 79... | ||
79 | { |
79 | { |
80 | void *faddr; |
80 | void *faddr; |
81 | 81 | ||
82 | faddr = frame_alloc(ONE_FRAME, FRAME_ATOMIC); |
82 | faddr = frame_alloc(ONE_FRAME, FRAME_ATOMIC); |
83 | if (!faddr) |
83 | if (!faddr) |
84 | panic("Cannot allocate page for clock"); |
84 | panic("Cannot allocate page for clock."); |
85 | 85 | ||
86 | uptime = (uptime_t *) PA2KA(faddr); |
86 | uptime = (uptime_t *) PA2KA(faddr); |
87 | 87 | ||
88 | uptime->seconds1 = 0; |
88 | uptime->seconds1 = 0; |
89 | uptime->seconds2 = 0; |
89 | uptime->seconds2 = 0; |
90 | uptime->useconds = 0; |
90 | uptime->useconds = 0; |
91 | 91 | ||
92 | clock_parea.pbase = (uintptr_t) faddr; |
92 | clock_parea.pbase = (uintptr_t) faddr; |
93 | clock_parea.vbase = (uintptr_t) uptime; |
- | |
94 | clock_parea.frames = 1; |
93 | clock_parea.frames = 1; |
95 | clock_parea.cacheable = true; |
- | |
96 | ddi_parea_register(&clock_parea); |
94 | ddi_parea_register(&clock_parea); |
97 | 95 | ||
98 | /* |
96 | /* |
99 | * Prepare information for the userspace so that it can successfully |
97 | * Prepare information for the userspace so that it can successfully |
100 | * physmem_map() the clock_parea. |
98 | * physmem_map() the clock_parea. |