Changes in / [72d120e:9d653e3] in mainline
- Files:
-
- 234 added
- 9 deleted
- 51 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
r72d120e r9d653e3 624 624 ! CONFIG_BAREBONE (n/y) 625 625 626 % Build pcc binaries 627 ! CONFIG_PCC (n/y) 628 629 % Build binutils binaries 630 ! CONFIG_BINUTILS (n/y) 631 632 % Build MSIM binary 633 ! CONFIG_MSIM (n/y) 634 626 635 % Line debugging information 627 636 ! [CONFIG_STRIP_BINARIES!=y] CONFIG_LINE_DEBUG (n/y) -
Makefile
r72d120e r9d653e3 106 106 distclean: clean 107 107 rm -f $(CSCOPE).out $(COMMON_MAKEFILE) $(COMMON_HEADER) $(COMMON_HEADER_PREV) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) tools/*.pyc tools/checkers/*.pyc release/HelenOS-* 108 cd ./uspace/app/binutils/; ./distclean.sh 108 109 109 110 clean: -
boot/Makefile.common
r72d120e r9d653e3 219 219 $(USPACE_PATH)/app/df/df 220 220 221 ifeq ($(CONFIG_PCC),y) 222 RD_APPS_NON_ESSENTIAL += \ 223 $(USPACE_PATH)/app/cc/cc \ 224 $(USPACE_PATH)/app/ccom/ccom \ 225 $(USPACE_PATH)/app/ccom/mkext/cc_mkext \ 226 $(USPACE_PATH)/app/cpp/cpp 227 endif 228 229 ifeq ($(CONFIG_BINUTILS),y) 230 RD_APPS_NON_ESSENTIAL += \ 231 $(USPACE_PATH)/app/binutils/bin/as \ 232 $(USPACE_PATH)/app/binutils/bin/ld 233 endif 234 235 ifeq ($(CONFIG_MSIM),y) 236 RD_APPS_NON_ESSENTIAL += \ 237 $(USPACE_PATH)/app/msim/msim 238 endif 239 221 240 COMPONENTS = \ 222 241 $(KERNEL_PATH)/kernel.bin \ -
boot/arch/ia64/Makefile.inc
r72d120e r9d653e3 31 31 BFD_ARCH = ia64 32 32 33 # 34 # FIXME: 35 # 36 # The -fno-selective-scheduling and -fno-selective-scheduling2 options 37 # should be removed as soon as a bug in GCC concerning unchecked 38 # speculative loads is fixed. 39 # 40 # See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53975 for reference. 41 # 42 33 43 BITS = 64 34 44 ENDIANESS = LE 35 EXTRA_CFLAGS = -fno-unwind-tables -mfixed-range=f32-f127 -mno-pic -mno-sdata 45 EXTRA_CFLAGS = -fno-unwind-tables -mfixed-range=f32-f127 -mno-pic -mno-sdata -fno-selective-scheduling -fno-selective-scheduling2 36 46 37 47 RD_SRVS_NON_ESSENTIAL += -
boot/genarch/src/ofw.c
r72d120e r9d653e3 377 377 (map->cnt < MEMMAP_MAX_RECORDS); pos += ac + sc) { 378 378 void *start = (void *) (buf[pos + ac - 1]); 379 uint ptr_t size = buf[pos + ac + sc - 1];379 uint32_t size = buf[pos + ac + sc - 1]; 380 380 381 381 /* -
contrib/bazaar/bzreml/__init__.py
r72d120e r9d653e3 40 40 import smtplib 41 41 import time 42 import os43 42 44 43 from StringIO import StringIO … … 134 133 revision_ac_no = branch.revision_id_to_revno(revision_ac_id) 135 134 136 repo_name = os.path.basename(branch.base)137 if (repo_name == ''):138 repo_name = os.path.basename(os.path.dirname(branch.base))139 140 135 committer = revision_ac.committer 141 136 authors = revision_ac.get_apparent_authors() 142 137 date = time.strftime("%Y-%m-%d %H:%M:%S %Z (%a, %d %b %Y)", time.localtime(revision_ac.timestamp)) 143 144 body.write("Repo: %s\n" % repo_name)145 138 146 139 if (authors != [committer]): … … 215 208 tree_prev.unlock() 216 209 217 subject = " [%s] r%d - %s" % (repo_name,revision_ac_no, commit_message)210 subject = "r%d - %s" % (revision_ac_no, commit_message) 218 211 send_smtp("localhost", config_sender(config), config_to(config), subject, body.getvalue()) 219 212 -
contrib/bazaar/bzreml/setup.py
r72d120e r9d653e3 7 7 description = 'Commit email plugin for Bazaar', 8 8 keywords = 'plugin bzr email', 9 version = '1. 4',9 version = '1.3', 10 10 url = 'http://www.decky.cz/', 11 11 license = 'BSD', -
contrib/tools/random_check.sh
r72d120e r9d653e3 38 38 echo -n "">"$PRUNE_CONFIG_FILE" 39 39 40 while getopts n:j:x:hs option; do40 while getopts n:j:x:hsS option; do 41 41 case $option in 42 42 n) … … 49 49 echo "$OPTARG" | tr -d ' ' >>"$PRUNE_CONFIG_FILE" 50 50 ;; 51 s )51 s|S) 52 52 echo "COMPILER=gcc_native" >>"$PRUNE_CONFIG_FILE" 53 53 echo "COMPILER=gcc_helenos" >>"$PRUNE_CONFIG_FILE" 54 54 echo "COMPILER=icc" >>"$PRUNE_CONFIG_FILE" 55 if [ "$option" = "S" ]; then 56 echo "CONFIG_PCC=y" >>"$PRUNE_CONFIG_FILE" 57 echo "CONFIG_BINUTILS=y" >>"$PRUNE_CONFIG_FILE" 58 echo "CONFIG_MSIM=y" >>"$PRUNE_CONFIG_FILE" 59 fi 55 60 ;; 56 61 *|h) … … 67 72 echo " Use only supported compilers." 68 73 echo " (That is, only GCC cross-compiler and Clang.)" 74 echo " -S" 75 echo " Build only reasonable configurations." 76 echo " (Implies -s, does not build ported programs.)" 69 77 echo " -x CONFIG_OPTION=value" 70 78 echo " Skip the configuration if this option is present." -
kernel/arch/ia64/Makefile.inc
r72d120e r9d653e3 30 30 BFD_ARCH = ia64-elf64 31 31 32 CMN1 = -mconstant-gp -fno-unwind-tables -mfixed-range=f32-f127 32 # 33 # FIXME: 34 # 35 # The -fno-selective-scheduling and -fno-selective-scheduling2 options 36 # should be removed as soon as a bug in GCC concerning unchecked 37 # speculative loads is fixed. 38 # 39 # See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53975 for reference. 40 # 41 42 CMN1 = -mconstant-gp -fno-unwind-tables -mfixed-range=f32-f127 -fno-selective-scheduling -fno-selective-scheduling2 33 43 GCC_CFLAGS += $(CMN1) 34 44 ICC_CFLAGS += $(CMN1) -
kernel/arch/sparc64/src/drivers/niagara.c
r72d120e r9d653e3 208 208 */ 209 209 210 sysinfo_set_item_val("fb", NULL, true);211 210 sysinfo_set_item_val("fb.kind", NULL, 5); 212 211 -
kernel/generic/src/ddi/ddi.c
r72d120e r9d653e3 229 229 void *virt_ptr, uintptr_t bound) 230 230 { 231 uintptr_t virt; 232 int rc = copy_from_uspace(&virt, virt_ptr, sizeof(virt)); 233 if (rc != EOK) 234 return rc; 235 236 rc = physmem_map(ALIGN_DOWN(phys, FRAME_SIZE), pages, flags, &virt, 237 bound); 231 uintptr_t virt = (uintptr_t) -1; 232 int rc = physmem_map(ALIGN_DOWN(phys, FRAME_SIZE), pages, flags, 233 &virt, bound); 238 234 if (rc != EOK) 239 235 return rc; … … 394 390 return rc; 395 391 396 uintptr_t virt;397 rc = copy_from_uspace(&virt, virt_ptr, sizeof(virt));398 if (rc != EOK)399 return rc;400 401 392 uintptr_t phys; 393 uintptr_t virt = (uintptr_t) -1; 402 394 rc = dmamem_map_anonymous(size, constraint, map_flags, flags, 403 395 &phys, &virt, bound); -
uspace/Makefile
r72d120e r9d653e3 156 156 drv/nic/rtl8169 157 157 158 ifeq ($(CONFIG_PCC),y) 159 DIRS += \ 160 app/cc \ 161 app/ccom \ 162 app/ccom/mkext \ 163 app/cpp 164 endif 165 166 ifeq ($(CONFIG_BINUTILS),y) 167 DIRS += \ 168 app/binutils 169 endif 170 171 ifeq ($(CONFIG_MSIM),y) 172 DIRS += \ 173 app/msim 174 endif 175 158 176 ## Platform-specific hardware support 159 177 # -
uspace/app/bdsh/compl.c
r72d120e r9d653e3 209 209 *cstart += rpath_sep + 1 - prefix; 210 210 free(prefix); 211 prefix = NULL;212 211 213 212 cs->path_list = malloc(sizeof(char *) * 2); … … 253 252 } 254 253 255 if ( (cs != NULL) && (cs->prefix != NULL))254 if (cs != NULL && cs->prefix != NULL) 256 255 free(cs->prefix); 257 258 256 if (dirname != NULL) 259 257 free(dirname); 260 261 258 if (prefix != NULL) 262 259 free(prefix); 263 264 260 if (stext != NULL) 265 261 free(stext); 266 267 262 if (cs != NULL) 268 263 free(cs); 269 270 264 if (tokens != NULL) 271 265 free(tokens); -
uspace/app/kio/kio.c
r72d120e r9d653e3 63 63 64 64 /* Pointer to kio area */ 65 static wchar_t *kio = (wchar_t *) AS_AREA_ANY;65 static wchar_t *kio; 66 66 static size_t kio_length; 67 67 -
uspace/app/vlaunch/vlaunch.c
r72d120e r9d653e3 41 41 #include <str.h> 42 42 #include <str_error.h> 43 #include <loc.h>44 #include <fibril_synch.h>45 #include <io/pixel.h>46 #include <device/led_dev.h>47 43 48 44 #include <window.h> … … 64 60 #define LOGO_HEIGHT 66 65 61 66 #define PERIOD 100000067 #define COLORS 768 69 62 static char *winreg = NULL; 70 static fibril_timer_t *timer = NULL;71 static list_t led_devs;72 73 static pixel_t colors[COLORS] = {74 PIXEL(0xff, 0xff, 0x00, 0x00),75 PIXEL(0xff, 0x00, 0xff, 0x00),76 PIXEL(0xff, 0x00, 0x00, 0xff),77 PIXEL(0xff, 0xff, 0xff, 0x00),78 PIXEL(0xff, 0xff, 0x00, 0xff),79 PIXEL(0xff, 0x00, 0xff, 0xff),80 PIXEL(0xff, 0xff, 0xff, 0xff)81 };82 83 static unsigned int color = 0;84 85 typedef struct {86 link_t link;87 service_id_t svc_id;88 async_sess_t *sess;89 } led_dev_t;90 63 91 64 static int app_launch(const char *app) 92 65 { 66 int rc; 93 67 printf("%s: Spawning %s %s \n", NAME, app, winreg); 94 68 95 69 task_id_t id; 96 int rc = task_spawnl(&id, app, app, winreg, NULL); 70 task_exit_t texit; 71 int retval; 72 rc = task_spawnl(&id, app, app, winreg, NULL); 97 73 if (rc != EOK) { 98 74 printf("%s: Error spawning %s %s (%s)\n", NAME, app, … … 100 76 return -1; 101 77 } 102 103 task_exit_t texit;104 int retval;105 78 rc = task_wait(id, &texit, &retval); 106 if ( (rc != EOK) || (texit != TASK_EXIT_NORMAL)) {79 if (rc != EOK || texit != TASK_EXIT_NORMAL) { 107 80 printf("%s: Error retrieving retval from %s (%s)\n", NAME, 108 81 app, str_error(rc)); 109 82 return -1; 110 83 } 111 84 112 85 return retval; 113 86 } … … 128 101 } 129 102 130 static void timer_callback(void *data)131 {132 pixel_t next_color = colors[color];133 134 color++;135 if (color >= COLORS)136 color = 0;137 138 list_foreach(led_devs, link, led_dev_t, dev) {139 if (dev->sess)140 led_dev_color_set(dev->sess, next_color);141 }142 143 fibril_timer_set(timer, PERIOD, timer_callback, NULL);144 }145 146 static void loc_callback(void)147 {148 category_id_t led_cat;149 int rc = loc_category_get_id("led", &led_cat, IPC_FLAG_BLOCKING);150 if (rc != EOK)151 return;152 153 service_id_t *svcs;154 size_t count;155 rc = loc_category_get_svcs(led_cat, &svcs, &count);156 if (rc != EOK)157 return;158 159 for (size_t i = 0; i < count; i++) {160 bool known = false;161 162 /* Determine whether we already know this device. */163 list_foreach(led_devs, link, led_dev_t, dev) {164 if (dev->svc_id == svcs[i]) {165 known = true;166 break;167 }168 }169 170 if (!known) {171 led_dev_t *dev = (led_dev_t *) calloc(1, sizeof(led_dev_t));172 if (!dev)173 continue;174 175 link_initialize(&dev->link);176 dev->svc_id = svcs[i];177 dev->sess = loc_service_connect(EXCHANGE_SERIALIZE, svcs[i], 0);178 179 list_append(&dev->link, &led_devs);180 }181 }182 183 // FIXME: Handle LED device removal184 185 free(svcs);186 }187 188 103 int main(int argc, char *argv[]) 189 104 { 190 105 if (argc < 2) { 191 106 printf("Compositor server not specified.\n"); 192 return 1;193 }194 195 list_initialize(&led_devs);196 int rc = loc_register_cat_change_cb(loc_callback);197 if (rc != EOK) {198 printf("Unable to register callback for device discovery.\n");199 return 1;200 }201 202 timer = fibril_timer_create();203 if (!timer) {204 printf("Unable to create timer.\n");205 107 return 1; 206 108 } … … 261 163 window_exec(main_window); 262 164 263 fibril_timer_set(timer, PERIOD, timer_callback, NULL);264 265 165 task_retval(0); 266 166 async_manager(); -
uspace/drv/audio/sb16/dsp.c
r72d120e r9d653e3 178 178 179 179 uintptr_t pa = 0; 180 void *buffer = AS_AREA_ANY;180 void *buffer = NULL; 181 181 182 182 int ret = dmamem_map_anonymous(size, DMAMEM_16MiB | 0x0000ffff, -
uspace/drv/block/ahci/ahci.c
r72d120e r9d653e3 234 234 235 235 uintptr_t phys; 236 void *ibuf = AS_AREA_ANY;236 void *ibuf; 237 237 int rc = dmamem_map_anonymous(sata->block_size, DMAMEM_4GiB, 238 238 AS_AREA_READ | AS_AREA_WRITE, 0, &phys, &ibuf); … … 277 277 278 278 uintptr_t phys; 279 void *ibuf = AS_AREA_ANY;279 void *ibuf; 280 280 int rc = dmamem_map_anonymous(sata->block_size, DMAMEM_4GiB, 281 281 AS_AREA_READ | AS_AREA_WRITE, 0, &phys, &ibuf); … … 436 436 437 437 uintptr_t phys; 438 sata_identify_data_t *idata = AS_AREA_ANY;438 sata_identify_data_t *idata; 439 439 int rc = dmamem_map_anonymous(SATA_IDENTIFY_DEVICE_BUFFER_LENGTH, 440 440 DMAMEM_4GiB, AS_AREA_READ | AS_AREA_WRITE, 0, &phys, 441 (void * ) &idata);441 (void **) &idata); 442 442 if (rc != EOK) { 443 443 ddf_msg(LVL_ERROR, "Cannot allocate buffer to identify device."); … … 630 630 631 631 uintptr_t phys; 632 sata_identify_data_t *idata = AS_AREA_ANY;632 sata_identify_data_t *idata; 633 633 int rc = dmamem_map_anonymous(SATA_SET_FEATURE_BUFFER_LENGTH, 634 634 DMAMEM_4GiB, AS_AREA_READ | AS_AREA_WRITE, 0, &phys, 635 (void * ) &idata);635 (void **) &idata); 636 636 if (rc != EOK) { 637 637 ddf_msg(LVL_ERROR, "Cannot allocate buffer for device set mode."); … … 938 938 size_t size = 4096; 939 939 uintptr_t phys = 0; 940 void *virt_fb = AS_AREA_ANY;941 void *virt_cmd = AS_AREA_ANY;942 void *virt_table = AS_AREA_ANY;940 void *virt_fb = NULL; 941 void *virt_cmd = NULL; 942 void *virt_table = NULL; 943 943 ddf_fun_t *fun; 944 944 … … 1155 1155 1156 1156 /* Map AHCI registers. */ 1157 ahci->memregs = AS_AREA_ANY;1157 ahci->memregs = NULL; 1158 1158 1159 1159 physmem_map(RNGABS(hw_res_parsed.mem_ranges.ranges[0]), 1160 1160 AHCI_MEMREGS_PAGES_COUNT, AS_AREA_READ | AS_AREA_WRITE, 1161 (void * ) &ahci->memregs);1161 (void **) &ahci->memregs); 1162 1162 if (ahci->memregs == NULL) 1163 1163 goto error_map_registers; -
uspace/drv/bus/usb/uhci/utils/malloc32.h
r72d120e r9d653e3 103 103 { 104 104 uintptr_t phys; 105 void *address = AS_AREA_ANY;105 void *address; 106 106 107 107 const int ret = dmamem_map_anonymous(UHCI_REQUIRED_PAGE_SIZE, -
uspace/drv/bus/usb/usbhid/Makefile
r72d120e r9d653e3 50 50 mouse/mousedev.c \ 51 51 multimedia/multimedia.c \ 52 multimedia/keymap.c \ 53 blink1/blink1.c 52 multimedia/keymap.c 54 53 55 54 SOURCES = \ -
uspace/drv/bus/usb/usbhid/generic/hiddev.c
r72d120e r9d653e3 49 49 #include "usbhid.h" 50 50 51 52 51 53 const usb_endpoint_description_t usb_hid_generic_poll_endpoint_description = { 52 54 .transfer_type = USB_TRANSFER_INTERRUPT, … … 59 61 60 62 const char *HID_GENERIC_FUN_NAME = "hid"; 61 const char *HID_GENERIC_C ATEGORY= "hid";63 const char *HID_GENERIC_CLASS_NAME = "hid"; 62 64 63 65 … … 224 226 return true; 225 227 } 226 227 228 /** 228 229 * @} -
uspace/drv/bus/usb/usbhid/generic/hiddev.h
r72d120e r9d653e3 38 38 39 39 #include <usb/dev/driver.h> 40 #include "../usbhid.h" 40 41 struct usb_hid_dev; 41 42 42 43 extern const usb_endpoint_description_t 43 44 usb_hid_generic_poll_endpoint_description; 44 45 45 externconst char *HID_GENERIC_FUN_NAME;46 extern const char *HID_GENERIC_CATEGORY;46 const char *HID_GENERIC_FUN_NAME; 47 const char *HID_GENERIC_CLASS_NAME; 47 48 48 49 /** The USB HID generic 'hid' function softstate */ 49 50 typedef struct { 50 usb_hid_dev_t*hid_dev;51 struct usb_hid_dev *hid_dev; 51 52 } usb_hid_gen_fun_t; 52 53 53 extern int usb_generic_hid_init(usb_hid_dev_t *, void **); 54 extern void usb_generic_hid_deinit(usb_hid_dev_t *, void *); 55 extern bool usb_generic_hid_polling_callback(usb_hid_dev_t *, void *); 54 int usb_generic_hid_init(struct usb_hid_dev *hid_dev, void **data); 55 56 void usb_generic_hid_deinit(struct usb_hid_dev *hid_dev, void *data); 57 58 bool usb_generic_hid_polling_callback(struct usb_hid_dev *hid_dev, void *data); 56 59 57 60 #endif // USB_HID_HIDDDEV_H_ -
uspace/drv/bus/usb/usbhid/kbd/kbddev.c
r72d120e r9d653e3 103 103 104 104 const char *HID_KBD_FUN_NAME = "keyboard"; 105 const char *HID_KBD_CATEGORY = "keyboard";105 const char *HID_KBD_CATEGORY_NAME = "keyboard"; 106 106 107 107 static void usb_kbd_set_led(usb_hid_dev_t *hid_dev, usb_kbd_t *kbd_dev); … … 513 513 514 514 usb_log_debug("Adding DDF function to category %s...\n", 515 HID_KBD_C ATEGORY);516 rc = ddf_fun_add_to_category(fun, HID_KBD_CATEGORY );515 HID_KBD_CLASS_NAME); 516 rc = ddf_fun_add_to_category(fun, HID_KBD_CATEGORY_NAME); 517 517 if (rc != EOK) { 518 518 usb_log_error( 519 519 "Could not add DDF function to category %s: %s.\n", 520 HID_KBD_C ATEGORY, str_error(rc));520 HID_KBD_CLASS_NAME, str_error(rc)); 521 521 if (ddf_fun_unbind(fun) == EOK) { 522 522 ddf_fun_destroy(fun); -
uspace/drv/bus/usb/usbhid/kbd/kbddev.h
r72d120e r9d653e3 45 45 #include <usb/dev/pipes.h> 46 46 #include <usb/dev/driver.h> 47 #include "../usbhid.h" 47 48 48 #include "kbdrepeat.h" 49 50 struct usb_hid_dev; 51 49 52 50 53 /** … … 62 65 typedef struct usb_kbd_t { 63 66 /** Link to HID device structure */ 64 usb_hid_dev_t*hid_dev;65 67 struct usb_hid_dev *hid_dev; 68 66 69 /** Previously pressed keys (not translated to key codes). */ 67 70 int32_t *keys_old; … … 72 75 /** Currently pressed modifiers (bitmap). */ 73 76 uint8_t modifiers; 74 77 75 78 /** Currently active modifiers including locks. Sent to the console. */ 76 unsigned intmods;77 79 unsigned mods; 80 78 81 /** Currently active lock keys. */ 79 unsigned intlock_keys;80 82 unsigned lock_keys; 83 81 84 /** IPC session to client (for sending key events). */ 82 85 async_sess_t *client_sess; 83 86 84 87 /** Information for auto-repeat of keys. */ 85 88 usb_kbd_repeat_t repeat; 86 89 87 90 /** Mutex for accessing the information about auto-repeat. */ 88 91 fibril_mutex_t repeat_mtx; 89 92 90 93 uint8_t *output_buffer; 91 94 92 95 size_t output_size; 93 96 94 97 size_t led_output_size; 95 98 96 99 usb_hid_report_path_t *led_path; 97 100 98 101 int32_t *led_data; 99 102 100 103 /** State of the structure (for checking before use). 101 * 104 * 102 105 * 0 - not initialized 103 106 * 1 - initialized … … 105 108 */ 106 109 int initialized; 107 110 108 111 /** DDF function */ 109 112 ddf_fun_t *fun; 110 113 } usb_kbd_t; 111 114 115 116 112 117 extern const usb_endpoint_description_t usb_hid_kbd_poll_endpoint_description; 113 118 114 externconst char *HID_KBD_FUN_NAME;115 extern const char *HID_KBD_CATEGORY;119 const char *HID_KBD_FUN_NAME; 120 const char *HID_KBD_CLASS_NAME; 116 121 117 extern int usb_kbd_init(usb_hid_dev_t *, void **); 118 extern bool usb_kbd_polling_callback(usb_hid_dev_t *, void *); 119 extern int usb_kbd_is_initialized(const usb_kbd_t *); 120 extern int usb_kbd_is_ready_to_destroy(const usb_kbd_t *); 121 extern void usb_kbd_destroy(usb_kbd_t *); 122 extern void usb_kbd_push_ev(usb_kbd_t *, int, unsigned int); 123 extern void usb_kbd_deinit(usb_hid_dev_t *, void *); 124 extern int usb_kbd_set_boot_protocol(usb_hid_dev_t *); 122 123 124 int usb_kbd_init(struct usb_hid_dev *hid_dev, void **data); 125 126 bool usb_kbd_polling_callback(struct usb_hid_dev *hid_dev, void *data); 127 128 int usb_kbd_is_initialized(const usb_kbd_t *kbd_dev); 129 130 int usb_kbd_is_ready_to_destroy(const usb_kbd_t *kbd_dev); 131 132 void usb_kbd_destroy(usb_kbd_t *kbd_dev); 133 134 void usb_kbd_push_ev(usb_kbd_t *kbd_dev, 135 int type, unsigned int key); 136 137 void usb_kbd_deinit(struct usb_hid_dev *hid_dev, void *data); 138 139 int usb_kbd_set_boot_protocol(struct usb_hid_dev *hid_dev); 125 140 126 141 #endif /* USB_HID_KBDDEV_H_ */ -
uspace/drv/bus/usb/usbhid/mouse/mousedev.c
r72d120e r9d653e3 344 344 345 345 if (hid_dev == NULL) { 346 usb_log_error("Failed to init mousestructure: no structure"346 usb_log_error("Failed to init keyboard structure: no structure" 347 347 " given.\n"); 348 348 return EINVAL; -
uspace/drv/bus/usb/usbhid/mouse/mousedev.h
r72d120e r9d653e3 39 39 #include <usb/dev/driver.h> 40 40 #include <async.h> 41 #include "../usbhid.h" 41 42 struct usb_hid_dev; 43 44 42 45 43 46 /** Container for USB mouse device. */ … … 45 48 /** IPC session to consumer. */ 46 49 async_sess_t *mouse_sess; 47 48 /* *Mouse buttons statuses. */50 51 /* Mouse buttons statuses. */ 49 52 int32_t *buttons; 50 53 size_t buttons_count; 51 52 /* *DDF mouse function */54 55 /* DDF mouse function */ 53 56 ddf_fun_t *mouse_fun; 54 57 } usb_mouse_t; 55 58 59 60 56 61 extern const usb_endpoint_description_t usb_hid_mouse_poll_endpoint_description; 57 62 58 externconst char *HID_MOUSE_FUN_NAME;59 externconst char *HID_MOUSE_CATEGORY;63 const char *HID_MOUSE_FUN_NAME; 64 const char *HID_MOUSE_CATEGORY; 60 65 61 extern int usb_mouse_init(usb_hid_dev_t *, void **); 62 extern bool usb_mouse_polling_callback(usb_hid_dev_t *, void *); 63 extern void usb_mouse_deinit(usb_hid_dev_t *, void *); 64 extern int usb_mouse_set_boot_protocol(usb_hid_dev_t *); 66 67 68 int usb_mouse_init(struct usb_hid_dev *hid_dev, void **data); 69 70 bool usb_mouse_polling_callback(struct usb_hid_dev *hid_dev, void *data); 71 72 void usb_mouse_deinit(struct usb_hid_dev *hid_dev, void *data); 73 74 int usb_mouse_set_boot_protocol(struct usb_hid_dev *hid_dev); 75 76 65 77 66 78 #endif // USB_HID_MOUSEDEV_H_ -
uspace/drv/bus/usb/usbhid/multimedia/multimedia.c
r72d120e r9d653e3 1 1 /* 2 * Copyright (c) 2011 Lubos Slovak 3 * Copyright (c) 2011 Vojtech Horky 2 * Copyright (c) 2011 Lubos Slovak, Vojtech Horky 4 3 * All rights reserved. 5 4 * -
uspace/drv/bus/usb/usbhid/multimedia/multimedia.h
r72d120e r9d653e3 38 38 39 39 #include <usb/dev/driver.h> 40 #include "../usbhid.h"41 40 42 extern int usb_multimedia_init(usb_hid_dev_t *, void **); 43 extern void usb_multimedia_deinit(usb_hid_dev_t *, void *); 44 extern bool usb_multimedia_polling_callback(usb_hid_dev_t *, void *); 41 struct usb_hid_dev; 42 43 44 45 int usb_multimedia_init(struct usb_hid_dev *hid_dev, void **data); 46 47 void usb_multimedia_deinit(struct usb_hid_dev *hid_dev, void *data); 48 49 bool usb_multimedia_polling_callback(struct usb_hid_dev *hid_dev, void *data); 50 51 45 52 46 53 #endif // USB_HID_MULTIMEDIA_H_ -
uspace/drv/bus/usb/usbhid/subdrivers.c
r72d120e r9d653e3 37 37 #include <usb/hid/usages/core.h> 38 38 #include <usb/hid/hidpath.h> 39 #include "kbd/kbddev.h" 39 40 #include "multimedia/multimedia.h" 40 41 #include "mouse/mousedev.h" 41 #include "multimedia/multimedia.h"42 #include "blink1/blink1.h"43 42 #include "generic/hiddev.h" 44 43 45 44 static const usb_hid_subdriver_usage_t path_kbd[] = { 46 { 47 USB_HIDUT_PAGE_GENERIC_DESKTOP, 48 USB_HIDUT_USAGE_GENERIC_DESKTOP_KEYBOARD 49 }, 45 {USB_HIDUT_PAGE_GENERIC_DESKTOP, 46 USB_HIDUT_USAGE_GENERIC_DESKTOP_KEYBOARD}, 50 47 {0, 0} 51 48 }; 52 49 53 50 static const usb_hid_subdriver_usage_t path_mouse[] = { 54 { 55 USB_HIDUT_PAGE_GENERIC_DESKTOP, 56 USB_HIDUT_USAGE_GENERIC_DESKTOP_MOUSE 57 }, 51 {USB_HIDUT_PAGE_GENERIC_DESKTOP, USB_HIDUT_USAGE_GENERIC_DESKTOP_MOUSE}, 58 52 {0, 0} 59 53 }; 60 54 61 static const usb_hid_subdriver_usage_t path_multim_key[] = { 62 { 63 USB_HIDUT_PAGE_CONSUMER, 64 USB_HIDUT_USAGE_CONSUMER_CONSUMER_CONTROL 65 }, 55 static const usb_hid_subdriver_usage_t multim_key_path[] = { 56 {USB_HIDUT_PAGE_CONSUMER, USB_HIDUT_USAGE_CONSUMER_CONSUMER_CONTROL}, 66 57 {0, 0} 67 58 }; … … 82 73 }, 83 74 { 84 path_multim_key,75 multim_key_path, 85 76 1, 86 77 USB_HID_PATH_COMPARE_BEGIN, … … 107 98 } 108 99 }, 109 {110 NULL,111 0,112 USB_HID_PATH_COMPARE_BEGIN,113 0x27b8,114 0x01ed,115 {116 .init = usb_blink1_init,117 .deinit = usb_blink1_deinit,118 .poll = NULL,119 .poll_end = NULL120 }121 }122 100 }; 123 101 -
uspace/drv/bus/usb/usbhid/subdrivers.h
r72d120e r9d653e3 40 40 #include "kbd/kbddev.h" 41 41 42 43 42 44 typedef struct usb_hid_subdriver_usage { 43 45 int usage_page; … … 45 47 } usb_hid_subdriver_usage_t; 46 48 47 /** Structure representing the mapping between device requirements and the 49 50 51 /** Structure representing the mapping between device requirements and the 48 52 * subdriver supposed to handle this device. 49 53 * … … 51 55 * a new subdriver mapping will be created and used by the HID driver when it 52 56 * searches for appropriate subdrivers for a device. 53 *54 57 */ 55 58 typedef struct usb_hid_subdriver_mapping { 56 /** Usage path that the device's input reports must contain.59 /** Usage path that the device's Input reports must contain. 57 60 * 58 61 * It is an array of pairs <usage_page, usage>, terminated by a <0, 0> … … 61 64 */ 62 65 const usb_hid_subdriver_usage_t *usage_path; 63 66 64 67 /** Report ID for which the path should apply. */ 65 68 int report_id; 66 67 /** Compare type for the usage path. */69 70 /** Compare type for the Usage path. */ 68 71 int compare; 69 72 70 73 /** Vendor ID (set to -1 if not specified). */ 71 74 int vendor_id; 72 75 73 76 /** Product ID (set to -1 if not specified). */ 74 77 int product_id; 75 78 76 79 /** Subdriver for controlling this device. */ 77 80 const usb_hid_subdriver_t subdriver; 78 81 } usb_hid_subdriver_mapping_t; 79 82 83 84 80 85 extern const usb_hid_subdriver_mapping_t usb_hid_subdrivers[]; 81 86 extern const size_t USB_HID_MAX_SUBDRIVERS; 87 88 82 89 83 90 #endif /* USB_HID_SUBDRIVERS_H_ */ -
uspace/drv/bus/usb/usbhid/usbhid.ma
r72d120e r9d653e3 1 100 0usb&interface&class=HID&subclass=0x01&protocol=0x011 100 usb&interface&class=HID&subclass=0x01&protocol=0x01 2 2 1000 usb&interface&class=HID&subclass=0x01&protocol=0x02 3 3 100 usb&interface&class=HID -
uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.c
r72d120e r9d653e3 38 38 #include <ddf/log.h> 39 39 #include <ddi.h> 40 #include <a s.h>40 #include <abi/mm/as.h> 41 41 42 42 #include "amdm37x_dispc.h" … … 274 274 const size_t size = ALIGN_UP(x * y * bpp, PAGE_SIZE); 275 275 uintptr_t pa; 276 void *buffer = AS_AREA_ANY;276 void *buffer; 277 277 int ret = dmamem_map_anonymous(size, DMAMEM_4GiB, 278 278 AS_AREA_READ | AS_AREA_WRITE, 0, &pa, &buffer); -
uspace/drv/fb/kfb/port.c
r72d120e r9d653e3 333 333 334 334 kfb.size = scanline * height; 335 kfb.addr = AS_AREA_ANY;336 337 335 rc = physmem_map(paddr + offset, 338 336 ALIGN_UP(kfb.size, PAGE_SIZE) >> PAGE_WIDTH, -
uspace/drv/nic/e1k/e1k.c
r72d120e r9d653e3 1375 1375 fibril_mutex_lock(&e1000->rx_lock); 1376 1376 1377 e1000->rx_ring_virt = AS_AREA_ANY;1378 1377 int rc = dmamem_map_anonymous( 1379 1378 E1000_RX_FRAME_COUNT * sizeof(e1000_rx_descriptor_t), … … 1397 1396 } 1398 1397 1399 for (size_t i = 0; i < E1000_RX_FRAME_COUNT; i++) { 1400 uintptr_t frame_phys; 1401 void *frame_virt = AS_AREA_ANY; 1402 1398 size_t i; 1399 uintptr_t frame_phys; 1400 void *frame_virt; 1401 1402 for (i = 0; i < E1000_RX_FRAME_COUNT; i++) { 1403 1403 rc = dmamem_map_anonymous(E1000_MAX_SEND_FRAME_SIZE, 1404 1404 DMAMEM_4GiB, AS_AREA_READ | AS_AREA_WRITE, 0, … … 1412 1412 1413 1413 /* Write descriptor */ 1414 for ( size_ti = 0; i < E1000_RX_FRAME_COUNT; i++)1414 for (i = 0; i < E1000_RX_FRAME_COUNT; i++) 1415 1415 e1000_fill_new_rx_descriptor(nic, i); 1416 1416 … … 1421 1421 1422 1422 error: 1423 for ( size_ti = 0; i < E1000_RX_FRAME_COUNT; i++) {1423 for (i = 0; i < E1000_RX_FRAME_COUNT; i++) { 1424 1424 if (e1000->rx_frame_virt[i] != NULL) { 1425 1425 dmamem_unmap_anonymous(e1000->rx_frame_virt[i]); … … 1571 1571 1572 1572 e1000->tx_ring_phys = 0; 1573 e1000->tx_ring_virt = AS_AREA_ANY;1573 e1000->tx_ring_virt = NULL; 1574 1574 1575 1575 e1000->tx_frame_phys = NULL; … … 1597 1597 1598 1598 for (i = 0; i < E1000_TX_FRAME_COUNT; i++) { 1599 e1000->tx_frame_virt[i] = AS_AREA_ANY;1600 1599 rc = dmamem_map_anonymous(E1000_MAX_SEND_FRAME_SIZE, 1601 1600 DMAMEM_4GiB, AS_AREA_READ | AS_AREA_WRITE, -
uspace/drv/nic/rtl8139/driver.c
r72d120e r9d653e3 1141 1141 1142 1142 ddf_msg(LVL_DEBUG, "Creating buffers"); 1143 1144 rtl8139->tx_buff_virt = AS_AREA_ANY; 1143 1145 1144 rc = dmamem_map_anonymous(TX_PAGES * PAGE_SIZE, DMAMEM_4GiB, 1146 1145 AS_AREA_WRITE, 0, &rtl8139->tx_buff_phys, &rtl8139->tx_buff_virt); … … 1162 1161 ddf_msg(LVL_DEBUG, "Allocating receiver buffer of the size %d bytes", 1163 1162 RxBUF_TOT_LENGTH); 1164 1165 rtl8139->rx_buff_virt = AS_AREA_ANY; 1163 1166 1164 rc = dmamem_map_anonymous(RxBUF_TOT_LENGTH, DMAMEM_4GiB, 1167 1165 AS_AREA_READ, 0, &rtl8139->rx_buff_phys, &rtl8139->rx_buff_virt); -
uspace/lib/c/Makefile
r72d120e r9d653e3 65 65 generic/device/pio_window.c \ 66 66 generic/device/clock_dev.c \ 67 generic/device/led_dev.c \68 67 generic/dhcp.c \ 69 68 generic/dnsr.c \ -
uspace/lib/c/arch/ia64/Makefile.common
r72d120e r9d653e3 27 27 # 28 28 29 GCC_CFLAGS += -fno-unwind-tables 29 # 30 # FIXME: 31 # 32 # The -fno-selective-scheduling and -fno-selective-scheduling2 options 33 # should be removed as soon as a bug in GCC concerning unchecked 34 # speculative loads is fixed. 35 # 36 # See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53975 for reference. 37 # 38 39 GCC_CFLAGS += -fno-unwind-tables -fno-selective-scheduling -fno-selective-scheduling2 30 40 31 41 ENDIANESS = LE -
uspace/lib/c/arch/sparc64/_link.ld.in
r72d120e r9d653e3 10 10 #endif 11 11 data PT_LOAD FLAGS(6); 12 debug PT_NOTE;13 12 } 14 13 … … 64 63 } :data 65 64 66 #ifdef CONFIG_LINE_DEBUG67 .comment 0 : { *(.comment); } :debug68 .debug_abbrev 0 : { *(.debug_abbrev); } :debug69 .debug_aranges 0 : { *(.debug_aranges); } :debug70 .debug_info 0 : { *(.debug_info); } :debug71 .debug_line 0 : { *(.debug_line); } :debug72 .debug_loc 0 : { *(.debug_loc); } :debug73 .debug_pubnames 0 : { *(.debug_pubnames); } :debug74 .debug_pubtypes 0 : { *(.debug_pubtypes); } :debug75 .debug_ranges 0 : { *(.debug_ranges); } :debug76 .debug_str 0 : { *(.debug_str); } :debug77 #endif78 79 65 /DISCARD/ : { 80 66 *(*); -
uspace/lib/c/generic/ddi.c
r72d120e r9d653e3 71 71 * @param flags Flags for the new address space area. 72 72 * @param virt Virtual address of the starting page. 73 * If set to AS_AREA_ANY ((void *) -1), a suitable value 74 * is found by the kernel, otherwise the kernel tries to 75 * obey the desired value. 76 * 77 * @return EOK on success. 78 * @return EPERM if the caller lacks the CAP_MEM_MANAGER capability. 73 * 74 * @return EOK on success 75 * @return EPERM if the caller lacks the CAP_MEM_MANAGER capability 76 * @return ENOENT if there is no task with specified ID 79 77 * @return ENOMEM if there was some problem in creating 80 78 * the address space area. … … 87 85 } 88 86 89 /** Lock a piece physical memory for DMA transfers.90 *91 * The mapping of the specified virtual memory address92 * to physical memory address is locked in order to93 * make it safe for DMA transferts.94 *95 * Caller of this function must have the CAP_MEM_MANAGER capability.96 *97 * @param virt Virtual address of the memory to be locked.98 * @param size Number of bytes to lock.99 * @param map_flags Desired virtual memory area flags.100 * @param flags Flags for the physical memory address.101 * @param phys Locked physical memory address.102 *103 * @return EOK on success.104 * @return EPERM if the caller lacks the CAP_MEM_MANAGER capability.105 * @return ENOMEM if there was some problem in creating106 * the address space area.107 *108 */109 87 int dmamem_map(void *virt, size_t size, unsigned int map_flags, 110 88 unsigned int flags, uintptr_t *phys) … … 115 93 } 116 94 117 /** Map a piece of physical memory suitable for DMA transfers.118 *119 * Caller of this function must have the CAP_MEM_MANAGER capability.120 *121 * @param size Number of bytes to map.122 * @param constraint Bit mask defining the contraint on the physical123 * address to be mapped.124 * @param map_flags Desired virtual memory area flags.125 * @param flags Flags for the physical memory address.126 * @param virt Virtual address of the starting page.127 * If set to AS_AREA_ANY ((void *) -1), a suitable value128 * is found by the kernel, otherwise the kernel tries to129 * obey the desired value.130 *131 * @return EOK on success.132 * @return EPERM if the caller lacks the CAP_MEM_MANAGER capability.133 * @return ENOMEM if there was some problem in creating134 * the address space area.135 *136 */137 95 int dmamem_map_anonymous(size_t size, uintptr_t constraint, 138 96 unsigned int map_flags, unsigned int flags, uintptr_t *phys, void **virt) … … 263 221 size_t pages = SIZE2PAGES(offset + size); 264 222 265 void *virt_page = AS_AREA_ANY;223 void *virt_page; 266 224 int rc = physmem_map(phys_frame, pages, 267 225 AS_AREA_READ | AS_AREA_WRITE, &virt_page); -
uspace/lib/c/generic/device/clock_dev.c
r72d120e r9d653e3 27 27 */ 28 28 29 /** @addtogroup libc29 /** @addtogroup libc 30 30 * @{ 31 31 */ -
uspace/lib/c/generic/time.c
r72d120e r9d653e3 555 555 } 556 556 557 void *addr = AS_AREA_ANY;557 void *addr; 558 558 rc = physmem_map(faddr, 1, AS_AREA_READ | AS_AREA_CACHEABLE, 559 559 &addr); -
uspace/lib/c/include/ipc/dev_iface.h
r72d120e r9d653e3 65 65 CLOCK_DEV_IFACE, 66 66 67 /** Interface provided by LED devices */68 LED_DEV_IFACE,69 70 67 /** Interface provided by battery powered devices */ 71 68 BATTERY_DEV_IFACE, -
uspace/lib/drv/Makefile
r72d120e r9d653e3 54 54 generic/remote_usbhid.c \ 55 55 generic/remote_clock_dev.c \ 56 generic/remote_led_dev.c \57 56 generic/remote_battery_dev.c \ 58 57 generic/remote_ahci.c -
uspace/lib/drv/generic/dev_iface.c
r72d120e r9d653e3 43 43 #include "remote_char_dev.h" 44 44 #include "remote_clock_dev.h" 45 #include "remote_led_dev.h"46 45 #include "remote_battery_dev.h" 47 46 #include "remote_graph_dev.h" … … 69 68 [USBHID_DEV_IFACE] = &remote_usbhid_iface, 70 69 [CLOCK_DEV_IFACE] = &remote_clock_dev_iface, 71 [LED_DEV_IFACE] = &remote_led_dev_iface,72 70 [BATTERY_DEV_IFACE] = &remote_battery_dev_iface, 73 71 [AHCI_DEV_IFACE] = &remote_ahci_iface, -
uspace/lib/drv/generic/remote_usbhc.c
r72d120e r9d653e3 363 363 static void async_transaction_destroy(async_transaction_t *trans) 364 364 { 365 if (trans == NULL) 366 return; 367 368 if (trans->buffer != NULL) 365 if (trans == NULL) { 366 return; 367 } 368 if (trans->buffer != NULL) { 369 369 free(trans->buffer); 370 370 } 371 371 372 free(trans); 372 373 } … … 584 585 async_answer_0(callid, ENOMEM); 585 586 async_transaction_destroy(trans); 586 return;587 587 } 588 588 -
uspace/srv/bd/rd/rd.c
r72d120e r9d653e3 60 60 61 61 /** Pointer to the ramdisk's image */ 62 static void *rd_addr = AS_AREA_ANY;62 static void *rd_addr; 63 63 64 64 /** Size of the ramdisk */ -
uspace/srv/hid/input/port/niagara.c
r72d120e r9d653e3 74 74 uint64_t read_ptr; 75 75 char data[INPUT_BUFFER_SIZE]; 76 } __attribute__((packed)) __attribute__((aligned(PAGE_SIZE))) *input_buffer_t; 76 } 77 __attribute__ ((packed)) 78 __attribute__ ((aligned(PAGE_SIZE))) 79 *input_buffer_t; 77 80 78 81 /* virtual address of the shared buffer */ 79 static input_buffer_t input_buffer = (input_buffer_t) AS_AREA_ANY;82 static input_buffer_t input_buffer; 80 83 81 84 static volatile bool polling_disabled = false; … … 84 87 /** 85 88 * Initializes the Niagara driver. 86 * Maps the shared buffer and creates the polling thread. 89 * Maps the shared buffer and creates the polling thread. 87 90 */ 88 91 static int niagara_port_init(kbd_dev_t *kdev) -
uspace/srv/hid/output/port/ega.c
r72d120e r9d653e3 215 215 216 216 ega.size = (ega.cols * ega.rows) << 1; 217 ega.addr = AS_AREA_ANY;218 217 219 218 rc = physmem_map(paddr, -
uspace/srv/hid/output/port/kchar.c
r72d120e r9d653e3 84 84 return rc; 85 85 86 kchar.addr = AS_AREA_ANY;87 88 86 rc = physmem_map(paddr, 89 87 ALIGN_UP(1, PAGE_SIZE) >> PAGE_WIDTH, -
uspace/srv/hid/output/port/niagara.c
r72d120e r9d653e3 104 104 return rc; 105 105 106 niagara.fifo = (output_fifo_t *) AS_AREA_ANY;107 108 106 rc = physmem_map(paddr, 1, AS_AREA_READ | AS_AREA_WRITE, 109 107 (void *) &niagara.fifo); -
uspace/srv/hw/irc/obio/obio.c
r72d120e r9d653e3 70 70 71 71 static uintptr_t base_phys; 72 static volatile uint64_t *base_virt = (volatile uint64_t *) AS_AREA_ANY;72 static volatile uint64_t *base_virt; 73 73 74 74 /** Handle one connection to obio. -
uspace/srv/locsrv/locsrv.c
r72d120e r9d653e3 320 320 svc_categ_t *memb = list_get_instance(link, svc_categ_t, 321 321 svc_link); 322 category_t *cat = memb->cat; 323 324 fibril_mutex_lock(&cat->mutex); 322 fibril_mutex_lock(&memb->cat->mutex); 325 323 category_remove_service(memb); 326 fibril_mutex_unlock(& cat->mutex);324 fibril_mutex_unlock(&memb->cat->mutex); 327 325 } 328 326 … … 1332 1330 1333 1331 cat = category_new("mouse"); 1334 categ_dir_add_cat(&cdir, cat);1335 1336 cat = category_new("led");1337 1332 categ_dir_add_cat(&cdir, cat); 1338 1333
Note:
See TracChangeset
for help on using the changeset viewer.