VirtualBox

Changeset 66149 in vbox


Ignore:
Timestamp:
Mar 16, 2017 10:41:19 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
114055
Message:

Added VBox/bios.h and VBox/bios.mac (generated) and changed the bootsector code to try both the VBox and Bochs shutdown ports.

Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.kmk

    r65433 r66149  
    18091809        $(APPEND) include/iprt/x86.mac '%include "iprt/x86extra.mac"'
    18101810        $(SED) -f include/VBox/various.sed --output include/VBox/apic.mac          include/VBox/apic.h
     1811        $(SED) -f include/VBox/various.sed --output include/VBox/bios.mac          include/VBox/bios.h
    18111812        $(SED) -f include/VBox/various.sed --output include/VBox/param.mac         include/VBox/param.h
    18121813        $(SED) -f include/VBox/various.sed --output include/VBox/VMMDevTesting.mac include/VBox/VMMDevTesting.h
  • trunk/src/VBox/ValidationKit/bootsectors/bootsector-pae.asm

    r66145 r66149  
    2727%include "iprt/asmdefs.mac"
    2828%include "iprt/x86.mac"
     29%include "VBox/bios.mac"
    2930
    3031
     
    3435%define PD_ADDR         0xa000
    3536
    36 ;; The magic shutdown I/O port
    37 %define SHUTDOWN_PORT   0x040f
    3837
    3938BITS 16
     
    117116    ;
    118117    mov bl, 64
    119     mov dx, SHUTDOWN_PORT
     118    mov dx, VBOX_BIOS_SHUTDOWN_PORT
     119    mov ax, VBOX_BIOS_OLD_SHUTDOWN_PORT
    120120retry:
    121121    mov ecx, 8
    122122    mov esi, (szShutdown - start) + BS_ADDR
    123123    rep outsb
     124    xchg dx, ax                         ; alternate between the new (VBox) and old (Bochs) ports.
    124125    dec bl
    125126    jnz retry
  • trunk/src/VBox/ValidationKit/bootsectors/bootsector-shutdown.asm

    r66145 r66149  
    2525;
    2626
    27 ;; The magic shutdown I/O port
    28 SHUTDOWN_PORT   equ     040fh
     27%include "VBox/bios.mac"
     28
    2929
    3030BITS 16
     
    3939
    4040    ;
    41     ; Bochs shutdown request - write "Shutdown" byte by byte to shutdown port.
     41    ; VBox/Bochs shutdown request - write "Shutdown" byte by byte to shutdown port.
    4242    ;
    4343    mov cx, 64
    44     mov dx, SHUTDOWN_PORT
     44    mov dx, VBOX_BIOS_SHUTDOWN_PORT
     45    mov bx, VBOX_BIOS_OLD_SHUTDOWN_PORT
    4546retry:
    4647    mov al, 'S'
     
    6061    mov al, 'n'
    6162    out dx, al
     63    xchg dx, bx                         ; alternate between the new (VBox) and old (Bochs) ports.
    6264    loop retry
    6365
  • trunk/src/VBox/ValidationKit/bootsectors/bootsector2-common-init-code.mac

    r66145 r66149  
    7070%include "bootsector2-structures.mac"
    7171%include "bootsector2-common-macros-1.mac"
     72%include "VBox/bios.mac"
    7273
    7374
     
    7576;*      Defined Constants And Macros                                           *
    7677;*******************************************************************************
    77 
    78 ;; The magic shutdown I/O port
    79 %define SHUTDOWN_PORT   0x040f
    80 
    8178;; @name Static Memory Allocation
    8279; @{
     
    614611        cli
    615612        mov     bl, 64
    616         mov     dx, SHUTDOWN_PORT
    617613        mov     ax, ss
    618614        mov     ds, ax
     615        mov     dx, VBOX_BIOS_SHUTDOWN_PORT
     616        mov     ax, VBOX_BIOS_OLD_SHUTDOWN_PORT
    619617.retry:
    620618        mov     ecx, 8
    621619        mov     esi, .s_szShutdown
    622620        rep outsb
     621        xchg    dx, ax                  ; alternate between the new (VBox) and old (Bochs) ports.
    623622        dec     bl
    624623        jnz     .retry
  • trunk/src/VBox/ValidationKit/bootsectors/bootsector2-common-routines-template-1.mac

    r66145 r66149  
    2626
    2727%include "bootsector2-template-header.mac"
     28%include "VBox/bios.mac"
     29
    2830ALIGNCODE(32)
    2931GLOBALNAME TMPL_NM_CMN(g_szMode)
    3032        db TMPL_MODE_STR, 0
    3133
    32 ;; The magic shutdown I/O port
    33 %define SHUTDOWN_PORT   0x040f
    3434
    3535;;
     
    4646        cli
    4747        mov     bl, 64
    48         mov     dx, SHUTDOWN_PORT
    4948        mov     ax, ss
    5049        mov     ds, ax
     50        mov     dx, VBOX_BIOS_SHUTDOWN_PORT
     51        mov     ax, VBOX_BIOS_OLD_SHUTDOWN_PORT
    5152.retry:
    5253        mov     ecx, 8
    5354        mov     esi, .s_szShutdown
    5455        rep outsb
     56        xchg    dx, ax                  ; alternate between the new (VBox) and old (Bochs) ports.
    5557        dec     bl
    5658        jnz     .retry
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-Shutdown.asm

    r66145 r66149  
    2626
    2727%include "bs3kit-template-header.mac"
     28%include "VBox/bios.mac"
    2829
    2930BS3_EXTERN_CMN Bs3Panic
     
    3132BS3_PROC_BEGIN_CMN Bs3Shutdown, BS3_PBC_HYBRID_0_ARGS
    3233        cli
    33         mov     bl, 64
    34         mov     dx, SHUTDOWN_PORT
    3534%ifdef TMPL_16BIT
    3635        mov     ax, cs
    3736        mov     ds, ax
    3837%endif
     38        mov     bl, 64
     39        mov     dx, VBOX_BIOS_SHUTDOWN_PORT
     40        mov     ax, VBOX_BIOS_OLD_SHUTDOWN_PORT
    3941.retry:
    4042        mov     ecx, 8
    4143        mov     esi, .s_szShutdown
    4244        rep outsb
     45        xchg    ax, dx                  ; alternate between the new (VBox) and old (Bochs) ports.
    4346        dec     bl
    4447        jnz     .retry
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.mac

    r66145 r66149  
    17081708;; @}
    17091709
    1710 ;; The magic shutdown I/O port
    1711 %define SHUTDOWN_PORT   0x040f
    1712 
    17131710%endif
    17141711
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