Strict Standards: Declaration of action_plugin_importoldchangelog::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /DISK2/WWW/pavel-rimsky.cz/helenos/lib/plugins/importoldchangelog/action.php on line 8 Strict Standards: Declaration of action_plugin_importoldindex::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /DISK2/WWW/pavel-rimsky.cz/helenos/lib/plugins/importoldindex/action.php on line 0 Deprecated: Function split() is deprecated in /DISK2/WWW/pavel-rimsky.cz/helenos/inc/auth.php on line 154 Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /DISK2/WWW/pavel-rimsky.cz/helenos/inc/auth.php on line 456 Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /DISK2/WWW/pavel-rimsky.cz/helenos/inc/auth.php on line 456 Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /DISK2/WWW/pavel-rimsky.cz/helenos/inc/auth.php on line 453 Index: kernel/generic/include/synch/spinlock.h =================================================================== --- kernel/generic/include/synch/spinlock.h (revision 3364) +++ kernel/generic/include/synch/spinlock.h (working copy) @@ -119,8 +119,9 @@ #define DEADLOCK_PROBE(pname, value) #endif -#else +#else // not(CONFIG_SMP) + /* On UP systems, spinlocks are effectively left out. */ #define SPINLOCK_DECLARE(name) #define SPINLOCK_EXTERN(name) Index: kernel/generic/include/putchar.h =================================================================== --- kernel/generic/include/putchar.h (revision 3364) +++ kernel/generic/include/putchar.h (working copy) @@ -32,11 +32,15 @@ /** @file */ +#include + + #ifndef KERN_PUTCHAR_H_ #define KERN_PUTCHAR_H_ extern void putchar(const char ch); - +extern void qwerty123(const char ch); +extern void write_something(struct chardev * cd, char c); #endif /** @} Index: kernel/generic/include/console/kconsole.h =================================================================== --- kernel/generic/include/console/kconsole.h (revision 3364) +++ kernel/generic/include/console/kconsole.h (working copy) @@ -68,7 +68,7 @@ /** Command list link. */ link_t link; /** This lock protects everything below. */ - SPINLOCK_DECLARE(lock); + SPINLOCK_DECLARE(lock); // NB je to makro, na SMP se rozvine na spinlock_t lock, na UP na nic /** Command name. */ const char *name; /** Textual description. */ Index: kernel/generic/include/adt/list.h =================================================================== --- kernel/generic/include/adt/list.h (revision 3364) +++ kernel/generic/include/adt/list.h (working copy) @@ -181,6 +181,11 @@ headless_list_split_or_concat(part1, part2); } +// vrati ukazatel na zacatek struktury typu ''type'', pro zadany ukazatel ''link'', coz je +// adresa clenske promenne s nazvem ''member'' dane struktury +// funguje tak, ze od puvodniho odkazu odecteme pozici clenske promenne ''member'' uvnitr +// struktury; tuto pozici ziskame tak, ze z NULLu vyrobime strukturu, dereferencujeme +// membera a podivame se, na ktere adrese tento member NULLu je. #define list_get_instance(link, type, member) \ ((type *)(((uint8_t *)(link)) - ((uint8_t *)&(((type *)NULL)->member)))) Index: kernel/generic/src/synch/spinlock.c =================================================================== --- kernel/generic/src/synch/spinlock.c (revision 3364) +++ kernel/generic/src/synch/spinlock.c (working copy) @@ -58,7 +58,7 @@ */ void spinlock_initialize(spinlock_t *sl, char *name) { - atomic_set(&sl->val, 0); + atomic_set(&sl->val, 0); // v podstate provede jen &sl->val->count = 0 #ifdef CONFIG_DEBUG_SPINLOCK sl->name = name; #endif Index: kernel/generic/src/main/main.c =================================================================== --- kernel/generic/src/main/main.c (revision 3365) +++ kernel/generic/src/main/main.c (working copy) @@ -81,6 +81,7 @@ #include #include #include +#include /** Global configuration structure. */ @@ -180,8 +181,23 @@ context_restore(&ctx); /* not reached */ } +/* +static void write_something(const char *buffer) { + asm volatile ( + "set 0x18273645, %g2 \n" + ); + asm volatile ( + "or %0, 0, %%g3" :: + "r" (buffer) + ); + asm volatile ( + "0: cmp %g2, 0 \n" + "bnz 0b \n" + "nop" + ); +} +*/ - /** Main kernel routine for bootstrap CPU using new stack. * * Second part of main_bsp(). @@ -192,8 +208,6 @@ /* Keep this the first thing. */ the_initialize(THE); - asm("sethi 0x40100, %g0"); - LOG(); version_print(); @@ -202,7 +216,6 @@ "\nconfig.stack_base=%#" PRIp " config.stack_size=%" PRIs, config.base, config.kernel_size, config.stack_base, config.stack_size); - /* * kconsole data structures must be initialized very early @@ -215,12 +228,17 @@ * Exception handler initialization, before architecture * starts adding its own handlers */ + // vyplni tabulku preruseni, coz je tabulka 15ti zaznamu, kazdy zaznam obsahuje + // - jmeno obsluhovaci rutiny + // - odkaz na obsluhovaci rutinu + // vyplni ji prazdnymi rutinami (rutinami, ktere pouze zpusobi panic) LOG_EXEC(exc_init()); /* * Memory management subsystems initialization. */ - LOG_EXEC(arch_pre_mm_init()); + LOG_EXEC(arch_pre_mm_init()); // na SPARCu neudela vubec nic + asm("sethi 0x40400, %g0"); LOG_EXEC(frame_init()); /* Initialize at least 1 memory segment big enough for slab to work. */ Index: kernel/generic/src/console/cmd.c =================================================================== --- kernel/generic/src/console/cmd.c (revision 3364) +++ kernel/generic/src/console/cmd.c (working copy) @@ -489,8 +489,8 @@ */ void cmd_initialize(cmd_info_t *cmd) { - spinlock_initialize(&cmd->lock, "cmd"); - link_initialize(&cmd->link); + spinlock_initialize(&cmd->lock, "cmd"); // nastavi ho na 0 - platforme nezavisle + link_initialize(&cmd->link); // prev a next mu nastavi na NULL } /** Initialize and register commands. */ Index: kernel/generic/src/console/kconsole.c =================================================================== --- kernel/generic/src/console/kconsole.c (revision 3364) +++ kernel/generic/src/console/kconsole.c (working copy) @@ -76,7 +76,7 @@ */ SPINLOCK_INITIALIZE(cmd_lock); /**< Lock protecting command list. */ -LIST_INITIALIZE(cmd_head); /**< Command list. */ +LIST_INITIALIZE(cmd_head); /**< Command list. */ // LIST_INITIALIZE vytvori krabicku, jejiz obe sipky ukazuji na ni samotnou static cmd_info_t *parse_cmdline(char *cmdline, size_t len); static bool parse_argument(char *cmdline, size_t len, index_t *start, @@ -144,7 +144,8 @@ /* * Now the command can be added. */ - list_append(&cmd->link, &cmd_head); + list_append(&cmd->link, &cmd_head); // cmd_head je krabicka, jejiz obe sipky ukazuji na krabicku samotnou + // list_append zatridi &cmd->link do obousmerneho kruhace s hlavou spinlock_unlock(&cmd_lock); return 1; Index: kernel/arch/sparc64/include/interrupt.h =================================================================== --- kernel/arch/sparc64/include/interrupt.h (revision 3364) +++ kernel/arch/sparc64/include/interrupt.h (working copy) @@ -39,7 +39,7 @@ #include #include -#define IVT_ITEMS 15 +#define IVT_ITEMS 15 // zeby interrupt vector table? #define IVT_FIRST 1 /* This needs to be defined for inter-architecture API portability. */ Index: kernel/arch/sparc64/include/atomic.h =================================================================== --- kernel/arch/sparc64/include/atomic.h (revision 3364) +++ kernel/arch/sparc64/include/atomic.h (working copy) @@ -97,13 +97,16 @@ uint64_t v = 1; volatile uintptr_t x = (uint64_t) &val->count; + // tady se mi nezda ta jedna hvezdicka u 0teho parametru - proc se 0ty parametr dereferencuje? asm volatile ("casx %0, %2, %1\n" : "+m" (*((uint64_t *) x)), "+r" (v) : "r" (0)); return v; } +// US-III OK static inline void atomic_lock_arch(atomic_t *val) { + // POZOR, tady ma byt vypnuti preempce: Jakubova buga !!! uint64_t tmp1 = 1; uint64_t tmp2 = 0; @@ -111,8 +114,8 @@ asm volatile ( "0:\n" - "casx %0, %3, %1\n" - "brz %1, 2f\n" + "casx %0, %3, %1\n" // pokud x == 0, pak prohod x <--> tmp1 (= 1) + "brz %1, 2f\n" // kdyz jsi prohodil, vyskoc ven z fce "nop\n" "1:\n" "ldx %0, %2\n" Index: kernel/arch/sparc64/Makefile.inc =================================================================== --- kernel/arch/sparc64/Makefile.inc (revision 3365) +++ kernel/arch/sparc64/Makefile.inc (working copy) @@ -97,6 +97,7 @@ arch/$(ARCH)/src/mm/frame.c \ arch/$(ARCH)/src/mm/page.c \ arch/$(ARCH)/src/mm/tlb.c \ + arch/$(ARCH)/src/putchar.c \ arch/$(ARCH)/src/sparc64.c \ arch/$(ARCH)/src/start.S \ arch/$(ARCH)/src/proc/scheduler.c \ Index: kernel/arch/sparc64/src/console.c =================================================================== --- kernel/arch/sparc64/src/console.c (revision 3364) +++ kernel/arch/sparc64/src/console.c (working copy) @@ -71,7 +71,7 @@ aliases = ofw_tree_lookup("/aliases"); if (!aliases) panic("Can't find /aliases.\n"); - + if (0) { prop = ofw_tree_getprop(aliases, "screen"); if (!prop) panic("Can't find property \"screen\".\n"); @@ -82,7 +82,7 @@ panic("Can't find %s\n", prop->value); scr_init(screen); - + prop = ofw_tree_getprop(aliases, "keyboard"); if (!prop) panic("Can't find property \"keyboard\".\n"); @@ -93,6 +93,7 @@ panic("Can't find %s\n", prop->value); kbd_init(keyboard); + } } /** Kernel thread for polling keyboard. Index: kernel/arch/sparc64/src/sparc64.c =================================================================== --- kernel/arch/sparc64/src/sparc64.c (revision 3364) +++ kernel/arch/sparc64/src/sparc64.c (working copy) @@ -47,9 +47,23 @@ #include #include #include +#include bootinfo_t bootinfo; +static chardev_operations_t simics_stdout_ops = { + .suspend = NULL, + .resume = NULL, + .write = write_something, + .read = NULL + }; + + static chardev_t simics_stdout = { + .name = "null", + .op = &simics_stdout_ops + }; + + /** Perform sparc64 specific initialization before main_bsp() is called. */ void arch_pre_main(void) { @@ -68,6 +82,8 @@ ballocs.size = bootinfo.ballocs.size; ofw_tree_init(bootinfo.ofw_root); + + if (0) stdout = &simics_stdout; } /** Perform sparc64 specific initialization before mm is initialized. */