VirtualBox

Changeset 60203 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Mar 26, 2016 11:49:13 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
106237
Message:

bs3kit: updates

Location:
trunk/src/VBox/ValidationKit/bootsectors
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-basic-2-template.c

    r60202 r60203  
    386386     * Modify the gate CS value and run the handler at a different CPL.
    387387     */
    388 # if BS3_MODE_IS_32BIT_SYS(TMPL_MODE) || BS3_MODE_IS_16BIT_SYS(TMPL_MODE)
    389388    for (i = 0; i <= 3; i++)
    390389    {
     
    415414        }
    416415    }
    417 #else
    418 i = 0; NOREF(i);
    419 #endif
    420416
    421417
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-c64-Trap64Generic.asm

    r60199 r60203  
    119119        mov     rbp, rsp
    120120        pushfq                          ; -08h
    121         cli
    122121        cld
    123122        push    rdi
     
    157156        mov     rbp, rsp
    158157        pushfq                          ; -08h
    159         cli
    160158        cld
    161159        push    rdi
     
    241239        mov     ax, cs
    242240        mov     [rdi + BS3TRAPFRAME.uHandlerCs], ax
    243         and     ax, 3
    244         mov     cx, ax
    245         shl     ax, BS3_SEL_RING_SHIFT
    246         or      ax, cx
     241        AssertCompile(BS3_SEL_RING_SHIFT == 8)
     242        and     al, 3
     243        mov     ah, al
    247244        add     ax, BS3_SEL_R0_DS64
    248245        mov     ds, ax
     
    279276        ; Control registers.
    280277        ;
     278        str     ax
     279        mov     [rdi + BS3TRAPFRAME.Ctx + BS3REGCTX.tr], ax
     280        sldt    ax
     281        mov     [rdi + BS3TRAPFRAME.Ctx + BS3REGCTX.ldtr], ax
     282
     283        mov     ax, ss
     284        test    al, 3
     285        jnz     .skip_crX_because_cpl_not_0
     286
    281287        mov     rax, cr0
    282288        mov     [rdi + BS3TRAPFRAME.Ctx + BS3REGCTX.cr0], rax
     
    287293        mov     rax, cr4
    288294        mov     [rdi + BS3TRAPFRAME.Ctx + BS3REGCTX.cr4], rax
    289         str     ax
    290         mov     [rdi + BS3TRAPFRAME.Ctx + BS3REGCTX.tr], ax
    291         sldt    ax
    292         mov     [rdi + BS3TRAPFRAME.Ctx + BS3REGCTX.ldtr], ax
     295        jmp     .dispatch_to_handler
     296
     297.skip_crX_because_cpl_not_0:
     298        or      byte [rdi + BS3TRAPFRAME.Ctx + BS3REGCTX.fbFlags], BS3REG_CTX_F_NO_CR
    293299
    294300        ;
    295301        ; Dispatch it to C code.
    296302        ;
     303.dispatch_to_handler:                   ; The double fault code joins us here.
    297304        movzx   ebx, byte [rdi + BS3TRAPFRAME.bXcpt]
    298305        lea     rax, [BS3_DATA16_WRT(_g_apfnBs3TrapHandlers_c64)]
Note: See TracChangeset for help on using the changeset viewer.

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