Changeset acc7ce4 in mainline
- Timestamp:
- 2011-01-07T14:57:40Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7c34b28f
- Parents:
- b404a98
- Files:
-
- 4 added
- 16 edited
- 5 moved
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/amd64/Makefile.inc
rb404a98 racc7ce4 30 30 31 31 RD_SRVS_ESSENTIAL += \ 32 $(USPACE_PATH)/srv/hw/char/i8042/i8042 32 $(USPACE_PATH)/srv/hw/char/i8042/i8042 \ 33 $(USPACE_PATH)/srv/hw/irc/apic/apic \ 34 $(USPACE_PATH)/srv/hw/irc/i8259/i8259 33 35 34 36 RD_SRVS_NON_ESSENTIAL += \ … … 41 43 isa \ 42 44 ns8250 43 45 44 46 RD_DRV_CFG += \ 45 47 isa/isa.dev -
boot/arch/sparc64/Makefile.inc
rb404a98 racc7ce4 43 43 44 44 RD_SRVS_ESSENTIAL += \ 45 $(USPACE_PATH)/srv/hw/ cir/fhc/fhc \46 $(USPACE_PATH)/srv/hw/ cir/obio/obio45 $(USPACE_PATH)/srv/hw/irc/fhc/fhc \ 46 $(USPACE_PATH)/srv/hw/irc/obio/obio 47 47 48 48 SOURCES = \ -
kernel/arch/amd64/include/interrupt.h
rb404a98 racc7ce4 74 74 extern void (* enable_irqs_function)(uint16_t); 75 75 extern void (* eoi_function)(void); 76 extern const char *irqs_info; 76 77 77 78 extern void interrupt_init(void); -
kernel/arch/amd64/src/amd64.c
rb404a98 racc7ce4 235 235 #endif 236 236 237 /* 238 * This nasty hack should also go away ASAP. 239 */ 240 trap_virtual_enable_irqs(1 << IRQ_DP8390); 237 if (irqs_info != NULL) 238 sysinfo_set_item_val(irqs_info, NULL, true); 239 241 240 sysinfo_set_item_val("netif.dp8390.inr", NULL, IRQ_DP8390); 242 241 } -
kernel/arch/amd64/src/interrupt.c
rb404a98 racc7ce4 62 62 void (* enable_irqs_function)(uint16_t irqmask) = NULL; 63 63 void (* eoi_function)(void) = NULL; 64 const char *irqs_info = NULL; 64 65 65 66 void istate_decode(istate_t *istate) -
kernel/arch/ia32/include/interrupt.h
rb404a98 racc7ce4 74 74 extern void (* enable_irqs_function)(uint16_t); 75 75 extern void (* eoi_function)(void); 76 extern const char *irqs_info; 76 77 77 78 extern void interrupt_init(void); -
kernel/arch/ia32/src/drivers/i8259.c
rb404a98 racc7ce4 86 86 disable_irqs_function = pic_disable_irqs; 87 87 eoi_function = pic_eoi; 88 irqs_info = "i8259"; 88 89 89 90 pic_disable_irqs(0xffff); /* disable all irq's */ -
kernel/arch/ia32/src/ia32.c
rb404a98 racc7ce4 193 193 #endif 194 194 195 /* 196 * This nasty hack should also go away ASAP. 197 */ 198 trap_virtual_enable_irqs(1 << IRQ_DP8390); 195 if (irqs_info != NULL) 196 sysinfo_set_item_val(irqs_info, NULL, true); 197 199 198 sysinfo_set_item_val("netif.dp8390.inr", NULL, IRQ_DP8390); 200 199 } -
kernel/arch/ia32/src/interrupt.c
rb404a98 racc7ce4 62 62 void (* enable_irqs_function)(uint16_t irqmask) = NULL; 63 63 void (* eoi_function)(void) = NULL; 64 const char *irqs_info = NULL; 64 65 65 66 void istate_decode(istate_t *istate) -
kernel/arch/ia32/src/smp/apic.c
rb404a98 racc7ce4 178 178 disable_irqs_function = io_apic_disable_irqs; 179 179 eoi_function = l_apic_eoi; 180 irqs_info = "apic"; 180 181 181 182 /* -
uspace/Makefile
rb404a98 racc7ce4 108 108 109 109 ifeq ($(UARCH),amd64) 110 DIRS += drv/rootpc 111 DIRS += drv/pciintel 112 DIRS += drv/isa 113 DIRS += drv/ns8250 110 DIRS += \ 111 drv/rootpc \ 112 drv/pciintel \ 113 drv/isa \ 114 drv/ns8250 \ 115 srv/hw/irc/apic \ 116 srv/hw/irc/i8259 114 117 endif 115 118 116 119 ifeq ($(UARCH),ia32) 117 DIRS += drv/rootpc 118 DIRS += drv/pciintel 119 DIRS += drv/isa 120 DIRS += drv/ns8250 120 DIRS += \ 121 drv/rootpc \ 122 drv/pciintel \ 123 drv/isa \ 124 drv/ns8250 \ 125 srv/hw/irc/apic \ 126 srv/hw/irc/i8259 121 127 endif 122 128 … … 127 133 ifeq ($(UARCH),sparc64) 128 134 DIRS += \ 129 srv/hw/ cir/fhc \130 srv/hw/ cir/obio135 srv/hw/irc/fhc \ 136 srv/hw/irc/obio 131 137 endif 132 138 -
uspace/app/init/init.c
rb404a98 racc7ce4 273 273 mount_tmpfs(); 274 274 275 spawn("/srv/apic"); 276 spawn("/srv/i8259"); 275 277 spawn("/srv/fhc"); 276 278 spawn("/srv/obio"); -
uspace/lib/c/include/ipc/irc.h
rb404a98 racc7ce4 31 31 */ 32 32 /** @file 33 */ 33 */ 34 34 35 #ifndef LIBC_ BUS_H_36 #define LIBC_ BUS_H_35 #ifndef LIBC_IRC_H_ 36 #define LIBC_IRC_H_ 37 37 38 38 #include <ipc/ipc.h> 39 39 40 40 typedef enum { 41 BUS_CLEAR_INTERRUPT = IPC_FIRST_USER_METHOD 42 } bus_request_t; 41 IRC_ENABLE_INTERRUPT = IPC_FIRST_USER_METHOD, 42 IRC_CLEAR_INTERRUPT 43 } irc_request_t; 43 44 44 45 #endif -
uspace/lib/c/include/ipc/services.h
rb404a98 racc7ce4 49 49 SERVICE_FHC, 50 50 SERVICE_OBIO, 51 SERVICE_APIC, 52 SERVICE_I8259, 51 53 SERVICE_CLIPBOARD, 52 54 SERVICE_NETWORKING, -
uspace/srv/hid/kbd/port/ns16550.c
rb404a98 racc7ce4 36 36 37 37 #include <ipc/ipc.h> 38 #include <ipc/ bus.h>38 #include <ipc/irc.h> 39 39 #include <async.h> 40 40 #include <sysinfo.h> … … 122 122 123 123 if (cir_service) 124 async_msg_1(cir_phone, BUS_CLEAR_INTERRUPT,124 async_msg_1(cir_phone, IRC_CLEAR_INTERRUPT, 125 125 IPC_GET_IMETHOD(*call)); 126 126 } -
uspace/srv/hid/kbd/port/z8530.c
rb404a98 racc7ce4 36 36 37 37 #include <ipc/ipc.h> 38 #include <ipc/ bus.h>38 #include <ipc/irc.h> 39 39 #include <async.h> 40 40 #include <sysinfo.h> … … 110 110 111 111 if (cir_service) 112 async_msg_1(cir_phone, BUS_CLEAR_INTERRUPT,112 async_msg_1(cir_phone, IRC_CLEAR_INTERRUPT, 113 113 IPC_GET_IMETHOD(*call)); 114 114 } -
uspace/srv/hw/irc/fhc/fhc.c
rb404a98 racc7ce4 38 38 #include <ipc/ipc.h> 39 39 #include <ipc/services.h> 40 #include <ipc/ bus.h>40 #include <ipc/irc.h> 41 41 #include <ipc/ns.h> 42 42 #include <sysinfo.h> … … 83 83 callid = async_get_call(&call); 84 84 switch (IPC_GET_IMETHOD(call)) { 85 case BUS_CLEAR_INTERRUPT: 85 case IRC_ENABLE_INTERRUPT: 86 /* Noop */ 87 ipc_answer_0(callid, EOK); 88 break; 89 case IRC_CLEAR_INTERRUPT: 86 90 inr = IPC_GET_ARG1(call); 87 91 switch (inr) { -
uspace/srv/hw/irc/obio/obio.c
rb404a98 racc7ce4 44 44 #include <ipc/ipc.h> 45 45 #include <ipc/services.h> 46 #include <ipc/ bus.h>46 #include <ipc/irc.h> 47 47 #include <ipc/ns.h> 48 48 #include <sysinfo.h> … … 93 93 callid = async_get_call(&call); 94 94 switch (IPC_GET_IMETHOD(call)) { 95 case BUS_CLEAR_INTERRUPT: 95 case IRC_ENABLE_INTERRUPT: 96 /* Noop */ 97 ipc_answer_0(callid, EOK); 98 break; 99 case IRC_CLEAR_INTERRUPT: 96 100 inr = IPC_GET_ARG1(call); 97 101 base_virt[OBIO_CIR(inr & INO_MASK)] = 0; -
uspace/srv/hw/netif/dp8390/dp8390_module.c
rb404a98 racc7ce4 41 41 #include <err.h> 42 42 #include <malloc.h> 43 #include <sysinfo.h> 43 44 #include <ipc/ipc.h> 44 45 #include <ipc/services.h> 46 #include <ipc/irc.h> 45 47 #include <net/modules.h> 46 48 #include <packet_client.h> … … 71 73 */ 72 74 #define IRQ_GET_ISR(call) ((int) IPC_GET_ARG2(call)) 75 76 static int irc_service = 0; 77 static int irc_phone = -1; 73 78 74 79 /** DP8390 kernel interrupt command sequence. … … 136 141 } 137 142 138 /** Changes the network interface state. 143 /** Change the network interface state. 144 * 139 145 * @param[in,out] device The network interface. 140 * @param[in] state The new state. 141 * @returns The new state. 146 * @param[in] state The new state. 147 * 148 * @return The new state. 149 * 142 150 */ 143 151 static int change_state(netif_device_t *device, device_state_t state) … … 272 280 return rc; 273 281 274 if (device->state != NETIF_ACTIVE) {282 if (device->state != NETIF_ACTIVE) { 275 283 netif_pq_release(packet_get_id(packet)); 276 284 return EFORWARD; … … 312 320 } 313 321 314 return change_state(device, NETIF_ACTIVE); 322 rc = change_state(device, NETIF_ACTIVE); 323 324 if (irc_service) 325 async_msg_1(irc_phone, IRC_ENABLE_INTERRUPT, dep->de_irq); 326 327 return rc; 315 328 } 316 329 … … 334 347 int netif_initialize(void) 335 348 { 349 sysarg_t apic; 350 sysarg_t i8259; 351 352 if ((sysinfo_get_value("apic", &apic) == EOK) && (apic)) 353 irc_service = SERVICE_APIC; 354 else if ((sysinfo_get_value("i8259", &i8259) == EOK) && (i8259)) 355 irc_service = SERVICE_I8259; 356 357 if (irc_service) { 358 while (irc_phone < 0) { 359 irc_phone = ipc_connect_me_to_blocking(PHONE_NS, irc_service, 360 0, 0); 361 } 362 } 363 364 async_set_interrupt_received(irq_handler); 365 336 366 sysarg_t phonehash; 337 async_set_interrupt_received(irq_handler);338 367 return ipc_connect_to_me(PHONE_NS, SERVICE_DP8390, 0, 0, &phonehash); 339 368 }
Note:
See TracChangeset
for help on using the changeset viewer.