Rev 2594 | Rev 2622 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2594 | Rev 2619 | ||
---|---|---|---|
Line 90... | Line 90... | ||
90 | void *ph_addr; |
90 | void *ph_addr; |
91 | 91 | ||
92 | if (!*addr) { |
92 | if (!*addr) { |
93 | ph_addr = (void *) sysinfo_value(name); |
93 | ph_addr = (void *) sysinfo_value(name); |
94 | if (!ph_addr) { |
94 | if (!ph_addr) { |
95 | ipc_answer_fast_0(callid, ENOENT); |
95 | ipc_answer_0(callid, ENOENT); |
96 | return; |
96 | return; |
97 | } |
97 | } |
98 | *addr = as_get_mappable_page(PAGE_SIZE); |
98 | *addr = as_get_mappable_page(PAGE_SIZE); |
99 | physmem_map(ph_addr, *addr, 1, |
99 | physmem_map(ph_addr, *addr, 1, |
100 | AS_AREA_READ | AS_AREA_CACHEABLE); |
100 | AS_AREA_READ | AS_AREA_CACHEABLE); |
101 | } |
101 | } |
102 | ipc_answer_fast(callid, EOK, (ipcarg_t) *addr, AS_AREA_READ); |
102 | ipc_answer_2(callid, EOK, (ipcarg_t) *addr, AS_AREA_READ); |
103 | } |
103 | } |
104 | 104 | ||
105 | int main(int argc, char **argv) |
105 | int main(int argc, char **argv) |
106 | { |
106 | { |
107 | ipc_call_t call; |
107 | ipc_call_t call; |
Line 126... | Line 126... | ||
126 | case SERVICE_MEM_KLOG: |
126 | case SERVICE_MEM_KLOG: |
127 | get_as_area(callid, &call, "klog.faddr", |
127 | get_as_area(callid, &call, "klog.faddr", |
128 | &klogaddr); |
128 | &klogaddr); |
129 | break; |
129 | break; |
130 | default: |
130 | default: |
131 | ipc_answer_fast_0(callid, ENOENT); |
131 | ipc_answer_0(callid, ENOENT); |
132 | } |
132 | } |
133 | continue; |
133 | continue; |
134 | case IPC_M_PHONE_HUNGUP: |
134 | case IPC_M_PHONE_HUNGUP: |
135 | retval = EOK; |
135 | retval = EOK; |
136 | break; |
136 | break; |
Line 151... | Line 151... | ||
151 | default: |
151 | default: |
152 | retval = ENOENT; |
152 | retval = ENOENT; |
153 | break; |
153 | break; |
154 | } |
154 | } |
155 | if (!(callid & IPC_CALLID_NOTIFICATION)) { |
155 | if (!(callid & IPC_CALLID_NOTIFICATION)) { |
156 | ipc_answer_fast_0(callid, retval); |
156 | ipc_answer_0(callid, retval); |
157 | } |
157 | } |
158 | } |
158 | } |
159 | } |
159 | } |
160 | 160 | ||
161 | /** Register service. |
161 | /** Register service. |