VirtualBox

Changeset 64694 in vbox


Ignore:
Timestamp:
Nov 17, 2016 5:10:47 PM (8 years ago)
Author:
vboxsync
Message:

bs3kit: Added Bs3SwitchTo32BitAndCallC and fixed a few problems switching from PE32 to other mode and back again.

Location:
trunk/src/VBox/ValidationKit/bootsectors/bs3kit
Files:
26 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk

    r61547 r64694  
    283283        bs3-mode-SwitchToLM32.asm \
    284284        bs3-mode-SwitchToLM16.asm \
     285        bs3-mode-SwitchTo32BitAndCallC.asm \
    285286        bs3-mode-EnteredMode.asm \
    286287        bs3-mode-PagingGetRootForPP16.asm \
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-SwitchTo16Bit.asm

    r62484 r64694  
    7575
    7676BS3_BEGIN_TEXT16
    77 .sixteen_bit:
     77BS3_GLOBAL_LOCAL_LABEL .sixteen_bit
    7878
    7979        ; Load 16-bit segment registers.
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-TestDoModesByOneHlp.asm

    r60750 r64694  
    8787
    8888        ; Assuming real mode far pointer, convert protected mode before calling it.
    89         push    word [BS3_CMN_NM(g_pfnBs3TestDoModesByOneCurrent) + 2]
     89        push    word [2 + BS3_DATA16_WRT(BS3_CMN_NM(g_pfnBs3TestDoModesByOneCurrent))]
    9090        call    _Bs3SelRealModeCodeToProtMode_c16
    9191        add     sp, 2
     
    9595
    9696        push    ax                                                  ; call converted selector
    97         push    word [BS3_CMN_NM(g_pfnBs3TestDoModesByOneCurrent)]  ; call offset
     97        push    word [BS3_DATA16_WRT(BS3_CMN_NM(g_pfnBs3TestDoModesByOneCurrent))]  ; call offset
    9898        retf
    9999
     
    130130
    131131        ; Assuming real mode far pointer, convert protected mode before calling it.
    132         push    word [BS3_CMN_NM(g_pfnBs3TestDoModesByOneCurrent) + 2]
     132        push    word [2 + BS3_DATA16_WRT(BS3_CMN_NM(g_pfnBs3TestDoModesByOneCurrent))]
    133133        call    _Bs3SelRealModeCodeToProtMode_c16
    134134        add     sp, 2
     
    137137        push    word .return                                        ; return address
    138138        push    ax                                                  ; call converted selector
    139         push    word [BS3_CMN_NM(g_pfnBs3TestDoModesByOneCurrent)] ; call offset
     139        push    word [BS3_DATA16_WRT(BS3_CMN_NM(g_pfnBs3TestDoModesByOneCurrent))] ; call offset
    140140        retf
    141141
     
    157157
    158158BS3_BEGIN_TEXT16
    159 BS3_SET_BITS 32
     159BS3_SET_BITS 16
    160160BS3_PROC_BEGIN _Bs3TestCallDoerTo32_f16
    161161        push    xBP
     
    180180        jnz     .return_to_v86          ; Need to figure this while we still have the mode value.
    181181
    182         call    [BS3_CMN_NM(g_pfnBs3TestDoModesByOneCurrent)]
     182        call    [BS3_DATA16_WRT(BS3_CMN_NM(g_pfnBs3TestDoModesByOneCurrent))]
    183183
    184184        ; Switch back to 16-bit mode.
     
    192192        BS3_SET_BITS 32
    193193.return_to_v86:
    194         call    [BS3_CMN_NM(g_pfnBs3TestDoModesByOneCurrent)]
     194        call    [BS3_DATA16_WRT(BS3_CMN_NM(g_pfnBs3TestDoModesByOneCurrent))]
    195195
    196196        ; Switch back to v8086 mode.
     
    222222
    223223        push    eax                     ; Worker bMode argument.
    224         call    [BS3_CMN_NM(g_pfnBs3TestDoModesByOneCurrent)]
     224        call    [BS3_DATA16_WRT(BS3_CMN_NM(g_pfnBs3TestDoModesByOneCurrent))]
    225225
    226226        ; Switch back to 64-bit mode.
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchTo32BitAndCallC.asm

    r64681 r64694  
    11; $Id$
    22;; @file
    3 ; BS3Kit - Bs3SwitchFromV86To16BitAndCallC
     3; BS3Kit - bs3SwitchTo32BitAndCallC
    44;
    55
     
    2929;*********************************************************************************************************************************
    3030%include "bs3kit-template-header.mac"
    31 %if TMPL_BITS != 16
    32  %error "16-bit only"
    33 %endif
    3431
    3532
     
    3734;*  External Symbols                                                                                                             *
    3835;*********************************************************************************************************************************
     36BS3_EXTERN_DATA16   g_bBs3CurrentMode
     37TMPL_BEGIN_TEXT
     38
    3939%ifdef BS3_STRICT
    40 BS3_EXTERN_DATA16 g_bBs3CurrentMode
    41 TMPL_BEGIN_TEXT
    42 BS3_EXTERN_CMN    Bs3Panic
     40BS3_EXTERN_CMN      Bs3Panic
    4341%endif
    44 BS3_EXTERN_CMN    Bs3SwitchTo16Bit
    45 BS3_EXTERN_CMN    Bs3SwitchTo16BitV86
    46 BS3_EXTERN_CMN    Bs3SelRealModeCodeToProtMode
     42
     43%if BS3_MODE_IS_RM_OR_V86(TMPL_MODE)
     44BS3_EXTERN_CMN      Bs3SelRealModeCodeToFlat
     45%endif
     46
     47%if TMPL_MODE == BS3_MODE_RM
     48extern              NAME(Bs3SwitchToPE32_rm)
     49extern              NAME(Bs3SwitchToRM_pe32)
     50%elif !BS3_MODE_IS_32BIT_CODE(TMPL_MODE)
     51BS3_EXTERN_CMN      Bs3SwitchTo32Bit
     52 %if BS3_MODE_IS_16BIT_CODE_NO_V86(TMPL_MODE)
     53extern              _Bs3SwitchTo16Bit_c32
     54 %elif BS3_MODE_IS_32BIT_CODE_NO_V86(TMPL_MODE)
     55extern              _Bs3SwitchTo16BitV86_c32
     56 %elif !BS3_MODE_IS_32BIT_CODE(TMPL_MODE)
     57extern              _Bs3SwitchTo64_c32
     58 %endif
     59%endif
     60
    4761
    4862
    4963;;
    50 ; @cproto   BS3_CMN_PROTO_STUB(int, Bs3SwitchFromV86To16BitAndCallC,(FPFNBS3FAR fpfnCall, unsigned cbParams, ...));
     64; @cproto   BS3_MODE_PROTO_STUB(int, Bs3SwitchTo32BitAndCallC,(PFNBS3FARADDRCONV fpfnCall, unsigned cbParams, ...));
    5165;
    52 BS3_PROC_BEGIN_CMN Bs3SwitchFromV86To16BitAndCallC, BS3_PBC_HYBRID
    53         inc     bp
    54         push    bp
    55         mov     bp, sp
     66BS3_PROC_BEGIN_MODE Bs3SwitchTo32BitAndCallC, BS3_PBC_HYBRID
     67        BS3_CALL_CONV_PROLOG 4
     68TONLY16 inc     xBP
     69        push    xBP
     70        mov     xBP, xSP
     71        push    xSI
    5672
    5773        ;
    5874        ; Push the arguments first.
    5975        ;
    60         mov     ax, si                  ; save si
    61         mov     si, [bp + 2 + cbCurRetAddr + 4]
     76TONLY16 mov     si,  [xBP + xCB + cbCurRetAddr + sCB]
     77TNOT16  mov     esi, [xBP + xCB + cbCurRetAddr + sCB]
    6278%ifdef BS3_STRICT
    63         test    si, 1
     79        test    xSI, 3
    6480        jz      .cbParams_ok
    6581        call    Bs3Panic
    6682.cbParams_ok:
    67         test    byte [g_bBs3CurrentMode], BS3_MODE_CODE_V86
    68         jnz     .mode_ok
     83        cmp     byte [BS3_DATA16_WRT(g_bBs3CurrentMode)], TMPL_MODE
     84        je      .mode_ok
    6985        call    Bs3Panic
    7086.mode_ok:
    7187%endif
    72 
     88        add     xSI, sCB - 1            ; round it up to nearest push size / dword.
     89        and     xSI, ~(sCB - 1)
     90        jz      .done_pushing           ; skip if zero
    7391.push_more:
    74         push    word [bp + 2 + cbCurRetAddr + 4 + 2 + si - 2]
    75         sub     si, 2
     92        push    xPRE [xBP + xCB + cbCurRetAddr + sCB + xCB + xSI - xCB]
     93        sub     xSI, xCB
    7694        jnz     .push_more
    77         mov     si, ax                  ; restore si
     95        mov     xSI, xAX                ; restore xSI
     96.done_pushing:
    7897
    7998        ;
    80         ; Convert the code segment to a 16-bit prot mode selector
     99        ; Load fpfnCall into eax.
    81100        ;
    82         push    word [bp + 2 + cbCurRetAddr + 2]
    83         call    Bs3SelRealModeCodeToProtMode
    84         mov     [bp + 2 + cbCurRetAddr + 2], ax
    85         add     sp, 2
     101%if BS3_MODE_IS_RM_OR_V86(TMPL_MODE)
     102        push    sPRE [xBP + xCB + cbCurRetAddr]
     103        BS3_CALL Bs3SelRealModeCodeToFlat, 1
     104        add     xSP, sCB
     105        rol     eax, 16
     106        mov     ax, dx
     107        rol     eax, 16
     108%else
     109        mov     eax, [xBP + xCB + cbCurRetAddr]
     110%endif
    86111
    87112        ;
    88         ; Switch mode.
     113        ; Switch to 32-bit mode, if this is real mode pick PE32.
    89114        ;
    90         call    Bs3SwitchTo16Bit
    91         call far [bp + 2 + cbCurRetAddr]
    92         call    Bs3SwitchTo16BitV86
     115%if TMPL_MODE == BS3_MODE_RM
     116        call    NAME(Bs3SwitchToPE32_rm)
     117        BS3_SET_BITS 32
     118%elif !BS3_MODE_IS_32BIT_CODE(TMPL_MODE)
     119        call    Bs3SwitchTo32Bit
     120        BS3_SET_BITS 32
     121%endif
    93122
    94         mov     sp, bp
    95         pop     bp
    96         dec     bp
     123        ;
     124        ; Make the call.
     125        ;
     126        call    eax
     127
     128        ;
     129        ; Return, preserving xAX.
     130        ;
     131%if BS3_MODE_IS_RM_OR_V86(TMPL_MODE)
     132        mov     edx, eax
     133        shr     edx, 16
     134%endif
     135%if TMPL_MODE == BS3_MODE_RM
     136        call    NAME(Bs3SwitchToRM_pe32)
     137%elif BS3_MODE_IS_16BIT_CODE_NO_V86(TMPL_MODE)
     138        call    _Bs3SwitchTo16Bit_c32
     139%elif BS3_MODE_IS_32BIT_CODE_NO_V86(TMPL_MODE)
     140        call    _Bs3SwitchTo16BitV86_c32
     141%elif !BS3_MODE_IS_32BIT_CODE(TMPL_MODE)
     142        call    _Bs3SwitchTo64_c32
     143%endif
     144        BS3_SET_BITS TMPL_BITS
     145
     146        ; Epilog.
     147        lea     xSP, [xBP - xCB]
     148        pop     xSI
     149        pop     xBP
     150TONLY16 dec     xBP
     151        BS3_CALL_CONV_EPILOG 4
    97152        BS3_HYBRID_RET
    98 BS3_PROC_END_CMN   Bs3SwitchFromV86To16BitAndCallC
     153BS3_PROC_END_MODE   Bs3SwitchTo32BitAndCallC
    99154
    100 
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToLM32.asm

    r60686 r64694  
    7979        jmp     .thirty_two_bit_segment
    8080BS3_BEGIN_TEXT32
    81 .thirty_two_bit_segment:
     81BS3_GLOBAL_LOCAL_LABEL .thirty_two_bit_segment
    8282 %endif
    8383
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPAE16.asm

    r60686 r64694  
    2525;
    2626
     27;*********************************************************************************************************************************
     28;*  Header Files                                                                                                                 *
     29;*********************************************************************************************************************************
    2730%include "bs3kit-template-header.mac"
    2831
     32
     33;*********************************************************************************************************************************
     34;*  External Symbols                                                                                                             *
     35;*********************************************************************************************************************************
    2936%ifndef TMPL_PAE16
     37BS3_BEGIN_TEXT16
    3038extern  NAME(Bs3EnteredMode_pae16)
    3139 %ifdef TMPL_PAE32
    3240 BS3_EXTERN_CMN Bs3SwitchTo16Bit
    33  %else
    34  %endif
    35 %endif
     41 %endif
     42TMPL_BEGIN_TEXT
     43%endif
     44
    3645
    3746;;
     
    7584        ;
    7685 %if TMPL_BITS != 16
    77         shl     xPRE [xSP + xCB], TMPL_BITS - 16    ; Adjust the return address.
     86        shl     xPRE [xSP], TMPL_BITS - 16  ; Adjust the return address.
    7887        add     xSP, xCB - 2
    7988
     
    8291BS3_BEGIN_TEXT16
    8392        BS3_SET_BITS TMPL_BITS
    84 .sixteen_bit_segment:
     93BS3_GLOBAL_LOCAL_LABEL .sixteen_bit_segment
    8594 %endif
    8695
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPAE16_32.asm

    r60557 r64694  
    5353BS3_BEGIN_TEXT16
    5454        BS3_SET_BITS TMPL_BITS
    55 .sixteen_bit_segment:
     55BS3_GLOBAL_LOCAL_LABEL .sixteen_bit_segment
    5656 %endif
    5757        extern  TMPL_NM(Bs3SwitchToPAE16)
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPAE16_V86.asm

    r60557 r64694  
    5757BS3_BEGIN_TEXT16
    5858        BS3_SET_BITS TMPL_BITS
    59 .sixteen_bit_segment:
     59BS3_GLOBAL_LOCAL_LABEL .sixteen_bit_segment
    6060 %endif
    6161
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPAE32.asm

    r60686 r64694  
    6262 %if TMPL_BITS != 32
    6363  %if TMPL_BITS > 32
    64         shl     xPRE [xSP + xCB], 32    ; Adjust the return address from 64-bit to 32-bit.
     64        shl     xPRE [xSP], 32          ; Adjust the return address from 64-bit to 32-bit.
    6565        add     rsp, xCB - 4
    6666  %else
    6767        push    word 0                  ; Reserve space to expand the return address.
    6868  %endif
     69 %endif
     70 %if TMPL_BITS != 16
    6971        ; Must be in 16-bit segment when calling Bs3SwitchTo16Bit.
    7072        jmp     .sixteen_bit_segment
    7173BS3_BEGIN_TEXT16
    7274        BS3_SET_BITS TMPL_BITS
    73 .sixteen_bit_segment:
     75BS3_GLOBAL_LOCAL_LABEL .sixteen_bit_segment
    7476 %endif
    7577
     
    121123        jmp     BS3_SEL_R0_CS32:dword .thirty_two_bit wrt FLAT
    122124BS3_BEGIN_TEXT32
    123 .thirty_two_bit:
     125BS3_GLOBAL_LOCAL_LABEL .thirty_two_bit
    124126
    125127        ;
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPAE32_16.asm

    r60557 r64694  
    4848
    4949%elif TMPL_MODE == BS3_MODE_PAE32
    50         extern  BS3_CMN_NM(Bs3SwitchTo32Bit)
    51         jmp     BS3_CMN_NM(Bs3SwitchTo32Bit)
     50        extern  BS3_CMN_NM(Bs3SwitchTo16Bit)
     51        jmp     BS3_CMN_NM(Bs3SwitchTo16Bit)
    5252
    5353%else
     
    6666BS3_BEGIN_TEXT16
    6767        BS3_SET_BITS TMPL_BITS
    68 .sixteen_bit_segment:
     68BS3_GLOBAL_LOCAL_LABEL .sixteen_bit_segment
    6969 %endif
    7070        extern  _Bs3SwitchTo16Bit_c32
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPE16.asm

    r62484 r64694  
    6868        ;
    6969 %if TMPL_BITS != 16
    70         shl     xPRE [xSP + xCB], TMPL_BITS - 16    ; Adjust the return address.
     70        shl     xPRE [xSP], TMPL_BITS - 16    ; Adjust the return address.
    7171        add     xSP, xCB - 2
    7272
     
    7575BS3_BEGIN_TEXT16
    7676        BS3_SET_BITS TMPL_BITS
    77 .sixteen_bit_segment:
     77BS3_GLOBAL_LOCAL_LABEL .sixteen_bit_segment
    7878 %endif
    7979
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPE16_32.asm

    r60557 r64694  
    5353BS3_BEGIN_TEXT16
    5454        BS3_SET_BITS TMPL_BITS
    55 .sixteen_bit_segment:
     55BS3_GLOBAL_LOCAL_LABEL .sixteen_bit_segment
    5656 %endif
    5757        extern  TMPL_NM(Bs3SwitchToPE16)
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPE16_V86.asm

    r60557 r64694  
    5757BS3_BEGIN_TEXT16
    5858        BS3_SET_BITS TMPL_BITS
    59 .sixteen_bit_segment:
     59BS3_GLOBAL_LOCAL_LABEL .sixteen_bit_segment
    6060 %endif
    6161
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPE32.asm

    r62484 r64694  
    6161 %if TMPL_BITS != 32
    6262  %if TMPL_BITS > 32
    63         shl     xPRE [xSP + xCB], 32    ; Adjust the return address from 64-bit to 32-bit.
     63        shl     xPRE [xSP], 32          ; Adjust the return address from 64-bit to 32-bit.
    6464        add     rsp, xCB - 4
    6565  %else
    6666        push    word 0                  ; Reserve space to expand the return address.
    6767  %endif
     68 %endif
     69 %if TMPL_BITS != 16
    6870        ; Must be in 16-bit segment when calling Bs3SwitchTo16Bit.
    6971        jmp     .sixteen_bit_segment
    7072BS3_BEGIN_TEXT16
    7173        BS3_SET_BITS TMPL_BITS
    72 .sixteen_bit_segment:
     74BS3_GLOBAL_LOCAL_LABEL .sixteen_bit_segment
    7375 %endif
    74 
    7576        ;
    7677        ; Switch to real mode.
     
    99100        jmp     BS3_SEL_R0_CS32:dword .thirty_two_bit wrt FLAT
    100101BS3_BEGIN_TEXT32
    101 .thirty_two_bit:
     102BS3_GLOBAL_LOCAL_LABEL .thirty_two_bit
    102103
    103104        ;
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPE32_16.asm

    r60557 r64694  
    4848
    4949%elif TMPL_MODE == BS3_MODE_PE32
    50         extern  BS3_CMN_NM(Bs3SwitchTo32Bit)
    51         jmp     BS3_CMN_NM(Bs3SwitchTo32Bit)
     50        extern  BS3_CMN_NM(Bs3SwitchTo16Bit)
     51        jmp     BS3_CMN_NM(Bs3SwitchTo16Bit)
    5252
    5353%else
     
    6666BS3_BEGIN_TEXT16
    6767        BS3_SET_BITS TMPL_BITS
    68 .sixteen_bit_segment:
     68BS3_GLOBAL_LOCAL_LABEL .sixteen_bit_segment
    6969 %endif
    7070        extern  _Bs3SwitchTo16Bit_c32
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPP16.asm

    r60686 r64694  
    2525;
    2626
     27;*********************************************************************************************************************************
     28;*  Header Files                                                                                                                 *
     29;*********************************************************************************************************************************
    2730%include "bs3kit-template-header.mac"
    2831
     32;*********************************************************************************************************************************
     33;*  External Symbols                                                                                                             *
     34;*********************************************************************************************************************************
    2935%ifndef TMPL_PP16
     36BS3_BEGIN_TEXT16
    3037extern  NAME(Bs3EnteredMode_pp16)
    3138 %ifdef TMPL_PP32
    3239 BS3_EXTERN_CMN Bs3SwitchTo16Bit
    33  %else
    34  %endif
    35 %endif
     40 %endif
     41TMPL_BEGIN_TEXT
     42%endif
     43
    3644
    3745;;
     
    7684        ;
    7785 %if TMPL_BITS != 16
    78         shl     xPRE [xSP + xCB], TMPL_BITS - 16    ; Adjust the return address.
     86        shl     xPRE [xSP], TMPL_BITS - 16    ; Adjust the return address.
    7987        add     xSP, xCB - 2
    8088
     
    8391BS3_BEGIN_TEXT16
    8492        BS3_SET_BITS TMPL_BITS
    85 .sixteen_bit_segment:
     93BS3_GLOBAL_LOCAL_LABEL .sixteen_bit_segment
    8694 %endif
    8795
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPP16_32.asm

    r60557 r64694  
    5353BS3_BEGIN_TEXT16
    5454        BS3_SET_BITS TMPL_BITS
    55 .sixteen_bit_segment:
     55BS3_GLOBAL_LOCAL_LABEL .sixteen_bit_segment
    5656 %endif
    5757        extern  TMPL_NM(Bs3SwitchToPP16)
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPP16_V86.asm

    r60557 r64694  
    5757BS3_BEGIN_TEXT16
    5858        BS3_SET_BITS TMPL_BITS
    59 .sixteen_bit_segment:
     59BS3_GLOBAL_LOCAL_LABEL .sixteen_bit_segment
    6060 %endif
    6161
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPP32.asm

    r62484 r64694  
    6262 %if TMPL_BITS != 32
    6363  %if TMPL_BITS > 32
    64         shl     xPRE [xSP + xCB], 32    ; Adjust the return address from 64-bit to 32-bit.
     64        shl     xPRE [xSP], 32          ; Adjust the return address from 64-bit to 32-bit.
    6565        add     rsp, xCB - 4
    6666  %else
    6767        push    word 0                  ; Reserve space to expand the return address.
    6868  %endif
     69 %endif
     70 %if TMPL_BITS != 16
    6971        ; Must be in 16-bit segment when calling Bs3SwitchTo16Bit.
    7072        jmp     .sixteen_bit_segment
    7173BS3_BEGIN_TEXT16
    7274        BS3_SET_BITS TMPL_BITS
    73 .sixteen_bit_segment:
     75BS3_GLOBAL_LOCAL_LABEL .sixteen_bit_segment
    7476 %endif
    7577
     
    129131        jmp     BS3_SEL_R0_CS32:dword .thirty_two_bit wrt FLAT
    130132BS3_BEGIN_TEXT32
    131 .thirty_two_bit:
     133BS3_GLOBAL_LOCAL_LABEL .thirty_two_bit
    132134        ;
    133135        ; Convert the (now) real mode stack pointer to 32-bit flat.
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToPP32_16.asm

    r60557 r64694  
    4848
    4949%elif TMPL_MODE == BS3_MODE_PP32
    50         extern  BS3_CMN_NM(Bs3SwitchTo32Bit)
    51         jmp     BS3_CMN_NM(Bs3SwitchTo32Bit)
     50        extern  BS3_CMN_NM(Bs3SwitchTo16Bit)
     51        jmp     BS3_CMN_NM(Bs3SwitchTo16Bit)
    5252
    5353%else
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToRM.asm

    r62484 r64694  
    242242BS3_BEGIN_TEXT16
    243243        BS3_SET_BITS TMPL_BITS
    244 .sixteen_bit_segment:
     244BS3_GLOBAL_LOCAL_LABEL .sixteen_bit_segment
    245245
    246246        extern  BS3_CMN_NM(Bs3SwitchTo16Bit)
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TestDoModesByOne.c

    r62471 r64694  
    112112extern PFNBS3TESTDOMODE g_pfnBs3TestDoModesByOneCurrent;
    113113
     114#include <iprt/asm-amd64-x86.h>
    114115
    115116
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TestDoModesHlp.asm

    r60676 r64694  
    3838;
    3939%if TMPL_MODE == BS3_MODE_RM
    40  %define MY_BEGIN_TEXT   BS3_BEGIN_RMTEXT16
    41  %define MY_BEGIN_TEXT16 BS3_BEGIN_RMTEXT16
    42 %else
    43  %define MY_BEGIN_TEXT   TMPL_BEGIN_TEXT
    44  %define MY_BEGIN_TEXT16 BS3_BEGIN_TEXT16
     40 %define MY_BEGIN_TEXT          BS3_BEGIN_RMTEXT16
     41 %define MY_BEGIN_TEXT16        BS3_BEGIN_RMTEXT16
     42 %define MY_TEXT16_WRT(a_Label) a_Label wrt BS3GROUPRMTEXT16
     43%else
     44 %define MY_BEGIN_TEXT          TMPL_BEGIN_TEXT
     45 %define MY_BEGIN_TEXT16        BS3_BEGIN_TEXT16
     46 %define MY_TEXT16_WRT(a_Label) BS3_TEXT16_WRT(a_Label)
    4547%endif
    4648
     
    137139
    138140
    139 
     141MY_BEGIN_TEXT16                         ; need the group definition
    140142MY_BEGIN_TEXT
    141143
     
    277279; @uses     rax
    278280BS3_PROC_BEGIN_MODE Bs3TestCallDoerInRM, BS3_PBC_NEAR
    279         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
    280         jmp     TMPL_NM(bs3TestCallDoerPrologue)
    281 MY_BEGIN_TEXT16
    282 BS3_SET_BITS TMPL_BITS
    283 .doit:
     281        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
     282        jmp     TMPL_NM(bs3TestCallDoerPrologue)
     283MY_BEGIN_TEXT16
     284BS3_SET_BITS TMPL_BITS
     285BS3_GLOBAL_LOCAL_LABEL .doit
    284286        mov     ax, [xBP + xCB + cbCurRetAddr]      ; Load far function pointer.
    285287        mov     dx, [xBP + xCB + cbCurRetAddr + 2]
     
    326328; @uses     rax
    327329BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPE16, BS3_PBC_NEAR
    328         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
    329         jmp     TMPL_NM(bs3TestCallDoerPrologue)
    330 MY_BEGIN_TEXT16
    331 BS3_SET_BITS TMPL_BITS
    332 .doit:
     330        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
     331        jmp     TMPL_NM(bs3TestCallDoerPrologue)
     332MY_BEGIN_TEXT16
     333BS3_SET_BITS TMPL_BITS
     334BS3_GLOBAL_LOCAL_LABEL .doit
    333335        mov     ax, [xBP + xCB + cbCurRetAddr]      ; Load far function pointer.
    334336        mov     dx, [xBP + xCB + cbCurRetAddr + 2]
     
    367369; @uses     rax
    368370BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPE16_32, BS3_PBC_NEAR
    369         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
     371        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
    370372        jmp     TMPL_NM(bs3TestCallDoerPrologue)
    371373.doit:
     
    396398; @uses     rax
    397399BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPE16_V86, BS3_PBC_NEAR
    398         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
    399         jmp     TMPL_NM(bs3TestCallDoerPrologue)
    400 .doit:
     400        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
     401        jmp     TMPL_NM(bs3TestCallDoerPrologue)
     402MY_BEGIN_TEXT16
     403BS3_SET_BITS TMPL_BITS
     404BS3_GLOBAL_LOCAL_LABEL .doit
    401405        mov     ax, [xBP + xCB + cbCurRetAddr]      ; Load far function pointer.
    402406        mov     dx, [xBP + xCB + cbCurRetAddr + 2]
     
    429433        STRICT_CHECK_REGS
    430434        jmp     TMPL_NM(bs3TestCallDoerEpilogue)
     435MY_BEGIN_TEXT
    431436BS3_PROC_END_MODE   Bs3TestCallDoerInPE16_V86
    432437
     
    435440; @uses     rax
    436441BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPE32, BS3_PBC_NEAR
    437         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
     442        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
    438443        jmp     TMPL_NM(bs3TestCallDoerPrologue)
    439444.doit:
     
    464469; @uses     rax
    465470BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPE32_16, BS3_PBC_NEAR
    466         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
    467         jmp     TMPL_NM(bs3TestCallDoerPrologue)
    468 MY_BEGIN_TEXT16
    469 BS3_SET_BITS TMPL_BITS
    470 .doit:
     471        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
     472        jmp     TMPL_NM(bs3TestCallDoerPrologue)
     473MY_BEGIN_TEXT16
     474BS3_SET_BITS TMPL_BITS
     475BS3_GLOBAL_LOCAL_LABEL .doit
    471476        mov     ax, [xBP + xCB + cbCurRetAddr]      ; Load far function pointer.
    472477        mov     dx, [xBP + xCB + cbCurRetAddr + 2]
     
    506511; @uses     rax
    507512BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPEV86, BS3_PBC_NEAR
    508         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
    509         jmp     TMPL_NM(bs3TestCallDoerPrologue)
    510 MY_BEGIN_TEXT16
    511 BS3_SET_BITS TMPL_BITS
    512 .doit:
     513        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
     514        jmp     TMPL_NM(bs3TestCallDoerPrologue)
     515MY_BEGIN_TEXT16
     516BS3_SET_BITS TMPL_BITS
     517BS3_GLOBAL_LOCAL_LABEL .doit
    513518        mov     ax, [xBP + xCB + cbCurRetAddr]      ; Load far function pointer.
    514519        mov     dx, [xBP + xCB + cbCurRetAddr + 2]
     
    554559; @uses     rax
    555560BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPP16, BS3_PBC_NEAR
    556         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
    557         jmp     TMPL_NM(bs3TestCallDoerPrologue)
    558 MY_BEGIN_TEXT16
    559 BS3_SET_BITS TMPL_BITS
    560 .doit:
     561        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
     562        jmp     TMPL_NM(bs3TestCallDoerPrologue)
     563MY_BEGIN_TEXT16
     564BS3_SET_BITS TMPL_BITS
     565BS3_GLOBAL_LOCAL_LABEL .doit
    561566        mov     ax, [xBP + xCB + cbCurRetAddr]      ; Load far function pointer.
    562567        mov     dx, [xBP + xCB + cbCurRetAddr + 2]
     
    596601; @uses     rax
    597602BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPP16_32, BS3_PBC_NEAR
    598         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
     603        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
    599604        jmp     TMPL_NM(bs3TestCallDoerPrologue)
    600605.doit:
     
    625630; @uses     rax
    626631BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPP16_V86, BS3_PBC_NEAR
    627         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
    628         jmp     TMPL_NM(bs3TestCallDoerPrologue)
    629 .doit:
     632        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
     633        jmp     TMPL_NM(bs3TestCallDoerPrologue)
     634MY_BEGIN_TEXT16
     635BS3_SET_BITS TMPL_BITS
     636BS3_GLOBAL_LOCAL_LABEL .doit
    630637        mov     ax, [xBP + xCB + cbCurRetAddr]      ; Load far function pointer.
    631638        mov     dx, [xBP + xCB + cbCurRetAddr + 2]
     
    658665        STRICT_CHECK_REGS
    659666        jmp     TMPL_NM(bs3TestCallDoerEpilogue)
     667MY_BEGIN_TEXT
    660668BS3_PROC_END_MODE   Bs3TestCallDoerInPP16_V86
    661669
     
    664672; @uses     rax
    665673BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPP32, BS3_PBC_NEAR
    666         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
     674        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
    667675        jmp     TMPL_NM(bs3TestCallDoerPrologue)
    668676.doit:
     
    693701; @uses     rax
    694702BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPP32_16, BS3_PBC_NEAR
    695         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
    696         jmp     TMPL_NM(bs3TestCallDoerPrologue)
    697 MY_BEGIN_TEXT16
    698 BS3_SET_BITS TMPL_BITS
    699 .doit:
     703        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
     704        jmp     TMPL_NM(bs3TestCallDoerPrologue)
     705MY_BEGIN_TEXT16
     706BS3_SET_BITS TMPL_BITS
     707BS3_GLOBAL_LOCAL_LABEL .doit
    700708        mov     ax, [xBP + xCB + cbCurRetAddr]      ; Load far function pointer.
    701709        mov     dx, [xBP + xCB + cbCurRetAddr + 2]
     
    735743; @uses     rax
    736744BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPPV86, BS3_PBC_NEAR
    737         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
    738         jmp     TMPL_NM(bs3TestCallDoerPrologue)
    739 MY_BEGIN_TEXT16
    740 BS3_SET_BITS TMPL_BITS
    741 .doit:
     745        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
     746        jmp     TMPL_NM(bs3TestCallDoerPrologue)
     747MY_BEGIN_TEXT16
     748BS3_SET_BITS TMPL_BITS
     749BS3_GLOBAL_LOCAL_LABEL .doit
    742750        mov     ax, [xBP + xCB + cbCurRetAddr]      ; Load far function pointer.
    743751        mov     dx, [xBP + xCB + cbCurRetAddr + 2]
     
    772780MY_BEGIN_TEXT
    773781BS3_PROC_END_MODE   Bs3TestCallDoerInPPV86
    774 
    775782
    776783
     
    783790; @uses     rax
    784791BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAE16, BS3_PBC_NEAR
    785         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
    786         jmp     TMPL_NM(bs3TestCallDoerPrologue)
    787 MY_BEGIN_TEXT16
    788 BS3_SET_BITS TMPL_BITS
    789 .doit:
     792        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
     793        jmp     TMPL_NM(bs3TestCallDoerPrologue)
     794MY_BEGIN_TEXT16
     795BS3_SET_BITS TMPL_BITS
     796BS3_GLOBAL_LOCAL_LABEL .doit
    790797        mov     ax, [xBP + xCB + cbCurRetAddr]      ; Load far function pointer.
    791798        mov     dx, [xBP + xCB + cbCurRetAddr + 2]
     
    825832; @uses     rax
    826833BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAE16_32, BS3_PBC_NEAR
    827         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
     834        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
    828835        jmp     TMPL_NM(bs3TestCallDoerPrologue)
    829836.doit:
     
    854861; @uses     rax
    855862BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAE16_V86, BS3_PBC_NEAR
    856         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
    857         jmp     TMPL_NM(bs3TestCallDoerPrologue)
    858 .doit:
     863        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
     864        jmp     TMPL_NM(bs3TestCallDoerPrologue)
     865MY_BEGIN_TEXT16
     866BS3_SET_BITS TMPL_BITS
     867BS3_GLOBAL_LOCAL_LABEL .doit
    859868        mov     ax, [xBP + xCB + cbCurRetAddr]      ; Load far function pointer.
    860869        mov     dx, [xBP + xCB + cbCurRetAddr + 2]
     
    887896        STRICT_CHECK_REGS
    888897        jmp     TMPL_NM(bs3TestCallDoerEpilogue)
     898MY_BEGIN_TEXT
    889899BS3_PROC_END_MODE   Bs3TestCallDoerInPAE16_V86
    890900
     
    893903; @uses     rax
    894904BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAE32, BS3_PBC_NEAR
    895         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
     905        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
    896906        jmp     TMPL_NM(bs3TestCallDoerPrologue)
    897907.doit:
     
    922932; @uses     rax
    923933BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAE32_16, BS3_PBC_NEAR
    924         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
    925         jmp     TMPL_NM(bs3TestCallDoerPrologue)
    926 MY_BEGIN_TEXT16
    927 BS3_SET_BITS TMPL_BITS
    928 .doit:
     934        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
     935        jmp     TMPL_NM(bs3TestCallDoerPrologue)
     936MY_BEGIN_TEXT16
     937BS3_SET_BITS TMPL_BITS
     938BS3_GLOBAL_LOCAL_LABEL .doit
    929939        mov     ax, [xBP + xCB + cbCurRetAddr]      ; Load far function pointer.
    930940        mov     dx, [xBP + xCB + cbCurRetAddr + 2]
     
    964974; @uses     rax
    965975BS3_PROC_BEGIN_MODE Bs3TestCallDoerInPAEV86, BS3_PBC_NEAR
    966         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
    967         jmp     TMPL_NM(bs3TestCallDoerPrologue)
    968 MY_BEGIN_TEXT16
    969 BS3_SET_BITS TMPL_BITS
    970 .doit:
     976        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
     977        jmp     TMPL_NM(bs3TestCallDoerPrologue)
     978MY_BEGIN_TEXT16
     979BS3_SET_BITS TMPL_BITS
     980BS3_GLOBAL_LOCAL_LABEL .doit
    971981        mov     ax, [xBP + xCB + cbCurRetAddr]      ; Load far function pointer.
    972982        mov     dx, [xBP + xCB + cbCurRetAddr + 2]
     
    10121022; @uses     rax
    10131023BS3_PROC_BEGIN_MODE Bs3TestCallDoerInLM16, BS3_PBC_NEAR
    1014         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
    1015         jmp     TMPL_NM(bs3TestCallDoerPrologue)
    1016 MY_BEGIN_TEXT16
    1017 BS3_SET_BITS TMPL_BITS
    1018 .doit:
     1024        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
     1025        jmp     TMPL_NM(bs3TestCallDoerPrologue)
     1026MY_BEGIN_TEXT16
     1027BS3_SET_BITS TMPL_BITS
     1028BS3_GLOBAL_LOCAL_LABEL .doit
    10191029        mov     ax, [xBP + xCB + cbCurRetAddr]      ; Load far function pointer.
    10201030        mov     dx, [xBP + xCB + cbCurRetAddr + 2]
     
    10541064; @uses     rax
    10551065BS3_PROC_BEGIN_MODE Bs3TestCallDoerInLM32, BS3_PBC_NEAR
    1056         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
     1066        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
    10571067        jmp     TMPL_NM(bs3TestCallDoerPrologue)
    10581068.doit:
     
    10841094; @uses     rax
    10851095BS3_PROC_BEGIN_MODE Bs3TestCallDoerInLM64, BS3_PBC_NEAR
    1086         BS3_LEA_MOV_WRT_RIP(xAX, .doit)
     1096        BS3_LEA_MOV_WRT_RIP(xAX, MY_TEXT16_WRT(.doit))
    10871097        jmp     TMPL_NM(bs3TestCallDoerPrologue)
    10881098.doit:
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-template-footer.mac

    r60676 r64694  
    127127%unmacro TONLY32 1+
    128128%unmacro TONLY64 1+
     129%unmacro TNOT16  1+
     130%unmacro TNOT32  1+
    129131%unmacro TNOT64  1+
    130132
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-template-header.mac

    r62484 r64694  
    470470%endif
    471471
     472;; @def TNOT16
     473; Version of BNOT16 that follows the code template.
     474; Like BNOT16 this normally goes in column 1.
     475%if TMPL_BITS == 16
     476 %macro TNOT16 1+
     477 %endmacro
     478%else
     479 %macro TNOT16 1+
     480        %1
     481 %endmacro
     482%endif
     483
     484;; @def TNOT32
     485; Version of BNOT32 that follows the code template.
     486; Like BNOT32 this normally goes in column 1.
     487%if TMPL_BITS == 32
     488 %macro TNOT32 1+
     489 %endmacro
     490%else
     491 %macro TNOT32 1+
     492        %1
     493 %endmacro
     494%endif
     495
    472496;; @def TNOT64
    473497; Version of BNOT64 that follows the code template.
     
    481505 %endmacro
    482506%endif
     507
    483508
    484509;
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h

    r64367 r64694  
    23132313 * Afterwards it switches back to v8086 mode and returns a 16-bit status code.
    23142314 *
    2315  * @returns     16-bit status code if the function returned anything.
    2316  * @param       fpfnCall        Far real mode pointer to the function to call.
    2317  * @param       cbParams        The size of the parameter list, in bytes.
    2318  * @param       ...             The parameters.
     2315 * @returns 16-bit status code if the function returned anything.
     2316 * @param   fpfnCall        Far real mode pointer to the function to call.
     2317 * @param   cbParams        The size of the parameter list, in bytes.
     2318 * @param   ...             The parameters.
     2319 * @sa Bs3SwitchTo32BitAndCallC
    23192320 */
    23202321BS3_CMN_PROTO_STUB(int, Bs3SwitchFromV86To16BitAndCallC,(FPFNBS3FAR fpfnCall, unsigned cbParams, ...));
     
    33043305
    33053306/**
     3307 * Call 32-bit prot mode C function.
     3308 *
     3309 * This switches from the current mode and calls the 32-bit @a fpfnCall C code
     3310 * with @a cbParams on the stack, then returns.
     3311 *
     3312 * @returns 32-bit status code if the function returned anything.
     3313 * @param   fpfnCall        Address of the 32-bit C function to call.  When
     3314 *                          called from 16-bit code, this is a far real mode
     3315 *                          function pointer, i.e. as fixed up by the linker.
     3316 *                          In 32-bit and 64-bit code, this is a flat address.
     3317 * @param   cbParams        The size of the parameter list, in bytes.
     3318 * @param   ...             The parameters.
     3319 * @sa      Bs3SwitchFromV86To16BitAndCallC
     3320 *
     3321 * @remarks     WARNING! This probably doesn't work in 64-bit mode yet.
     3322 *                       Only tested for 16-bit real mode.
     3323 */
     3324BS3_MODE_PROTO_STUB(int32_t, Bs3SwitchTo32BitAndCallC,(FPFNBS3FAR fpfnCall, unsigned cbParams, ...));
     3325
     3326/**
    33063327 * Initializes trap handling for the current system.
    33073328 *
     
    33193340
    33203341/**
    3321  * Executes the array of tests in every possibly mode, unitifed driver.
     3342 * Executes the array of tests in every possibly mode, unified driver.
    33223343 *
    33233344 * This requires much less code space than Bs3TestDoModes as there is only one
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.mac

    r62484 r64694  
    213213 %endif
    214214
     215 ;; @def BS3_TEXT16_WRT
     216 ; For accessing BS3DATA16 correctly.
     217 ; @param a_Label The BS3TEXT16 label.
     218 %undef BS3_TEXT16_WRT
     219 %if %1 == 16
     220  %define BS3_TEXT16_WRT(a_Label)   a_Label wrt CGROUP16
     221 %elif %1 == 32
     222  %define BS3_TEXT16_WRT(a_Label)   a_Label wrt FLAT
     223 %else
     224  %define BS3_TEXT16_WRT(a_Label)   BS3_WRT_RIP(a_Label) wrt FLAT
     225 %endif
     226
    215227 %undef   BS3_IF_16BIT_OTHERWISE
    216228 %if %1 == 16
     
    622634%macro BS3_GLOBAL_NAME_EX 3
    623635global %1
     636%1:
     637%undef  BS3_LAST_LABEL
     638%xdefine BS3_LAST_LABEL %1
     639%endmacro
     640
     641;;
     642; Global local label.
     643;
     644; This should be used when switching segments and jumping to it via a local lable.
     645; It makes the lable visible to the debugger and map file.
     646;
     647%macro BS3_GLOBAL_LOCAL_LABEL 1
     648global RT_CONCAT(BS3_LAST_LABEL,%1)
    624649%1:
    625650%endmacro
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