diff --git a/elks/arch/i86/boot/cputype.S b/elks/arch/i86/boot/cputype.S index d34ec3e61..fbeda7b2a 100644 --- a/elks/arch/i86/boot/cputype.S +++ b/elks/arch/i86/boot/cputype.S @@ -1,6 +1,6 @@ // obsolete and inaccurate, but required for arch_cpu = 6 and 7 (286, 386+) // XT vs AT BIOS system capabilities (sys_caps) auto-detection by kernel -// +// Note: enables, then disables interrupts when called /* ! Probe for the CPU @@ -9,7 +9,7 @@ ! */ getcpu: - mov $SETUPSEG,%ax // setup.S code segment + mov $SETUPSEG,%ax // setup code segment mov %ax,%ds pushf // check for 8088/8086/V20/V30/80188/80186 xor %ax,%ax @@ -45,12 +45,12 @@ getcpu: and $0x70,%bh // 32-bit CPU if we changed NT or IOPL je not_32bit mov $7,%cl // 80386+ - lea p80386,%si + #lea p80386,%si jmp cpu_store not_32bit: // Unknown CPU mov $255,%cl - lea px86,%si + #lea px86,%si jmp cpu_store is8086: @@ -63,38 +63,37 @@ is8086: mov $0xffff,%cx nop rep -// seg es lodsb or %cx,%cx jz isv30 call queue jz is8088 mov $1,%cl - lea p8086,%si + #lea p8086,%si jmp cpu_store is8088: xor %cl,%cl - lea p8088,%si + #lea p8088,%si jmp cpu_store is80186:call queue jz is80188 mov $5,%cl - lea p80186,%si + #lea p80186,%si jmp cpu_store is80188:mov $4,%cl - lea p80188,%si + #lea p80188,%si jmp cpu_store isv30: call queue jz isv20 mov $3,%cl - lea pv30,%si + #lea pv30,%si jmp cpu_store isv20: mov $2,%cl - lea pv20,%si + #lea pv20,%si jmp cpu_store is80286:mov $6,%cl - lea p80286,%si + #lea p80286,%si // jmp cpu_store cpu_store: @@ -183,6 +182,7 @@ queue_end: or %dx,%dx ret +#if UNUSED // // The processor name must not be longer than 15 characters! // @@ -202,3 +202,4 @@ v_id: .byte 0,0,0,0 v_id2: .byte 0,0,0,0 v_id3: .byte 0,0,0,0 .byte 0 +#endif diff --git a/elks/arch/i86/boot/setup.S b/elks/arch/i86/boot/setup.S index 0d63e2123..93004ec04 100644 --- a/elks/arch/i86/boot/setup.S +++ b/elks/arch/i86/boot/setup.S @@ -43,7 +43,7 @@ ! 10: mono/color, video memory size, 2 bytes ! 14: screen_lines, 1 byte ! 15: VGA present, 1 byte -! 0x20: cpu_type byte Processor type UNUSED +! 0x20: cpu_type byte Processor type ! 0 = 8088 ! 1 = 8086 ! 2 = NEC V20 diff --git a/elks/arch/i86/kernel/system.c b/elks/arch/i86/kernel/system.c index db35aa737..7278b683b 100644 --- a/elks/arch/i86/kernel/system.c +++ b/elks/arch/i86/kernel/system.c @@ -71,7 +71,7 @@ unsigned int INITPROC setup_arch(void) byte_t arch_cpu = SETUP_CPU_TYPE; if (arch_cpu > 5) /* 80286+ IBM PC/AT capabilities or Unknown CPU */ sys_caps = CAP_ALL; - printk("arch %d sys_caps %02x\n", arch_cpu, sys_caps); + debug("arch %d sys_caps %02x\n", arch_cpu, sys_caps); #endif return endbss; /* used as start address in near heap init */