VirtualBox

Changeset 59977 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
Mar 10, 2016 7:58:08 AM (9 years ago)
Author:
vboxsync
Message:

bs3kit: 64-bit fixes and some updates.

Location:
trunk/src/VBox/ValidationKit/bootsectors/bs3kit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SwitchTo16Bit.asm

    r59949 r59977  
    5050        ; Switch to ring-0 if v8086 mode.
    5151        mov     ax, BS3_SYSCALL_TO_RING0
    52         int    BS3_TRAP_SYSCALL
     52        lock int BS3_TRAP_SYSCALL
    5353
    5454.ret_16bit:
     
    103103
    104104        popfd
    105  %if TMPL_BITS == 64
    106         add     sp, 4
    107  %endif
     105        TMPL_ONLY_64BIT_STMT pop     ebx
    108106        pop     ebx
    109  %if TMPL_BITS == 64
    110         add     sp, 4
    111  %endif
     107        TMPL_ONLY_64BIT_STMT pop     eax
    112108        pop     eax
    113  %if TMPL_BITS == 64
    114         add     sp, 4
    115  %endif
     109        TMPL_ONLY_64BIT_STMT add     sp, 4
    116110        ret     (TMPL_BITS - 16) / 8    ; Return and pop 2 or 6 bytes of "parameters" (unused return value)
    117111
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToRM.asm

    r59975 r59977  
    7070        cmp     byte [BS3_DATA16_WRT(g_uBs3CpuDetected)], BS3CPU_80286
    7171        ja      .do_386_prologue
    72         push    bp
    7372        push    ax
    7473        push    bx
     
    7877 %endif
    7978.do_386_prologue:
    80         push    sBP
    8179        push    sAX
    8280        push    sBX
     
    171169        pop     bp
    172170 %endif
    173  %if TMPL_BITS != 64
    174171.do_386_epilogue:
    175172        popfd
     173        TMPL_ONLY_64BIT_STMT pop ebx
    176174        pop     ebx
     175        TMPL_ONLY_64BIT_STMT pop eax
    177176        pop     eax
    178 %if 0
    179         pop     ebp
    180 %else
    181 add     esp, 4
    182 %endif
    183  %else
    184         pop     eax
    185         popfd
    186         pop     ebx
    187         pop     ebx
    188         pop     eax
    189         pop     eax
    190         pop     ebp
    191         pop     ebp
    192  %endif
     177        TMPL_ONLY_64BIT_STMT add sp, 4
    193178        retn    (TMPL_BITS - 16) / 8
    194179
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-template-footer.mac

    r59863 r59977  
    55
    66;
    7 ; Copyright (C) 2007-2015 Oracle Corporation
     7; Copyright (C) 2007-2016 Oracle Corporation
    88;
    99; This file is part of VirtualBox Open Source Edition (OSE), as
     
    123123%undef sSI
    124124
     125%unmacro TMPL_ONLY_16BIT_STMT 1+
     126%unmacro TMPL_ONLY_32BIT_STMT 1+
     127%unmacro TMPL_ONLY_64BIT_STMT 1+
     128
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-template-header.mac

    r59949 r59977  
    431431%endif
    432432
     433;; @def TMPL_ONLY_16BIT_STMT
     434; Version of BS3_ONLY_16BIT_STMT that follows the code template.
     435%if TMPL_BITS == 16
     436 %macro TMPL_ONLY_16BIT_STMT 1+
     437        %1
     438 %endmacro
     439%else
     440 %macro TMPL_ONLY_16BIT_STMT 1+
     441 %endmacro
     442%endif
     443
     444;; @def TMPL_ONLY_32BIT_STMT
     445; Version of BS3_ONLY_32BIT_STMT that follows the code template.
     446%if TMPL_BITS == 32
     447 %macro TMPL_ONLY_32BIT_STMT 1+
     448        %1
     449 %endmacro
     450%else
     451 %macro TMPL_ONLY_32BIT_STMT 1+
     452 %endmacro
     453%endif
     454
     455;; @def TMPL_ONLY_64BIT_STMT
     456; Version of BS3_ONLY_64BIT_STMT that follows the code template.
     457%if TMPL_BITS == 64
     458 %macro TMPL_ONLY_64BIT_STMT 1+
     459        %1
     460 %endmacro
     461%else
     462 %macro TMPL_ONLY_64BIT_STMT 1+
     463 %endmacro
     464%endif
     465
    433466;
    434467; Default code segment (changes BITS too).
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette