Changes in / [9d653e3:72d120e] in mainline
- Files:
-
- 9 added
- 234 deleted
- 51 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
r9d653e3 r72d120e 624 624 ! CONFIG_BAREBONE (n/y) 625 625 626 % Build pcc binaries627 ! CONFIG_PCC (n/y)628 629 % Build binutils binaries630 ! CONFIG_BINUTILS (n/y)631 632 % Build MSIM binary633 ! CONFIG_MSIM (n/y)634 635 626 % Line debugging information 636 627 ! [CONFIG_STRIP_BINARIES!=y] CONFIG_LINE_DEBUG (n/y) -
Makefile
r9d653e3 r72d120e 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.sh109 108 110 109 clean: -
boot/Makefile.common
r9d653e3 r72d120e 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/cpp227 endif228 229 ifeq ($(CONFIG_BINUTILS),y)230 RD_APPS_NON_ESSENTIAL += \231 $(USPACE_PATH)/app/binutils/bin/as \232 $(USPACE_PATH)/app/binutils/bin/ld233 endif234 235 ifeq ($(CONFIG_MSIM),y)236 RD_APPS_NON_ESSENTIAL += \237 $(USPACE_PATH)/app/msim/msim238 endif239 240 221 COMPONENTS = \ 241 222 $(KERNEL_PATH)/kernel.bin \ -
boot/arch/ia64/Makefile.inc
r9d653e3 r72d120e 31 31 BFD_ARCH = ia64 32 32 33 #34 # FIXME:35 #36 # The -fno-selective-scheduling and -fno-selective-scheduling2 options37 # should be removed as soon as a bug in GCC concerning unchecked38 # speculative loads is fixed.39 #40 # See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53975 for reference.41 #42 43 33 BITS = 64 44 34 ENDIANESS = LE 45 EXTRA_CFLAGS = -fno-unwind-tables -mfixed-range=f32-f127 -mno-pic -mno-sdata -fno-selective-scheduling -fno-selective-scheduling235 EXTRA_CFLAGS = -fno-unwind-tables -mfixed-range=f32-f127 -mno-pic -mno-sdata 46 36 47 37 RD_SRVS_NON_ESSENTIAL += -
boot/genarch/src/ofw.c
r9d653e3 r72d120e 377 377 (map->cnt < MEMMAP_MAX_RECORDS); pos += ac + sc) { 378 378 void *start = (void *) (buf[pos + ac - 1]); 379 uint 32_t size = buf[pos + ac + sc - 1];379 uintptr_t size = buf[pos + ac + sc - 1]; 380 380 381 381 /* -
contrib/bazaar/bzreml/__init__.py
r9d653e3 r72d120e 40 40 import smtplib 41 41 import time 42 import os 42 43 43 44 from StringIO import StringIO … … 133 134 revision_ac_no = branch.revision_id_to_revno(revision_ac_id) 134 135 136 repo_name = os.path.basename(branch.base) 137 if (repo_name == ''): 138 repo_name = os.path.basename(os.path.dirname(branch.base)) 139 135 140 committer = revision_ac.committer 136 141 authors = revision_ac.get_apparent_authors() 137 142 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) 138 145 139 146 if (authors != [committer]): … … 208 215 tree_prev.unlock() 209 216 210 subject = " r%d - %s" % (revision_ac_no, commit_message)217 subject = "[%s] r%d - %s" % (repo_name, revision_ac_no, commit_message) 211 218 send_smtp("localhost", config_sender(config), config_to(config), subject, body.getvalue()) 212 219 -
contrib/bazaar/bzreml/setup.py
r9d653e3 r72d120e 7 7 description = 'Commit email plugin for Bazaar', 8 8 keywords = 'plugin bzr email', 9 version = '1. 3',9 version = '1.4', 10 10 url = 'http://www.decky.cz/', 11 11 license = 'BSD', -
contrib/tools/random_check.sh
r9d653e3 r72d120e 38 38 echo -n "">"$PRUNE_CONFIG_FILE" 39 39 40 while getopts n:j:x:hs Soption; do40 while getopts n:j:x:hs option; do 41 41 case $option in 42 42 n) … … 49 49 echo "$OPTARG" | tr -d ' ' >>"$PRUNE_CONFIG_FILE" 50 50 ;; 51 s |S)51 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" ]; then56 echo "CONFIG_PCC=y" >>"$PRUNE_CONFIG_FILE"57 echo "CONFIG_BINUTILS=y" >>"$PRUNE_CONFIG_FILE"58 echo "CONFIG_MSIM=y" >>"$PRUNE_CONFIG_FILE"59 fi60 55 ;; 61 56 *|h) … … 72 67 echo " Use only supported compilers." 73 68 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.)"77 69 echo " -x CONFIG_OPTION=value" 78 70 echo " Skip the configuration if this option is present." -
kernel/arch/ia64/Makefile.inc
r9d653e3 r72d120e 30 30 BFD_ARCH = ia64-elf64 31 31 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 32 CMN1 = -mconstant-gp -fno-unwind-tables -mfixed-range=f32-f127 43 33 GCC_CFLAGS += $(CMN1) 44 34 ICC_CFLAGS += $(CMN1) -
kernel/arch/sparc64/src/drivers/niagara.c
r9d653e3 r72d120e 208 208 */ 209 209 210 sysinfo_set_item_val("fb", NULL, true); 210 211 sysinfo_set_item_val("fb.kind", NULL, 5); 211 212 -
kernel/generic/src/ddi/ddi.c
r9d653e3 r72d120e 229 229 void *virt_ptr, uintptr_t bound) 230 230 { 231 uintptr_t virt = (uintptr_t) -1; 232 int rc = physmem_map(ALIGN_DOWN(phys, FRAME_SIZE), pages, flags, 233 &virt, bound); 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); 234 238 if (rc != EOK) 235 239 return rc; … … 390 394 return rc; 391 395 396 uintptr_t virt; 397 rc = copy_from_uspace(&virt, virt_ptr, sizeof(virt)); 398 if (rc != EOK) 399 return rc; 400 392 401 uintptr_t phys; 393 uintptr_t virt = (uintptr_t) -1;394 402 rc = dmamem_map_anonymous(size, constraint, map_flags, flags, 395 403 &phys, &virt, bound); -
uspace/Makefile
r9d653e3 r72d120e 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/cpp164 endif165 166 ifeq ($(CONFIG_BINUTILS),y)167 DIRS += \168 app/binutils169 endif170 171 ifeq ($(CONFIG_MSIM),y)172 DIRS += \173 app/msim174 endif175 176 158 ## Platform-specific hardware support 177 159 # -
uspace/app/bdsh/compl.c
r9d653e3 r72d120e 209 209 *cstart += rpath_sep + 1 - prefix; 210 210 free(prefix); 211 prefix = NULL; 211 212 212 213 cs->path_list = malloc(sizeof(char *) * 2); … … 252 253 } 253 254 254 if ( cs != NULL && cs->prefix != NULL)255 if ((cs != NULL) && (cs->prefix != NULL)) 255 256 free(cs->prefix); 257 256 258 if (dirname != NULL) 257 259 free(dirname); 260 258 261 if (prefix != NULL) 259 262 free(prefix); 263 260 264 if (stext != NULL) 261 265 free(stext); 266 262 267 if (cs != NULL) 263 268 free(cs); 269 264 270 if (tokens != NULL) 265 271 free(tokens); -
uspace/app/kio/kio.c
r9d653e3 r72d120e 63 63 64 64 /* Pointer to kio area */ 65 static wchar_t *kio ;65 static wchar_t *kio = (wchar_t *) AS_AREA_ANY; 66 66 static size_t kio_length; 67 67 -
uspace/app/vlaunch/vlaunch.c
r9d653e3 r72d120e 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> 43 47 44 48 #include <window.h> … … 60 64 #define LOGO_HEIGHT 66 61 65 66 #define PERIOD 1000000 67 #define COLORS 7 68 62 69 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; 63 90 64 91 static int app_launch(const char *app) 65 92 { 66 int rc;67 93 printf("%s: Spawning %s %s \n", NAME, app, winreg); 68 94 69 95 task_id_t id; 70 task_exit_t texit; 71 int retval; 72 rc = task_spawnl(&id, app, app, winreg, NULL); 96 int rc = task_spawnl(&id, app, app, winreg, NULL); 73 97 if (rc != EOK) { 74 98 printf("%s: Error spawning %s %s (%s)\n", NAME, app, … … 76 100 return -1; 77 101 } 102 103 task_exit_t texit; 104 int retval; 78 105 rc = task_wait(id, &texit, &retval); 79 if ( rc != EOK || texit != TASK_EXIT_NORMAL) {106 if ((rc != EOK) || (texit != TASK_EXIT_NORMAL)) { 80 107 printf("%s: Error retrieving retval from %s (%s)\n", NAME, 81 108 app, str_error(rc)); 82 109 return -1; 83 110 } 84 111 85 112 return retval; 86 113 } … … 99 126 { 100 127 app_launch("/app/vlaunch"); 128 } 129 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 removal 184 185 free(svcs); 101 186 } 102 187 … … 105 190 if (argc < 2) { 106 191 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"); 107 205 return 1; 108 206 } … … 163 261 window_exec(main_window); 164 262 263 fibril_timer_set(timer, PERIOD, timer_callback, NULL); 264 165 265 task_retval(0); 166 266 async_manager(); -
uspace/drv/audio/sb16/dsp.c
r9d653e3 r72d120e 178 178 179 179 uintptr_t pa = 0; 180 void *buffer = NULL;180 void *buffer = AS_AREA_ANY; 181 181 182 182 int ret = dmamem_map_anonymous(size, DMAMEM_16MiB | 0x0000ffff, -
uspace/drv/block/ahci/ahci.c
r9d653e3 r72d120e 234 234 235 235 uintptr_t phys; 236 void *ibuf ;236 void *ibuf = AS_AREA_ANY; 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 ;279 void *ibuf = AS_AREA_ANY; 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 ;438 sata_identify_data_t *idata = AS_AREA_ANY; 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 ;632 sata_identify_data_t *idata = AS_AREA_ANY; 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 = NULL;941 void *virt_cmd = NULL;942 void *virt_table = NULL;940 void *virt_fb = AS_AREA_ANY; 941 void *virt_cmd = AS_AREA_ANY; 942 void *virt_table = AS_AREA_ANY; 943 943 ddf_fun_t *fun; 944 944 … … 1155 1155 1156 1156 /* Map AHCI registers. */ 1157 ahci->memregs = NULL;1157 ahci->memregs = AS_AREA_ANY; 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
r9d653e3 r72d120e 103 103 { 104 104 uintptr_t phys; 105 void *address ;105 void *address = AS_AREA_ANY; 106 106 107 107 const int ret = dmamem_map_anonymous(UHCI_REQUIRED_PAGE_SIZE, -
uspace/drv/bus/usb/usbhid/Makefile
r9d653e3 r72d120e 50 50 mouse/mousedev.c \ 51 51 multimedia/multimedia.c \ 52 multimedia/keymap.c 52 multimedia/keymap.c \ 53 blink1/blink1.c 53 54 54 55 SOURCES = \ -
uspace/drv/bus/usb/usbhid/generic/hiddev.c
r9d653e3 r72d120e 49 49 #include "usbhid.h" 50 50 51 52 53 51 const usb_endpoint_description_t usb_hid_generic_poll_endpoint_description = { 54 52 .transfer_type = USB_TRANSFER_INTERRUPT, … … 61 59 62 60 const char *HID_GENERIC_FUN_NAME = "hid"; 63 const char *HID_GENERIC_C LASS_NAME= "hid";61 const char *HID_GENERIC_CATEGORY = "hid"; 64 62 65 63 … … 226 224 return true; 227 225 } 226 228 227 /** 229 228 * @} -
uspace/drv/bus/usb/usbhid/generic/hiddev.h
r9d653e3 r72d120e 38 38 39 39 #include <usb/dev/driver.h> 40 41 struct usb_hid_dev; 40 #include "../usbhid.h" 42 41 43 42 extern const usb_endpoint_description_t 44 43 usb_hid_generic_poll_endpoint_description; 45 44 46 const char *HID_GENERIC_FUN_NAME;47 const char *HID_GENERIC_CLASS_NAME;45 extern const char *HID_GENERIC_FUN_NAME; 46 extern const char *HID_GENERIC_CATEGORY; 48 47 49 48 /** The USB HID generic 'hid' function softstate */ 50 49 typedef struct { 51 struct usb_hid_dev*hid_dev;50 usb_hid_dev_t *hid_dev; 52 51 } usb_hid_gen_fun_t; 53 52 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); 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 *); 59 56 60 57 #endif // USB_HID_HIDDDEV_H_ -
uspace/drv/bus/usb/usbhid/kbd/kbddev.c
r9d653e3 r72d120e 103 103 104 104 const char *HID_KBD_FUN_NAME = "keyboard"; 105 const char *HID_KBD_CATEGORY _NAME= "keyboard";105 const char *HID_KBD_CATEGORY = "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 LASS_NAME);516 rc = ddf_fun_add_to_category(fun, HID_KBD_CATEGORY _NAME);515 HID_KBD_CATEGORY); 516 rc = ddf_fun_add_to_category(fun, HID_KBD_CATEGORY); 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 LASS_NAME, str_error(rc));520 HID_KBD_CATEGORY, 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
r9d653e3 r72d120e 45 45 #include <usb/dev/pipes.h> 46 46 #include <usb/dev/driver.h> 47 47 #include "../usbhid.h" 48 48 #include "kbdrepeat.h" 49 50 struct usb_hid_dev;51 52 49 53 50 /** … … 65 62 typedef struct usb_kbd_t { 66 63 /** Link to HID device structure */ 67 struct usb_hid_dev*hid_dev;68 64 usb_hid_dev_t *hid_dev; 65 69 66 /** Previously pressed keys (not translated to key codes). */ 70 67 int32_t *keys_old; … … 75 72 /** Currently pressed modifiers (bitmap). */ 76 73 uint8_t modifiers; 77 74 78 75 /** Currently active modifiers including locks. Sent to the console. */ 79 unsigned mods;80 76 unsigned int mods; 77 81 78 /** Currently active lock keys. */ 82 unsigned lock_keys;83 79 unsigned int lock_keys; 80 84 81 /** IPC session to client (for sending key events). */ 85 82 async_sess_t *client_sess; 86 83 87 84 /** Information for auto-repeat of keys. */ 88 85 usb_kbd_repeat_t repeat; 89 86 90 87 /** Mutex for accessing the information about auto-repeat. */ 91 88 fibril_mutex_t repeat_mtx; 92 89 93 90 uint8_t *output_buffer; 94 91 95 92 size_t output_size; 96 93 97 94 size_t led_output_size; 98 95 99 96 usb_hid_report_path_t *led_path; 100 97 101 98 int32_t *led_data; 102 99 103 100 /** State of the structure (for checking before use). 104 * 101 * 105 102 * 0 - not initialized 106 103 * 1 - initialized … … 108 105 */ 109 106 int initialized; 110 107 111 108 /** DDF function */ 112 109 ddf_fun_t *fun; 113 110 } usb_kbd_t; 114 111 115 116 117 112 extern const usb_endpoint_description_t usb_hid_kbd_poll_endpoint_description; 118 113 119 const char *HID_KBD_FUN_NAME;120 const char *HID_KBD_CLASS_NAME;114 extern const char *HID_KBD_FUN_NAME; 115 extern const char *HID_KBD_CATEGORY; 121 116 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); 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 *); 140 125 141 126 #endif /* USB_HID_KBDDEV_H_ */ -
uspace/drv/bus/usb/usbhid/mouse/mousedev.c
r9d653e3 r72d120e 344 344 345 345 if (hid_dev == NULL) { 346 usb_log_error("Failed to init keyboardstructure: no structure"346 usb_log_error("Failed to init mouse structure: no structure" 347 347 " given.\n"); 348 348 return EINVAL; -
uspace/drv/bus/usb/usbhid/mouse/mousedev.h
r9d653e3 r72d120e 39 39 #include <usb/dev/driver.h> 40 40 #include <async.h> 41 42 struct usb_hid_dev; 43 44 41 #include "../usbhid.h" 45 42 46 43 /** Container for USB mouse device. */ … … 48 45 /** IPC session to consumer. */ 49 46 async_sess_t *mouse_sess; 50 51 /* Mouse buttons statuses. */47 48 /** Mouse buttons statuses. */ 52 49 int32_t *buttons; 53 50 size_t buttons_count; 54 55 /* DDF mouse function */51 52 /** DDF mouse function */ 56 53 ddf_fun_t *mouse_fun; 57 54 } usb_mouse_t; 58 55 59 60 61 56 extern const usb_endpoint_description_t usb_hid_mouse_poll_endpoint_description; 62 57 63 const char *HID_MOUSE_FUN_NAME;64 const char *HID_MOUSE_CATEGORY;58 extern const char *HID_MOUSE_FUN_NAME; 59 extern const char *HID_MOUSE_CATEGORY; 65 60 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 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 *); 77 65 78 66 #endif // USB_HID_MOUSEDEV_H_ -
uspace/drv/bus/usb/usbhid/multimedia/multimedia.c
r9d653e3 r72d120e 1 1 /* 2 * Copyright (c) 2011 Lubos Slovak, Vojtech Horky 2 * Copyright (c) 2011 Lubos Slovak 3 * Copyright (c) 2011 Vojtech Horky 3 4 * All rights reserved. 4 5 * -
uspace/drv/bus/usb/usbhid/multimedia/multimedia.h
r9d653e3 r72d120e 38 38 39 39 #include <usb/dev/driver.h> 40 #include "../usbhid.h" 40 41 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 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 *); 52 45 53 46 #endif // USB_HID_MULTIMEDIA_H_ -
uspace/drv/bus/usb/usbhid/subdrivers.c
r9d653e3 r72d120e 37 37 #include <usb/hid/usages/core.h> 38 38 #include <usb/hid/hidpath.h> 39 39 #include "kbd/kbddev.h" 40 #include "mouse/mousedev.h" 40 41 #include "multimedia/multimedia.h" 41 #include " mouse/mousedev.h"42 #include "blink1/blink1.h" 42 43 #include "generic/hiddev.h" 43 44 44 45 static const usb_hid_subdriver_usage_t path_kbd[] = { 45 {USB_HIDUT_PAGE_GENERIC_DESKTOP, 46 USB_HIDUT_USAGE_GENERIC_DESKTOP_KEYBOARD}, 46 { 47 USB_HIDUT_PAGE_GENERIC_DESKTOP, 48 USB_HIDUT_USAGE_GENERIC_DESKTOP_KEYBOARD 49 }, 47 50 {0, 0} 48 51 }; 49 52 50 53 static const usb_hid_subdriver_usage_t path_mouse[] = { 51 {USB_HIDUT_PAGE_GENERIC_DESKTOP, USB_HIDUT_USAGE_GENERIC_DESKTOP_MOUSE}, 54 { 55 USB_HIDUT_PAGE_GENERIC_DESKTOP, 56 USB_HIDUT_USAGE_GENERIC_DESKTOP_MOUSE 57 }, 52 58 {0, 0} 53 59 }; 54 60 55 static const usb_hid_subdriver_usage_t multim_key_path[] = { 56 {USB_HIDUT_PAGE_CONSUMER, USB_HIDUT_USAGE_CONSUMER_CONSUMER_CONTROL}, 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 }, 57 66 {0, 0} 58 67 }; … … 73 82 }, 74 83 { 75 multim_key_path,84 path_multim_key, 76 85 1, 77 86 USB_HID_PATH_COMPARE_BEGIN, … … 98 107 } 99 108 }, 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 = NULL 120 } 121 } 100 122 }; 101 123 -
uspace/drv/bus/usb/usbhid/subdrivers.h
r9d653e3 r72d120e 40 40 #include "kbd/kbddev.h" 41 41 42 43 44 42 typedef struct usb_hid_subdriver_usage { 45 43 int usage_page; … … 47 45 } usb_hid_subdriver_usage_t; 48 46 49 50 51 /** Structure representing the mapping between device requirements and the 47 /** Structure representing the mapping between device requirements and the 52 48 * subdriver supposed to handle this device. 53 49 * … … 55 51 * a new subdriver mapping will be created and used by the HID driver when it 56 52 * searches for appropriate subdrivers for a device. 53 * 57 54 */ 58 55 typedef struct usb_hid_subdriver_mapping { 59 /** Usage path that the device's Input reports must contain.56 /** Usage path that the device's input reports must contain. 60 57 * 61 58 * It is an array of pairs <usage_page, usage>, terminated by a <0, 0> … … 64 61 */ 65 62 const usb_hid_subdriver_usage_t *usage_path; 66 63 67 64 /** Report ID for which the path should apply. */ 68 65 int report_id; 69 70 /** Compare type for the Usage path. */66 67 /** Compare type for the usage path. */ 71 68 int compare; 72 69 73 70 /** Vendor ID (set to -1 if not specified). */ 74 71 int vendor_id; 75 72 76 73 /** Product ID (set to -1 if not specified). */ 77 74 int product_id; 78 75 79 76 /** Subdriver for controlling this device. */ 80 77 const usb_hid_subdriver_t subdriver; 81 78 } usb_hid_subdriver_mapping_t; 82 79 83 84 85 80 extern const usb_hid_subdriver_mapping_t usb_hid_subdrivers[]; 86 81 extern const size_t USB_HID_MAX_SUBDRIVERS; 87 88 89 82 90 83 #endif /* USB_HID_SUBDRIVERS_H_ */ -
uspace/drv/bus/usb/usbhid/usbhid.ma
r9d653e3 r72d120e 1 100 usb&interface&class=HID&subclass=0x01&protocol=0x011 1000 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
r9d653e3 r72d120e 38 38 #include <ddf/log.h> 39 39 #include <ddi.h> 40 #include <a bi/mm/as.h>40 #include <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 ;276 void *buffer = AS_AREA_ANY; 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
r9d653e3 r72d120e 333 333 334 334 kfb.size = scanline * height; 335 kfb.addr = AS_AREA_ANY; 336 335 337 rc = physmem_map(paddr + offset, 336 338 ALIGN_UP(kfb.size, PAGE_SIZE) >> PAGE_WIDTH, -
uspace/drv/nic/e1k/e1k.c
r9d653e3 r72d120e 1375 1375 fibril_mutex_lock(&e1000->rx_lock); 1376 1376 1377 e1000->rx_ring_virt = AS_AREA_ANY; 1377 1378 int rc = dmamem_map_anonymous( 1378 1379 E1000_RX_FRAME_COUNT * sizeof(e1000_rx_descriptor_t), … … 1396 1397 } 1397 1398 1398 size_t i; 1399 uintptr_t frame_phys; 1400 void *frame_virt; 1401 1402 for (i = 0; i < E1000_RX_FRAME_COUNT; i++) { 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 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 ( i = 0; i < E1000_RX_FRAME_COUNT; i++)1414 for (size_t 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 ( i = 0; i < E1000_RX_FRAME_COUNT; i++) {1423 for (size_t 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 = NULL;1573 e1000->tx_ring_virt = AS_AREA_ANY; 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; 1599 1600 rc = dmamem_map_anonymous(E1000_MAX_SEND_FRAME_SIZE, 1600 1601 DMAMEM_4GiB, AS_AREA_READ | AS_AREA_WRITE, -
uspace/drv/nic/rtl8139/driver.c
r9d653e3 r72d120e 1141 1141 1142 1142 ddf_msg(LVL_DEBUG, "Creating buffers"); 1143 1143 1144 rtl8139->tx_buff_virt = AS_AREA_ANY; 1144 1145 rc = dmamem_map_anonymous(TX_PAGES * PAGE_SIZE, DMAMEM_4GiB, 1145 1146 AS_AREA_WRITE, 0, &rtl8139->tx_buff_phys, &rtl8139->tx_buff_virt); … … 1161 1162 ddf_msg(LVL_DEBUG, "Allocating receiver buffer of the size %d bytes", 1162 1163 RxBUF_TOT_LENGTH); 1163 1164 1165 rtl8139->rx_buff_virt = AS_AREA_ANY; 1164 1166 rc = dmamem_map_anonymous(RxBUF_TOT_LENGTH, DMAMEM_4GiB, 1165 1167 AS_AREA_READ, 0, &rtl8139->rx_buff_phys, &rtl8139->rx_buff_virt); -
uspace/lib/c/Makefile
r9d653e3 r72d120e 65 65 generic/device/pio_window.c \ 66 66 generic/device/clock_dev.c \ 67 generic/device/led_dev.c \ 67 68 generic/dhcp.c \ 68 69 generic/dnsr.c \ -
uspace/lib/c/arch/ia64/Makefile.common
r9d653e3 r72d120e 27 27 # 28 28 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 29 GCC_CFLAGS += -fno-unwind-tables 40 30 41 31 ENDIANESS = LE -
uspace/lib/c/arch/sparc64/_link.ld.in
r9d653e3 r72d120e 10 10 #endif 11 11 data PT_LOAD FLAGS(6); 12 debug PT_NOTE; 12 13 } 13 14 … … 63 64 } :data 64 65 66 #ifdef CONFIG_LINE_DEBUG 67 .comment 0 : { *(.comment); } :debug 68 .debug_abbrev 0 : { *(.debug_abbrev); } :debug 69 .debug_aranges 0 : { *(.debug_aranges); } :debug 70 .debug_info 0 : { *(.debug_info); } :debug 71 .debug_line 0 : { *(.debug_line); } :debug 72 .debug_loc 0 : { *(.debug_loc); } :debug 73 .debug_pubnames 0 : { *(.debug_pubnames); } :debug 74 .debug_pubtypes 0 : { *(.debug_pubtypes); } :debug 75 .debug_ranges 0 : { *(.debug_ranges); } :debug 76 .debug_str 0 : { *(.debug_str); } :debug 77 #endif 78 65 79 /DISCARD/ : { 66 80 *(*); -
uspace/lib/c/generic/ddi.c
r9d653e3 r72d120e 71 71 * @param flags Flags for the new address space area. 72 72 * @param virt Virtual address of the starting page. 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 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. 77 79 * @return ENOMEM if there was some problem in creating 78 80 * the address space area. … … 85 87 } 86 88 89 /** Lock a piece physical memory for DMA transfers. 90 * 91 * The mapping of the specified virtual memory address 92 * to physical memory address is locked in order to 93 * 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 creating 106 * the address space area. 107 * 108 */ 87 109 int dmamem_map(void *virt, size_t size, unsigned int map_flags, 88 110 unsigned int flags, uintptr_t *phys) … … 93 115 } 94 116 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 physical 123 * 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 value 128 * is found by the kernel, otherwise the kernel tries to 129 * 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 creating 134 * the address space area. 135 * 136 */ 95 137 int dmamem_map_anonymous(size_t size, uintptr_t constraint, 96 138 unsigned int map_flags, unsigned int flags, uintptr_t *phys, void **virt) … … 221 263 size_t pages = SIZE2PAGES(offset + size); 222 264 223 void *virt_page ;265 void *virt_page = AS_AREA_ANY; 224 266 int rc = physmem_map(phys_frame, pages, 225 267 AS_AREA_READ | AS_AREA_WRITE, &virt_page); -
uspace/lib/c/generic/device/clock_dev.c
r9d653e3 r72d120e 27 27 */ 28 28 29 29 /** @addtogroup libc 30 30 * @{ 31 31 */ -
uspace/lib/c/generic/time.c
r9d653e3 r72d120e 555 555 } 556 556 557 void *addr ;557 void *addr = AS_AREA_ANY; 558 558 rc = physmem_map(faddr, 1, AS_AREA_READ | AS_AREA_CACHEABLE, 559 559 &addr); -
uspace/lib/c/include/ipc/dev_iface.h
r9d653e3 r72d120e 65 65 CLOCK_DEV_IFACE, 66 66 67 /** Interface provided by LED devices */ 68 LED_DEV_IFACE, 69 67 70 /** Interface provided by battery powered devices */ 68 71 BATTERY_DEV_IFACE, -
uspace/lib/drv/Makefile
r9d653e3 r72d120e 54 54 generic/remote_usbhid.c \ 55 55 generic/remote_clock_dev.c \ 56 generic/remote_led_dev.c \ 56 57 generic/remote_battery_dev.c \ 57 58 generic/remote_ahci.c -
uspace/lib/drv/generic/dev_iface.c
r9d653e3 r72d120e 43 43 #include "remote_char_dev.h" 44 44 #include "remote_clock_dev.h" 45 #include "remote_led_dev.h" 45 46 #include "remote_battery_dev.h" 46 47 #include "remote_graph_dev.h" … … 68 69 [USBHID_DEV_IFACE] = &remote_usbhid_iface, 69 70 [CLOCK_DEV_IFACE] = &remote_clock_dev_iface, 71 [LED_DEV_IFACE] = &remote_led_dev_iface, 70 72 [BATTERY_DEV_IFACE] = &remote_battery_dev_iface, 71 73 [AHCI_DEV_IFACE] = &remote_ahci_iface, -
uspace/lib/drv/generic/remote_usbhc.c
r9d653e3 r72d120e 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 } 371 370 372 371 free(trans); 373 372 } … … 585 584 async_answer_0(callid, ENOMEM); 586 585 async_transaction_destroy(trans); 586 return; 587 587 } 588 588 -
uspace/srv/bd/rd/rd.c
r9d653e3 r72d120e 60 60 61 61 /** Pointer to the ramdisk's image */ 62 static void *rd_addr ;62 static void *rd_addr = AS_AREA_ANY; 63 63 64 64 /** Size of the ramdisk */ -
uspace/srv/hid/input/port/niagara.c
r9d653e3 r72d120e 74 74 uint64_t read_ptr; 75 75 char data[INPUT_BUFFER_SIZE]; 76 } 77 __attribute__ ((packed)) 78 __attribute__ ((aligned(PAGE_SIZE))) 79 *input_buffer_t; 76 } __attribute__((packed)) __attribute__((aligned(PAGE_SIZE))) *input_buffer_t; 80 77 81 78 /* virtual address of the shared buffer */ 82 static input_buffer_t input_buffer ;79 static input_buffer_t input_buffer = (input_buffer_t) AS_AREA_ANY; 83 80 84 81 static volatile bool polling_disabled = false; … … 87 84 /** 88 85 * Initializes the Niagara driver. 89 * Maps the shared buffer and creates the polling thread. 86 * Maps the shared buffer and creates the polling thread. 90 87 */ 91 88 static int niagara_port_init(kbd_dev_t *kdev) -
uspace/srv/hid/output/port/ega.c
r9d653e3 r72d120e 215 215 216 216 ega.size = (ega.cols * ega.rows) << 1; 217 ega.addr = AS_AREA_ANY; 217 218 218 219 rc = physmem_map(paddr, -
uspace/srv/hid/output/port/kchar.c
r9d653e3 r72d120e 84 84 return rc; 85 85 86 kchar.addr = AS_AREA_ANY; 87 86 88 rc = physmem_map(paddr, 87 89 ALIGN_UP(1, PAGE_SIZE) >> PAGE_WIDTH, -
uspace/srv/hid/output/port/niagara.c
r9d653e3 r72d120e 104 104 return rc; 105 105 106 niagara.fifo = (output_fifo_t *) AS_AREA_ANY; 107 106 108 rc = physmem_map(paddr, 1, AS_AREA_READ | AS_AREA_WRITE, 107 109 (void *) &niagara.fifo); -
uspace/srv/hw/irc/obio/obio.c
r9d653e3 r72d120e 70 70 71 71 static uintptr_t base_phys; 72 static volatile uint64_t *base_virt ;72 static volatile uint64_t *base_virt = (volatile uint64_t *) AS_AREA_ANY; 73 73 74 74 /** Handle one connection to obio. -
uspace/srv/locsrv/locsrv.c
r9d653e3 r72d120e 320 320 svc_categ_t *memb = list_get_instance(link, svc_categ_t, 321 321 svc_link); 322 fibril_mutex_lock(&memb->cat->mutex); 322 category_t *cat = memb->cat; 323 324 fibril_mutex_lock(&cat->mutex); 323 325 category_remove_service(memb); 324 fibril_mutex_unlock(& memb->cat->mutex);326 fibril_mutex_unlock(&cat->mutex); 325 327 } 326 328 … … 1330 1332 1331 1333 cat = category_new("mouse"); 1334 categ_dir_add_cat(&cdir, cat); 1335 1336 cat = category_new("led"); 1332 1337 categ_dir_add_cat(&cdir, cat); 1333 1338
Note:
See TracChangeset
for help on using the changeset viewer.