Rev 1435 | Rev 1493 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1435 | Rev 1462 | ||
---|---|---|---|
Line 79... | Line 79... | ||
79 | static void get_realtime_as(ipc_callid_t callid, ipc_call_t *call) |
79 | static void get_realtime_as(ipc_callid_t callid, ipc_call_t *call) |
80 | { |
80 | { |
81 | static void *addr = NULL; |
81 | static void *addr = NULL; |
82 | void *ph_addr; |
82 | void *ph_addr; |
83 | 83 | ||
84 | if (IPC_GET_ARG3(*call) != (AS_AREA_READ | AS_AREA_CACHEABLE)) { |
- | |
85 | ipc_answer_fast(callid, EPERM, 0, 0); |
- | |
86 | return; |
- | |
87 | } |
- | |
88 | if (!addr) { |
84 | if (!addr) { |
89 | ph_addr = (void *)sysinfo_value("clock.faddr"); |
85 | ph_addr = (void *)sysinfo_value("clock.faddr"); |
90 | if (!ph_addr) { |
86 | if (!ph_addr) { |
91 | ipc_answer_fast(callid, ENOENT, 0, 0); |
87 | ipc_answer_fast(callid, ENOENT, 0, 0); |
92 | return; |
88 | return; |
93 | } |
89 | } |
94 | addr = (void *)(200*1024*1024); /* TODO: intelligent freemem space */ |
90 | addr = (void *)(200*1024*1024); /* TODO: intelligent freemem space */ |
95 | map_physmem(task_get_id(), ph_addr, addr, 1, |
91 | map_physmem(task_get_id(), ph_addr, addr, 1, |
96 | AS_AREA_READ | AS_AREA_CACHEABLE); |
92 | AS_AREA_READ | AS_AREA_CACHEABLE); |
97 | } |
93 | } |
98 | ipc_answer_fast(callid, 0, (ipcarg_t)addr, 0); |
94 | ipc_answer_fast(callid, 0, (ipcarg_t)addr, AS_AREA_READ | AS_AREA_CACHEABLE); |
99 | } |
95 | } |
100 | 96 | ||
101 | int main(int argc, char **argv) |
97 | int main(int argc, char **argv) |
102 | { |
98 | { |
103 | ipc_call_t call; |
99 | ipc_call_t call; |