Changeset 7bdcc45 in mainline for kernel/arch/ia32/src
- Timestamp:
- 2010-12-16T16:38:49Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7837101
- Parents:
- 8e58f94 (diff), eb221e5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- kernel/arch/ia32/src
- Files:
-
- 13 edited
-
bios/bios.c (modified) (2 diffs)
-
boot/memmap.c (modified) (1 diff)
-
cpu/cpu.c (modified) (2 diffs)
-
debug/stacktrace.c (modified) (1 diff)
-
drivers/i8254.c (modified) (1 diff)
-
drivers/i8259.c (modified) (1 diff)
-
drivers/vesa.c (modified) (1 diff)
-
ia32.c (modified) (1 diff)
-
interrupt.c (modified) (2 diffs)
-
mm/frame.c (modified) (1 diff)
-
mm/page.c (modified) (1 diff)
-
smp/apic.c (modified) (3 diffs)
-
smp/mps.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/ia32/src/bios/bios.c
r8e58f94 r7bdcc45 36 36 #include <typedefs.h> 37 37 38 #define BIOS_EBDA_PTR 0x40e 38 #define BIOS_EBDA_PTR 0x40eU 39 39 40 40 uintptr_t ebda = 0; … … 43 43 { 44 44 /* Copy the EBDA address out from BIOS Data Area */ 45 ebda = *((uint16_t *) BIOS_EBDA_PTR) * 0x10 ;45 ebda = *((uint16_t *) BIOS_EBDA_PTR) * 0x10U; 46 46 } 47 47 -
kernel/arch/ia32/src/boot/memmap.c
r8e58f94 r7bdcc45 35 35 #include <arch/boot/memmap.h> 36 36 37 uint8_t e820counter = 0xff ;37 uint8_t e820counter = 0xffU; 38 38 e820memmap_t e820table[MEMMAP_E820_MAX_RECORDS]; 39 39 -
kernel/arch/ia32/src/cpu/cpu.c
r8e58f94 r7bdcc45 49 49 * Contains only non-MP-Specification specific SMP code. 50 50 */ 51 #define AMD_CPUID_EBX 0x6874754152 #define AMD_CPUID_ECX 0x444d416353 #define AMD_CPUID_EDX 0x69746e6551 #define AMD_CPUID_EBX UINT32_C(0x68747541) 52 #define AMD_CPUID_ECX UINT32_C(0x444d4163) 53 #define AMD_CPUID_EDX UINT32_C(0x69746e65) 54 54 55 #define INTEL_CPUID_EBX 0x756e654756 #define INTEL_CPUID_ECX 0x6c65746e57 #define INTEL_CPUID_EDX 0x49656e6955 #define INTEL_CPUID_EBX UINT32_C(0x756e6547) 56 #define INTEL_CPUID_ECX UINT32_C(0x6c65746e) 57 #define INTEL_CPUID_EDX UINT32_C(0x49656e69) 58 58 59 59 … … 140 140 if ((info.cpuid_ebx == AMD_CPUID_EBX) 141 141 && (info.cpuid_ecx == AMD_CPUID_ECX) 142 && (info.cpuid_edx == AMD_CPUID_EDX))142 && (info.cpuid_edx == AMD_CPUID_EDX)) 143 143 CPU->arch.vendor = VendorAMD; 144 144 145 145 /* 146 146 * Check for Intel processor. 147 */ 147 */ 148 148 if ((info.cpuid_ebx == INTEL_CPUID_EBX) 149 149 && (info.cpuid_ecx == INTEL_CPUID_ECX) 150 && (info.cpuid_edx == INTEL_CPUID_EDX))150 && (info.cpuid_edx == INTEL_CPUID_EDX)) 151 151 CPU->arch.vendor = VendorIntel; 152 152 153 153 cpuid(INTEL_CPUID_STANDARD, &info); 154 CPU->arch.family = (info.cpuid_eax >> 8) & 0x0f ;155 CPU->arch.model = (info.cpuid_eax >> 4) & 0x0f ;156 CPU->arch.stepping = (info.cpuid_eax >> 0) & 0x0f ;154 CPU->arch.family = (info.cpuid_eax >> 8) & 0x0fU; 155 CPU->arch.model = (info.cpuid_eax >> 4) & 0x0fU; 156 CPU->arch.stepping = (info.cpuid_eax >> 0) & 0x0fU; 157 157 } 158 158 } -
kernel/arch/ia32/src/debug/stacktrace.c
r8e58f94 r7bdcc45 37 37 #include <typedefs.h> 38 38 39 #define FRAME_OFFSET_FP_PREV 040 #define FRAME_OFFSET_RA 139 #define FRAME_OFFSET_FP_PREV 0 40 #define FRAME_OFFSET_RA 1 41 41 42 42 bool kernel_stack_trace_context_validate(stack_trace_context_t *ctx) -
kernel/arch/ia32/src/drivers/i8254.c
r8e58f94 r7bdcc45 54 54 #include <ddi/device.h> 55 55 56 #define CLK_PORT1 ((ioport8_t *) 0x40 )57 #define CLK_PORT4 ((ioport8_t *) 0x43 )56 #define CLK_PORT1 ((ioport8_t *) 0x40U) 57 #define CLK_PORT4 ((ioport8_t *) 0x43U) 58 58 59 59 #define CLK_CONST 1193180 -
kernel/arch/ia32/src/drivers/i8259.c
r8e58f94 r7bdcc45 121 121 void pic_eoi(void) 122 122 { 123 pio_write_8((ioport8_t *) 0x20, 0x20);124 pio_write_8((ioport8_t *) 0xa0, 0x20);123 pio_write_8((ioport8_t *) 0x20, 0x20); 124 pio_write_8((ioport8_t *) 0xa0, 0x20); 125 125 } 126 126 -
kernel/arch/ia32/src/drivers/vesa.c
r8e58f94 r7bdcc45 70 70 bool vesa_init(void) 71 71 { 72 if ((vesa_width == 0xffff ) || (vesa_height == 0xffff))72 if ((vesa_width == 0xffffU) || (vesa_height == 0xffffU)) 73 73 return false; 74 74 -
kernel/arch/ia32/src/ia32.c
r8e58f94 r7bdcc45 211 211 * selector, and the descriptor->base is the correct address. 212 212 */ 213 unative_t sys_tls_set(unative_t addr)213 sysarg_t sys_tls_set(sysarg_t addr) 214 214 { 215 215 THREAD->arch.tls = addr; -
kernel/arch/ia32/src/interrupt.c
r8e58f94 r7bdcc45 65 65 void istate_decode(istate_t *istate) 66 66 { 67 printf("cs =%p\teip=%p\tefl=%p\terr=%p\n", 68 istate->cs, istate->eip, istate->eflags, istate->error_word); 69 70 printf("ds =%p\tes =%p\tfs =%p\tgs =%p\n", 67 printf("cs =%#0" PRIx32 "\teip=%p\t" 68 "efl=%#0" PRIx32 "\terr=%#0" PRIx32 "\n", 69 istate->cs, (void *) istate->eip, 70 istate->eflags, istate->error_word); 71 72 printf("ds =%#0" PRIx32 "\tes =%#0" PRIx32 "\t" 73 "fs =%#0" PRIx32 "\tgs =%#0" PRIx32 "\n", 71 74 istate->ds, istate->es, istate->fs, istate->gs); 75 72 76 if (istate_from_uspace(istate)) 73 printf("ss =%p\n", istate->ss); 74 75 printf("eax=%p\tebx=%p\tecx=%p\tedx=%p\n", 77 printf("ss =%#0" PRIx32 "\n", istate->ss); 78 79 printf("eax=%#0" PRIx32 "\tebx=%#0" PRIx32 "\t" 80 "ecx=%#0" PRIx32 "\tedx=%#0" PRIx32 "\n", 76 81 istate->eax, istate->ebx, istate->ecx, istate->edx); 82 77 83 printf("esi=%p\tedi=%p\tebp=%p\tesp=%p\n", 78 istate->esi, istate->edi, istate->ebp, 79 istate_from_uspace(istate) ? istate->esp : (uintptr_t)&istate->esp); 84 (void *) istate->esi, (void *) istate->edi, 85 (void *) istate->ebp, 86 istate_from_uspace(istate) ? ((void *) istate->esp) : 87 &istate->esp); 80 88 } 81 89 … … 139 147 ); 140 148 141 fault_if_from_uspace(istate, "SIMD FP exception(19), MXCSR=%#0 .8x.",142 (unative_t)mxcsr);143 panic_badtrap(istate, n, "SIMD FP exception , MXCSR=%#0.8x");149 fault_if_from_uspace(istate, "SIMD FP exception(19), MXCSR=%#0" PRIx32 ".", 150 mxcsr); 151 panic_badtrap(istate, n, "SIMD FP exception"); 144 152 } 145 153 -
kernel/arch/ia32/src/mm/frame.c
r8e58f94 r7bdcc45 44 44 #include <align.h> 45 45 #include <macros.h> 46 47 46 #include <print.h> 48 47 49 #define PHYSMEM_LIMIT32 0x07c000000ull50 #define PHYSMEM_LIMIT64 0x200000000ull48 #define PHYSMEM_LIMIT32 UINT64_C(0x07c000000) 49 #define PHYSMEM_LIMIT64 UINT64_C(0x200000000) 51 50 52 51 size_t hardcoded_unmapped_ktext_size = 0; -
kernel/arch/ia32/src/mm/page.c
r8e58f94 r7bdcc45 82 82 { 83 83 if (last_frame + ALIGN_UP(size, PAGE_SIZE) > KA2PA(KERNEL_ADDRESS_SPACE_END_ARCH)) 84 panic("Unable to map physical memory %p (%d bytes).", physaddr, size); 84 panic("Unable to map physical memory %p (%zu bytes).", 85 (void *) physaddr, size); 85 86 86 87 uintptr_t virtaddr = PA2KA(last_frame); -
kernel/arch/ia32/src/smp/apic.c
r8e58f94 r7bdcc45 72 72 * 73 73 */ 74 volatile uint32_t *l_apic = (uint32_t *) 0xfee00000;75 volatile uint32_t *io_apic = (uint32_t *) 0xfec00000;74 volatile uint32_t *l_apic = (uint32_t *) UINT32_C(0xfee00000); 75 volatile uint32_t *io_apic = (uint32_t *) UINT32_C(0xfec00000); 76 76 77 77 uint32_t apic_id_mask = 0; … … 184 184 * Other interrupts will be forwarded to the lowest priority CPU. 185 185 */ 186 io_apic_disable_irqs(0xffff );186 io_apic_disable_irqs(0xffffU); 187 187 188 188 irq_initialize(&l_apic_timer_irq); … … 477 477 { 478 478 #ifdef LAPIC_VERBOSE 479 printf("LVT on cpu% " PRIs ", LAPIC ID: %" PRIu8 "\n",479 printf("LVT on cpu%u, LAPIC ID: %" PRIu8 "\n", 480 480 CPU->id, l_apic_id()); 481 481 -
kernel/arch/ia32/src/smp/mps.c
r8e58f94 r7bdcc45 52 52 */ 53 53 54 #define FS_SIGNATURE 0x5f504d5f55 #define CT_SIGNATURE 0x504d435054 #define FS_SIGNATURE UINT32_C(0x5f504d5f) 55 #define CT_SIGNATURE UINT32_C(0x504d4350) 56 56 57 57 static struct mps_fs *fs;
Note:
See TracChangeset
for help on using the changeset viewer.
