Changeset 336d2f52 in mainline
- Timestamp:
- 2011-07-02T21:16:24Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e944e4c
- Parents:
- d2fac08c
- Files:
-
- 17 deleted
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
HelenOS.config
rd2fac08c r336d2f52 59 59 % Machine type 60 60 @ "generic" Generic Sun workstation or server 61 @ "serengeti" Serengeti system62 61 ! [PLATFORM=sparc64] MACHINE (choice) 63 62 … … 86 85 ! [PLATFORM=sparc64&MACHINE=generic] PROCESSOR (choice) 87 86 88 % CPU type89 @ "us3"90 ! [PLATFORM=sparc64&MACHINE=serengeti] PROCESSOR (choice)91 92 87 % RAM disk format 93 88 @ "tmpfs" TMPFS image … … 468 463 ! [PLATFORM=arm32&MACHINE=gta02] CONFIG_S3C24XX_IRQC (y) 469 464 470 % Support for Z8530 controller471 ! [(CONFIG_HID_IN=generic|CONFIG_HID_IN=keyboard)&PLATFORM=sparc64&MACHINE=generic] CONFIG_Z8530 (y/n)472 473 % Support for Serengeti console474 ! [CONFIG_HID_OUT=generic&PLATFORM=sparc64&MACHINE=serengeti] CONFIG_SGCN_PRN (y/n)475 476 % Support for Serengeti keyboard477 ! [CONFIG_HID_IN=generic&PLATFORM=sparc64&MACHINE=serengeti] CONFIG_SGCN_KBD (y/n)478 479 465 % Support for i8042 controller 480 466 ! [CONFIG_PC_KBD=y] CONFIG_I8042 (y) … … 484 470 485 471 % Sun keyboard support 486 ! [(CONFIG_HID_IN=generic|CONFIG_HID_IN=keyboard)&PLATFORM=sparc64&MACHINE=generic& (CONFIG_NS16550=y|CONFIG_Z8530=y)] CONFIG_SUN_KBD (y)472 ! [(CONFIG_HID_IN=generic|CONFIG_HID_IN=keyboard)&PLATFORM=sparc64&MACHINE=generic&CONFIG_NS16550=y] CONFIG_SUN_KBD (y) 487 473 488 474 % Macintosh ADB keyboard support … … 496 482 497 483 % Serial line input module 498 ! [CONFIG_DSRLNIN=y|(PLATFORM=arm32&MACHINE=gta02)|(PLATFORM=ia64&MACHINE=i460GX&CONFIG_NS16550=y)|(PLATFORM=ia64&MACHINE=ski)|(PLATFORM=sparc64& MACHINE=serengeti&CONFIG_SGCN_KBD=y)|(PLATFORM=sparc64&PROCESSOR=sun4v)] CONFIG_SRLN (y)484 ! [CONFIG_DSRLNIN=y|(PLATFORM=arm32&MACHINE=gta02)|(PLATFORM=ia64&MACHINE=i460GX&CONFIG_NS16550=y)|(PLATFORM=ia64&MACHINE=ski)|(PLATFORM=sparc64&PROCESSOR=sun4v)] CONFIG_SRLN (y) 499 485 500 486 % EGA support … … 543 529 ! [PLATFORM=sparc64&CONFIG_SMP=y] CONFIG_AP (y/n) 544 530 545 % Preserve A.OUT header in isofs.b546 ! [PLATFORM=sparc64&MACHINE=generic] CONFIG_AOUT_ISOFS_B (y)547 548 531 % Dynamic linking support 549 532 ! [PLATFORM=ia32] CONFIG_RTLD (n/y) -
boot/Makefile.silo
rd2fac08c r336d2f52 31 31 include Makefile.common 32 32 33 ifeq ($(CONFIG_AOUT_ISOFS_B),y) 34 SILO_PACKAGE = a.out 35 else 36 SILO_PACKAGE = raw 37 endif 33 SILO_PACKAGE = a.out 38 34 39 35 ISOFS_B = silo/$(SILO_PACKAGE)/isofs.b -
boot/arch/sparc64/Makefile.inc
rd2fac08c r336d2f52 43 43 44 44 RD_SRVS_ESSENTIAL += \ 45 $(USPACE_PATH)/srv/hw/irc/fhc/fhc \46 45 $(USPACE_PATH)/srv/hw/irc/obio/obio 47 46 -
boot/arch/sparc64/src/main.c
rd2fac08c r336d2f52 182 182 * of the "/memory" node to find out which parts of memory 183 183 * are used by OBP and redesign the algorithm of copying 184 * kernel/init tasks/ramdisk from the bootable image to memory 185 * (which we must do anyway because of issues with claiming the memory 186 * on Serengeti). 187 * 184 * kernel/init tasks/ramdisk from the bootable image to memory. 188 185 */ 189 186 bootinfo.physmem_start += OBP_BIAS; -
defaults/sparc64/Makefile.config
rd2fac08c r336d2f52 53 53 CONFIG_AP = y 54 54 55 # Preserve A.OUT header in isofs.b56 CONFIG_AOUT_ISOFS_B = y57 58 55 # Load disk drivers on startup 59 56 CONFIG_START_BD = n -
kernel/arch/sparc64/Makefile.inc
rd2fac08c r336d2f52 84 84 arch/$(KARCH)/src/drivers/tick.c \ 85 85 arch/$(KARCH)/src/drivers/kbd.c \ 86 arch/$(KARCH)/src/drivers/sgcn.c \87 86 arch/$(KARCH)/src/drivers/pci.c \ 88 arch/$(KARCH)/src/drivers/fhc.c \89 87 arch/$(KARCH)/src/trap/$(USARCH)/interrupt.c 90 88 -
kernel/arch/sparc64/src/console.c
rd2fac08c r336d2f52 38 38 #include <arch/drivers/scr.h> 39 39 #include <arch/drivers/kbd.h> 40 #include <arch/drivers/sgcn.h>41 40 #include <genarch/srln/srln.h> 42 41 #include <console/chardev.h> … … 89 88 } 90 89 91 /** Initilize I/O on the Serengeti machine. */92 static void serengeti_init(void)93 {94 #ifdef CONFIG_SGCN_KBD95 sgcn_instance_t *sgcn_instance = sgcnin_init();96 if (sgcn_instance) {97 srln_instance_t *srln_instance = srln_init();98 if (srln_instance) {99 indev_t *sink = stdin_wire();100 indev_t *srln = srln_wire(srln_instance, sink);101 sgcnin_wire(sgcn_instance, srln);102 }103 }104 #endif105 106 #ifdef CONFIG_SGCN_PRN107 outdev_t *sgcndev = sgcnout_init();108 if (sgcndev)109 stdout_wire(sgcndev);110 #endif111 }112 113 90 /** 114 91 * Initialize input/output. Auto-detects the type of machine … … 127 104 prop = ofw_tree_getprop(aliases, "def-cn"); 128 105 129 if ((!prop) || (!prop->value) || (str_cmp(prop->value, "/sgcn") != 0)) {106 if ((!prop) || (!prop->value)) 130 107 standard_console_init(aliases); 131 } else {132 serengeti_init();133 }134 108 } 135 109 -
kernel/arch/sparc64/src/drivers/kbd.c
rd2fac08c r336d2f52 35 35 #include <arch/drivers/kbd.h> 36 36 #include <genarch/ofw/ofw_tree.h> 37 #include <genarch/ofw/fhc.h>38 37 #include <genarch/ofw/ebus.h> 39 38 #include <console/console.h> … … 51 50 #endif 52 51 53 #ifdef CONFIG_Z853054 #include <genarch/drivers/z8530/z8530.h>55 #endif56 57 52 #ifdef CONFIG_NS16550 58 53 #include <genarch/drivers/ns16550/ns16550.h> … … 60 55 61 56 #ifdef CONFIG_SUN_KBD 62 63 #ifdef CONFIG_Z853064 65 static bool kbd_z8530_init(ofw_tree_node_t *node)66 {67 const char *name = ofw_tree_node_name(node);68 69 if (str_cmp(name, "zs") != 0)70 return false;71 72 /*73 * Read 'interrupts' property.74 */75 ofw_tree_property_t *prop = ofw_tree_getprop(node, "interrupts");76 if ((!prop) || (!prop->value)) {77 printf("z8530: Unable to find interrupts property\n");78 return false;79 }80 81 uint32_t interrupts = *((uint32_t *) prop->value);82 83 /*84 * Read 'reg' property.85 */86 prop = ofw_tree_getprop(node, "reg");87 if ((!prop) || (!prop->value)) {88 printf("z8530: Unable to find reg property\n");89 return false;90 }91 92 size_t size = ((ofw_fhc_reg_t *) prop->value)->size;93 94 uintptr_t pa;95 if (!ofw_fhc_apply_ranges(node->parent,96 ((ofw_fhc_reg_t *) prop->value), &pa)) {97 printf("z8530: Failed to determine address\n");98 return false;99 }100 101 inr_t inr;102 cir_t cir;103 void *cir_arg;104 if (!ofw_fhc_map_interrupt(node->parent,105 ((ofw_fhc_reg_t *) prop->value), interrupts, &inr, &cir,106 &cir_arg)) {107 printf("z8530: Failed to determine interrupt\n");108 return false;109 }110 111 /*112 * We need to pass aligned address to hw_map().113 * However, the physical keyboard address can114 * be pretty much unaligned, depending on the115 * underlying controller.116 */117 uintptr_t aligned_addr = ALIGN_DOWN(pa, PAGE_SIZE);118 size_t offset = pa - aligned_addr;119 120 z8530_t *z8530 = (z8530_t *)121 (hw_map(aligned_addr, offset + size) + offset);122 123 z8530_instance_t *z8530_instance = z8530_init(z8530, inr, cir, cir_arg);124 if (z8530_instance) {125 kbrd_instance_t *kbrd_instance = kbrd_init();126 if (kbrd_instance) {127 indev_t *sink = stdin_wire();128 indev_t *kbrd = kbrd_wire(kbrd_instance, sink);129 z8530_wire(z8530_instance, kbrd);130 }131 }132 133 /*134 * This is the necessary evil until the userspace drivers are135 * entirely self-sufficient.136 */137 sysinfo_set_item_val("kbd", NULL, true);138 sysinfo_set_item_val("kbd.inr", NULL, inr);139 sysinfo_set_item_val("kbd.address.kernel", NULL,140 (uintptr_t) z8530);141 sysinfo_set_item_val("kbd.address.physical", NULL, pa);142 sysinfo_set_item_val("kbd.type.z8530", NULL, true);143 144 return true;145 }146 147 #endif /* CONFIG_Z8530 */148 57 149 58 #ifdef CONFIG_NS16550 … … 243 152 void kbd_init(ofw_tree_node_t *node) 244 153 { 245 #ifdef CONFIG_Z8530246 kbd_z8530_init(node);247 #endif248 249 154 #ifdef CONFIG_NS16550 250 155 kbd_ns16550_init(node); -
kernel/genarch/Makefile.inc
rd2fac08c r336d2f52 100 100 endif 101 101 102 ifeq ($(CONFIG_Z8530),y)103 GENARCH_SOURCES += \104 genarch/src/drivers/z8530/z8530.c105 endif106 107 102 ifeq ($(CONFIG_VIA_CUDA),y) 108 103 GENARCH_SOURCES += \ … … 141 136 GENARCH_SOURCES += \ 142 137 genarch/src/ofw/ebus.c \ 143 genarch/src/ofw/fhc.c \144 138 genarch/src/ofw/pci.c \ 145 139 genarch/src/ofw/sbus.c \ -
release/Makefile
rd2fac08c r336d2f52 34 34 PROFILES = amd64 arm32/GXemul arm32/integratorcp arm32/gta02 ia32 \ 35 35 ia64/i460GX ia64/ski mips32/GXemul mips32/msim sparc64/niagara \ 36 sparc64/ serengeti sparc64/ultra36 sparc64/ultra 37 37 38 38 BZR = bzr -
uspace/Makefile
rd2fac08c r336d2f52 153 153 ifeq ($(UARCH),sparc64) 154 154 DIRS += \ 155 srv/hw/irc/fhc \156 155 srv/hw/irc/obio 157 156 endif -
uspace/app/init/init.c
rd2fac08c r336d2f52 270 270 spawn("/srv/apic"); 271 271 spawn("/srv/i8259"); 272 spawn("/srv/fhc");273 272 spawn("/srv/obio"); 274 273 srv_start("/srv/cuda_adb"); -
uspace/srv/hid/fb/Makefile
rd2fac08c r336d2f52 84 84 EXTRA_CFLAGS += -DNIAGARA_ENABLED 85 85 endif 86 87 ifeq ($(MACHINE),serengeti)88 SOURCES += \89 sgcn.c \90 serial_console.c91 EXTRA_CFLAGS += -DSGCN_ENABLED92 endif93 86 endif 94 87 -
uspace/srv/hid/fb/main.c
rd2fac08c r336d2f52 40 40 #include "msim.h" 41 41 #include "ski.h" 42 #include "sgcn.h"43 42 #include "niagara.h" 44 43 #include "main.h" … … 92 91 } 93 92 #endif 94 #ifdef SGCN_ENABLED95 if ((!initialized) && (fb_kind == 4)) {96 if (sgcn_init() == 0)97 initialized = true;98 }99 #endif100 93 #ifdef NIAGARA_ENABLED 101 94 if ((!initialized) && (fb_kind == 5)) { -
uspace/srv/hid/fb/niagara.c
rd2fac08c r336d2f52 29 29 */ 30 30 31 /** @defgroup niagarafb SGCN31 /** @defgroup niagarafb 32 32 * @brief userland driver of the Niagara console output 33 33 * @{ -
uspace/srv/hid/fb/niagara.h
rd2fac08c r336d2f52 27 27 */ 28 28 29 /** @defgroup sgcnfb SGCN30 * @brief userland driver of the Serengeticonsole output29 /** @defgroup niagarafb 30 * @brief userland driver of the Niagara console output 31 31 * @{ 32 32 */ -
uspace/srv/hid/input/Makefile
rd2fac08c r336d2f52 49 49 port/ns16550.c \ 50 50 port/pl050.c \ 51 port/sgcn.c \52 51 port/ski.c \ 53 port/z8530.c \54 52 proto/adb.c \ 55 53 proto/mousedev.c \ -
uspace/srv/hid/input/generic/input.c
rd2fac08c r336d2f52 424 424 kbd_add_dev(&niagara_port, &stty_ctl); 425 425 #endif 426 #if defined(UARCH_sparc64) && defined(MACHINE_serengeti)427 kbd_add_dev(&sgcn_port, &stty_ctl);428 #endif429 426 #if defined(UARCH_sparc64) && defined(MACHINE_generic) 430 kbd_add_dev(&z8530_port, &sun_ctl);431 427 kbd_add_dev(&ns16550_port, &sun_ctl); 432 428 #endif … … 556 552 printf("%s: HelenOS input service\n", NAME); 557 553 558 sysarg_t fhc;559 554 sysarg_t obio; 560 555 … … 562 557 list_initialize(&mouse_devs); 563 558 564 if (((sysinfo_get_value("kbd.cir.fhc", &fhc) == EOK) && (fhc)) 565 || ((sysinfo_get_value("kbd.cir.obio", &obio) == EOK) && (obio))) 559 if ((sysinfo_get_value("kbd.cir.obio", &obio) == EOK) && (obio)) 566 560 irc_service = true; 567 561 -
uspace/srv/hid/input/include/kbd_port.h
rd2fac08c r336d2f52 56 56 extern kbd_port_ops_t ns16550_port; 57 57 extern kbd_port_ops_t pl050_port; 58 extern kbd_port_ops_t sgcn_port;59 58 extern kbd_port_ops_t ski_port; 60 extern kbd_port_ops_t z8530_port;61 59 62 60 #endif -
uspace/srv/hid/input/port/niagara.c
rd2fac08c r336d2f52 154 154 155 155 /** 156 * Thread to poll SGCNfor keypresses.156 * Thread to poll Niagara console for keypresses. 157 157 */ 158 158 static void niagara_thread_impl(void *arg)
Note:
See TracChangeset
for help on using the changeset viewer.