Changeset 58593 in vbox for trunk/src/VBox/ValidationKit/bootsectors
- Timestamp:
- Nov 6, 2015 3:17:20 AM (9 years ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors
- Files:
-
- 1 deleted
- 2 edited
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/Makefile.kmk
r58588 r58593 187 187 188 188 189 ifeq ($(USER),bird) # work in progress.190 191 #192 # BS3Kit193 #194 195 # Dummy CP "linker" tool.196 TOOL_VBoxBsCpLd = Dummy copy linker.197 TOOL_VBoxBsCpLd_LINK_MISCBIN_OUTPUT =198 TOOL_VBoxBsCpLd_LINK_MISCBIN_DEPEND =199 TOOL_VBoxBsCpLd_LINK_MISCBIN_DEPORD =200 define TOOL_VBoxBsCpLd_LINK_MISCBIN_CMDS201 $(CP) -- $(objs) $(othersrc) "$(out)"202 endef203 204 # Dummy exit 1 "linker" tool.205 TOOL_VBoxBsUnusedLd = Dummy unused linker.206 TOOL_VBoxBsUnusedLd_LINK_MISCBIN_OUTPUT =207 TOOL_VBoxBsUnusedLd_LINK_MISCBIN_DEPEND =208 TOOL_VBoxBsUnusedLd_LINK_MISCBIN_DEPORD =209 define TOOL_VBoxBsUnusedLd_LINK_MISCBIN_CMDS210 echo "cannot use this template for linking"211 exit 1212 endef213 214 # BS3Kit template for assembly and 16-bit code.215 TEMPLATE_VBoxBS3KitImg = Template for building BS3Kit test images.216 TEMPLATE_VBoxBS3KitImg_INST = $(INST_VALIDATIONKIT)bootsectors/217 TEMPLATE_VBoxBS3KitImg_BINSUFF = .img218 TEMPLATE_VBoxBS3KitImg_MODE = 0644219 TEMPLATE_VBoxBS3KitImg_ASTOOL = NASM220 TEMPLATE_VBoxBS3KitImg_ASFLAGS := -f obj -g -w+orphan-labels #-P $(PATH_SUB_CURRENT)/bootsector2-first.mac221 TEMPLATE_VBoxBS3KitImg_ASDEFS = ASM_FORMAT_OMF __NASM__222 TEMPLATE_VBoxBS3KitImg_ARTOOL = OPENWATCOM-16223 TEMPLATE_VBoxBS3KitImg_CTOOL = OPENWATCOM-16224 TEMPLATE_VBoxBS3KitImg_CXXTOOL = OPENWATCOM-16225 TEMPLATE_VBoxBS3KitImg_CFLAGS = -nt=TEXT16 -nd=DATA16 -nc=CODE16226 TEMPLATE_VBoxBS3KitImg_CXXFLAGS = -nt=TEXT16 -nd=DATA16 -nc=CODE16227 TEMPLATE_VBoxBS3KitImg_INCS = bs3kit .228 TEMPLATE_VBoxBS3KitImg_LDTOOL = OPENWATCOM-WL229 TEMPLATE_VBoxBS3KitImg_LDFLAGS = \230 output raw offset=0x10000 \231 order \232 clname CODE16 \233 segment TEXT16 segaddr=0x1000 \234 clname DATA16 \235 segment DATA16 segaddr=0x1000 \236 clname CODE32 \237 segment TEXT32 \238 clname DATA32 \239 segment DATA32240 241 # BS3Kit template for 32-bit code.242 TEMPLATE_VBoxBS3KitImg32 = Template for building BS3Kit test images.243 TEMPLATE_VBoxBS3KitImg32_INSTTYPE = none244 TEMPLATE_VBoxBS3KitImg32_ASTOOL = NASM245 TEMPLATE_VBoxBS3KitImg32_ASFLAGS := -f obj -g -w+orphan-labels #-P $(PATH_SUB_CURRENT)/bootsector2-first.mac246 TEMPLATE_VBoxBS3KitImg32_ASDEFS = ASM_FORMAT_OMF __NASM__247 TEMPLATE_VBoxBS3KitImg32_ARTOOL = OPENWATCOM248 TEMPLATE_VBoxBS3KitImg32_CTOOL = OPENWATCOM249 TEMPLATE_VBoxBS3KitImg32_CXXTOOL = OPENWATCOM250 TEMPLATE_VBoxBS3KitImg32_CFLAGS = -nt=TEXT32 -nd=DATA32 -nc=CODE32251 TEMPLATE_VBoxBS3KitImg32_CXXFLAGS = -nt=TEXT32 -nd=DATA32 -nc=CODE32252 TEMPLATE_VBoxBS3KitImg32_INCS = bs3kit .253 TEMPLATE_VBoxBS3KitImg32_LDTOOL = VBoxBsUnusedLd254 255 # BS3Kit template for 64-bit code.256 TEMPLATE_VBoxBS3KitImg64 = Template for building BS3Kit test images.257 TEMPLATE_VBoxBS3KitImg64_INSTTYPE = none258 TEMPLATE_VBoxBS3KitImg64_ASTOOL = NASM259 TEMPLATE_VBoxBS3KitImg64_ASFLAGS := -f elf64 -g -w+orphan-labels #-P $(PATH_SUB_CURRENT)/bootsector2-first.mac260 TEMPLATE_VBoxBS3KitImg64_ASDEFS = ASM_FORMAT_ELF __NASM__ TMPL261 TEMPLATE_VBoxBS3KitImg64_ARTOOL = OPENWATCOM262 TEMPLATE_VBoxBS3KitImg64_CTOOL = DUMMY263 TEMPLATE_VBoxBS3KitImg64_CXXTOOL = DUMMY264 TEMPLATE_VBoxBS3KitImg64_INCS = bs3kit .265 TEMPLATE_VBoxBS3KitImg64_LDTOOL = VBoxBsUnusedLd266 267 # BS3Kit template for the bootsector.268 TEMPLATE_VBoxBS3KitBS = Template for building BS3Kit test images.269 TEMPLATE_VBoxBS3KitBS_INST = $(INST_VALIDATIONKIT)bootsectors/270 TEMPLATE_VBoxBS3KitBS_INSTTYPE = none271 TEMPLATE_VBoxBS3KitBS_BINSUFF = .img272 TEMPLATE_VBoxBS3KitBS_MODE = 0644273 TEMPLATE_VBoxBS3KitBS_ASTOOL = YASM274 TEMPLATE_VBoxBS3KitBS_ASFLAGS := -f bin --mapfile275 TEMPLATE_VBoxBS3KitBS_ASDEFS = ASM_FORMAT_BIN __YASM__276 TEMPLATE_VBoxBS3KitBS_INCS = bs3kit277 TEMPLATE_VBoxBS3KitBS_LDTOOL = VBoxBsCpLd278 279 # The boot sector.280 MISCBINS += bs3-bootsector281 bs3-bootsector_TEMPLATE = VBoxBS3KitBS282 bs3-bootsector_SOURCES = bs3kit/bs3-bootsector.asm283 284 # The BS3Kit library.285 LIBRARIES += bs3kit-common-16286 bs3kit-common-16_TEMPLATE = VBoxBS3KitImg287 bs3kit-common-16_DEFS = TMPL_PE16 BS3_CMN_ONLY288 bs3kit-common-16_SOURCES = \289 bs3kit/bs3-shutdown.asm290 291 # The 32-bit BS3Kit library.292 LIBRARIES += bs3kit-common-32293 bs3kit-common-32_TEMPLATE = VBoxBS3KitImg32294 bs3kit-common-32_DEFS = TMPL_PE32 BS3_CMN_ONLY295 bs3kit-common-32_SOURCES = \296 bs3kit/bs3-shutdown.asm297 298 # The 64-bit BS3Kit library.299 LIBRARIES += bs3kit-common-64300 bs3kit-common-64_TEMPLATE = VBoxBS3KitImg64301 bs3kit-common-64_DEFS = TMPL_LM64 BS3_CMN_ONLY302 bs3kit-common-64_SOURCES = \303 bs3kit/bs3-shutdown.asm304 305 endif # experimental306 307 189 include $(FILE_KBUILD_SUB_FOOTER) 308 190 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk
r58588 r58593 1 1 # $Id$ 2 2 ## @file 3 # VirtualBox Validation Kit - Bootsector Tests for Test Drivers or standalone testing.3 # VirtualBox Validation Kit - Bootsector Kit v3 4 4 # 5 5 … … 25 25 # 26 26 27 SUB_DEPTH = ../../../.. 27 SUB_DEPTH = ../../../../.. 28 28 include $(KBUILD_PATH)/subheader.kmk 29 29 30 30 31 31 # 32 # Boot Sector "Linker" tool. 33 # 34 TOOL_VBoxBootSectorLd = Joins one or more BS2 object files into a floppy img. 35 TOOL_VBoxBootSectorLd_LINK_MISCBIN_OUTPUT = 36 TOOL_VBoxBootSectorLd_LINK_MISCBIN_DEPEND = 37 TOOL_VBoxBootSectorLd_LINK_MISCBIN_DEPORD = $(VBoxBs2Linker_1_TARGET) 38 define TOOL_VBoxBootSectorLd_LINK_MISCBIN_CMDS 39 $(VBoxBs2Linker_1_TARGET) -o $(out) $(objs) $(othersrc) 40 endef 41 42 BLDPROGS += VBoxBs2Linker 43 VBoxBs2Linker_TEMPLATE = VBoxBldProg 44 VBoxBs2Linker_SOURCES = VBoxBs2Linker.cpp 45 46 47 # 48 # Makes a boot sector test image. 49 # 50 TEMPLATE_VBoxBsTestImg = kBuild tool config for building boot sector stuff. 51 TEMPLATE_VBoxBsTestImg_INST = $(INST_VALIDATIONKIT)bootsectors/ 52 TEMPLATE_VBoxBsTestImg_BINSUFF = .img 53 TEMPLATE_VBoxBsTestImg_MODE = 0644 54 TEMPLATE_VBoxBsTestImg_ASTOOL = YASM 55 TEMPLATE_VBoxBsTestImg_ASFLAGS:= -f bin -P $(PATH_SUB_CURRENT)/bootsector2-first.mac $(VBOX_YASM_Wno-segreg-in-64bit) --mapfile 56 TEMPLATE_VBoxBsTestImg_ASDEFS = ASM_FORMAT_BIN 57 TEMPLATE_VBoxBsTestImg_INCS = \ 58 . \ 59 ../../VMM/testcase/Instructions 60 TEMPLATE_VBoxBsTestImg_LDTOOL = VBoxBootSectorLd 61 62 63 # 64 # The boot sector tests. 65 # 66 MISCBINS += bootsector-shutdown 67 bootsector-shutdown_TEMPLATE = VBoxBsTestImg 68 bootsector-shutdown_SOURCES = bootsector-shutdown.asm 69 70 MISCBINS += bootsector-pae 71 bootsector-pae_TEMPLATE = VBoxBsTestImg 72 bootsector-pae_SOURCES = bootsector-pae.asm 73 74 MISCBINS += bootsector-empty 75 bootsector-empty_TEMPLATE = VBoxBsTestImg 76 bootsector-empty_SOURCES = bootsector-empty.asm 77 78 MISCBINS += bootsector2-test1 79 bootsector2-test1_TEMPLATE = VBoxBsTestImg 80 bootsector2-test1_SOURCES = bootsector2-test1.asm 81 82 MISCBINS += bootsector2-cpu-hidden-regs-1 83 bootsector2-cpu-hidden-regs-1_TEMPLATE = VBoxBsTestImg 84 bootsector2-cpu-hidden-regs-1_SOURCES = bootsector2-cpu-hidden-regs-1.asm 85 86 MISCBINS += bootsector2-cpu-instr-1 87 bootsector2-cpu-instr-1_TEMPLATE = VBoxBsTestImg 88 bootsector2-cpu-instr-1_SOURCES = bootsector2-cpu-instr-1.asm 89 90 MISCBINS += bootsector2-cpu-pf-1 91 bootsector2-cpu-pf-1_TEMPLATE = VBoxBsTestImg 92 bootsector2-cpu-pf-1_SOURCES = bootsector2-cpu-pf-1.asm 93 94 MISCBINS += bootsector2-cpu-xcpt-1 95 bootsector2-cpu-xcpt-1_TEMPLATE = VBoxBsTestImg 96 bootsector2-cpu-xcpt-1_SOURCES = bootsector2-cpu-xcpt-1.asm 97 98 MISCBINS += bootsector2-cpu-xcpt-2 99 bootsector2-cpu-xcpt-2_TEMPLATE = VBoxBsTestImg 100 bootsector2-cpu-xcpt-2_SOURCES = bootsector2-cpu-xcpt-2.asm 101 102 MISCBINS += bootsector2-cpu-a20-1 103 bootsector2-cpu-a20-1_TEMPLATE = VBoxBsTestImg 104 bootsector2-cpu-a20-1_SOURCES = bootsector2-cpu-a20-1.asm 105 106 MISCBINS += bootsector2-cpu-basic-1 107 bootsector2-cpu-basic-1_TEMPLATE = VBoxBsTestImg 108 bootsector2-cpu-basic-1_SOURCES = bootsector2-cpu-basic-1.asm 109 110 MISCBINS += bootsector2-boot-registers-1 111 bootsector2-boot-registers-1_TEMPLATE = VBoxBsTestImg 112 bootsector2-boot-registers-1_SOURCES = bootsector2-boot-registers-1.asm 113 114 MISCBINS += bootsector2-triple-fault-1 115 bootsector2-triple-fault-1_TEMPLATE = VBoxBsTestImg 116 bootsector2-triple-fault-1_SOURCES = bootsector2-triple-fault-1.asm 117 118 119 ifeq ($(USERNAME),birdxx) 120 if1of ($(KBUILD_HOST).$(KBUILD_HOST_ARCH),win.amd64) 121 # 122 # Generated instruction tests (work in progress). 32 # ----- Config.kmk: start ----- 123 33 # 124 34 125 VBOX_PATH_VBINSTST = $(PATH_ROOT)/src/VBox/VMM/testcase/Instructions 126 VBOX_VBINSTST_GEN = $(VBOX_PATH_VBINSTST)/InstructionTestGen.py 127 VBOX_BOOTSECTOR2_VBINSTST_AMD64_GEN = $(VBOX_BLD_PYTHON) $(VBOX_VBINSTST_GEN) \ 128 --split 3 --target bs2-r0-64 --output-base $(bootsectors_0_OUTDIR)/VBInsTst-64 --test-size tiny 129 VBOX_BOOTSECTOR2_VBINSTST_AMD64_FILES = $(shell $(VBOX_BOOTSECTOR2_VBINSTST_AMD64_GEN) --makefile-mode) 130 131 #$$(bootsectors_0_OUTDIR)/VBInsTst.ts + $$(VBOX_BOOTSECTOR2_VBINSTST_AMD64_FILES): $(VBOX_VBINSTST_GEN) | $$(dir $$@) 132 # $(VBOX_BOOTSECTOR2_VBINSTST_AMD64_GEN) 133 # $(APPEND) -t $@ 134 # 135 #bootsectors_SOURCES += $(bootsectors_0_OUTDIR)/bootsector2-vbinstst-1.img 136 #bootsectors_CLEAN += $(VBOX_BOOTSECTOR2_VBINSTST_AMD64_FILES) 137 # 138 #$$(bootsectors_0_OUTDIR)/bootsector2-vbinstst-1.img: \ 139 # $(PATH_SUB_CURRENT)/bootsector2-vbinstst-64-1.asm \ 140 # $$(bootsectors_0_OUTDIR)/VBInsTst-64.asm 141 # $(TOOL_$(VBOX_ASTOOL)_AS) -f bin -D ASM_FORMAT_BIN -I $(dir $@) -I $(PATH_ROOT)/include -I $(VBOX_PATH_VBINSTST) -o $@ -L nasm -l [email protected] $< 142 143 MISCBINS += bootsector2-vbinstst-kernel 144 bootsector2-vbinstst-kernel_TEMPLATE = VBoxBsTestImg 145 bootsector2-vbinstst-kernel_SOURCES = \ 146 bootsector2-vbinstst-kernel.asm 147 148 149 MISCBINS += bootsector2-vbinstst-64-1 150 bootsector2-vbinstst-64-1_TEMPLATE = VBoxBsTestImg 151 bootsector2-vbinstst-64-1_DEFS = \ 152 BS2_BIG_IMAGE_LM64 \ 153 BS2_BIG_IMAGE_GEN_SOURCE_FILE=bs2-vbinstst-64-1.asm \ 154 BS2_BIG_IMAGE_GEN_TEST_NAME=\"bs2-vbinstst-64-1\" 155 bootsector2-vbinstst-64-1_INCS = $(bootsector2-vbinstst-64-1_0_OUTDIR)/ 156 bootsector2-vbinstst-64-1_SOURCES = \ 157 bootsector2-vbinstst-kernel.asm \ 158 bootsector2-vbinstst-big-template.asm 159 bootsector2-vbinstst-64-1_INTERMEDIATES = \ 160 $(bootsector2-vbinstst-64-1_0_OUTDIR)/bs2-vbinstst-64-1.asm 161 bootsector2-vbinstst-64-1_CLEAN = \ 162 $(bootsector2-vbinstst-64-1_0_OUTDIR)/bs2-vbinstst-64-1.asm 163 164 $$(bootsector2-vbinstst-64-1_0_OUTDIR)/bs2-vbinstst-64-1.asm: $(VBOX_VBINSTST_GEN) | $$(dir $$@) 165 $(VBOX_BLD_PYTHON) $(VBOX_VBINSTST_GEN) --target bs2-r0-64-big --output-base $(basename $@) --test-size medium 166 167 MISCBINS += bootsector2-vbinstst-32-1 168 bootsector2-vbinstst-32-1_TEMPLATE = VBoxBsTestImg 169 bootsector2-vbinstst-32-1_DEFS = \ 170 BS2_BIG_IMAGE_PP32 \ 171 BS2_BIG_IMAGE_GEN_SOURCE_FILE=bs2-vbinstst-32-1.asm \ 172 BS2_BIG_IMAGE_GEN_TEST_NAME=\"bs2-vbinstst-32-1\" 173 bootsector2-vbinstst-32-1_INCS = $(bootsector2-vbinstst-32-1_0_OUTDIR)/ 174 bootsector2-vbinstst-32-1_SOURCES = \ 175 bootsector2-vbinstst-kernel.asm \ 176 bootsector2-vbinstst-big-template.asm 177 bootsector2-vbinstst-32-1_INTERMEDIATES = \ 178 $(bootsector2-vbinstst-32-1_0_OUTDIR)/bs2-vbinstst-32-1.asm 179 bootsector2-vbinstst-32-1_CLEAN = \ 180 $(bootsector2-vbinstst-32-1_0_OUTDIR)/bs2-vbinstst-32-1.asm 181 182 $$(bootsector2-vbinstst-32-1_0_OUTDIR)/bs2-vbinstst-32-1.asm: $(VBOX_VBINSTST_GEN) | $$(dir $$@) 183 $(VBOX_BLD_PYTHON) $(VBOX_VBINSTST_GEN) --target bs2-r0-32-big --output-base $(basename $@) --test-size medium 184 185 endif 186 endif # bird-only 187 188 189 ifeq ($(USER),bird) # work in progress. 190 191 # 192 # BS3Kit 193 # 35 # The bs3kit source directory. 36 VBOX_PATH_BS3KIT_SRC = $(VBOX_PATH_VALIDATIONKIT_SRC)/bootsectors/bs3kit 194 37 195 38 # Dummy CP "linker" tool. … … 218 61 TEMPLATE_VBoxBS3KitImg_MODE = 0644 219 62 TEMPLATE_VBoxBS3KitImg_ASTOOL = NASM 220 TEMPLATE_VBoxBS3KitImg_ASFLAGS := -f obj -g -w+orphan-labels #-P $(PATH_SUB_CURRENT)/bootsector2-first.mac221 TEMPLATE_VBoxBS3KitImg_ASDEFS = ASM_FORMAT_OMF __NASM__63 TEMPLATE_VBoxBS3KitImg_ASFLAGS := -f obj -g -w+orphan-labels 64 TEMPLATE_VBoxBS3KitImg_ASDEFS = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__ 222 65 TEMPLATE_VBoxBS3KitImg_ARTOOL = OPENWATCOM-16 223 66 TEMPLATE_VBoxBS3KitImg_CTOOL = OPENWATCOM-16 224 67 TEMPLATE_VBoxBS3KitImg_CXXTOOL = OPENWATCOM-16 225 TEMPLATE_VBoxBS3KitImg_CFLAGS = -nt= TEXT16 -nd=DATA16 -nc=CODE16226 TEMPLATE_VBoxBS3KitImg_CXXFLAGS = -nt= TEXT16 -nd=DATA16 -nc=CODE16227 TEMPLATE_VBoxBS3KitImg_INCS = bs3kit.68 TEMPLATE_VBoxBS3KitImg_CFLAGS = -nt=BS3TEXT16 -nd=BS3DATA16 -nc=BS3CODE16 -ecc -q -3 -wx -zl -zu -s -oafs -mc -hc -d1+ 69 TEMPLATE_VBoxBS3KitImg_CXXFLAGS = -nt=BS3TEXT16 -nd=BS3DATA16 -nc=BS3CODE16 -ecc -q -3 -wx -zl -zu -s -oafs -mc -hc -d1+ 70 TEMPLATE_VBoxBS3KitImg_INCS = $(VBOX_PATH_BS3KIT_SRC) . 228 71 TEMPLATE_VBoxBS3KitImg_LDTOOL = OPENWATCOM-WL 229 TEMPLATE_VBoxBS3KitImg_LDFLAGS = \ 72 # option quiet, nofarcalls\ 73 # disable 1014, 1023, 2120, 1080 74 75 TEMPLATE_VBoxBS3KitImg_LDFLAGS = system dos \ 76 debug codeview all \ 77 option quiet, map, statics, verbose, symfile, start=_start \ 78 disable 1014, 1080 \ 79 \ 230 80 output raw offset=0x10000 \ 231 81 order \ 232 clname CODE16 \ 233 segment TEXT16 segaddr=0x1000 \ 234 clname DATA16 \ 235 segment DATA16 segaddr=0x1000 \ 82 clname CODE16 segaddr=0x1000 \ 83 segment BS3TEXT16 \ 84 segment text \ 85 clname FAR_DATA \ 86 segment BS3DATA16 \ 236 87 clname CODE32 \ 88 segment BS3TEXT32 \ 237 89 segment TEXT32 \ 238 90 clname DATA32 \ 91 segment BS3DATA32 \ 239 92 segment DATA32 93 TEMPLATE_VBoxBS3KitImg_LIBS = \ 94 $(PATH_OBJ)/bs3kit-common-16/bs3kit-common-16.lib \ 95 $(PATH_OBJ)/bs3kit-common-32/bs3kit-common-32.lib \ 96 $(PATH_OBJ)/bs3kit-common-64/bs3kit-common-64.lib 240 97 241 98 # BS3Kit template for 32-bit code. … … 243 100 TEMPLATE_VBoxBS3KitImg32_INSTTYPE = none 244 101 TEMPLATE_VBoxBS3KitImg32_ASTOOL = NASM 245 TEMPLATE_VBoxBS3KitImg32_ASFLAGS := -f obj -g - w+orphan-labels #-P $(PATH_SUB_CURRENT)/bootsector2-first.mac246 TEMPLATE_VBoxBS3KitImg32_ASDEFS = ASM_FORMAT_OMF __NASM__102 TEMPLATE_VBoxBS3KitImg32_ASFLAGS := -f obj -g --allow-64bit-code-anywhere -w+orphan-labels 103 TEMPLATE_VBoxBS3KitImg32_ASDEFS = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__ 247 104 TEMPLATE_VBoxBS3KitImg32_ARTOOL = OPENWATCOM 248 105 TEMPLATE_VBoxBS3KitImg32_CTOOL = OPENWATCOM 249 106 TEMPLATE_VBoxBS3KitImg32_CXXTOOL = OPENWATCOM 250 TEMPLATE_VBoxBS3KitImg32_CFLAGS = -nt= TEXT32 -nd=DATA32 -nc=CODE32251 TEMPLATE_VBoxBS3KitImg32_CXXFLAGS = -nt= TEXT32 -nd=DATA32 -nc=CODE32252 TEMPLATE_VBoxBS3KitImg32_INCS = bs3kit.107 TEMPLATE_VBoxBS3KitImg32_CFLAGS = -nt=BS3TEXT32 -nd=BS3DATA32 -nc=BS3CODE32 -ecc -q -wx -zu -s -oas -ms -hc -d1 108 TEMPLATE_VBoxBS3KitImg32_CXXFLAGS = -nt=BS3TEXT32 -nd=BS3DATA32 -nc=BS3CODE32 -ecc -q -wx -zu -s -oas -ms -hc -d1 109 TEMPLATE_VBoxBS3KitImg32_INCS = $(VBOX_PATH_BS3KIT_SRC) . 253 110 TEMPLATE_VBoxBS3KitImg32_LDTOOL = VBoxBsUnusedLd 254 111 … … 257 114 TEMPLATE_VBoxBS3KitImg64_INSTTYPE = none 258 115 TEMPLATE_VBoxBS3KitImg64_ASTOOL = NASM 259 TEMPLATE_VBoxBS3KitImg64_ASFLAGS := -f elf64 -g -w+orphan-labels #-P $(PATH_SUB_CURRENT)/bootsector2-first.mac260 TEMPLATE_VBoxBS3KitImg64_ASDEFS = ASM_FORMAT_ ELF __NASM__ TMPL116 TEMPLATE_VBoxBS3KitImg64_ASFLAGS := -f obj -g --allow-64bit-code-anywhere -w+orphan-labels 117 TEMPLATE_VBoxBS3KitImg64_ASDEFS = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__ 261 118 TEMPLATE_VBoxBS3KitImg64_ARTOOL = OPENWATCOM 262 TEMPLATE_VBoxBS3KitImg64_ CTOOL = DUMMY263 TEMPLATE_VBoxBS3KitImg64_C XXTOOL = DUMMY264 TEMPLATE_VBoxBS3KitImg64_ INCS = bs3kit .119 TEMPLATE_VBoxBS3KitImg64_INCS = $(VBOX_PATH_BS3KIT_SRC) . 120 TEMPLATE_VBoxBS3KitImg64_CTOOL = VBoxBsUnusedLd 121 TEMPLATE_VBoxBS3KitImg64_CXXTOOL = VBoxBsUnusedLd 265 122 TEMPLATE_VBoxBS3KitImg64_LDTOOL = VBoxBsUnusedLd 266 123 … … 273 130 TEMPLATE_VBoxBS3KitBS_ASTOOL = YASM 274 131 TEMPLATE_VBoxBS3KitBS_ASFLAGS := -f bin --mapfile 275 TEMPLATE_VBoxBS3KitBS_ASDEFS = ASM_FORMAT_BIN __YASM__276 TEMPLATE_VBoxBS3KitBS_INCS = bs3kit132 TEMPLATE_VBoxBS3KitBS_ASDEFS = ASM_FORMAT_BIN RT_NOINC_SEGMENTS __YASM__ 133 TEMPLATE_VBoxBS3KitBS_INCS = $(VBOX_PATH_BS3KIT_SRC) . 277 134 TEMPLATE_VBoxBS3KitBS_LDTOOL = VBoxBsCpLd 135 136 # 137 # ----- Config.kmk: end ----- 138 # 139 278 140 279 141 # The boot sector. 280 142 MISCBINS += bs3-bootsector 281 143 bs3-bootsector_TEMPLATE = VBoxBS3KitBS 282 bs3-bootsector_SOURCES = bs3kit/bs3-bootsector.asm 144 bs3-bootsector_SOURCES = bs3-bootsector.asm 145 146 # Common sources to be compiled into _p16, _p32 and _p64 versions. 147 VBOX_BS3KIT_COMMON_SOURCES = \ 148 bs3-cmn-shutdown.asm \ 149 bs3-cmn-panic.asm 283 150 284 151 # The BS3Kit library. … … 286 153 bs3kit-common-16_TEMPLATE = VBoxBS3KitImg 287 154 bs3kit-common-16_DEFS = TMPL_PE16 BS3_CMN_ONLY 288 bs3kit-common-16_SOURCES = \ 289 bs3kit/bs3-shutdown.asm 155 bs3kit-common-16_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) 290 156 291 157 # The 32-bit BS3Kit library. … … 293 159 bs3kit-common-32_TEMPLATE = VBoxBS3KitImg32 294 160 bs3kit-common-32_DEFS = TMPL_PE32 BS3_CMN_ONLY 295 bs3kit-common-32_SOURCES = \ 296 bs3kit/bs3-shutdown.asm 161 bs3kit-common-32_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) 297 162 298 163 # The 64-bit BS3Kit library. … … 300 165 bs3kit-common-64_TEMPLATE = VBoxBS3KitImg64 301 166 bs3kit-common-64_DEFS = TMPL_LM64 BS3_CMN_ONLY 302 bs3kit-common-64_SOURCES = \ 303 bs3kit/bs3-shutdown.asm 167 bs3kit-common-64_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) 304 168 305 endif # experimental 169 # 170 # shutdown example. 171 # 172 MISCBINS += bs3-shutdown 173 bs3-shutdown_TEMPLATE = VBoxBS3KitImg 174 bs3-shutdown_SOURCES = bs3-first-rm.asm bs3-shutdown.c 175 306 176 307 177 include $(FILE_KBUILD_SUB_FOOTER) -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3-cmn-shutdown.asm
r58588 r58593 27 27 %include "bs3kit-template-header.mac" 28 28 29 extern TMPL_CMN_NM(Bs3Panic) 29 EXTERN_CMN_NM Bs3Panic 30 30 31 31 BEGINPROC TMPL_CMN_NM(Bs3Shutdown) … … 44 44 jnz .retry 45 45 ; Shutdown failed! 46 jmp TMPL_CMN_NM(Bs3Panic)46 jmp Bs3Panic 47 47 .s_szShutdown: 48 48 db 'Shutdown', 0 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/bs3kit.mac
r58588 r58593 28 28 %define ___bs3kit_mac___ 29 29 30 31 ;; When using watcom + OMF, we're using __cdecl by default, which 32 ; get an underscore added in front. 33 %ifdef ASM_FORMAT_OMF 34 %define NAME(name) _ %+ NAME_OVERLOAD(name) 35 %endif 36 37 30 38 %include "iprt/asmdefs.mac" 31 39 %include "iprt/x86.mac" 40 41 42 ;; 43 ; Extern macro which mangles the name correctly. 44 %macro EXTERN 1 45 extern NAME(%1) 46 %endmacro 47 48 ;; 49 ; Extern macro which mangles the common name correctly, redefining the unmangled 50 ; name with to the mangled one for ease of use. 51 %macro EXTERN_CMN_NM 1 52 %ifdef TMPL_64BIT 53 extern NAME(%1 %+ _p64) 54 %define %1 NAME(%1 %+ _p64) 55 56 %elifdef TMPL_32BIT 57 extern NAME(%1 %+ _p32) 58 %define %1 NAME(%1 %+ _p32) 59 60 %elifdef TMPL_16BIT 61 extern NAME(%1 %+ _p16) 62 %define %1 NAME(%1 %+ _p16) 63 64 %else 65 %error "Missing TMPL_xxBIT!" 66 %endif 67 %endmacro 68 32 69 33 70 … … 107 144 ;; @{ 108 145 %macro BS3_BEGIN_TEXT16 0 109 %ifndef BS3_BEGIN_TEXT16_NOT_FIRST146 %ifndef BS3_BEGIN_TEXT16_NOT_FIRST 110 147 %define BS3_BEGIN_TEXT16_NOT_FIRST 111 section TEXT16 CLASS=CODE16 PUBLIC USE16 ALIGN=1 112 %else 113 section TEXT16 148 %ifdef ASM_FORMAT_ELF 149 section BS3TEXT16 align=1 progbits alloc exec nowrite 150 %else 151 section BS3TEXT16 align=1 CLASS=CODE16 PUBLIC USE16 152 %endif 153 154 %else 155 section BS3TEXT16 114 156 %endif 115 157 %endmacro 116 158 117 159 %macro BS3_BEGIN_DATA16 0 118 %ifndef BS3_BEGIN_DATA16_NOT_FIRST160 %ifndef BS3_BEGIN_DATA16_NOT_FIRST 119 161 %define BS3_BEGIN_DATA16_NOT_FIRST 120 section DATA16 CLASS=DATA16 PUBLIC USE16 ALIGN=2 121 %else 122 section DATA16 162 %ifdef ASM_FORMAT_ELF 163 section BS3DATA16 align=2 progbits alloc noexec write 164 %else 165 section BS3DATA16 align=2 CLASS=FAR_DATA PUBLIC USE16 166 %endif 167 %else 168 section BS3DATA16 123 169 %endif 124 170 %endmacro 125 171 126 172 %macro BS3_BEGIN_TEXT32 0 127 %ifndef BS3_BEGIN_TEXT16_NOT_FIRST 128 %define BS3_BEGIN_TEXT16_NOT_FIRST 129 section TEXT32 CLASS=CODE32 PUBLIC USE32 ALIGN=1 130 %else 131 section TEXT32 173 %ifndef BS3_BEGIN_TEXT32_NOT_FIRST 174 %define BS3_BEGIN_TEXT32_NOT_FIRST 175 %ifdef ASM_FORMAT_ELF 176 section BS3TEXT32 align=1 progbits alloc exec nowrite 177 %else 178 section BS3TEXT32 align=1 CLASS=CODE32 PUBLIC USE32 179 %endif 180 %else 181 section BS3TEXT32 132 182 %endif 133 183 %endmacro 134 184 135 185 %macro BS3_BEGIN_DATA32 0 136 %ifndef BS3_BEGIN_DATA32_NOT_FIRST186 %ifndef BS3_BEGIN_DATA32_NOT_FIRST 137 187 %define BS3_BEGIN_DATA32_NOT_FIRST 138 section DATA32 CLASS=DATA32 PUBLIC USE32 ALIGN=16 139 %else 140 section DATA32 188 %ifdef ASM_FORMAT_ELF 189 section BS3DATA32 align=16 progbits alloc noexec write 190 %else 191 section BS3DATA32 align=16 CLASS=DATA32 PUBLIC USE32 192 %endif 193 %else 194 section BS3DATA32 141 195 %endif 142 196 %endmacro 143 197 144 198 %macro BS3_BEGIN_TEXT64 0 145 %ifndef BS3_BEGIN_TEXT64_NOT_FIRST199 %ifndef BS3_BEGIN_TEXT64_NOT_FIRST 146 200 %define BS3_BEGIN_TEXT64_NOT_FIRST 147 201 %ifdef ASM_FORMAT_ELF 148 section TEXT64 ALIGN=1149 %else 150 section TEXT64 CLASS=CODE64 PUBLIC USE32 ALIGN=1151 %endif 152 %else 153 section TEXT64202 section BS3TEXT64 align=1 progbits alloc exec nowrite 203 %else 204 section BS3TEXT64 align=1 CLASS=CODE64 PUBLIC USE32 205 %endif 206 %else 207 section BS3TEXT64 154 208 %endif 155 209 %endmacro 156 210 157 211 %macro BS3_BEGIN_DATA64 0 158 %ifndef BS3_BEGIN_DATA64_NOT_FIRST212 %ifndef BS3_BEGIN_DATA64_NOT_FIRST 159 213 %define BS3_BEGIN_DATA64_NOT_FIRST 160 214 %ifdef ASM_FORMAT_ELF 161 section DATA64 ALIGN=16162 %else 163 section DATA64 CLASS=DATA64 PUBLIC USE32 ALIGN=16164 %endif 165 %else 166 section DATA64215 section BS3DATA64 align=16 progbits alloc noexec write 216 %else 217 section BS3DATA64 align=16 CLASS=DATA64 PUBLIC USE32 218 %endif 219 %else 220 section BS3DATA64 167 221 %endif 168 222 %endmacro
Note:
See TracChangeset
for help on using the changeset viewer.