Changeset 59789 in vbox for trunk/src/VBox/ValidationKit
- Timestamp:
- Feb 23, 2016 2:18:03 PM (9 years ago)
- 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 44 44 %include "bs3kit-template-header.mac" 45 45 46 BS3_EXTERN_DATA16 g_uBs3CpuDetected 46 47 BS3_BEGIN_TEXT16 47 BS3_EXTERN_TMPL Bs3InitMemory48 BS3_EXTERN_CMN Bs3Trap32Init49 48 BS3_EXTERN_CMN Bs3Shutdown 49 extern _Bs3InitAll_rm 50 50 51 51 … … 57 57 sub sp, 20h ; reserve 20h for 64-bit calls (we're doing them MSC style, remember). 58 58 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 64 60 65 61 ; -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk
r59747 r59789 132 132 bs3kit-common-16_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \ 133 133 bs3-system-data.asm \ 134 bs3-rm-InitAll.c \ 134 135 bs3-rm-InitMemory.c \ 135 136 bs3-cmn-hexdigits.c \ -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-CpuDetectData.c
r59482 r59789 38 38 #if ARCH_BITS == 16 39 39 40 extern uint16_t BS3_DATA_NM(g_uBs3CpuDetected) = BS3CPU_TYPE_MASK | BS3CPU_F_CPUID;40 uint16_t BS3_DATA_NM(g_uBs3CpuDetected) = BS3CPU_TYPE_MASK | BS3CPU_F_CPUID | BS3CPU_F_CPUID_EXT_LEAVES | BS3CPU_F_LONG_MODE; 41 41 42 42 #endif /* ARCH_BITS == 16 */ -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-CpuDetect.asm
r59482 r59789 203 203 je .return 204 204 .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: 205 222 mov xAX, BS3CPU_PProOrNewer | BS3CPU_F_CPUID 206 223 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
r59482 r59789 1858 1858 1859 1859 /** 1860 * Initializes all of boot sector kit \#3. 1861 */ 1862 BS3_DECL(void) Bs3InitAll_rm(void); 1863 1864 /** 1860 1865 * Initializes the REAL and TILED memory pools. 1861 1866 * … … 1863 1868 */ 1864 1869 BS3_DECL(void) Bs3InitMemory_rm(void); 1870 1865 1871 1866 1872 … … 1907 1913 /** @name BS3CPU_XXX - CPU detected by BS3CpuDetect_c16() and friends. 1908 1914 * @{ */ 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) 1918 1924 /** CPU type mask. This is a full byte so it's possible to use byte access 1919 1925 * 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) 1921 1927 /** 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) 1923 1933 /** @} */ 1924 1934 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.mac
r59482 r59789 944 944 ;; @name BS3CPU_XXX - Bs3CpuDetect_mmm return value and g_bBs3CpuDetected. 945 945 ;; @{ 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 957 959 ;; @} 958 960
Note:
See TracChangeset
for help on using the changeset viewer.