Changeset 60578 in vbox for trunk/src/VBox/ValidationKit/bootsectors/bs3kit
- Timestamp:
- Apr 19, 2016 3:26:34 PM (9 years ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors/bs3kit
- Files:
-
- 8 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk
r60557 r60578 201 201 bs3-c16-CreateHybridFarRet.asm 202 202 bs3kit-common-16_bs3-cmn-UInt64Div.c_CFLAGS = -oh -d0 # -d1+ vs -d0 saves 0x6a3-0x577 = 0x12C (300)! 203 bs3kit-common-16_VBOX_NEAR_TO_FAR_ FUNCTIONS := \203 bs3kit-common-16_VBOX_NEAR_TO_FAR_CMN_FUNCTIONS := \ 204 204 $(sort $(subst bs3-cmn-,Bs3,$(basename $(filter-out \ 205 205 %Data.c \ … … 221 221 Bs3TrapInit \ 222 222 223 $(call BS3KIT_FN_GEN_NEARSTUBS,bs3kit-common-16,$(bs3kit-common-16_VBOX_NEAR_TO_FAR_FUNCTIONS)) 223 bs3kit-common-16_VBOX_FAR_TO_NEAR_CMN_FUNCTIONS := \ 224 ASMMemFirstMismatchingU8:8 \ 225 ASMMemFirstNonZero:6 \ 226 227 $(call BS3KIT_FN_GEN_CMN_NEARSTUBS,bs3kit-common-16,$(bs3kit-common-16_VBOX_NEAR_TO_FAR_CMN_FUNCTIONS)) 224 228 $(call BS3KIT_FN_GEN_MODE_NEARSTUBS,bs3kit-common-16,$(bs3kit-common-16_VBOX_NEAR_TO_FAR_MODE_FUNCTIONS)) 229 $(call BS3KIT_FN_GEN_CMN_FARSTUBS,bs3kit-common-16,$(bs3kit-common-16_VBOX_FAR_TO_NEAR_CMN_FUNCTIONS)) 225 230 226 231 # The 32-bit BS3Kit library. -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-instantiate-x0.c16
r60566 r60578 1 1 /* $Id$ */ 2 2 /** @file 3 * BS3Kit - 16-bit common C template instantiator .3 * BS3Kit - 16-bit common C template instantiator, using the BS3X0TEXT16 segment. 4 4 */ 5 5 … … 25 25 */ 26 26 27 27 #define BS3_USE_X0_TEXT_SEG 1 28 28 #include "bs3-cmn-instantiate-common.h" 29 29 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-instantiate-x1.c16
r60566 r60578 1 1 /* $Id$ */ 2 2 /** @file 3 * BS3Kit - 16-bit common C template instantiator .3 * BS3Kit - 16-bit common C template instantiator, using the BS3X1TEXT16 segment. 4 4 */ 5 5 … … 25 25 */ 26 26 27 27 #define BS3_USE_X1_TEXT_SEG 1 28 28 #include "bs3-cmn-instantiate-common.h" 29 29 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-SwitchToLM64.asm
r60557 r60578 41 41 ; @remarks Does not require 20h of parameter scratch space in 64-bit mode. 42 42 ; 43 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToLM 16_Safe), function, 043 BS3_GLOBAL_NAME_EX TMPL_NM(Bs3SwitchToLM64_Safe), function, 0 44 44 BS3_PROC_BEGIN_MODE Bs3SwitchToLM64, BS3_PBC_NEAR 45 45 %ifdef TMPL_LM64 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-mode-TestDoModes.c
r60557 r60578 25 25 */ 26 26 27 /** @todo get this mess into the RM segment! */28 29 27 30 28 /********************************************************************************************************************************* 31 29 * Header Files * 32 30 *********************************************************************************************************************************/ 33 #if defined(__WATCOMC__) && TMPL_MODE == BS3_MODE_RM 34 /* In real mode we move this blob of code to the RMTEXT16 segment to save space. */ 35 # define BS3_USE_RM_TEXT_SEG 1 31 #if TMPL_MODE == BS3_MODE_RM 32 # define BS3_USE_RM_TEXT_SEG 1 /* Real mode version in RMTEXT16 segment to save space. */ 36 33 # include "bs3kit-template-header.h" 37 34 # include "bs3-cmn-test.h" 38 # pragma code_seg("BS3RMTEXT16", "BS3CLASS16RMCODE")39 35 #else 40 36 # include "bs3kit-template-header.h" -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-rm-InitAll.c
r60556 r60578 34 34 #include <iprt/asm-amd64-x86.h> 35 35 36 //#ifdef __WATCOMC__37 //# pragma code_seg("BS3RMTEXT16", "BS3CLASS16RMCODE")38 //#endif39 40 36 41 37 BS3_DECL(void) Bs3InitAll_rm(void) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-rm-InitGdt.c
r60557 r60578 32 32 #include <iprt/asm.h> 33 33 34 #ifdef __WATCOMC__35 # pragma code_seg("BS3RMTEXT16", "BS3CLASS16RMCODE")36 #endif37 38 34 39 35 /********************************************************************************************************************************* -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-rm-InitMemory.c
r60556 r60578 32 32 #include "bs3-cmn-memory.h" 33 33 #include <iprt/asm.h> 34 35 #ifdef __WATCOMC__36 # pragma code_seg("BS3RMTEXT16", "BS3CLASS16RMCODE")37 #endif38 34 39 35 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit-mangling-code.h
r60527 r60578 30 30 */ 31 31 #undef BS3_CMN_MANGLER 32 #if ARCH_BITS != 16 || !defined(BS3_USE_ RM_TEXT_SEG)32 #if ARCH_BITS != 16 || !defined(BS3_USE_ALT_16BIT_TEXT_SEG) 33 33 # define BS3_CMN_MANGLER(a_Function) BS3_CMN_NM(a_Function) 34 34 #else -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.h
r60557 r60578 49 49 #endif 50 50 51 /** @def BS3_USE_ALT_16BIT_TEXT_SEG 52 * Combines the BS3_USE_RM_TEXT_SEG, BS3_USE_X0_TEXT_SEG, and 53 * BS3_USE_X1_TEXT_SEG indicators into a single one. */ 54 #if defined(BS3_USE_RM_TEXT_SEG) || defined(BS3_USE_X0_TEXT_SEG) || defined(BS3_USE_X1_TEXT_SEG) 55 # define BS3_USE_ALT_16BIT_TEXT_SEG 56 #else 57 # undef BS3_USE_ALT_16BIT_TEXT_SEG 58 #endif 59 51 60 /* 52 61 * We may want to reuse some IPRT code in the common name space, so we … … 55 64 * declarations before we can define it. Thus the duplciate effort.) 56 65 */ 57 #if ARCH_BITS != 16 || !defined(BS3_USE_ RM_TEXT_SEG)66 #if ARCH_BITS != 16 || !defined(BS3_USE_ALT_16BIT_TEXT_SEG) 58 67 # define RT_MANGLER(a_Name) RT_CONCAT3(a_Name,_c,ARCH_BITS) 59 68 #else 60 69 # define RT_MANGLER(a_Name) RT_CONCAT(a_Name,_f16) 70 # undef RTCALL 71 # define RTCALL __cdecl __far 61 72 #endif 62 73 #include <iprt/mangling.h> … … 509 520 * 510 521 * @param a_Type The return type. */ 511 #if ARCH_BITS != 16 || !defined(BS3_USE_ RM_TEXT_SEG)522 #if ARCH_BITS != 16 || !defined(BS3_USE_ALT_16BIT_TEXT_SEG) 512 523 # define BS3_DECL(a_Type) BS3_DECL_NEAR(a_Type) 513 524 #else … … 576 587 * Constructs a common function name, far or near as defined by the source. 577 588 * 578 * Which to use in 16-bit mode is defined by BS3_USE_ RM_TEXT_SEG. In 32-bit and579 * 64-bit mode there are no far symbols, only near ones.589 * Which to use in 16-bit mode is defined by BS3_USE_ALT_16BIT_TEXT_SEG. In 590 * 32-bit and 64-bit mode there are no far symbols, only near ones. 580 591 * 581 592 * Example: BS3_CMN_FN_NM(Bs3Shutdown) … … 583 594 * @param a_Name The name of the function. 584 595 */ 585 #if ARCH_BITS != 16 || !defined(BS3_USE_ RM_TEXT_SEG)596 #if ARCH_BITS != 16 || !defined(BS3_USE_ALT_16BIT_TEXT_SEG) 586 597 # define BS3_CMN_FN_NM(a_Name) BS3_CMN_NM(a_Name) 587 598 #else … … 2687 2698 #include "bs3kit-mangling-code.h" 2688 2699 2689 2690 #endif 2691 2700 /* 2701 * Change 16-bit text segment if requested. 2702 */ 2703 #if defined(BS3_USE_ALT_16BIT_TEXT_SEG) && ARCH_BITS == 16 && !defined(BS3_DONT_CHANGE_TEXT_SEG) 2704 # if (defined(BS3_USE_RM_TEXT_SEG) + defined(BS3_USE_X0_TEXT_SEG) + defined(BS3_USE_X1_TEXT_SEG)) != 1 2705 # error "Cannot set more than one alternative 16-bit text segment!" 2706 # elif defined(BS3_USE_RM_TEXT_SEG) 2707 # pragma code_seg("BS3RMTEXT16", "BS3CLASS16RMCODE") 2708 # elif defined(BS3_USE_X0_TEXT_SEG) 2709 # pragma code_seg("BS3X0TEXT16", "BS3CLASS16X0CODE") 2710 # elif defined(BS3_USE_X1_TEXT_SEG) 2711 # pragma code_seg("BS3X1TEXT16", "BS3CLASS16X1CODE") 2712 # else 2713 # error "Huh? Which alternative text segment did you want again?" 2714 # endif 2715 #endif 2716 2717 #endif 2718
Note:
See TracChangeset
for help on using the changeset viewer.