Changeset 04803bf in mainline for uspace/lib/c/arch/ia32/src


Ignore:
Timestamp:
2011-03-21T22:00:17Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
143932e3
Parents:
b50b5af2 (diff), 7308e84 (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 (needs fixes).

Location:
uspace/lib/c/arch/ia32/src
Files:
2 added
6 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/arch/ia32/src/entry.s

    rb50b5af2 r04803bf  
    2727#
    2828
     29INTEL_CPUID_STANDARD = 1
     30INTEL_SEP = 11
     31
    2932.section .init, "ax"
    3033
     
    3538## User-space task entry point
    3639#
    37 # %ebx contains the PCB pointer
     40# %edi contains the PCB pointer
    3841#
    3942__entry:
     
    4346        mov %ax, %fs
    4447        # Do not set %gs, it contains descriptor that can see TLS
    45 
     48       
     49        # Detect the mechanism used for making syscalls
     50        movl $(INTEL_CPUID_STANDARD), %eax
     51        cpuid
     52        bt $(INTEL_SEP), %edx
     53        jnc 0f
     54        leal __syscall_fast_func, %eax
     55        movl $__syscall_fast, (%eax)
     560:
     57        #
     58        # Create the first stack frame.
     59        #
     60        pushl $0
     61        movl %esp, %ebp
     62       
    4663        # Pass the PCB pointer to __main as the first argument
    47         pushl %ebx
     64        pushl %edi
    4865        call __main
    49 
    50         call __exit
  • uspace/lib/c/arch/ia32/src/syscall.S

    rb50b5af2 r04803bf  
    2727#
    2828
     29.data
     30
     31.global __syscall_fast_func
     32__syscall_fast_func:
     33        .long __syscall_slow
     34
    2935.text
    3036
     
    3541 * could benefit from this and not save unused registers on the stack.
    3642 */
    37 .global __syscall_int
    38 __syscall_int:
     43.global __syscall_slow
     44__syscall_slow:
    3945        pushl %ebx
    4046        pushl %esi
     
    6470 * segment, otherwise the SYSENTER wouldn't work in the first place).
    6571 */
    66 .global __syscall_sysenter
    67         .type __syscall_sysenter, @function
     72.global __syscall_fast
     73        .type __syscall_fast, @function
    6874
    69 __syscall_sysenter:
     75__syscall_fast:
    7076        pushl %ebx
    7177        pushl %esi
     
    9298        ret
    9399
    94         .size __syscall_sysenter, . - __syscall_sysenter
     100        .size __syscall_fast, . - __syscall_fast
  • uspace/lib/c/arch/ia32/src/thread_entry.s

    rb50b5af2 r04803bf  
    4242
    4343        #
     44        # Create the first stack frame.
     45        #
     46        pushl $0
     47        mov %esp, %ebp
     48
     49        #
    4450        # EAX contains address of uarg.
    4551        #
Note: See TracChangeset for help on using the changeset viewer.