Changeset ad7a6c9 in mainline for kernel/arch


Ignore:
Timestamp:
2011-03-30T13:10:24Z (15 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4ae90f9
Parents:
6e50466 (diff), d6b81941 (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
Files:
8 deleted
45 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/Makefile.inc

    r6e50466 rad7a6c9  
    3333
    3434FPU_NO_CFLAGS = -mno-sse -mno-sse2
    35 CMN1 = -m64 -mcmodel=large -mno-red-zone -fno-unwind-tables -fno-omit-frame-pointer
     35
     36#
     37# FIXME:
     38#
     39# The -fno-optimize-sibling-calls should be removed as soon as a bug
     40# in GCC concerning the "large" memory model and tail call optimization
     41# is fixed.
     42#
     43# If GCC generates a code for tail call, instead of generating ..
     44#
     45#   jmp *fnc
     46#
     47# it generates an assembly code with an illegal immediate prefix:
     48#
     49#   jmp *$fnc
     50#
     51
     52CMN1 = -m64 -mcmodel=large -mno-red-zone -fno-unwind-tables -fno-omit-frame-pointer -fno-optimize-sibling-calls
    3653GCC_CFLAGS += $(CMN1)
    3754ICC_CFLAGS += $(CMN1)
  • kernel/arch/amd64/_link.ld.in

    r6e50466 rad7a6c9  
    2626        .mapped (PA2KA(BOOT_OFFSET)+SIZEOF(.unmapped)) : AT (SIZEOF(.unmapped)) {
    2727                ktext_start = .;
    28                 *(.text);
     28                *(.text .text.*);
    2929                ktext_end = .;
    3030               
    3131                kdata_start = .;
    32                 *(.data);       /* initialized data */
    33                 *(.rodata*);    /* string literals */
     32                *(.data);              /* initialized data */
     33                *(.rodata .rodata.*);  /* string literals */
    3434                hardcoded_load_address = .;
    3535                QUAD(PA2KA(BOOT_OFFSET));
  • kernel/arch/amd64/include/interrupt.h

    r6e50466 rad7a6c9  
    5555#define IRQ_PIC_SPUR  7
    5656#define IRQ_MOUSE     12
    57 #define IRQ_DP8390    9
     57#define IRQ_NE2000    9
    5858
    5959/* This one must have four least significant bits set to ones */
     
    7474extern void (* enable_irqs_function)(uint16_t);
    7575extern void (* eoi_function)(void);
     76extern const char *irqs_info;
    7677
    7778extern void interrupt_init(void);
  • kernel/arch/amd64/src/amd64.c

    r6e50466 rad7a6c9  
    199199void arch_post_smp_init(void)
    200200{
     201        /* Currently the only supported platform for amd64 is 'pc'. */
     202        static const char *platform = "pc";
     203
     204        sysinfo_set_item_data("platform", NULL, (void *) platform,
     205            str_size(platform));
     206
    201207#ifdef CONFIG_PC_KBD
    202208        /*
     
    229235#endif
    230236       
    231         /*
    232          * This nasty hack should also go away ASAP.
    233          */
    234         trap_virtual_enable_irqs(1 << IRQ_DP8390);
    235         sysinfo_set_item_val("netif.dp8390.inr", NULL, IRQ_DP8390);
     237        if (irqs_info != NULL)
     238                sysinfo_set_item_val(irqs_info, NULL, true);
     239       
     240        sysinfo_set_item_val("netif.ne2000.inr", NULL, IRQ_NE2000);
    236241}
    237242
  • kernel/arch/amd64/src/asm.S

    r6e50466 rad7a6c9  
    3737.global read_efer_flag
    3838.global set_efer_flag
    39 .global memsetb
    40 .global memsetw
    41 .global memcpy
    4239.global memcpy_from_uspace
    4340.global memcpy_to_uspace
     
    4643.global early_putchar
    4744
    48 /* Wrapper for generic memsetb */
    49 memsetb:
    50         jmp _memsetb
    51 
    52 /* Wrapper for generic memsetw */
    53 memsetw:
    54         jmp _memsetw
    55 
    5645#define MEMCPY_DST   %rdi
    5746#define MEMCPY_SRC   %rsi
     
    7463 *
    7564 */
    76 memcpy:
    7765memcpy_from_uspace:
    7866memcpy_to_uspace:
  • kernel/arch/amd64/src/interrupt.c

    r6e50466 rad7a6c9  
    6262void (* enable_irqs_function)(uint16_t irqmask) = NULL;
    6363void (* eoi_function)(void) = NULL;
     64const char *irqs_info = NULL;
    6465
    6566void istate_decode(istate_t *istate)
  • kernel/arch/arm32/include/mach/integratorcp/integratorcp.h

    r6e50466 rad7a6c9  
    106106extern void icp_frame_init(void);
    107107extern size_t icp_get_irq_count(void);
     108extern const char *icp_get_platform_name(void);
    108109
    109110extern struct arm_machine_ops icp_machine_ops;
  • kernel/arch/arm32/include/mach/testarm/testarm.h

    r6e50466 rad7a6c9  
    7474extern void gxemul_frame_init(void);
    7575extern size_t gxemul_get_irq_count(void);
     76extern const char *gxemul_get_platform_name(void);
    7677
    7778extern struct arm_machine_ops gxemul_machine_ops;
  • kernel/arch/arm32/include/machine_func.h

    r6e50466 rad7a6c9  
    5656        void (*machine_input_init)(void);
    5757        size_t (*machine_get_irq_count)(void);
     58        const char *(*machine_get_platform_name)(void);
    5859};
    5960
  • kernel/arch/arm32/src/asm.S

    r6e50466 rad7a6c9  
    2929.text
    3030
    31 .global memsetb
    32 .global memsetw
    33 .global memcpy
    3431.global memcpy_from_uspace
    3532.global memcpy_to_uspace
     
    3835.global early_putchar
    3936
    40 memsetb:
    41         b _memsetb
    42 
    43 memsetw:
    44         b _memsetw
    45 
    46 memcpy:
    4737memcpy_from_uspace:
    4838memcpy_to_uspace:
  • kernel/arch/arm32/src/exception.c

    r6e50466 rad7a6c9  
    3535
    3636#include <arch/exception.h>
    37 #include <arch/memstr.h>
    3837#include <arch/regutils.h>
    3938#include <arch/machine_func.h>
  • kernel/arch/arm32/src/mach/gta02/gta02.c

    r6e50466 rad7a6c9  
    7171static void gta02_input_init(void);
    7272static size_t gta02_get_irq_count(void);
     73static const char *gta02_get_platform_name(void);
    7374
    7475static void gta02_timer_irq_init(void);
     
    9293        gta02_output_init,
    9394        gta02_input_init,
    94         gta02_get_irq_count
     95        gta02_get_irq_count,
     96        gta02_get_platform_name
    9597};
    9698
     
    172174                fb_parea.pbase = GTA02_FB_BASE;
    173175                fb_parea.frames = 150;
     176                fb_parea.unpriv = false;
    174177                ddi_parea_register(&fb_parea);
    175178        }
     
    235238}
    236239
     240const char *gta02_get_platform_name(void)
     241{
     242        return "gta02";
     243}
     244
    237245static void gta02_timer_irq_init(void)
    238246{
  • kernel/arch/arm32/src/mach/integratorcp/integratorcp.c

    r6e50466 rad7a6c9  
    6565        icp_output_init,
    6666        icp_input_init,
    67         icp_get_irq_count
     67        icp_get_irq_count,
     68        icp_get_platform_name
    6869};
    6970
     
    291292                .y = 480,
    292293                .scan = 2560,
    293                 .visual = VISUAL_BGR_0_8_8_8,
     294                .visual = VISUAL_RGB_8_8_8_0,
    294295        };
    295296       
     
    299300                fb_parea.pbase = ICP_FB;
    300301                fb_parea.frames = 300;
     302                fb_parea.unpriv = false;
    301303                ddi_parea_register(&fb_parea);
    302304        }
     
    342344}
    343345
     346const char *icp_get_platform_name(void)
     347{
     348        return "integratorcp";
     349}
     350
    344351/** @}
    345352 */
  • kernel/arch/arm32/src/mach/testarm/testarm.c

    r6e50466 rad7a6c9  
    6565        gxemul_output_init,
    6666        gxemul_input_init,
    67         gxemul_get_irq_count
     67        gxemul_get_irq_count,
     68        gxemul_get_platform_name
    6869};
    6970
     
    132133}
    133134
     135const char *gxemul_get_platform_name(void)
     136{
     137        return "gxemul";
     138}
     139
    134140/** Starts gxemul Real Time Clock device, which asserts regular interrupts.
    135141 *
  • kernel/arch/ia32/_link.ld.in

    r6e50466 rad7a6c9  
    2525        .mapped (PA2KA(BOOT_OFFSET)+SIZEOF(.unmapped)): AT (SIZEOF(.unmapped)) {
    2626                ktext_start = .;
    27                 *(.text);
     27                *(.text .text.*);
    2828                ktext_end = .;
    2929               
    3030                kdata_start = .;
    3131                *(.data);               /* initialized data */
    32                 *(.rodata*);            /* string literals */
     32                *(.rodata .rodata.*);   /* string literals */
    3333                *(COMMON);              /* global variables */
    3434                hardcoded_load_address = .;
     
    4949        }
    5050       
     51#ifdef CONFIG_LINE_DEBUG
     52        .comment 0 : { *(.comment); }
     53        .debug_abbrev 0 : { *(.debug_abbrev); }
     54        .debug_aranges 0 : { *(.debug_aranges); }
     55        .debug_info 0 : { *(.debug_info); }
     56        .debug_line 0 : { *(.debug_line); }
     57        .debug_loc 0 : { *(.debug_loc); }
     58        .debug_pubnames 0 : { *(.debug_pubnames); }
     59        .debug_pubtypes 0 : { *(.debug_pubtypes); }
     60        .debug_ranges 0 : { *(.debug_ranges); }
     61        .debug_str 0 : { *(.debug_str); }
     62#endif
     63       
    5164        /DISCARD/ : {
    52                 *(.note.GNU-stack);
    53                 *(.comment);
     65                *(*);
    5466        }
    5567       
  • kernel/arch/ia32/include/interrupt.h

    r6e50466 rad7a6c9  
    5555#define IRQ_PIC_SPUR  7
    5656#define IRQ_MOUSE     12
    57 #define IRQ_DP8390    9
     57#define IRQ_NE2000    5
    5858
    5959/* This one must have four least significant bits set to ones */
     
    7474extern void (* enable_irqs_function)(uint16_t);
    7575extern void (* eoi_function)(void);
     76extern const char *irqs_info;
    7677
    7778extern void interrupt_init(void);
  • kernel/arch/ia32/src/asm.S

    r6e50466 rad7a6c9  
    3838.global paging_on
    3939.global enable_l_apic_in_msr
    40 .global memsetb
    41 .global memsetw
    42 .global memcpy
    4340.global memcpy_from_uspace
    4441.global memcpy_from_uspace_failover_address
     
    4744.global early_putchar
    4845
    49 /* Wrapper for generic memsetb */
    50 memsetb:
    51         jmp _memsetb
    52 
    53 /* Wrapper for generic memsetw */
    54 memsetw:
    55         jmp _memsetw
    56 
    5746#define MEMCPY_DST   4
    5847#define MEMCPY_SRC   8
     
    7463 *
    7564 */
    76 memcpy:
    7765memcpy_from_uspace:
    7866memcpy_to_uspace:
  • kernel/arch/ia32/src/cpu/cpu.c

    r6e50466 rad7a6c9  
    9292void cpu_arch_init(void)
    9393{
    94         cpuid_extended_feature_info efi;
    9594        cpu_info_t info;
    9695        uint32_t help = 0;
     
    104103       
    105104        CPU->arch.fi.word = info.cpuid_edx;
    106         efi.word = info.cpuid_ecx;
    107105       
    108106        if (CPU->arch.fi.bits.fxsr)
  • kernel/arch/ia32/src/drivers/i8259.c

    r6e50466 rad7a6c9  
    8686        disable_irqs_function = pic_disable_irqs;
    8787        eoi_function = pic_eoi;
     88        irqs_info = "i8259";
    8889
    8990        pic_disable_irqs(0xffff);               /* disable all irq's */
  • kernel/arch/ia32/src/ia32.c

    r6e50466 rad7a6c9  
    157157void arch_post_smp_init(void)
    158158{
     159        /* Currently the only supported platform for ia32 is 'pc'. */
     160        static const char *platform = "pc";
     161
     162        sysinfo_set_item_data("platform", NULL, (void *) platform,
     163            str_size(platform));
     164
    159165#ifdef CONFIG_PC_KBD
    160166        /*
     
    187193#endif
    188194       
    189         /*
    190          * This nasty hack should also go away ASAP.
    191          */
    192         trap_virtual_enable_irqs(1 << IRQ_DP8390);
    193         sysinfo_set_item_val("netif.dp8390.inr", NULL, IRQ_DP8390);
     195        if (irqs_info != NULL)
     196                sysinfo_set_item_val(irqs_info, NULL, true);
     197       
     198        sysinfo_set_item_val("netif.ne2000.inr", NULL, IRQ_NE2000);
    194199}
    195200
  • kernel/arch/ia32/src/interrupt.c

    r6e50466 rad7a6c9  
    6262void (* enable_irqs_function)(uint16_t irqmask) = NULL;
    6363void (* eoi_function)(void) = NULL;
     64const char *irqs_info = NULL;
    6465
    6566void istate_decode(istate_t *istate)
  • kernel/arch/ia32/src/smp/apic.c

    r6e50466 rad7a6c9  
    178178        disable_irqs_function = io_apic_disable_irqs;
    179179        eoi_function = l_apic_eoi;
     180        irqs_info = "apic";
    180181       
    181182        /*
  • kernel/arch/ia64/_link.ld.in

    r6e50466 rad7a6c9  
    1616                ktext_start = .;
    1717                *(K_TEXT_START);
    18                 *(.text)
     18                *(.text .text.*)
    1919                ktext_end = .;
    2020               
     
    3636                *(.bss)
    3737                *(COMMON);
    38 
     38               
    3939                . = ALIGN(8);
    40                 symbol_table = .;
    41                 *(symtab.*);            /* Symbol table, must be LAST symbol!*/
    42 
     40                symbol_table = .;
     41                *(symtab.*);            /* Symbol table, must be LAST symbol!*/
     42               
    4343                kdata_end = .;
    4444        }
    45 
     45       
    4646        /DISCARD/ : {
    4747                *(*);
    4848        }
    49 
    5049}
  • kernel/arch/ia64/include/interrupt.h

    r6e50466 rad7a6c9  
    6161#define IRQ_KBD    (0x01 + LEGACY_INTERRUPT_BASE)
    6262#define IRQ_MOUSE  (0x0c + LEGACY_INTERRUPT_BASE)
    63 #define IRQ_DP8390 (0x09 + LEGACY_INTERRUPT_BASE)
     63#define IRQ_NE2000 (0x09 + LEGACY_INTERRUPT_BASE)
    6464
    6565/** General Exception codes. */
  • kernel/arch/ia64/src/asm.S

    r6e50466 rad7a6c9  
    3030
    3131.text
    32 .global memcpy
    3332.global memcpy_from_uspace
    3433.global memcpy_to_uspace
     
    3938 *
    4039 * This memcpy() has been taken from the assembler output of
    41  * the generic _memcpy() and modified to have the failover part.
     40 * a plain C implementation of memcpy() modified to have the
     41 * failover part.
    4242 *
    4343 * @param in0 Destination address.
     
    4646 *
    4747 */
    48 memcpy:
    4948memcpy_from_uspace:
    5049memcpy_to_uspace:
     
    141140        br.ret.sptk.many rp
    142141
    143 .global memsetb
    144 memsetb:
    145         br _memsetb
    146 
    147 .global memsetw
    148 memsetw:
    149         br _memsetw
    150 
    151142.global cpu_halt
    152143cpu_halt:
  • kernel/arch/ia64/src/ia64.c

    r6e50466 rad7a6c9  
    147147void arch_post_smp_init(void)
    148148{
     149        static const char *platform;
     150
     151        /* Set platform name. */
     152#ifdef MACHINE_ski
     153        platform = "pc";
     154#endif
     155#ifdef MACHINE_i460GX
     156        platform = "i460GX";
     157#endif
     158        sysinfo_set_item_data("platform", NULL, (void *) platform,
     159            str_size(platform));
     160
    149161#ifdef MACHINE_ski
    150162        ski_instance_t *ski_instance = skiin_init();
     
    210222#endif
    211223
    212         sysinfo_set_item_val("netif.dp8390.inr", NULL, IRQ_DP8390);
     224        sysinfo_set_item_val("netif.ne2000.inr", NULL, IRQ_NE2000);
    213225
    214226        sysinfo_set_item_val("ia64_iospace", NULL, true);
  • kernel/arch/ia64/src/mm/tlb.c

    r6e50466 rad7a6c9  
    475475void alternate_instruction_tlb_fault(uint64_t vector, istate_t *istate)
    476476{
    477         region_register_t rr;
    478         rid_t rid;
    479477        uintptr_t va;
    480478        pte_t *t;
    481479       
    482480        va = istate->cr_ifa; /* faulting address */
    483         rr.word = rr_read(VA2VRN(va));
    484         rid = rr.map.rid;
    485481       
    486482        page_table_lock(AS, true);
     
    649645void data_dirty_bit_fault(uint64_t vector, istate_t *istate)
    650646{
    651         region_register_t rr;
    652         rid_t rid;
    653647        uintptr_t va;
    654648        pte_t *t;
    655649       
    656650        va = istate->cr_ifa;  /* faulting address */
    657         rr.word = rr_read(VA2VRN(va));
    658         rid = rr.map.rid;
    659651       
    660652        page_table_lock(AS, true);
     
    686678void instruction_access_bit_fault(uint64_t vector, istate_t *istate)
    687679{
    688         region_register_t rr;
    689         rid_t rid;
    690680        uintptr_t va;
    691681        pte_t *t;
    692682       
    693683        va = istate->cr_ifa;  /* faulting address */
    694         rr.word = rr_read(VA2VRN(va));
    695         rid = rr.map.rid;
    696684       
    697685        page_table_lock(AS, true);
     
    723711void data_access_bit_fault(uint64_t vector, istate_t *istate)
    724712{
    725         region_register_t rr;
    726         rid_t rid;
    727713        uintptr_t va;
    728714        pte_t *t;
    729715       
    730716        va = istate->cr_ifa;  /* faulting address */
    731         rr.word = rr_read(VA2VRN(va));
    732         rid = rr.map.rid;
    733717       
    734718        page_table_lock(AS, true);
     
    760744void data_access_rights_fault(uint64_t vector, istate_t *istate)
    761745{
    762         region_register_t rr;
    763         rid_t rid;
    764746        uintptr_t va;
    765747        pte_t *t;
    766748       
    767749        va = istate->cr_ifa;  /* faulting address */
    768         rr.word = rr_read(VA2VRN(va));
    769         rid = rr.map.rid;
    770750       
    771751        /*
     
    792772void page_not_present(uint64_t vector, istate_t *istate)
    793773{
    794         region_register_t rr;
    795         rid_t rid;
    796774        uintptr_t va;
    797775        pte_t *t;
    798776       
    799777        va = istate->cr_ifa;  /* faulting address */
    800         rr.word = rr_read(VA2VRN(va));
    801         rid = rr.map.rid;
    802778       
    803779        page_table_lock(AS, true);
  • kernel/arch/mips32/include/cp0.h

    r6e50466 rad7a6c9  
    7070  { \
    7171      uint32_t retval; \
    72       asm("mfc0 %0, $" #reg : "=r"(retval)); \
     72      asm volatile ("mfc0 %0, $" #reg : "=r"(retval)); \
    7373      return retval; \
    7474  }
     
    7676#define GEN_WRITE_CP0(nm,reg) static inline void cp0_ ##nm##_write(uint32_t val) \
    7777 { \
    78     asm("mtc0 %0, $" #reg : : "r"(val) ); \
     78    asm volatile ("mtc0 %0, $" #reg : : "r"(val) ); \
    7979 }
    8080
  • kernel/arch/mips32/src/asm.S

    r6e50466 rad7a6c9  
    5757        nop
    5858
    59 .global memsetb
    60 memsetb:
    61         j _memsetb
    62         nop
    63 
    64 .global memsetw
    65 memsetw:
    66         j _memsetw
    67         nop
    68 
    69 .global memcpy
    7059.global memcpy_from_uspace
    7160.global memcpy_to_uspace
    7261.global memcpy_from_uspace_failover_address
    7362.global memcpy_to_uspace_failover_address
    74 memcpy:
    7563memcpy_from_uspace:
    7664memcpy_to_uspace:
  • kernel/arch/mips32/src/mips32.c

    r6e50466 rad7a6c9  
    168168void arch_post_smp_init(void)
    169169{
     170        static const char *platform;
     171
     172        /* Set platform name. */
     173#ifdef MACHINE_msim
     174        platform = "msim";
     175#endif
     176#ifdef MACHINE_bgxemul
     177        platform = "gxemul";
     178#endif
     179#ifdef MACHINE_lgxemul
     180        platform = "gxemul";
     181#endif
     182        sysinfo_set_item_data("platform", NULL, (void *) platform,
     183            str_size(platform));
     184
    170185#ifdef CONFIG_MIPS_KBD
    171186        /*
  • kernel/arch/mips32/src/mm/tlb.c

    r6e50466 rad7a6c9  
    557557        entry_hi_t hi, hi_save;
    558558        tlb_index_t index;
    559 
    560         ASSERT(asid != ASID_INVALID);
     559       
     560        if (asid == ASID_INVALID)
     561                return;
    561562
    562563        hi_save.value = cp0_entry_hi_read();
  • kernel/arch/ppc32/_link.ld.in

    r6e50466 rad7a6c9  
    3636                kdata_start = .;
    3737                *(K_DATA_START);
    38                 *(.rodata);
    39                 *(.rodata.*);
     38                *(.rodata .rodata.*);
    4039                *(.data);       /* initialized data */
    4140                *(.sdata);
  • kernel/arch/ppc32/src/asm.S

    r6e50466 rad7a6c9  
    3535.global iret
    3636.global iret_syscall
    37 .global memsetb
    38 .global memsetw
    39 .global memcpy
    4037.global memcpy_from_uspace
    4138.global memcpy_to_uspace
     
    208205        rfi
    209206
    210 memsetb:
    211         b _memsetb
    212 
    213 memsetw:
    214         b _memsetw
    215 
    216 memcpy:
    217207memcpy_from_uspace:
    218208memcpy_to_uspace:
  • kernel/arch/ppc32/src/ppc32.c

    r6e50466 rad7a6c9  
    249249void arch_post_smp_init(void)
    250250{
     251        /* Currently the only supported platform for ppc32 is 'mac'. */
     252        static const char *platform = "mac";
     253
     254        sysinfo_set_item_data("platform", NULL, (void *) platform,
     255            str_size(platform));
     256
    251257        ofw_tree_walk_by_device_type("mac-io", macio_register, NULL);
    252258}
  • kernel/arch/sparc64/_link.ld.in

    r6e50466 rad7a6c9  
    1515                ktext_start = .;
    1616                *(K_TEXT_START)
    17                 *(.text);
     17                *(.text .text.*);
    1818                ktext_end = .;
    1919               
    2020                kdata_start = .;
    2121                *(K_DATA_START)
    22                 *(.rodata);
    23                 *(.rodata.*);
     22                *(.rodata .rodata.*);
    2423                *(.data);                   /* initialized data */
    2524                *(.sdata);
  • kernel/arch/sparc64/src/asm.S

    r6e50466 rad7a6c9  
    3434.register %g2, #scratch
    3535.register %g3, #scratch
    36 
    37 /*
    38  * This is the assembly language version of our _memcpy() generated by gcc.
    39  */
    40 .global memcpy
    41 memcpy:
    42         mov %o0, %o3  /* save dst */
    43         add %o1, 7, %g1
    44         and %g1, -8, %g1
    45         cmp %o1, %g1
    46         be,pn %xcc, 3f
    47         add %o0, 7, %g1
    48         mov 0, %g3
    49        
    50         0:
    51        
    52                 brz,pn %o2, 2f
    53                 mov 0, %g2
    54        
    55         1:
    56        
    57                 ldub [%g3 + %o1], %g1
    58                 add %g2, 1, %g2
    59                 cmp %o2, %g2
    60                 stb %g1, [%g3 + %o0]
    61                 bne,pt %xcc, 1b
    62                 mov %g2, %g3
    63        
    64         2:
    65        
    66                 jmp %o7 + 8  /* exit point */
    67                 mov %o3, %o0
    68        
    69         3:
    70        
    71                 and %g1, -8, %g1
    72                 cmp %o0, %g1
    73                 bne,pt %xcc, 0b
    74                 mov 0, %g3
    75                 srlx %o2, 3, %g4
    76                 brz,pn %g4, 5f
    77                 mov 0, %g5
    78        
    79         4:
    80        
    81                 sllx %g3, 3, %g2
    82                 add %g5, 1, %g3
    83                 ldx [%o1 + %g2], %g1
    84                 mov %g3, %g5
    85                 cmp %g4, %g3
    86                 bne,pt %xcc, 4b
    87                 stx %g1, [%o0 + %g2]
    88        
    89         5:
    90        
    91                 and %o2, 7, %o2
    92                 brz,pn %o2, 2b
    93                 sllx %g4, 3, %g1
    94                 mov 0, %g2
    95                 add %g1, %o0, %o0
    96                 add %g1, %o1, %g4
    97                 mov 0, %g3
    98        
    99         6:
    100        
    101                 ldub [%g2 + %g4], %g1
    102                 stb %g1, [%g2 + %o0]
    103                 add %g3, 1, %g2
    104                 cmp %o2, %g2
    105                 bne,pt %xcc, 6b
    106                 mov %g2, %g3
    107                
    108                 jmp %o7 + 8  /* exit point */
    109                 mov %o3, %o0
    11036
    11137/*
     
    264190        mov %g0, %o0  /* return 0 on failure */
    265191
    266 .global memsetb
    267 memsetb:
    268         ba %xcc, _memsetb
    269         nop
    270 
    271 .global memsetw
    272 memsetw:
    273         ba %xcc, _memsetw
    274         nop
    275 
    276192.global early_putchar
    277193early_putchar:
  • kernel/arch/sparc64/src/drivers/niagara.c

    r6e50466 rad7a6c9  
    216216        outbuf_parea.pbase = (uintptr_t) (KA2PA(&output_buffer));
    217217        outbuf_parea.frames = 1;
     218        outbuf_parea.unpriv = false;
    218219        ddi_parea_register(&outbuf_parea);
    219220
     
    221222        inbuf_parea.pbase = (uintptr_t) (KA2PA(&input_buffer));
    222223        inbuf_parea.frames = 1;
     224        inbuf_parea.unpriv = false;
    223225        ddi_parea_register(&inbuf_parea);
    224226
  • kernel/arch/sparc64/src/mm/sun4u/as.c

    r6e50466 rad7a6c9  
    4343
    4444#include <arch/mm/tsb.h>
    45 #include <arch/memstr.h>
    4645#include <arch/asm.h>
    4746#include <mm/frame.h>
  • kernel/arch/sparc64/src/mm/sun4v/as.c

    r6e50466 rad7a6c9  
    4646
    4747#include <arch/mm/tsb.h>
    48 #include <arch/memstr.h>
    4948#include <arch/asm.h>
    5049#include <mm/frame.h>
  • kernel/arch/sparc64/src/smp/sun4v/smp.c

    r6e50466 rad7a6c9  
    11/*
    22 * Copyright (c) 2006 Jakub Jermar
    3  * Copyright (c) 2009 Pavel Rimsky 
     3 * Copyright (c) 2009 Pavel Rimsky
    44 * All rights reserved.
    55 *
     
    439439        if (waitq_sleep_timeout(&ap_completion_wq, 10000000, SYNCH_FLAGS_NONE) ==
    440440            ESYNCH_TIMEOUT)
    441                 printf("%s: waiting for processor (cpuid = %" PRIu32 ") timed out\n",
     441                printf("%s: waiting for processor (cpuid = %" PRIu64 ") timed out\n",
    442442                    __func__, cpuid);
    443443       
  • kernel/arch/sparc64/src/sun4u/sparc64.c

    r6e50466 rad7a6c9  
    5050#include <ddi/irq.h>
    5151#include <str.h>
     52#include <sysinfo/sysinfo.h>
    5253
    5354memmap_t memmap;
     
    111112void arch_post_smp_init(void)
    112113{
     114        /* Currently the only supported platform for sparc64/sun4u is 'sun4u'. */
     115        static const char *platform = "sun4u";
     116
     117        sysinfo_set_item_data("platform", NULL, (void *) platform,
     118            str_size(platform));
     119
    113120        standalone_sparc64_console_init();
    114121}
  • kernel/arch/sparc64/src/sun4v/asm.S

    r6e50466 rad7a6c9  
    4141.global switch_to_userspace
    4242switch_to_userspace:
    43         wrpr PSTATE_PRIV_BIT, %pstate
    44         save %o1, -STACK_WINDOW_SAVE_AREA_SIZE, %sp
     43        save %o1, -(STACK_WINDOW_SAVE_AREA_SIZE + STACK_ARG_SAVE_AREA_SIZE), %sp
    4544        flushw
    4645        wrpr %g0, 0, %cleanwin          ! avoid information leak
  • kernel/arch/sparc64/src/sun4v/sparc64.c

    r6e50466 rad7a6c9  
    5252#include <str.h>
    5353#include <arch/drivers/niagara.h>
     54#include <sysinfo/sysinfo.h>
    5455
    5556memmap_t memmap;
     
    109110void arch_post_smp_init(void)
    110111{
     112        /* Currently the only supported platform for sparc64/sun4v is 'sun4v'. */
     113        static const char *platform = "sun4v";
     114
     115        sysinfo_set_item_data("platform", NULL, (void *) platform,
     116            str_size(platform));
     117
    111118        niagarain_init();
    112119}
  • kernel/arch/sparc64/src/sun4v/start.S

    r6e50466 rad7a6c9  
    296296         * Create the first stack frame.
    297297         */
    298         save %sp, -(STACK_WINDWO_SAVE_AREA_SIZE + STACK_ARG_SAVE_AREA_SIZE), %sp
     298        save %sp, -(STACK_WINDOW_SAVE_AREA_SIZE + STACK_ARG_SAVE_AREA_SIZE), %sp
    299299        flushw
    300300        add %g0, -STACK_BIAS, %fp
  • kernel/arch/sparc64/src/trap/sun4v/interrupt.c

    r6e50466 rad7a6c9  
    111111                        ((void (*)(void)) data1)();
    112112                } else {
    113                         printf("Spurious interrupt on %d, data = %" PRIx64 ".\n",
     113                        printf("Spurious interrupt on %" PRIu64 ", data = %" PRIx64 ".\n",
    114114                            CPU->arch.id, data1);
    115115                }
Note: See TracChangeset for help on using the changeset viewer.