Changes in / [28f4adb:e06ef614] in mainline


Ignore:
Files:
5 edited

Legend:

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

    r28f4adb re06ef614  
    9595memcpy_from_uspace_failover_address:
    9696memcpy_to_uspace_failover_address:
    97         xorq %rax, %rax         /* return 0, failure */
     97        xorl %eax, %eax         /* return 0, failure */
    9898        ret
    9999
     
    143143
    144144set_efer_flag:
    145         movq $0xc0000080, %rcx
     145        movl $0xc0000080, %ecx
    146146        rdmsr
    147147        btsl %edi, %eax
     
    150150
    151151read_efer_flag:
    152         movq $0xc0000080, %rcx
     152        movl $0xc0000080, %ecx
    153153        rdmsr
    154154        ret
     
    243243         * Stop stack traces here if we came from userspace.
    244244         */
    245         xorq %rdx, %rdx
     245        xorl %edx, %edx
    246246        cmpq $(GDT_SELECTOR(KTEXT_DES)), ISTATE_OFFSET_CS(%rsp)
    247247        cmovnzq %rdx, %rbp
     
    386386        movq ISTATE_OFFSET_RSP(%rsp), %rsp
    387387
     388        /*
     389         * Clear the rest of the scratch registers to prevent information leak.
     390         * The 32-bit XOR on the low GPRs actually clears the entire 64-bit
     391         * register and the instruction is shorter.
     392         */
     393        xorl %edx, %edx
     394        xorl %esi, %esi
     395        xorl %edi, %edi
     396        xorq %r8, %r8
     397        xorq %r9, %r9
     398        xorq %r10, %r10
     399
    388400        sysretq
    389401
     
    413425        movq %rdi, %rsi
    414426        movq $(PA2KA(0xb8000)), %rdi  /* base of EGA text mode memory */
    415         xorq %rax, %rax
     427        xorl %eax, %eax
    416428       
    417429        /* Read bits 8 - 15 of the cursor address */
     
    493505                movq $(PA2KA(0xb80a0)), %rsi
    494506                movq $(PA2KA(0xb8000)), %rdi
    495                 movq $480, %rcx
     507                movl $480, %ecx
    496508                rep movsq
    497509               
    498510                /* Clear the 24th row */
    499                 xorq %rax, %rax
    500                 movq $20, %rcx
     511                xorl %eax, %eax
     512                movl $20, %ecx
    501513                rep stosq
    502514               
  • kernel/arch/amd64/src/boot/boot.S

    r28f4adb re06ef614  
    516516                movq $(PA2KA(0xb80a0)), %rsi
    517517                movq $(PA2KA(0xb8000)), %rdi
    518                 movq $480, %rcx
     518                movl $480, %ecx
    519519                rep movsq
    520520               
    521521                /* Clear the 24th row */
    522                 xorq %rax, %rax
    523                 movq $20, %rcx
     522                xorl %eax, %eax
     523                movl $20, %ecx
    524524                rep stosq
    525525               
  • kernel/arch/amd64/src/context.S

    r28f4adb re06ef614  
    4545        CONTEXT_SAVE_ARCH_CORE %rdi %rdx
    4646       
    47         xorq %rax, %rax       # context_save returns 1
    48         incq %rax
     47        xorl %eax, %eax       # context_save returns 1
     48        incl %eax
    4949        ret
    5050
     
    6060        movq %rdx, (%rsp)
    6161       
    62         xorq %rax, %rax       # context_restore returns 0
     62        xorl %eax, %eax       # context_restore returns 0
    6363        ret
  • uspace/lib/c/arch/amd64/src/entry.s

    r28f4adb re06ef614  
    4242        #
    4343        pushq $0
    44         mov %rsp, %rbp
     44        movq %rsp, %rbp
    4545       
    4646        # %rdi was deliberately chosen as the first argument is also in %rdi
  • uspace/lib/c/arch/amd64/src/fibril.S

    r28f4adb re06ef614  
    4949        movq %rax, OFFSET_TLS(%rdi)
    5050               
    51         xorq %rax,%rax          # context_save returns 1
    52         incq %rax
     51        xorl %eax, %eax         # context_save returns 1
     52        incl %eax
    5353        ret
    5454
     
    6767        # Set thread local storage
    6868        movq OFFSET_TLS(%rdi), %rdi   # Set arg1 to TLS addr
    69         movq $1, %rax           # SYS_TLS_SET
     69        movl $1, %eax           # SYS_TLS_SET
    7070        syscall
    7171
    72         xorq %rax,%rax          # context_restore returns 0
     72        xorl %eax, %eax         # context_restore returns 0
    7373        ret
Note: See TracChangeset for help on using the changeset viewer.