Changeset 7bdcc45 in mainline for kernel/arch/ia32/src


Ignore:
Timestamp:
2010-12-16T16:38:49Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
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.
Message:

Merge mainline changes.

Location:
kernel/arch/ia32/src
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/bios/bios.c

    r8e58f94 r7bdcc45  
    3636#include <typedefs.h>
    3737
    38 #define BIOS_EBDA_PTR  0x40e
     38#define BIOS_EBDA_PTR  0x40eU
    3939
    4040uintptr_t ebda = 0;
     
    4343{
    4444        /* 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;
    4646}
    4747
  • kernel/arch/ia32/src/boot/memmap.c

    r8e58f94 r7bdcc45  
    3535#include <arch/boot/memmap.h>
    3636
    37 uint8_t e820counter = 0xff;
     37uint8_t e820counter = 0xffU;
    3838e820memmap_t e820table[MEMMAP_E820_MAX_RECORDS];
    3939
  • kernel/arch/ia32/src/cpu/cpu.c

    r8e58f94 r7bdcc45  
    4949 * Contains only non-MP-Specification specific SMP code.
    5050 */
    51 #define AMD_CPUID_EBX  0x68747541
    52 #define AMD_CPUID_ECX  0x444d4163
    53 #define AMD_CPUID_EDX  0x69746e65
     51#define AMD_CPUID_EBX  UINT32_C(0x68747541)
     52#define AMD_CPUID_ECX  UINT32_C(0x444d4163)
     53#define AMD_CPUID_EDX  UINT32_C(0x69746e65)
    5454
    55 #define INTEL_CPUID_EBX  0x756e6547
    56 #define INTEL_CPUID_ECX  0x6c65746e
    57 #define INTEL_CPUID_EDX  0x49656e69
     55#define INTEL_CPUID_EBX  UINT32_C(0x756e6547)
     56#define INTEL_CPUID_ECX  UINT32_C(0x6c65746e)
     57#define INTEL_CPUID_EDX  UINT32_C(0x49656e69)
    5858
    5959
     
    140140                if ((info.cpuid_ebx == AMD_CPUID_EBX)
    141141                    && (info.cpuid_ecx == AMD_CPUID_ECX)
    142                         && (info.cpuid_edx == AMD_CPUID_EDX))
     142                    && (info.cpuid_edx == AMD_CPUID_EDX))
    143143                        CPU->arch.vendor = VendorAMD;
    144144               
    145145                /*
    146146                 * Check for Intel processor.
    147                  */             
     147                 */
    148148                if ((info.cpuid_ebx == INTEL_CPUID_EBX)
    149149                    && (info.cpuid_ecx == INTEL_CPUID_ECX)
    150                         && (info.cpuid_edx == INTEL_CPUID_EDX))
     150                    && (info.cpuid_edx == INTEL_CPUID_EDX))
    151151                        CPU->arch.vendor = VendorIntel;
    152152               
    153153                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;
    157157        }
    158158}
  • kernel/arch/ia32/src/debug/stacktrace.c

    r8e58f94 r7bdcc45  
    3737#include <typedefs.h>
    3838
    39 #define FRAME_OFFSET_FP_PREV    0
    40 #define FRAME_OFFSET_RA         1
     39#define FRAME_OFFSET_FP_PREV  0
     40#define FRAME_OFFSET_RA       1
    4141
    4242bool kernel_stack_trace_context_validate(stack_trace_context_t *ctx)
  • kernel/arch/ia32/src/drivers/i8254.c

    r8e58f94 r7bdcc45  
    5454#include <ddi/device.h>
    5555
    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)
    5858
    5959#define CLK_CONST     1193180
  • kernel/arch/ia32/src/drivers/i8259.c

    r8e58f94 r7bdcc45  
    121121void pic_eoi(void)
    122122{
    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);
    125125}
    126126
  • kernel/arch/ia32/src/drivers/vesa.c

    r8e58f94 r7bdcc45  
    7070bool vesa_init(void)
    7171{
    72         if ((vesa_width == 0xffff) || (vesa_height == 0xffff))
     72        if ((vesa_width == 0xffffU) || (vesa_height == 0xffffU))
    7373                return false;
    7474       
  • kernel/arch/ia32/src/ia32.c

    r8e58f94 r7bdcc45  
    211211 * selector, and the descriptor->base is the correct address.
    212212 */
    213 unative_t sys_tls_set(unative_t addr)
     213sysarg_t sys_tls_set(sysarg_t addr)
    214214{
    215215        THREAD->arch.tls = addr;
  • kernel/arch/ia32/src/interrupt.c

    r8e58f94 r7bdcc45  
    6565void istate_decode(istate_t *istate)
    6666{
    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",
    7174            istate->ds, istate->es, istate->fs, istate->gs);
     75       
    7276        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",
    7681            istate->eax, istate->ebx, istate->ecx, istate->edx);
     82       
    7783        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);
    8088}
    8189
     
    139147        );
    140148       
    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");
    144152}
    145153
  • kernel/arch/ia32/src/mm/frame.c

    r8e58f94 r7bdcc45  
    4444#include <align.h>
    4545#include <macros.h>
    46 
    4746#include <print.h>
    4847
    49 #define PHYSMEM_LIMIT32  0x07c000000ull
    50 #define PHYSMEM_LIMIT64  0x200000000ull
     48#define PHYSMEM_LIMIT32  UINT64_C(0x07c000000)
     49#define PHYSMEM_LIMIT64  UINT64_C(0x200000000)
    5150
    5251size_t hardcoded_unmapped_ktext_size = 0;
  • kernel/arch/ia32/src/mm/page.c

    r8e58f94 r7bdcc45  
    8282{
    8383        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);
    8586       
    8687        uintptr_t virtaddr = PA2KA(last_frame);
  • kernel/arch/ia32/src/smp/apic.c

    r8e58f94 r7bdcc45  
    7272 *
    7373 */
    74 volatile uint32_t *l_apic = (uint32_t *) 0xfee00000;
    75 volatile uint32_t *io_apic = (uint32_t *) 0xfec00000;
     74volatile uint32_t *l_apic = (uint32_t *) UINT32_C(0xfee00000);
     75volatile uint32_t *io_apic = (uint32_t *) UINT32_C(0xfec00000);
    7676
    7777uint32_t apic_id_mask = 0;
     
    184184         * Other interrupts will be forwarded to the lowest priority CPU.
    185185         */
    186         io_apic_disable_irqs(0xffff);
     186        io_apic_disable_irqs(0xffffU);
    187187       
    188188        irq_initialize(&l_apic_timer_irq);
     
    477477{
    478478#ifdef LAPIC_VERBOSE
    479         printf("LVT on cpu%" PRIs ", LAPIC ID: %" PRIu8 "\n",
     479        printf("LVT on cpu%u, LAPIC ID: %" PRIu8 "\n",
    480480            CPU->id, l_apic_id());
    481481       
  • kernel/arch/ia32/src/smp/mps.c

    r8e58f94 r7bdcc45  
    5252 */
    5353
    54 #define FS_SIGNATURE  0x5f504d5f
    55 #define CT_SIGNATURE  0x504d4350
     54#define FS_SIGNATURE  UINT32_C(0x5f504d5f)
     55#define CT_SIGNATURE  UINT32_C(0x504d4350)
    5656
    5757static struct mps_fs *fs;
Note: See TracChangeset for help on using the changeset viewer.