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/genarch/src/mm/asid_fifo.c =================================================================== --- kernel/genarch/src/mm/asid_fifo.c (revision 3437) +++ kernel/genarch/src/mm/asid_fifo.c (working copy) @@ -63,11 +63,11 @@ int i; #if (!FIFO_STATIC) - fifo_create(free_asids); + fifo_create(free_asids); // objekt free_asids uz existuje, my jen naalokujeme to, na co ukazuje free_asids.info (naalokujeme pole o velikost free_Asids.items) #endif for (i = 0; i < ASIDS_ALLOCABLE; i++) { - fifo_push(free_asids, ASID_START + i); + fifo_push(free_asids, ASID_START + i); // ASID_START = nejmensi cislo ASIDu. } } Index: kernel/generic/src/main/main.c =================================================================== --- kernel/generic/src/main/main.c (revision 3437) +++ kernel/generic/src/main/main.c (working copy) @@ -220,17 +220,17 @@ /* * Memory management subsystems initialization. */ - LOG_EXEC(arch_pre_mm_init()); - LOG_EXEC(frame_init()); + LOG_EXEC(arch_pre_mm_init()); // na Sparc64 nic + LOG_EXEC(frame_init()); // nevola nic moc arcitecture-specific /* Initialize at least 1 memory segment big enough for slab to work. */ LOG_EXEC(slab_cache_init()); LOG_EXEC(btree_init()); LOG_EXEC(as_init()); LOG_EXEC(page_init()); - LOG_EXEC(tlb_init()); - LOG_EXEC(ddi_init()); - LOG_EXEC(tasklet_init()); + LOG_EXEC(tlb_init()); // nastavi abstraktni operace na operace s hashtable + LOG_EXEC(ddi_init()); // jen vytvori nejaky B-strom + LOG_EXEC(tasklet_init()); // systemove nezavisla inicializace LOG_EXEC(arch_post_mm_init()); LOG_EXEC(arch_pre_smp_init()); LOG_EXEC(smp_init()); Index: kernel/generic/src/mm/slab.c =================================================================== --- kernel/generic/src/mm/slab.c (revision 3437) +++ kernel/generic/src/mm/slab.c (working copy) @@ -528,7 +528,7 @@ static unsigned int comp_objects(slab_cache_t *cache) { if (cache->flags & SLAB_CACHE_SLINSIDE) - return ((PAGE_SIZE << cache->order) - sizeof(slab_t)) / + return ((PAGE_SIZE << cache->order) - sizeof(slab_t)) / // (Velikost slabu - velikost popisujici struktury) / velikost_objektu = # objektu cache->size; else return (PAGE_SIZE << cache->order) / cache->size; @@ -541,7 +541,7 @@ unsigned int ssize; objects = comp_objects(cache); - ssize = PAGE_SIZE << cache->order; + ssize = PAGE_SIZE << cache->order; // velikost slabu if (cache->flags & SLAB_CACHE_SLINSIDE) ssize -= sizeof(slab_t); return ssize - objects * cache->size; @@ -574,10 +574,10 @@ int pages; ipl_t ipl; - memsetb(cache, sizeof(*cache), 0); + memsetb(cache, sizeof(*cache), 0); // vyplni strukturu "cache" nulami (fce implementovana v kernel/generic/src/lib) cache->name = name; - if (align < sizeof(unative_t)) + if (align < sizeof(unative_t)) // unative_t ... 64 bitu align = sizeof(unative_t); size = ALIGN_UP(size, align); @@ -605,9 +605,11 @@ if (pages == 1) cache->order = 0; else - cache->order = fnzb(pages - 1) + 1; - - while (badness(cache) > SLAB_MAX_BADNESS(cache)) { + cache->order = fnzb(pages - 1) + 1; // fnzb - pocita dvojkovy logaritmus ("fnbz" = "first non zero bit (from left)") + // ... a fnzb(pages - 1) + 1 vrati dvojkovy logaritmus "pages" zaokrouhleny nahoru + while (badness(cache) > SLAB_MAX_BADNESS(cache)) { // badness - velikost nevyuziteho mista ve slabu + // SLAB_MAX_BADNESS = max. snesitelna velikost slabu = polovina velikosti slabu + // jak se to vlastne muze stat? cache->order += 1; } cache->objects = comp_objects(cache); @@ -872,20 +874,23 @@ int i, size; /* Initialize magazine cache */ + // magaziny jsou objekty kernelu, takze i na ne se pouziva slab alokator _slab_cache_create(&mag_cache, "slab_magazine", - sizeof(slab_magazine_t) + SLAB_MAG_SIZE * sizeof(void*), - sizeof(uintptr_t), NULL, NULL, SLAB_CACHE_NOMAGAZINE | - SLAB_CACHE_SLINSIDE); + sizeof(slab_magazine_t) + SLAB_MAG_SIZE * sizeof(void*), // velikost = velikost struktury magazinu + velikost dat (tj. odkazu na alokovane objekty) + sizeof(uintptr_t), NULL, NULL, SLAB_CACHE_NOMAGAZINE | // slab alokator pri alokovani magazinu prirozene nepouziva magaziny + SLAB_CACHE_SLINSIDE); // ridici struktura bude uvnitr slabu /* Initialize slab_cache cache */ _slab_cache_create(&slab_cache_cache, "slab_cache", sizeof(slab_cache_cache), sizeof(uintptr_t), NULL, NULL, SLAB_CACHE_NOMAGAZINE | SLAB_CACHE_SLINSIDE); /* Initialize external slab cache */ + // tady se nevola _slab_cache_create, nybrz slab_cache_create, ktera objekt cache naalokuje slab_extern_cache = slab_cache_create("slab_extern", sizeof(slab_t), 0, - NULL, NULL, SLAB_CACHE_SLINSIDE | SLAB_CACHE_MAGDEFERRED); + NULL, NULL, SLAB_CACHE_SLINSIDE | SLAB_CACHE_MAGDEFERRED); // SLAB_CACHE_MAGDEFERRED - jako NOMAGAZINE, ale navic se nastavi priznak, ktery rika, ze v budoucnu se ma cache vytvorit /* Initialize structures for malloc */ - for (i = 0, size = (1 << SLAB_MIN_MALLOC_W); + // pro kazdou velikost, kterou budeme chtit alokovat, vytvorime slab cache pro malloc + for (i = 0, size = (1 << SLAB_MIN_MALLOC_W); // SLAB_MIN_MALLOC_W - minimalni velikost alokovatelna mallocem i < (SLAB_MAX_MALLOC_W - SLAB_MIN_MALLOC_W + 1); i++, size <<= 1) { malloc_caches[i] = slab_cache_create(malloc_names[i], size, 0, Index: kernel/arch/sparc64/include/mm/tlb.h =================================================================== --- kernel/arch/sparc64/include/mm/tlb.h (revision 3440) +++ kernel/arch/sparc64/include/mm/tlb.h (working copy) @@ -35,9 +35,15 @@ #ifndef KERN_sparc64_TLB_H_ #define KERN_sparc64_TLB_H_ -#define ITLB_ENTRY_COUNT 64 -#define DTLB_ENTRY_COUNT 64 +#if defined (US) + #define ITLB_ENTRY_COUNT 64 + #define DTLB_ENTRY_COUNT 64 +#endif +#if defined (US3) + #define DTLB_MAX_LOCKED_ENTRIES 16 +#endif + #define MEM_CONTEXT_KERNEL 0 #define MEM_CONTEXT_TEMP 1 @@ -53,6 +59,9 @@ /* TLB Demap Operation types. */ #define TLB_DEMAP_PAGE 0 #define TLB_DEMAP_CONTEXT 1 +#if defined (US3) +#define TLB_DEMAP_ALL 2 +#endif #define TLB_DEMAP_TYPE_SHIFT 6 @@ -163,6 +172,7 @@ /** I-/D-TLB Tag Read Register. */ union tlb_tag_read_reg { + // TODO have a look at how non-8kB pages will be treated uint64_t value; struct { uint64_t vpn : 51; /**< Virtual Address bits 63:13. */ @@ -178,8 +188,13 @@ uint64_t value; struct { uint64_t vpn: 51; /**< Virtual Address bits 63:13. */ +#if defined (US) unsigned : 6; /**< Ignored. */ unsigned type : 1; /**< The type of demap operation. */ +#elif defined (US3) + unsigned : 5; /**< Ignored. */ + unsigned type: 2; /**< The type of demap operation. */ +#endif unsigned context : 2; /**< Context register selection. */ unsigned : 4; /**< Zero. */ } __attribute__ ((packed)); @@ -190,10 +205,19 @@ union tlb_sfsr_reg { uint64_t value; struct { +#if defined (US) unsigned long : 40; /**< Implementation dependent. */ unsigned asi : 8; /**< ASI. */ unsigned : 2; unsigned ft : 7; /**< Fault type. */ +#elif defined (US3) + unsigned long : 39; /**< Implementation dependent. */ + unsigned nf : 1; /**< Non-faulting load. */ + unsigned asi : 8; /**< ASI. */ + unsigned tm : 1; /**< I-TLB miss. */ + unsigned : 3; /**< Reserved. */ + unsigned ft : 5; /**< Fault type. */ +#endif unsigned e : 1; /**< Side-effect bit. */ unsigned ct : 2; /**< Context Register selection. */ unsigned pr : 1; /**< Privilege bit. */ Index: kernel/arch/sparc64/src/mm/page.c =================================================================== --- kernel/arch/sparc64/src/mm/page.c (revision 3437) +++ kernel/arch/sparc64/src/mm/page.c (working copy) @@ -52,7 +52,7 @@ uintptr_t virt_page; uintptr_t phys_page; int pagesize_code; -} bsp_locked_dtlb_entry[DTLB_ENTRY_COUNT]; +} bsp_locked_dtlb_entry[DTLB_MAX_LOCKED_ENTRIES]; /** Number of entries in bsp_locked_dtlb_entry array. */ static count_t bsp_locked_dtlb_entries = 0;