Changeset ae318d3 in mainline for uspace/srv/ns/ns.c
- Timestamp:
- 2009-02-16T18:50:48Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 06da55b
- Parents:
- 17f168e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/ns/ns.c
r17f168e rae318d3 109 109 } 110 110 111 static void get_as_area(ipc_callid_t callid, ipc_call_t *call, char *name, 112 void **addr) 111 static void get_as_area(ipc_callid_t callid, ipc_call_t *call, char *name, void **addr) 113 112 { 114 113 void *ph_addr; 115 114 116 115 if (!*addr) { 117 116 ph_addr = (void *) sysinfo_value(name); … … 121 120 } 122 121 *addr = as_get_mappable_page(PAGE_SIZE); 123 physmem_map(ph_addr, *addr, 1, 124 AS_AREA_READ | AS_AREA_CACHEABLE); 122 if (physmem_map(ph_addr, *addr, 1, 123 AS_AREA_READ | AS_AREA_CACHEABLE) != 0) { 124 ipc_answer_0(callid, ENOENT); 125 return; 126 } 125 127 } 126 128 ipc_answer_2(callid, EOK, (ipcarg_t) *addr, AS_AREA_READ); … … 151 153 switch (IPC_GET_ARG3(call)) { 152 154 case SERVICE_MEM_REALTIME: 153 get_as_area(callid, &call, "clock.faddr", 154 &clockaddr); 155 get_as_area(callid, &call, "clock.faddr", &clockaddr); 155 156 break; 156 157 case SERVICE_MEM_KLOG: 157 get_as_area(callid, &call, "klog.faddr", 158 &klogaddr); 158 get_as_area(callid, &call, "klog.faddr", &klogaddr); 159 159 break; 160 160 default:
Note:
See TracChangeset
for help on using the changeset viewer.