Changeset 76fca31 in mainline for kernel/arch/ia32/src
- Timestamp:
- 2008-12-16T19:02:07Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5ae4443
- Parents:
- 8fe5980
- Location:
- kernel/arch/ia32/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/cpu/cpu.c
r8fe5980 r76fca31 66 66 static char *vendor_str[] = { 67 67 "Unknown Vendor", 68 "A uthenticAMD",69 " GenuineIntel"68 "AMD", 69 "Intel" 70 70 }; 71 71 … … 78 78 : 79 79 : 80 : "%eax"80 : "%eax" 81 81 ); 82 82 } … … 90 90 : 91 91 : 92 : "%eax"92 : "%eax" 93 93 ); 94 94 } … … 141 141 * Check for AMD processor. 142 142 */ 143 if (info.cpuid_ebx==AMD_CPUID_EBX && info.cpuid_ecx==AMD_CPUID_ECX && info.cpuid_edx==AMD_CPUID_EDX) { 143 if ((info.cpuid_ebx == AMD_CPUID_EBX) 144 && (info.cpuid_ecx == AMD_CPUID_ECX) 145 && (info.cpuid_edx == AMD_CPUID_EDX)) 144 146 CPU->arch.vendor = VendorAMD; 145 } 146 147 147 148 /* 148 149 * Check for Intel processor. 149 150 */ 150 if (info.cpuid_ebx==INTEL_CPUID_EBX && info.cpuid_ecx==INTEL_CPUID_ECX && info.cpuid_edx==INTEL_CPUID_EDX) { 151 if ((info.cpuid_ebx == INTEL_CPUID_EBX) 152 && (info.cpuid_ecx == INTEL_CPUID_ECX) 153 && (info.cpuid_edx == INTEL_CPUID_EDX)) 151 154 CPU->arch.vendor = VendorIntel; 152 } 153 155 154 156 cpuid(1, &info); 155 CPU->arch.family = (info.cpuid_eax >>8)&0xf;156 CPU->arch.model = (info.cpuid_eax >>4)&0xf;157 CPU->arch.stepping = (info.cpuid_eax >>0)&0xf;157 CPU->arch.family = (info.cpuid_eax >> 8) & 0x0f; 158 CPU->arch.model = (info.cpuid_eax >> 4) & 0x0f; 159 CPU->arch.stepping = (info.cpuid_eax >> 0) & 0x0f; 158 160 } 159 161 } 160 162 161 void cpu_print_report(cpu_t* m)163 void cpu_print_report(cpu_t* cpu) 162 164 { 163 printf("cpu% d: (%s family=%d model=%d stepping=%d) %dMHz\n",164 m->id, vendor_str[m->arch.vendor], m->arch.family, m->arch.model, m->arch.stepping,165 m->frequency_mhz);165 printf("cpu%u: (%s family=%u model=%u stepping=%u) %" PRIu16 " MHz\n", 166 cpu->id, vendor_str[cpu->arch.vendor], cpu->arch.family, 167 cpu->arch.model, cpu->arch.stepping, cpu->frequency_mhz); 166 168 } 167 169 -
kernel/arch/ia32/src/drivers/vesa.c
r8fe5980 r76fca31 98 98 } 99 99 100 void vesa_redraw(void) 101 { 102 fb_redraw(); 103 } 104 100 105 #endif 101 106 -
kernel/arch/ia32/src/ia32.c
r8fe5980 r76fca31 94 94 else 95 95 #endif 96 ega_init(); 96 ega_init(); /* video */ 97 97 98 98 /* Enable debugger */ … … 160 160 void arch_grab_console(void) 161 161 { 162 #ifdef CONFIG_FB 163 vesa_redraw(); 164 #else 165 ega_redraw(); 166 #endif 167 162 168 i8042_grab(); 163 169 } 170 164 171 /** Return console to userspace 165 172 *
Note:
See TracChangeset
for help on using the changeset viewer.