void cpu_startup_common(void) { vaddr_t minaddr, maxaddr; char pbuf[9]; /* "99999 MB" */ pmap_tlb_info_evcnt_attach(&pmap_tlb0_info); #ifdef MULTIPROCESSOR kcpuset_create(&cpus_halted, true); KASSERT(cpus_halted != NULL); kcpuset_create(&cpus_hatched, true); KASSERT(cpus_hatched != NULL); kcpuset_create(&cpus_paused, true); KASSERT(cpus_paused != NULL); kcpuset_create(&cpus_resumed, true); KASSERT(cpus_resumed != NULL); kcpuset_create(&cpus_running, true); KASSERT(cpus_running != NULL); kcpuset_set(cpus_hatched, cpu_number()); kcpuset_set(cpus_running, cpu_number()); #endif cpu_hwrena_setup(); /* * Good {morning,afternoon,evening,night}. */ printf("%s%s", copyright, version); printf("%s\n", cpu_getmodel()); format_bytes(pbuf, sizeof(pbuf), ctob(physmem)); printf("total memory = %s\n", pbuf); minaddr = 0; /* * Allocate a submap for physio. */ phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr, VM_PHYS_SIZE, 0, FALSE, NULL); /* * (No need to allocate an mbuf cluster submap. Mbuf clusters * are allocated via the pool allocator, and we use KSEG/XKPHYS to * map those pages.) */ format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free)); printf("avail memory = %s\n", pbuf); #if defined(__mips_n32) module_machine = "mips-n32"; #endif }
static int luaopen_systm(void *ls) { lua_State *L = (lua_State *)ls; const luaL_Reg systm_lib[ ] = { { "print", print }, { "print_nolog", print_nolog }, { "uprint", uprint }, { "aprint_normal", systm_aprint_normal }, { "aprint_naive", systm_aprint_naive }, { "aprint_verbose", systm_aprint_verbose }, { "aprint_debug", systm_aprint_debug }, { "aprint_error", systm_aprint_error }, { "aprint_get_error_count", systm_aprint_get_error_count }, /* panicing */ { "panic", systm_panic }, /* callouts */ /* mutexes */ {NULL, NULL} }; luaL_register(L, "systm", systm_lib); /* some string values */ lua_pushstring(L, copyright); lua_setfield(L, -2, "copyright"); lua_pushstring(L, cpu_getmodel()); lua_setfield(L, -2, "cpu_model"); lua_pushstring(L, machine); lua_setfield(L, -2, "machine"); lua_pushstring(L, machine_arch); lua_setfield(L, -2, "machine_arch"); lua_pushstring(L, osrelease); lua_setfield(L, -2, "osrelease"); lua_pushstring(L, ostype); lua_setfield(L, -2, "ostype"); lua_pushstring(L, kernel_ident); lua_setfield(L, -2, "kernel_ident"); lua_pushstring(L, version); lua_setfield(L, -2, "version"); /* some integer values */ lua_pushinteger(L, ncpu); lua_setfield(L, -2, "ncpu"); return 1; }
void cpu_startup(void) { #if VAX46 || VAX48 || VAX49 || VAX53 || VAXANY vaddr_t minaddr, maxaddr; #endif char pbuf[9]; /* * Initialize error message buffer. */ initmsgbuf(msgbufaddr, round_page(MSGBUFSIZE)); /* * Good {morning,afternoon,evening,night}. * Also call CPU init on systems that need that. */ printf("%s%s", copyright, version); printf("%s\n", cpu_getmodel()); if (dep_call->cpu_conf) (*dep_call->cpu_conf)(); format_bytes(pbuf, sizeof(pbuf), avail_end); printf("total memory = %s\n", pbuf); panicstr = NULL; mtpr(AST_NO, PR_ASTLVL); spl0(); #if VAX46 || VAX48 || VAX49 || VAX53 || VAXANY minaddr = 0; /* * Allocate a submap for physio. This map effectively limits the * number of processes doing physio at any one time. */ phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr, VM_PHYS_SIZE, 0, false, NULL); #endif format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free)); printf("avail memory = %s\n", pbuf); #ifdef DDB if (boothowto & RB_KDB) Debugger(); #endif iomap_ex_malloc_safe = 1; }
void identifycpu(void) { extern int cputype; const char *model, *fpu; switch (cputype) { case CPU_68030: model ="LUNA-I"; switch (fputype) { case FPU_68881: fpu = "MC68881"; break; case FPU_68882: fpu = "MC68882"; break; case FPU_NONE: fpu = "no"; break; default: fpu = "unknown"; break; } cpu_setmodel("%s (MC68030 CPU+MMU, %s FPU)", model, fpu); machtype = LUNA_I; /* 20MHz 68030 */ cpuspeed = 20; delay_divisor = 102; hz = 60; break; #if defined(M68040) case CPU_68040: model ="LUNA-II"; cpu_setmodel( "%s (MC68040 CPU+MMU+FPU, 4k on-chip physical I/D caches)", model); machtype = LUNA_II; /* 25MHz 68040 */ cpuspeed = 25; delay_divisor = 30; /* hz = 100 on LUNA-II */ break; #endif default: panic("unknown CPU type"); } printf("%s\n", cpu_getmodel()); }
void sh_startup(void) { vaddr_t minaddr, maxaddr; char pbuf[9]; const char *model = cpu_getmodel(); printf("%s%s", copyright, version); if (*model != '\0') printf("%s", model); #ifdef DEBUG printf("general exception handler:\t%d byte\n", sh_vector_generic_end - sh_vector_generic); printf("TLB miss exception handler:\t%d byte\n", #if defined(SH3) && defined(SH4) CPU_IS_SH3 ? sh3_vector_tlbmiss_end - sh3_vector_tlbmiss : sh4_vector_tlbmiss_end - sh4_vector_tlbmiss #elif defined(SH3) sh3_vector_tlbmiss_end - sh3_vector_tlbmiss #elif defined(SH4) sh4_vector_tlbmiss_end - sh4_vector_tlbmiss #endif ); printf("interrupt exception handler:\t%d byte\n", sh_vector_interrupt_end - sh_vector_interrupt); #endif /* DEBUG */ format_bytes(pbuf, sizeof(pbuf), ctob(physmem)); printf("total memory = %s\n", pbuf); minaddr = 0; /* * Allocate a submap for physio */ phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr, VM_PHYS_SIZE, 0, false, NULL); format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free)); printf("avail memory = %s\n", pbuf); }
void cpu_startup(void) { char pbuf[9]; vaddr_t minaddr, maxaddr; #ifdef DEBUG extern int pmapdebug; /* XXX */ int opmapdebug = pmapdebug; pmapdebug = 0; /* Shut up pmap debug during bootstrap */ #endif /* * Good {morning,afternoon,evening,night}. */ printf("%s%s", copyright, version); printf("%s\n", cpu_getmodel()); format_bytes(pbuf, sizeof(pbuf), ctob(physmem)); printf("total memory = %s\n", pbuf); minaddr = 0; /* * Allocate a submap for physio */ phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr, VM_PHYS_SIZE, 0, FALSE, NULL); /* * No need to allocate an mbuf cluster submap. Mbuf clusters * are allocated via the pool allocator, and we use KSEG to * map those pages. */ #ifdef DEBUG pmapdebug = opmapdebug; #endif format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free)); printf("avail memory = %s\n", pbuf); }
void identifycpu(void) { printf("%s\n", cpu_getmodel()); printf("delay constant: %d\n", delay_divisor); }