Changeset 6da1013f in mainline for kernel/arch/mips32/src


Ignore:
Timestamp:
2009-02-12T20:09:19Z (16 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
84266669
Parents:
7004747
Message:

simplify configuration
introduce arch_construct_function and inb/outb (sometimes empty) on all platforms
various code cleanup

Location:
kernel/arch/mips32/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/mips32/src/asm.S

    r7004747 r6da1013f  
    160160.global fpu_context_save
    161161fpu_context_save:
    162 #ifdef ARCH_HAS_FPU
     162#ifdef CONFIG_FPU
    163163        fpu_gp_save 0,$a0
    164164        fpu_gp_save 1,$a0
     
    231231.global fpu_context_restore
    232232fpu_context_restore:
    233 #ifdef ARCH_HAS_FPU
     233#ifdef CONFIG_FPU
    234234        fpu_gp_restore 0,$a0
    235235        fpu_gp_restore 1,$a0
  • kernel/arch/mips32/src/drivers/msim.c

    r7004747 r6da1013f  
    7777}
    7878
    79 #include <print.h>
    8079/** Read character using polling, assume interrupts disabled */
    8180static char msim_do_read(chardev_t *dev)
  • kernel/arch/mips32/src/fpu_context.c

    r7004747 r6da1013f  
    4141void fpu_disable(void)
    4242{       
    43 #ifdef ARCH_HAS_FPU
     43#ifdef CONFIG_FPU
    4444        cp0_status_write(cp0_status_read() & ~cp0_status_fpu_bit);
    4545#endif
     
    4848void fpu_enable(void)
    4949{
    50 #ifdef ARCH_HAS_FPU
     50#ifdef CONFIG_FPU
    5151        cp0_status_write(cp0_status_read() | cp0_status_fpu_bit);
    5252#endif
  • kernel/arch/mips32/src/mips32.c

    r7004747 r6da1013f  
    112112        cp0_status_write(cp0_status_read() &
    113113            ~(cp0_status_bev_bootstrap_bit | cp0_status_erl_error_bit));
    114 
    115         /* 
    116          * Mask all interrupts 
     114       
     115        /*
     116         * Mask all interrupts
    117117         */
    118118        cp0_mask_all_int();
    119                
     119       
    120120        debugger_init();
    121121}
     
    133133                .y = 480,
    134134                .scan = 1920,
    135                 .visual = VISUAL_RGB_8_8_8,
     135                .visual = VISUAL_BGR_8_8_8,
    136136        };
    137137        fb_init(&gxemul_prop);
    138138#endif
    139         sysinfo_set_item_val("machine." STRING(MACHINE), NULL, 1);
     139
     140#ifdef msim
     141        sysinfo_set_item_val("machine.msim", NULL, 1);
     142#endif
     143
     144#ifdef simics
     145        sysinfo_set_item_val("machine.simics", NULL, 1);
     146#endif
     147
     148#ifdef bgxemul
     149        sysinfo_set_item_val("machine.bgxemul", NULL, 1);
     150#endif
     151
     152#ifdef lgxemul
     153        sysinfo_set_item_val("machine.lgxemul", NULL, 1);
     154#endif
    140155}
    141156
     
    162177            (uintptr_t) kernel_uarg->uspace_entry);
    163178       
    164         while (1)
    165                 ;
     179        while (1);
    166180}
    167181
     
    196210        ___halt();
    197211       
    198         while (1)
    199                 ;
     212        while (1);
     213}
     214
     215/** Construct function pointer
     216 *
     217 * @param fptr   function pointer structure
     218 * @param addr   function address
     219 * @param caller calling function address
     220 *
     221 * @return address of the function pointer
     222 *
     223 */
     224void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller)
     225{
     226        return addr;
    200227}
    201228
  • kernel/arch/mips32/src/mm/frame.c

    r7004747 r6da1013f  
    7676static bool frame_available(pfn_t frame)
    7777{
    78 #if MACHINE == msim
     78#ifdef msim
    7979        /* MSIM device (dprinter) */
    8080        if (frame == (KA2PA(MSIM_VIDEORAM) >> ZERO_PAGE_WIDTH))
     
    8686#endif
    8787
    88 #if MACHINE == simics
     88#ifdef simics
    8989        /* Simics device (serial line) */
    9090        if (frame == (KA2PA(SERIAL_ADDRESS) >> ZERO_PAGE_WIDTH))
     
    9292#endif
    9393
    94 #if (MACHINE == lgxemul) || (MACHINE == bgxemul)
     94#if defined(lgxemul) || defined(bgxemul)
    9595        /* gxemul devices */
    9696        if (overlaps(frame << ZERO_PAGE_WIDTH, ZERO_PAGE_SIZE,
     
    219219                                        if (ZERO_PAGE_VALUE != 0xdeadbeef)
    220220                                                avail = false;
    221 #if (MACHINE == lgxemul) || (MACHINE == bgxemul)
     221#if defined(lgxemul) || defined(bgxemul)
    222222                                        else {
    223223                                                ZERO_PAGE_VALUE_KSEG1(frame) = 0xaabbccdd;
Note: See TracChangeset for help on using the changeset viewer.