Changeset 59482 in vbox
- Timestamp:
- Jan 26, 2016 3:02:43 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 105244
- Location:
- trunk/src/VBox/ValidationKit/bootsectors
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/Config.kmk
r59304 r59482 304 304 # -ecw Sets the default calling convension to __watcall () 305 305 # -q Quiet, no logos or stuff. 306 # -0 Use 8086 instruction set (16-bit only). 306 307 # -3 Use 386 instruction set (16-bit only). 307 308 # -wx Maxium warning level. … … 335 336 TEMPLATE_VBoxBS3KitImg_CXXTOOL = Bs3Ow16 336 337 TEMPLATE_VBoxBS3KitImg_CFLAGS = \ 337 -nt=BS3TEXT16 -nd=BS3DATA16 -nc=BS3CODE16 -ecw -q - 3-wx -zl -zu -mc $(BS3_OW_DBG_OPT) -d1 -s -oa -ob -of -oi -ol -or -os338 -nt=BS3TEXT16 -nd=BS3DATA16 -nc=BS3CODE16 -ecw -q -0 -wx -zl -zu -mc $(BS3_OW_DBG_OPT) -d1 -s -oa -ob -of -oi -ol -or -os 338 339 TEMPLATE_VBoxBS3KitImg_CXXFLAGS = \ 339 -nt=BS3TEXT16 -nd=BS3DATA16 -nc=BS3CODE16 -ecw -q - 3-wx -zl -zu -mc $(BS3_OW_DBG_OPT) -d1 -s -oa -ob -of -oi -ol -or -os340 -nt=BS3TEXT16 -nd=BS3DATA16 -nc=BS3CODE16 -ecw -q -0 -wx -zl -zu -mc $(BS3_OW_DBG_OPT) -d1 -s -oa -ob -of -oi -ol -or -os 340 341 TEMPLATE_VBoxBS3KitImg_INCS = $(VBOX_PATH_BS3KIT_SRC) 341 342 TEMPLATE_VBoxBS3KitImg_LDTOOL = OPENWATCOM-WL -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk
r59320 r59482 112 112 ../../../Runtime/common/asm/ASMBitFirstSet.asm \ 113 113 ../../../Runtime/common/asm/ASMBitNextClear.asm \ 114 ../../../Runtime/common/asm/ASMBitNextSet.asm 114 ../../../Runtime/common/asm/ASMBitNextSet.asm \ 115 ../../../Runtime/common/asm/ASMBitFirstSetU16.asm \ 116 ../../../Runtime/common/asm/ASMBitFirstSetU32.asm \ 117 ../../../Runtime/common/asm/ASMBitFirstSetU64.asm \ 118 ../../../Runtime/common/asm/ASMBitLastSetU16.asm \ 119 ../../../Runtime/common/asm/ASMBitLastSetU32.asm \ 120 ../../../Runtime/common/asm/ASMBitLastSetU64.asm \ 115 121 116 122 # The 16-bit BS3Kit library. … … 124 130 bs3-rm-InitMemory.c \ 125 131 bs3-cmn-hexdigits.c \ 132 bs3-cmn-CpuDetectData.c \ 126 133 bs3-cmn-ConvertRMStackToP16UsingCxReturnToAx.asm \ 127 134 bs3-wc16-U8DR.asm \ -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-CpuDetect.asm
r59311 r59482 27 27 %include "bs3kit-template-header.mac" 28 28 29 %define BS3CPU_8086 1 30 %define BS3CPU_V20 2 31 %define BS3CPU_80186 3 32 %define BS3CPU_80286 4 33 %define BS3CPU_80386 5 34 %define BS3CPU_80486 6 35 %define BS3CPU_80486 7 36 %define BS3CPU_Pentium 8 37 %define BS3CPU_PPro 9 38 %define BS3CPU_PProOrNewer 10 39 %define BS3CPU_F_CPUID 0x80 40 29 BS3_EXTERN_DATA16 g_uBs3CpuDetected 30 TMPL_BEGIN_TEXT 41 31 42 32 ;; … … 215 205 mov xAX, BS3CPU_PProOrNewer | BS3CPU_F_CPUID 216 206 217 ;218 ; Epilogue.219 ;220 207 CPU 8086 221 208 .return: 209 ; 210 ; Save the return value. 211 ; 212 BS3_ONLY_16BIT_STMT push ds 213 BS3_ONLY_16BIT_STMT mov bx, seg g_uBs3CpuDetected 214 BS3_ONLY_16BIT_STMT mov ds, bx 215 mov [g_uBs3CpuDetected], ax 216 BS3_ONLY_16BIT_STMT pop ds 217 218 ; 219 ; Epilogue. 220 ; 222 221 popf 223 222 pop xBX … … 225 224 pop xCX 226 225 pop xBP 227 ;; @todo cache the return value.228 226 ret 229 227 BS3_PROC_END_MODE Bs3EnteredMode -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-rm-InitMemory.c
r59239 r59482 71 71 BS3_DECL(uint32_t) Bs3BiosInt15hE820(INT15E820ENTRY BS3_FAR *pEntry, size_t cbEntry, uint32_t uContinuationValue); 72 72 #pragma aux Bs3BiosInt15hE820 = \ 73 ".386" \ 73 74 "shl ebx, 10h" \ 74 75 "mov bx, ax" /* ebx = continutation */ \ … … 219 220 and BS3_SEL_TILED_AREA_SIZE present. This means we're only interested 220 221 in entries describing usable memory, ASSUMING of course no overlaps. */ 221 if (Bs3BiosInt15hE820(&Entry, sizeof(Entry), 0) != 0) 222 if ( (BS3_DATA_NM(g_uBs3CpuDetected) & BS3CPU_TYPE_MASK) >= BS3CPU_80386 223 && Bs3BiosInt15hE820(&Entry, sizeof(Entry), 0) != 0) 222 224 { 223 225 uint32_t uCont = 0; -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
r59287 r59482 730 730 uint16_t Bs3AsmSmsw(void); 731 731 # pragma aux Bs3AsmSmsw = \ 732 ".286" \ 732 733 "smsw ax" \ 733 734 value [ax] modify exact [ax] nomemory; … … 1858 1859 /** 1859 1860 * Initializes the REAL and TILED memory pools. 1861 * 1862 * For proper operation on OLDer CPUs, call #Bs3CpuDetect_mmm first. 1860 1863 */ 1861 1864 BS3_DECL(void) Bs3InitMemory_rm(void); … … 1872 1875 */ 1873 1876 1874 1877 /** 1878 * Macro for reducing typing. 1879 * 1880 * Doxygen knows how to expand this, well, kind of. 1881 */ 1882 #define BS3_MODE_EXPAND_PROTOTYPES(a_RetType, a_BaseFnNm, a_Parameters) \ 1883 BS3_DECL(a_RetType) RT_CONCAT(a_BaseFnNm,_rm) a_Parameters; \ 1884 BS3_DECL(a_RetType) RT_CONCAT(a_BaseFnNm,_pe16) a_Parameters; \ 1885 BS3_DECL(a_RetType) RT_CONCAT(a_BaseFnNm,_pe32) a_Parameters; \ 1886 BS3_DECL(a_RetType) RT_CONCAT(a_BaseFnNm,_pev86) a_Parameters; \ 1887 BS3_DECL(a_RetType) RT_CONCAT(a_BaseFnNm,_pp16) a_Parameters; \ 1888 BS3_DECL(a_RetType) RT_CONCAT(a_BaseFnNm,_pp32) a_Parameters; \ 1889 BS3_DECL(a_RetType) RT_CONCAT(a_BaseFnNm,_ppv86) a_Parameters; \ 1890 BS3_DECL(a_RetType) RT_CONCAT(a_BaseFnNm,_pae16) a_Parameters; \ 1891 BS3_DECL(a_RetType) RT_CONCAT(a_BaseFnNm,_pae32) a_Parameters; \ 1892 BS3_DECL(a_RetType) RT_CONCAT(a_BaseFnNm,_paev86) a_Parameters; \ 1893 BS3_DECL(a_RetType) RT_CONCAT(a_BaseFnNm,_lm16) a_Parameters; \ 1894 BS3_DECL(a_RetType) RT_CONCAT(a_BaseFnNm,_lm32) a_Parameters; \ 1895 BS3_DECL(a_RetType) RT_CONCAT(a_BaseFnNm,_lm64) a_Parameters 1896 1897 /** 1898 * Basic CPU detection. 1899 * 1900 * This sets the #g_bBs3CpuDetected global variable to the return value. 1901 * 1902 * @returns BS3CPU_XXX value with the BS3CPU_F_CPUID flag set depending on 1903 * capabilities. 1904 */ 1905 BS3_MODE_EXPAND_PROTOTYPES(uint8_t, Bs3CpuDetect,(void)); 1906 1907 /** @name BS3CPU_XXX - CPU detected by BS3CpuDetect_c16() and friends. 1908 * @{ */ 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) 1918 /** CPU type mask. This is a full byte so it's possible to use byte access 1919 * without and AND'ing to get the type value. */ 1920 #define BS3CPU_TYPE_MASK UINT16_C(0x00ff) 1921 /** Flag indicating that the CPUID instruction is supported by the CPU. */ 1922 #define BS3CPU_F_CPUID UINT16_C(0x0100) 1875 1923 /** @} */ 1876 1924 1925 /** The return value of #Bs3CpuDetect_mmm. (Initial value is BS3CPU_TYPE_MASK.) */ 1926 extern uint16_t BS3_DATA_NM(g_uBs3CpuDetected); 1927 1928 1929 /** @} */ 1930 1877 1931 RT_C_DECLS_END 1878 1932 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.mac
r59287 r59482 941 941 %define BS3TRAPRESUME_F_SKIP_CRX 1 942 942 943 %endif 944 943 944 ;; @name BS3CPU_XXX - Bs3CpuDetect_mmm return value and g_bBs3CpuDetected. 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 957 ;; @} 958 959 960 %endif 961
Note:
See TracChangeset
for help on using the changeset viewer.