VirtualBox

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


Ignore:
Timestamp:
Feb 23, 2016 2:18:03 PM (9 years ago)
Author:
vboxsync
Message:

bs3: updates

Location:
trunk/src/VBox/ValidationKit/bootsectors
Files:
1 added
6 edited

Legend:

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

    r59311 r59789  
    4444%include "bs3kit-template-header.mac"
    4545
     46BS3_EXTERN_DATA16 g_uBs3CpuDetected
    4647BS3_BEGIN_TEXT16
    47 BS3_EXTERN_TMPL Bs3InitMemory
    48 BS3_EXTERN_CMN  Bs3Trap32Init
    4948BS3_EXTERN_CMN  Bs3Shutdown
     49extern          _Bs3InitAll_rm
    5050
    5151
     
    5757        sub     sp, 20h                 ; reserve 20h for 64-bit calls (we're doing them MSC style, remember).
    5858
    59         ;
    60         ; Do bs3kit init.
    61         ;
    62         call    Bs3InitMemory           ; Initialize the memory (must be done from real mode).
    63         call    Bs3Trap32Init
     59        call    _Bs3InitAll_rm
    6460
    6561        ;
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk

    r59747 r59789  
    132132bs3kit-common-16_SOURCES  = $(VBOX_BS3KIT_COMMON_SOURCES) \
    133133        bs3-system-data.asm \
     134        bs3-rm-InitAll.c \
    134135        bs3-rm-InitMemory.c \
    135136        bs3-cmn-hexdigits.c \
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-CpuDetectData.c

    r59482 r59789  
    3838#if ARCH_BITS == 16
    3939
    40 extern uint16_t BS3_DATA_NM(g_uBs3CpuDetected) = BS3CPU_TYPE_MASK | BS3CPU_F_CPUID;
     40uint16_t BS3_DATA_NM(g_uBs3CpuDetected) = BS3CPU_TYPE_MASK | BS3CPU_F_CPUID | BS3CPU_F_CPUID_EXT_LEAVES | BS3CPU_F_LONG_MODE;
    4141
    4242#endif /* ARCH_BITS == 16 */
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-CpuDetect.asm

    r59482 r59789  
    203203        je      .return
    204204.NewerThanPPro:
     205        ; Check for extended leaves and long mode.
     206        mov     eax, 0x80000000
     207        cpuid
     208        sub     eax, 0x80000001         ; Minimum leaf 0x80000001
     209        cmp     eax, 0x00010000         ; At most 0x10000 leaves.
     210        ja      .no_ext_leaves
     211
     212        mov     eax, 0x80000001
     213        cpuid
     214        test    edx, X86_CPUID_EXT_FEATURE_EDX_LONG_MODE
     215        jz      .no_long_mode
     216        mov     xAX, BS3CPU_PProOrNewer | BS3CPU_F_CPUID | BS3CPU_F_CPUID_EXT_LEAVES | BS3CPU_F_LONG_MODE
     217        jmp     .return
     218.no_long_mode:
     219        mov     xAX, BS3CPU_PProOrNewer | BS3CPU_F_CPUID | BS3CPU_F_CPUID_EXT_LEAVES
     220        jmp     .return
     221.no_ext_leaves:
    205222        mov     xAX, BS3CPU_PProOrNewer | BS3CPU_F_CPUID
    206223
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h

    r59482 r59789  
    18581858
    18591859/**
     1860 * Initializes all of boot sector kit \#3.
     1861 */
     1862BS3_DECL(void) Bs3InitAll_rm(void);
     1863
     1864/**
    18601865 * Initializes the REAL and TILED memory pools.
    18611866 *
     
    18631868 */
    18641869BS3_DECL(void) Bs3InitMemory_rm(void);
     1870
    18651871
    18661872
     
    19071913/** @name BS3CPU_XXX - CPU detected by BS3CpuDetect_c16() and friends.
    19081914 * @{ */
    1909 #define BS3CPU_8086             UINT16_C(0x0001)    /**< Both 8086 and 8088. */
    1910 #define BS3CPU_V20              UINT16_C(0x0002)    /**< Both NEC V20, V30 and relatives. */
    1911 #define BS3CPU_80186            UINT16_C(0x0003)    /**< Both 80186 and 80188. */
    1912 #define BS3CPU_80286            UINT16_C(0x0004)
    1913 #define BS3CPU_80386            UINT16_C(0x0005)
    1914 #define BS3CPU_80486            UINT16_C(0x0006)
    1915 #define BS3CPU_Pentium          UINT16_C(0x0007)
    1916 #define BS3CPU_PPro             UINT16_C(0x0008)
    1917 #define BS3CPU_PProOrNewer      UINT16_C(0x0009)
     1915#define BS3CPU_8086                 UINT16_C(0x0001)    /**< Both 8086 and 8088. */
     1916#define BS3CPU_V20                  UINT16_C(0x0002)    /**< Both NEC V20, V30 and relatives. */
     1917#define BS3CPU_80186                UINT16_C(0x0003)    /**< Both 80186 and 80188. */
     1918#define BS3CPU_80286                UINT16_C(0x0004)
     1919#define BS3CPU_80386                UINT16_C(0x0005)
     1920#define BS3CPU_80486                UINT16_C(0x0006)
     1921#define BS3CPU_Pentium              UINT16_C(0x0007)
     1922#define BS3CPU_PPro                 UINT16_C(0x0008)
     1923#define BS3CPU_PProOrNewer          UINT16_C(0x0009)
    19181924/** CPU type mask.  This is a full byte so it's possible to use byte access
    19191925 * without and AND'ing to get the type value. */
    1920 #define BS3CPU_TYPE_MASK        UINT16_C(0x00ff)
     1926#define BS3CPU_TYPE_MASK            UINT16_C(0x00ff)
    19211927/** Flag indicating that the CPUID instruction is supported by the CPU. */
    1922 #define BS3CPU_F_CPUID          UINT16_C(0x0100)
     1928#define BS3CPU_F_CPUID              UINT16_C(0x0100)
     1929/** Flag indicating that extend CPUID leaves are available (at least two).   */
     1930#define BS3CPU_F_CPUID_EXT_LEAVES   UINT16_C(0x0200)
     1931/** Flag indicating that the CPU supports long mode. */
     1932#define BS3CPU_F_LONG_MODE          UINT16_C(0x0400)
    19231933/** @} */
    19241934
  • trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.mac

    r59482 r59789  
    944944;; @name BS3CPU_XXX - Bs3CpuDetect_mmm return value and g_bBs3CpuDetected.
    945945;; @{
    946 %define BS3CPU_8086             0x0001
    947 %define BS3CPU_V20              0x0002
    948 %define BS3CPU_80186            0x0003
    949 %define BS3CPU_80286            0x0004
    950 %define BS3CPU_80386            0x0005
    951 %define BS3CPU_80486            0x0006
    952 %define BS3CPU_Pentium          0x0007
    953 %define BS3CPU_PPro             0x0008
    954 %define BS3CPU_PProOrNewer      0x0009
    955 %define BS3CPU_TYPE_MASK        0x00ff
    956 %define BS3CPU_F_CPUID          0x0100
     946%define BS3CPU_8086                 0x0001
     947%define BS3CPU_V20                  0x0002
     948%define BS3CPU_80186                0x0003
     949%define BS3CPU_80286                0x0004
     950%define BS3CPU_80386                0x0005
     951%define BS3CPU_80486                0x0006
     952%define BS3CPU_Pentium              0x0007
     953%define BS3CPU_PPro                 0x0008
     954%define BS3CPU_PProOrNewer          0x0009
     955%define BS3CPU_TYPE_MASK            0x00ff
     956%define BS3CPU_F_CPUID              0x0100
     957%define BS3CPU_F_CPUID_EXT_LEAVES   0x0200
     958%define BS3CPU_F_LONG_MODE          0x0400
    957959;; @}
    958960
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