Changeset 8565a42 in mainline for boot/arch/mips32


Ignore:
Timestamp:
2018-03-02T20:34:50Z (8 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (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.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

Location:
boot/arch/mips32
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/mips32/_link.ld.in

    r3061bc1 r8565a42  
    2323                *(.components);
    2424        }
    25        
     25
    2626        /DISCARD/ : {
    2727                *(.gnu.*);
  • boot/arch/mips32/src/asm.S

    r3061bc1 r8565a42  
    5555        sw $a3, 0($a0)
    5656#endif
    57        
     57
    5858        /*
    5959         * Setup CPU map (on msim this code
     
    6262         */
    6363        la $a0, PA2KA(CPUMAP_OFFSET)
    64        
     64
    6565        sw $zero, 0($a0)
    6666        sw $zero, 4($a0)
    6767        sw $zero, 8($a0)
    6868        sw $zero, 12($a0)
    69        
     69
    7070        sw $zero, 16($a0)
    7171        sw $zero, 20($a0)
    7272        sw $zero, 24($a0)
    7373        sw $zero, 28($a0)
    74        
     74
    7575        sw $zero, 32($a0)
    7676        sw $zero, 36($a0)
    7777        sw $zero, 40($a0)
    7878        sw $zero, 44($a0)
    79        
     79
    8080        sw $zero, 48($a0)
    8181        sw $zero, 52($a0)
    8282        sw $zero, 56($a0)
    8383        sw $zero, 60($a0)
    84        
     84
    8585        sw $zero, 64($a0)
    8686        sw $zero, 68($a0)
    8787        sw $zero, 72($a0)
    8888        sw $zero, 76($a0)
    89        
     89
    9090        sw $zero, 80($a0)
    9191        sw $zero, 84($a0)
    9292        sw $zero, 88($a0)
    9393        sw $zero, 92($a0)
    94        
     94
    9595        sw $zero, 96($a0)
    9696        sw $zero, 100($a0)
    9797        sw $zero, 104($a0)
    9898        sw $zero, 108($a0)
    99        
     99
    100100        sw $zero, 112($a0)
    101101        sw $zero, 116($a0)
    102102        sw $zero, 120($a0)
    103103        sw $zero, 124($a0)
    104        
     104
    105105        lui $a1, 1
    106        
     106
    107107#ifdef MACHINE_msim
    108        
     108
    109109        /* Read dorder value */
    110110        la $k0, MSIM_DORDER_ADDRESS
    111111        lw $k1, ($k0)
    112        
     112
    113113        /*
    114114         * If we are not running on BSP
     
    117117        beq $k1, $zero, bsp
    118118        nop
    119        
     119
    120120        /* Record CPU presence */
    121121        sll $a2, $k1, 2
    122122        addu $a2, $a2, $a0
    123123        sw $a1, ($a2)
    124        
     124
    125125        loop:
    126126                j loop
    127127                nop
    128        
     128
    129129#endif
    130        
     130
    131131        bsp:
    132132                /* Record CPU presence */
    133133                sw $a1, ($a0)
    134                
     134
    135135                /* Setup initial stack */
    136136                la $sp, PA2KA(STACK_OFFSET)
    137                
     137
    138138                j bootstrap
    139139                nop
  • boot/arch/mips32/src/boot.S

    r3061bc1 r8565a42  
    3838.global start
    3939start:
    40        
     40
    4141        /* Setup CPU map (on msim this code
    4242           is executed in parallel on all CPUs,
    4343           but it not an issue) */
    4444        la $a0, CPUMAP
    45        
     45
    4646        sw $zero, 0($a0)
    4747        sw $zero, 4($a0)
    4848        sw $zero, 8($a0)
    4949        sw $zero, 12($a0)
    50        
     50
    5151        sw $zero, 16($a0)
    5252        sw $zero, 20($a0)
    5353        sw $zero, 24($a0)
    5454        sw $zero, 28($a0)
    55        
     55
    5656        sw $zero, 32($a0)
    5757        sw $zero, 36($a0)
    5858        sw $zero, 40($a0)
    5959        sw $zero, 44($a0)
    60        
     60
    6161        sw $zero, 48($a0)
    6262        sw $zero, 52($a0)
    6363        sw $zero, 56($a0)
    6464        sw $zero, 60($a0)
    65        
     65
    6666        sw $zero, 64($a0)
    6767        sw $zero, 68($a0)
    6868        sw $zero, 72($a0)
    6969        sw $zero, 76($a0)
    70        
     70
    7171        sw $zero, 80($a0)
    7272        sw $zero, 84($a0)
    7373        sw $zero, 88($a0)
    7474        sw $zero, 92($a0)
    75        
     75
    7676        sw $zero, 96($a0)
    7777        sw $zero, 100($a0)
    7878        sw $zero, 104($a0)
    7979        sw $zero, 108($a0)
    80        
     80
    8181        sw $zero, 112($a0)
    8282        sw $zero, 116($a0)
    8383        sw $zero, 120($a0)
    8484        sw $zero, 124($a0)
    85        
     85
    8686        lui $a1, 1
    87        
     87
    8888#ifdef MACHINE_msim
    89        
     89
    9090        /* Read dorder value */
    9191        la $k0, MSIM_DORDER_ADDRESS
    9292        lw $k1, ($k0)
    93        
     93
    9494        /* If we are not running on BSP
    9595           then end in an infinite loop  */
    9696        beq $k1, $zero, bsp
    9797        nop
    98        
     98
    9999        /* Record CPU presence */
    100100        sll $a2, $k1, 2
    101101        addu $a2, $a2, $a0
    102102        sw $a1, ($a2)
    103        
     103
    104104        loop:
    105105                j loop
    106106                nop
    107        
     107
    108108#endif
    109        
     109
    110110        bsp:
    111111                /* Record CPU presence */
    112112                sw $a1, ($a0)
    113                
     113
    114114                /* Setup initial stack */
    115115                la $sp, INITIAL_STACK
    116                
     116
    117117                j bootstrap
    118118                nop
  • boot/arch/mips32/src/main.c

    r3061bc1 r8565a42  
    4949{
    5050        version_print();
    51        
     51
    5252        printf("\nMemory statistics\n");
    5353        printf(" %p|%p: CPU map\n", (void *) PA2KA(CPUMAP_OFFSET),
     
    6161        printf(" %p|%p: bootloader entry point\n",
    6262            (void *) PA2KA(LOADER_OFFSET), (void *) LOADER_OFFSET);
    63        
     63
    6464        size_t i;
    6565        for (i = 0; i < COMPONENTS; i++)
     
    7070                    components[i].name, components[i].inflated,
    7171                    components[i].size);
    72        
     72
    7373        void *dest[COMPONENTS];
    7474        size_t top = 0;
     
    7777        for (i = 0; i < min(COMPONENTS, TASKMAP_MAX_RECORDS); i++) {
    7878                top = ALIGN_UP(top, PAGE_SIZE);
    79                
     79
    8080                if (i > 0) {
    8181                        bootinfo->tasks[bootinfo->cnt].addr = TOP2ADDR(top);
    8282                        bootinfo->tasks[bootinfo->cnt].size = components[i].inflated;
    83                        
     83
    8484                        str_cpy(bootinfo->tasks[bootinfo->cnt].name,
    8585                            BOOTINFO_TASK_NAME_BUFLEN, components[i].name);
    86                        
     86
    8787                        bootinfo->cnt++;
    8888                }
    89                
     89
    9090                dest[i] = TOP2ADDR(top);
    9191                top += components[i].inflated;
    9292                cnt++;
    9393        }
    94        
     94
    9595        printf("\nInflating components ... ");
    96        
     96
    9797        for (i = cnt; i > 0; i--) {
    9898#ifdef MACHINE_msim
     
    104104                }
    105105#endif
    106                
     106
    107107                printf("%s ", components[i - 1].name);
    108                
     108
    109109                int err = inflate(components[i - 1].addr, components[i - 1].size,
    110110                    dest[i - 1], components[i - 1].inflated);
    111                
     111
    112112                if (err != EOK) {
    113113                        printf("\n%s: Inflating error %d, halting.\n",
     
    116116                }
    117117        }
    118        
     118
    119119        printf(".\n");
    120        
     120
    121121        printf("Copying CPU map ... \n");
    122        
     122
    123123        bootinfo->cpumap = 0;
    124124        for (i = 0; i < CPUMAP_MAX_RECORDS; i++) {
     
    126126                        bootinfo->cpumap |= (1 << i);
    127127        }
    128        
     128
    129129        printf("Booting the kernel ... \n");
    130130        jump_to_kernel((void *) PA2KA(BOOT_OFFSET), bootinfo);
Note: See TracChangeset for help on using the changeset viewer.