Ignore:
Timestamp:
2018-03-02T20:10:49Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1380b7
Parents:
3061bc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/amd64/src/boot/multiboot2.S

    r3061bc1 ra35b458  
    4747        .long multiboot2_header_end - multiboot2_header_start
    4848        .long -(MULTIBOOT2_HEADER_MAGIC + MULTIBOOT2_HEADER_ARCH_I386 + (multiboot2_header_end - multiboot2_header_start))
    49        
     49
    5050        /* Information request tag */
    5151        .align 8
     
    6161#endif
    6262        tag_info_req_end:
    63        
     63
    6464        /* Address tag */
    6565        .align 8
     
    7373                .long 0
    7474        tag_address_end:
    75        
     75
    7676        /* Entry address tag */
    7777        .align 8
     
    8282                .long multiboot2_image_start
    8383        tag_entry_address_end:
    84        
     84
    8585        /* Flags tag */
    8686        .align 8
     
    9191                .long MULTIBOOT2_FLAGS_CONSOLE
    9292        tag_flags_end:
    93        
     93
    9494#ifdef CONFIG_FB
    9595        /* Framebuffer tag */
     
    104104        tag_framebuffer_end:
    105105#endif
    106        
     106
    107107        /* Module alignment tag */
    108108        .align 8
     
    113113                .long 0
    114114        tag_module_align_end:
    115        
     115
    116116        /* Tag terminator */
    117117        .align 8
     
    126126        cli
    127127        cld
    128        
     128
    129129        /* Initialize stack pointer */
    130130        movl $START_STACK, %esp
    131        
     131
    132132        /*
    133133         * Initialize Global Descriptor Table and
     
    136136        lgdtl bootstrap_gdtr
    137137        lidtl bootstrap_idtr
    138        
     138
    139139        /* Kernel data + stack */
    140140        movw $GDT_SELECTOR(KDATA_DES), %cx
     
    142142        movw %cx, %ds
    143143        movw %cx, %ss
    144        
     144
    145145        /*
    146146         * Simics seems to remove hidden part of GS on entering user mode
     
    150150        movw %cx, %fs
    151151        movw %cx, %gs
    152        
     152
    153153        jmpl $GDT_SELECTOR(KTEXT32_DES), $multiboot2_meeting_point
    154154        multiboot2_meeting_point:
    155        
     155
    156156        /*
    157157         * Protected 32-bit. We want to reuse the code-seg descriptor,
    158158         * the Default operand size must not be 1 when entering long mode.
    159159         */
    160        
     160
    161161        /* Save multiboot arguments */
    162162        movl %eax, multiboot_eax
    163163        movl %ebx, multiboot_ebx
    164        
     164
    165165        movl $(INTEL_CPUID_EXTENDED), %eax
    166166        cpuid
    167167        cmp $(INTEL_CPUID_EXTENDED), %eax
    168168        ja extended_cpuid_supported
    169        
    170                 jmp pm_error_halt
    171        
     169
     170                jmp pm_error_halt
     171
    172172        extended_cpuid_supported:
    173        
     173
    174174        movl $(AMD_CPUID_EXTENDED), %eax
    175175        cpuid
    176176        bt $(AMD_EXT_LONG_MODE), %edx
    177177        jc long_mode_supported
    178        
    179                 jmp pm_error_halt
    180        
     178
     179                jmp pm_error_halt
     180
    181181        long_mode_supported:
    182        
     182
    183183        bt $(AMD_EXT_NOEXECUTE), %edx
    184184        jc noexecute_supported
    185        
    186                 jmp pm_error_halt
    187        
     185
     186                jmp pm_error_halt
     187
    188188        noexecute_supported:
    189        
     189
    190190        movl $(INTEL_CPUID_STANDARD), %eax
    191191        cpuid
    192192        bt $(INTEL_FXSAVE), %edx
    193193        jc fx_supported
    194        
    195                 jmp pm_error_halt
    196        
     194
     195                jmp pm_error_halt
     196
    197197        fx_supported:
    198        
     198
    199199        bt $(INTEL_SSE2), %edx
    200200        jc sse2_supported
    201        
    202                 jmp pm_error_halt
    203        
     201
     202                jmp pm_error_halt
     203
    204204        sse2_supported:
    205        
     205
    206206        /*
    207207         * Enable 64-bit page translation entries - CR4.PAE = 1.
    208208         * Paging is not enabled until after long mode is enabled.
    209209         */
    210        
     210
    211211        movl %cr4, %eax
    212212        orl $CR4_PAE, %eax
    213213        movl %eax, %cr4
    214        
     214
    215215        /* Set up paging tables */
    216216        leal ptl_0, %eax
    217217        movl %eax, %cr3
    218        
     218
    219219        /* Enable long mode */
    220220        movl $AMD_MSR_EFER, %ecx
     
    222222        orl $AMD_LME, %eax        /* set LME = 1 */
    223223        wrmsr
    224        
     224
    225225        /* Enable paging to activate long mode (set CR0.PG = 1) */
    226226        movl %cr0, %eax
    227227        orl $CR0_PG, %eax
    228228        movl %eax, %cr0
    229        
     229
    230230        /* At this point we are in compatibility mode */
    231231        jmpl $GDT_SELECTOR(KTEXT_DES), $start64
     
    240240
    241241start64:
    242        
     242
    243243        /*
    244244         * Long mode.
    245245         */
    246        
     246
    247247        movq $(PA2KA(START_STACK)), %rsp
    248        
     248
    249249        /* Create the first stack frame */
    250250        pushq $0
    251251        movq %rsp, %rbp
    252        
     252
    253253        /* Call amd64_pre_main(multiboot_eax, multiboot_ebx) */
    254254        movl multiboot_eax, %edi
    255255        movl multiboot_ebx, %esi
    256        
     256
    257257#ifdef MEMORY_MODEL_large
    258258        movabsq $amd64_pre_main, %rax
     
    261261        callq amd64_pre_main
    262262#endif
    263        
     263
    264264        /* Call main_bsp() */
    265265#ifdef MEMORY_MODEL_large
     
    269269        callq main_bsp
    270270#endif
    271        
     271
    272272        /* Not reached */
    273273        cli
Note: See TracChangeset for help on using the changeset viewer.