diff --git a/ChangeLog.txt b/ChangeLog.txt
index f545b5f..a179a7c 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,6 +1,11 @@
For detailed information about the changes below, please see the git log or
visit: https://github.com/pbatard/efifs
+v1.2 (2017.11.14)
+* Add EDK2 compilation support
+* Add Visual Studio 2017 ARM64 compilation support
+* Update GRUB and gnu-efi to latest
+
v1.1 (2016.12.28)
* Add ARM64 platform support
* Add F2FS support (EXPERIMENTAL)
diff --git a/CompilerIntrinsicsLib.inf b/CompilerIntrinsicsLib.inf
new file mode 100644
index 0000000..1472bec
--- /dev/null
+++ b/CompilerIntrinsicsLib.inf
@@ -0,0 +1,51 @@
+#/*++
+#
+# Copyright (c) 2017, Pete Batard. All rights reserved.
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD License
+# which accompanies this distribution. The full text of the license may be found at
+# http://opensource.org/licenses/bsd-license.php
+#
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+# Abstract:
+#
+# Intrinsics required to compile EfiFs with MSFT.
+#
+#--*/
+
+[Defines]
+ INF_VERSION = 0x00010005
+ BASE_NAME = CompilerIntrinsicsLib
+ FILE_GUID = B11194CC-A4AA-4886-8241-101F3DAD8BEF
+ MODULE_TYPE = BASE
+ VERSION_STRING = 1.0
+ LIBRARY_CLASS = CompilerIntrinsicsLib
+
+#
+# VALID_ARCHITECTURES = IA32
+#
+
+[Sources.IA32]
+ # Compiler helper (C RunTime) functions
+ ../StdLib/LibC/CRT/Ia32/llmul.c | MSFT # __allmul
+ ../StdLib/LibC/CRT/Ia32/llshl.c | MSFT # __allshl
+ ../StdLib/LibC/CRT/Ia32/llshr.c | MSFT # __allshr
+ ../StdLib/LibC/CRT/Ia32/ulldiv.c | MSFT # __aulldiv
+ ../StdLib/LibC/CRT/Ia32/ullrem.c | MSFT # __aullrem
+ ../StdLib/LibC/CRT/Ia32/ullshr.c | MSFT # __aullshr
+ ../StdLib/LibC/CRT/Ia32/lldiv.c | MSFT # __alldiv
+ ../StdLib/LibC/CRT/Ia32/llrem.c | MSFT # __allrem
+ ../StdLib/LibC/CRT/Ia32/lldvrm.c | MSFT # __alldvrm
+ ../StdLib/LibC/CRT/Ia32/ulldvrm.c | MSFT # __aulldvrm
+
+[Packages]
+ MdePkg/MdePkg.dec
+ ArmPkg/ArmPkg.dec
+
+[LibraryClasses]
+
+[BuildOptions]
+ MSFT:*_*_IA32_CC_FLAGS = /GL-
+ MSFT:*_*_IA32_DLINK_FLAGS = /INCLUDE:_MultS64x64
\ No newline at end of file
diff --git a/EfiFsPkg.dec b/EfiFsPkg.dec
index 4b69608..6c1e18e 100644
--- a/EfiFsPkg.dec
+++ b/EfiFsPkg.dec
@@ -10,7 +10,7 @@
PACKAGE_NAME = EfiFsPkg
PACKAGE_UNI_FILE = EfiFsPkg.uni
PACKAGE_GUID = D65E40B8-BC4B-4625-9E5C-17C5726C39C3
- PACKAGE_VERSION = 1.1
+ PACKAGE_VERSION = 1.2
[UserExtensions.TianoCore."ExtraFiles"]
EfiFsPkgExtra.uni
diff --git a/EfiFsPkg.dsc b/EfiFsPkg.dsc
index bff30d4..18b747f 100644
--- a/EfiFsPkg.dsc
+++ b/EfiFsPkg.dsc
@@ -8,7 +8,7 @@
[Defines]
PLATFORM_NAME = EfiFs
PLATFORM_GUID = 700d6096-1578-409e-a6c7-9acdf9f565b3
- PLATFORM_VERSION = 1.1
+ PLATFORM_VERSION = 1.2
DSC_SPECIFICATION = 0x00010005
SUPPORTED_ARCHITECTURES = IA32|X64|EBC|ARM|AARCH64
OUTPUT_DIRECTORY = Build/EfiFs
@@ -42,19 +42,16 @@
DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf
DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
-[LibraryClasses.common.PEIM]
- PeimEntryPoint|MdePkg/Library/PeimEntryPoint/PeimEntryPoint.inf
- PeiServicesLib|MdePkg/Library/PeiServicesLib/PeiServicesLib.inf
- PeiServicesTablePointerLib|MdePkg/Library/PeiServicesTablePointerLib/PeiServicesTablePointerLib.inf
- HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
- MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
-
[LibraryClasses.ARM, LibraryClasses.AARCH64]
-!if $(TOOLCHAIN) != "VS2017" || $(ARCH) != "AARCH64"
NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
-!endif
-!if $(TOOLCHAIN) != "VS2017"
NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf
+
+[LibraryClasses.IA32, LibraryClasses.X64]
+ NULL|EdkCompatibilityPkg/Foundation/Library/CompilerStub/CompilerStubLib.inf
+
+[LibraryClasses.IA32]
+!if $(TOOLCHAIN) == "VS2017"
+ NULL|EfiFsPkg/CompilerIntrinsicsLib.inf
!endif
###################################################################################################
diff --git a/EfiFsPkg/Affs.inf b/EfiFsPkg/Affs.inf
index 4e0df1e..b56d41e 100644
--- a/EfiFsPkg/Affs.inf
+++ b/EfiFsPkg/Affs.inf
@@ -8,7 +8,7 @@
BASE_NAME = affs
FILE_GUID = BD873114-A318-48C4-AEF9-6C9E43A50FFA
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -69,6 +69,5 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR="\"Amiga FFS\""
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
GCC:*_*_*_CC_FLAGS = -Wno-overflow
diff --git a/EfiFsPkg/Afs.inf b/EfiFsPkg/Afs.inf
index a02df8c..7bf4dc2 100644
--- a/EfiFsPkg/Afs.inf
+++ b/EfiFsPkg/Afs.inf
@@ -8,7 +8,7 @@
BASE_NAME = afs
FILE_GUID = DEFE2F9E-38C4-4278-AB7D-3BCC7B3C9292
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -69,5 +69,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"AFS\"
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Bfs.inf b/EfiFsPkg/Bfs.inf
index 2bad973..b4f62dc 100644
--- a/EfiFsPkg/Bfs.inf
+++ b/EfiFsPkg/Bfs.inf
@@ -8,7 +8,7 @@
BASE_NAME = bfs
FILE_GUID = 7686EACB-461E-417F-BB6B-0C5DBA8B4087
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -69,5 +69,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"BFS\"
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
\ No newline at end of file
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Btrfs.inf b/EfiFsPkg/Btrfs.inf
index ea3aded..2c9b5f7 100644
--- a/EfiFsPkg/Btrfs.inf
+++ b/EfiFsPkg/Btrfs.inf
@@ -8,7 +8,7 @@
BASE_NAME = btrfs
FILE_GUID = E4FD4F23-5515-434C-9F19-59CA8B122825
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -74,5 +74,4 @@
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"Btrfs\"
*_*_*_CC_FLAGS = -DEXTRAMODULE=gzio
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Cbfs.inf b/EfiFsPkg/Cbfs.inf
index 5f37825..e7a2f0f 100644
--- a/EfiFsPkg/Cbfs.inf
+++ b/EfiFsPkg/Cbfs.inf
@@ -8,7 +8,7 @@
BASE_NAME = cbfs
FILE_GUID = DEEC0FF0-64AE-4B2D-A9D1-87057258854C
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -71,5 +71,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"CBFS\"
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Cpio.inf b/EfiFsPkg/Cpio.inf
index ca976ff..d0c223a 100644
--- a/EfiFsPkg/Cpio.inf
+++ b/EfiFsPkg/Cpio.inf
@@ -8,7 +8,7 @@
BASE_NAME = cpio
FILE_GUID = FE902772-06CD-40E4-B35B-0E760C5E9C1A
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -70,5 +70,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR="\"cpio (LE)\""
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/CpioBe.inf b/EfiFsPkg/CpioBe.inf
index dc5ae4e..971aa84 100644
--- a/EfiFsPkg/CpioBe.inf
+++ b/EfiFsPkg/CpioBe.inf
@@ -8,7 +8,7 @@
BASE_NAME = cpio_be
FILE_GUID = A3853AE0-E77D-405E-8A75-16333DE1632C
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -70,5 +70,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR="\"cpio (BE)\""
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/ExFat.inf b/EfiFsPkg/ExFat.inf
index 579b7aa..4c7c672 100644
--- a/EfiFsPkg/ExFat.inf
+++ b/EfiFsPkg/ExFat.inf
@@ -8,7 +8,7 @@
BASE_NAME = exfat
FILE_GUID = 2920E524-AD21-499E-9F4A-466BFDC3BFFB
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -69,5 +69,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"ExFAT\"
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Ext2.inf b/EfiFsPkg/Ext2.inf
index 0031b42..8fe9d1b 100644
--- a/EfiFsPkg/Ext2.inf
+++ b/EfiFsPkg/Ext2.inf
@@ -8,7 +8,7 @@
BASE_NAME = ext2
FILE_GUID = 7DDA7772-B8F5-4859-9DBA-0D6F2DBA4AF1
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -69,5 +69,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"ext2/3/4\"
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/F2fs.inf b/EfiFsPkg/F2fs.inf
index e6f8d71..eca2621 100644
--- a/EfiFsPkg/F2fs.inf
+++ b/EfiFsPkg/F2fs.inf
@@ -8,7 +8,7 @@
BASE_NAME = f2fs
FILE_GUID = 3D1F4906-3509-4DD4-8850-70033DE336E4
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -69,5 +69,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"F2FS\"
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Fat.inf b/EfiFsPkg/Fat.inf
index 0c78cd2..cdecd38 100644
--- a/EfiFsPkg/Fat.inf
+++ b/EfiFsPkg/Fat.inf
@@ -8,7 +8,7 @@
BASE_NAME = fat
FILE_GUID = B9E0C839-BF75-4889-82FF-214BED41BA47
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -69,5 +69,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"ExFAT\"
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Hfs.inf b/EfiFsPkg/Hfs.inf
index addbdc1..b19bd51 100644
--- a/EfiFsPkg/Hfs.inf
+++ b/EfiFsPkg/Hfs.inf
@@ -8,7 +8,7 @@
BASE_NAME = hfs
FILE_GUID = BB57B5D8-F6DE-481C-9B08-C779B0F33E25
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -69,5 +69,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"HFS\"
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/HfsPlus.inf b/EfiFsPkg/HfsPlus.inf
index 65584b8..e91cc0f 100644
--- a/EfiFsPkg/HfsPlus.inf
+++ b/EfiFsPkg/HfsPlus.inf
@@ -8,7 +8,7 @@
BASE_NAME = hfsplus
FILE_GUID = EE593365-0635-44FC-AF28-DB98B63FDBC6
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -73,5 +73,4 @@
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"HFS+\"
# HFS+ has a compressed driver
*_*_*_CC_FLAGS = -DCOMPRESSED_DRIVERNAME=$(BASE_NAME)comp -DEXTRAMODULE=gzio
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Iso9660.inf b/EfiFsPkg/Iso9660.inf
index 7c389ba..856e6f9 100644
--- a/EfiFsPkg/Iso9660.inf
+++ b/EfiFsPkg/Iso9660.inf
@@ -8,7 +8,7 @@
BASE_NAME = iso9660
FILE_GUID = EFBE987A-A33B-4EE4-B2B5-35DEDC28A5E9
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -69,5 +69,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"ISO9660\"
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Jfs.inf b/EfiFsPkg/Jfs.inf
index a3994d3..caf0305 100644
--- a/EfiFsPkg/Jfs.inf
+++ b/EfiFsPkg/Jfs.inf
@@ -8,7 +8,7 @@
BASE_NAME = jfs
FILE_GUID = E87CF4E3-318E-4B5F-98B9-A6B47414506D
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -69,5 +69,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"JFS\"
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Minix.inf b/EfiFsPkg/Minix.inf
index 8d95be0..0a45df5 100644
--- a/EfiFsPkg/Minix.inf
+++ b/EfiFsPkg/Minix.inf
@@ -8,7 +8,7 @@
BASE_NAME = minix
FILE_GUID = 16CE8469-1586-4CE0-B90C-88D049A2967B
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -70,5 +70,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR="\"Minix (LE)\""
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Minix2.inf b/EfiFsPkg/Minix2.inf
index 951cb20..2c786b1 100644
--- a/EfiFsPkg/Minix2.inf
+++ b/EfiFsPkg/Minix2.inf
@@ -8,7 +8,7 @@
BASE_NAME = minix2
FILE_GUID = 0AF860D2-4089-496A-AB51-2F28730E5CF6
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -70,5 +70,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR="\"Minix2 (LE)\""
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Minix2Be.inf b/EfiFsPkg/Minix2Be.inf
index bf0a953..94b2d9e 100644
--- a/EfiFsPkg/Minix2Be.inf
+++ b/EfiFsPkg/Minix2Be.inf
@@ -8,7 +8,7 @@
BASE_NAME = minix2_be
FILE_GUID = 0974F29A-42B5-4B32-A9E6-7BB42BE57B84
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -70,5 +70,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR="\"Minix2 (BE)\""
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Minix3.inf b/EfiFsPkg/Minix3.inf
index 6685a07..f3ad4cd 100644
--- a/EfiFsPkg/Minix3.inf
+++ b/EfiFsPkg/Minix3.inf
@@ -8,7 +8,7 @@
BASE_NAME = minix3
FILE_GUID = 8DE9E73E-B120-49AA-960B-FC18FCEAAB3A
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -70,5 +70,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR="\"Minix3 (LE)\""
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Minix3Be.inf b/EfiFsPkg/Minix3Be.inf
index 0db0a0b..8b5738f 100644
--- a/EfiFsPkg/Minix3Be.inf
+++ b/EfiFsPkg/Minix3Be.inf
@@ -8,7 +8,7 @@
BASE_NAME = minix3_be
FILE_GUID = 9C3DB9FC-7B1A-4534-B5B9-C21E56EE7BA6
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -70,5 +70,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR="\"Minix3 (BE)\""
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/MinixBe.inf b/EfiFsPkg/MinixBe.inf
index d3c2634..4f9d870 100644
--- a/EfiFsPkg/MinixBe.inf
+++ b/EfiFsPkg/MinixBe.inf
@@ -8,7 +8,7 @@
BASE_NAME = minix_be
FILE_GUID = 5B677870-CF38-4892-AF77-AA5C9695DFBB
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -70,5 +70,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR="\"Minix (BE)\""
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/NewC.inf b/EfiFsPkg/NewC.inf
index 28f2915..8313170 100644
--- a/EfiFsPkg/NewC.inf
+++ b/EfiFsPkg/NewC.inf
@@ -8,7 +8,7 @@
BASE_NAME = newc
FILE_GUID = 5C0F70A7-DC33-4A82-9056-924E83E33F01
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -70,5 +70,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR="\"cpio (newc)\""
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/NilFs2.inf b/EfiFsPkg/NilFs2.inf
index 077864c..8dea107 100644
--- a/EfiFsPkg/NilFs2.inf
+++ b/EfiFsPkg/NilFs2.inf
@@ -8,7 +8,7 @@
BASE_NAME = nilfs2
FILE_GUID = E6BCED0B-96E0-4BD7-AF96-65467ABAAC6E
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -69,5 +69,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"NILFS2\"
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Ntfs.inf b/EfiFsPkg/Ntfs.inf
index dabdb69..85b77bf 100644
--- a/EfiFsPkg/Ntfs.inf
+++ b/EfiFsPkg/Ntfs.inf
@@ -8,7 +8,7 @@
BASE_NAME = ntfs
FILE_GUID = 80FB68D4-7C52-4AFE-A91E-D3DDADB5C54F
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -72,5 +72,4 @@
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"NTFS\"
# NTFS has a compressed driver
*_*_*_CC_FLAGS = -DCOMPRESSED_DRIVERNAME=$(BASE_NAME)comp
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Odc.inf b/EfiFsPkg/Odc.inf
index 9bccbd9..6462878 100644
--- a/EfiFsPkg/Odc.inf
+++ b/EfiFsPkg/Odc.inf
@@ -8,7 +8,7 @@
BASE_NAME = odc
FILE_GUID = FC117DCB-B369-46B7-A84E-E34EF821756C
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -70,5 +70,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR="\"cpio (odc)\""
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/ProcFs.inf b/EfiFsPkg/ProcFs.inf
index 3f9b187..299334b 100644
--- a/EfiFsPkg/ProcFs.inf
+++ b/EfiFsPkg/ProcFs.inf
@@ -8,7 +8,7 @@
BASE_NAME = procfs
FILE_GUID = 4F59B6B8-8FED-41B4-A970-CCBAF0F684DF
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -70,5 +70,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"procfs\"
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/ReiserFs.inf b/EfiFsPkg/ReiserFs.inf
index 1b26153..0b47495 100644
--- a/EfiFsPkg/ReiserFs.inf
+++ b/EfiFsPkg/ReiserFs.inf
@@ -8,7 +8,7 @@
BASE_NAME = reiserfs
FILE_GUID = 8B20B75F-5AAB-4839-A5F2-2843653BDEFF
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -69,5 +69,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"ReiserFS\"
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/RomFs.inf b/EfiFsPkg/RomFs.inf
index b28e8e9..340bfb0 100644
--- a/EfiFsPkg/RomFs.inf
+++ b/EfiFsPkg/RomFs.inf
@@ -8,7 +8,7 @@
BASE_NAME = romfs
FILE_GUID = A57C00D8-2766-4DDF-AC8D-BAC89472F255
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -69,5 +69,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"romfs\"
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Sfs.inf b/EfiFsPkg/Sfs.inf
index 85cee49..4e99be2 100644
--- a/EfiFsPkg/Sfs.inf
+++ b/EfiFsPkg/Sfs.inf
@@ -8,7 +8,7 @@
BASE_NAME = sfs
FILE_GUID = 0093FDD4-86D8-457C-82C9-2832321BB8B5
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -69,5 +69,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR="\"Amiga SFS\""
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/SquashFs.inf b/EfiFsPkg/SquashFs.inf
index d9f3816..c5ca97e 100644
--- a/EfiFsPkg/SquashFs.inf
+++ b/EfiFsPkg/SquashFs.inf
@@ -8,7 +8,7 @@
BASE_NAME = squash4
FILE_GUID = F85516B3-FEAD-4D5B-9E4A-9A476ABA65CA
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -80,5 +80,4 @@
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"SquashFS\"
# SquashFS uses additional modules
*_*_*_CC_FLAGS = -DEXTRAMODULE=gzio -DEXTRAMODULE2=lzopio -DEXTRAMODULE3=xzio
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Tar.inf b/EfiFsPkg/Tar.inf
index f984f2c..e069c1b 100644
--- a/EfiFsPkg/Tar.inf
+++ b/EfiFsPkg/Tar.inf
@@ -8,7 +8,7 @@
BASE_NAME = tar
FILE_GUID = 5FA5BB28-C228-48BC-BEED-4137E56B5C32
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -70,5 +70,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"tar\"
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Udf.inf b/EfiFsPkg/Udf.inf
index df4ae79..5a77fe8 100644
--- a/EfiFsPkg/Udf.inf
+++ b/EfiFsPkg/Udf.inf
@@ -8,7 +8,7 @@
BASE_NAME = udf
FILE_GUID = 3E1C5997-2AED-4A6C-A8BF-07882633D1FB
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -70,5 +70,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"UDF\"
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Ufs.inf b/EfiFsPkg/Ufs.inf
index d39e7b8..46664de 100644
--- a/EfiFsPkg/Ufs.inf
+++ b/EfiFsPkg/Ufs.inf
@@ -8,7 +8,7 @@
BASE_NAME = ufs1
FILE_GUID = CFC9DAEA-DBB4-4A5A-8034-D0ABF2849DF3
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -70,5 +70,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR="\"UFS (LE)\""
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Ufs2.inf b/EfiFsPkg/Ufs2.inf
index 8d9c9b5..8a9eefa 100644
--- a/EfiFsPkg/Ufs2.inf
+++ b/EfiFsPkg/Ufs2.inf
@@ -8,7 +8,7 @@
BASE_NAME = ufs2
FILE_GUID = 15ED2F4C-1EB8-4B4F-826B-73D83EDAA449
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -70,5 +70,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"UFS2\"
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/UfsBe.inf b/EfiFsPkg/UfsBe.inf
index c3ac095..60d2840 100644
--- a/EfiFsPkg/UfsBe.inf
+++ b/EfiFsPkg/UfsBe.inf
@@ -8,7 +8,7 @@
BASE_NAME = ufs1_be
FILE_GUID = F3B03ADF-0595-483C-BF15-0C39A444345C
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -70,5 +70,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR="\"UFS (BE)\""
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Xfs.inf b/EfiFsPkg/Xfs.inf
index 809f9c3..70a3533 100644
--- a/EfiFsPkg/Xfs.inf
+++ b/EfiFsPkg/Xfs.inf
@@ -8,7 +8,7 @@
BASE_NAME = xfs
FILE_GUID = 8F56A526-1566-442F-9D7F-3E704772B75A
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.1
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -70,5 +70,4 @@
*_*_IA32_CC_FLAGS = -DFORMAT=efi-app-ia32
*_*_X64_CC_FLAGS = -DFORMAT=efi-app-x64
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"XFS\"
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/EfiFsPkg/Zfs.inf b/EfiFsPkg/Zfs.inf
index 71fee10..cdcbcd3 100644
--- a/EfiFsPkg/Zfs.inf
+++ b/EfiFsPkg/Zfs.inf
@@ -8,7 +8,7 @@
BASE_NAME = zfs
FILE_GUID = 0F6A96E7-0F76-4947-90DB-D4FD7A7E6147
MODULE_TYPE = UEFI_DRIVER
- VERSION_STRING = 1.0
+ VERSION_STRING = 1.2
EDK_RELEASE_VERSION = 0x00020000
EFI_SPECIFICATION_VERSION = 0x00020000
ENTRY_POINT = FSDriverInstall
@@ -79,5 +79,4 @@
*_*_*_CC_FLAGS = -Os -DCPU_$(ARCH) -DGRUB_FILE=__FILE__ -DDRIVERNAME=$(BASE_NAME) -DDRIVERNAME_STR=\"ZFS\"
# ZFS has an extra module
*_*_*_CC_FLAGS = -DEXTRAMODULE=gzio
- # On MSFT compilers, we must force-disable the default /GL option in order to replace the memset() intrinsic
- MSFT:*_*_*_CC_FLAGS = /GL- /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
+ MSFT:*_*_*_CC_FLAGS = /wd4028 /wd4068 /wd4133 /wd4146 /wd4201 /wd4204 /wd4244 /wd4245 /wd4267 /wd4311 /wd4312 /wd4334 /wd4706
diff --git a/debug.vbs b/debug.vbs
index a91ba77..848eb86 100644
--- a/debug.vbs
+++ b/debug.vbs
@@ -12,6 +12,10 @@ QEMU_PATH = "C:\Program Files\qemu\"
QEMU_OPTS = "-nodefaults -vga std -serial vc"
' Set to True if you need to download a file that might be cached locally
NO_CACHE = False
+' Set to True if you want to use drivers from the EDK2 repo instead of the VS ones
+USE_EDK2 = False
+' Path of EDK2 for the above option
+EDK2_BASE = "D:\edk2"
' You shouldn't have to mofify anything below this
CONF = WScript.Arguments(0)
@@ -24,11 +28,13 @@ If (TARGET = "x86") Then
QEMU_ARCH = "i386"
PRE_CMD = "dir "
FW_BASE = "OVMF"
+ EDK_ARCH = "IA32"
ElseIf (TARGET = "x64") Then
UEFI_EXT = "x64"
QEMU_ARCH = "x86_64"
FW_BASE = "OVMF"
PRE_CMD = ""
+ EDK_ARCH = "X64"
ElseIf (TARGET = "ARM") Then
UEFI_EXT = "arm"
QEMU_ARCH = "arm"
@@ -37,12 +43,14 @@ ElseIf (TARGET = "ARM") Then
QEMU_OPTS = "-M virt -cpu cortex-a15 " & QEMU_OPTS
PRE_CMD = "dir "
FW_BASE = "QEMU_EFI"
+ EDK_ARCH = "ARM"
ElseIf (TARGET = "ARM64") Then
UEFI_EXT = "aa64"
QEMU_ARCH = "aarch64"
QEMU_OPTS = "-M virt -cpu cortex-a57 " & QEMU_OPTS
PRE_CMD = "dir "
FW_BASE = "QEMU_EFI"
+ EDK_ARCH = "AARCH64"
Else
MsgBox("Unsupported debug target: " & TARGET)
Call WScript.Quit(1)
@@ -176,7 +184,11 @@ End If
' Copy the files where required, and start QEMU
' Note: Linaro's QEMU-EFI.fd firmware is very sensitive about '/' vs '\'
Call shell.Run("%COMSPEC% /c mkdir ""image\efi\boot""", 0, True)
-Call fso.CopyFile(BIN, "image\" & DRV, True)
+If USE_EDK2 Then
+ Call fso.CopyFile(EDK2_BASE & "\Build\EfiFs\RELEASE_VS2017\" & EDK_ARCH & "\" & FS & ".efi", "image\" & DRV, True)
+Else
+ Call fso.CopyFile(BIN, "image\" & DRV, True)
+End If
' Create a startup.nsh that: sets logging, loads the driver and executes an "Hello World" app from the disk
Set file = fso.CreateTextFile("image\efi\boot\startup.nsh", True)
Call file.Write("set FS_LOGGING " & LOG_LEVEL & vbCrLf &_
diff --git a/edk2/0001-EDK2-Add-BaseTools-Bin-Win32-as-a-git-module.patch b/edk2/0001-EDK2-Add-BaseTools-Bin-Win32-as-a-git-module.patch
deleted file mode 100644
index e5ac5b0..0000000
--- a/edk2/0001-EDK2-Add-BaseTools-Bin-Win32-as-a-git-module.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 7265f2b1701330b78aeb6799955bd1e5dfe7c67b Mon Sep 17 00:00:00 2001
-From: Pete Batard
-Date: Tue, 7 Nov 2017 17:59:27 +0000
-Subject: [PATCH 1/2] EDK2 - Add BaseTools/Bin/Win32 as a git module
-
-* Makes things A LOT easier
----
- .gitmodules | 3 +++
- BaseTools/Bin/Win32 | 1 +
- 2 files changed, 4 insertions(+)
- create mode 100644 .gitmodules
- create mode 160000 BaseTools/Bin/Win32
-
-diff --git a/.gitmodules b/.gitmodules
-new file mode 100644
-index 0000000..c5f5c11
---- /dev/null
-+++ b/.gitmodules
-@@ -0,0 +1,3 @@
-+[submodule "BaseTools/Bin/Win32"]
-+ path = BaseTools/Bin/Win32
-+ url = https://github.com/tianocore/edk2-BaseTools-win32
-diff --git a/BaseTools/Bin/Win32 b/BaseTools/Bin/Win32
-new file mode 160000
-index 0000000..56e87e6
---- /dev/null
-+++ b/BaseTools/Bin/Win32
-@@ -0,0 +1 @@
-+Subproject commit 56e87e680716323de849a10eb836cd3b299b844d
---
-2.9.3.windows.2
-
diff --git a/edk2/0002-EDK2-Add-VS2017-support-including-ARM-ARM64.patch b/edk2/0002-EDK2-Add-VS2017-support-including-ARM-ARM64.patch
deleted file mode 100644
index 325d2df..0000000
--- a/edk2/0002-EDK2-Add-VS2017-support-including-ARM-ARM64.patch
+++ /dev/null
@@ -1,575 +0,0 @@
-From ea34bee976349cb178407e867dab8ca23e7a1fbe Mon Sep 17 00:00:00 2001
-From: Pete Batard
-Date: Tue, 7 Nov 2017 18:01:10 +0000
-Subject: [PATCH 2/2] EDK2 - Add VS2017 support, including ARM/ARM64
-
----
- .../Library/CompilerIntrinsicsLib/Arm/__rt_div.c | 202 +++++++++++++++++++++
- .../CompilerIntrinsicsLib/Arm/__rt_srsh.asm | 72 ++++++++
- .../CompilerIntrinsicsLib.inf | 8 +-
- BaseTools/Conf/tools_def.template | 172 ++++++++++++++++++
- BaseTools/set_vsprefix_envs.bat | 12 ++
- MdePkg/Library/BaseLib/BaseLib.inf | 8 +-
- 6 files changed, 470 insertions(+), 4 deletions(-)
- create mode 100644 ArmPkg/Library/CompilerIntrinsicsLib/Arm/__rt_div.c
- create mode 100644 ArmPkg/Library/CompilerIntrinsicsLib/Arm/__rt_srsh.asm
-
-diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/__rt_div.c b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/__rt_div.c
-new file mode 100644
-index 0000000..7640d1a
---- /dev/null
-+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/__rt_div.c
-@@ -0,0 +1,202 @@
-+/*
-+ * CRT replacement for MSVC/ARM
-+ * Modified from ReactOS' sdk/lib/crt/math/arm/... - BSD License
-+ */
-+
-+#include
-+
-+int _fltused = 0x9875;
-+
-+typedef struct {
-+ uint32_t quotient;
-+ uint32_t modulus;
-+} udiv_result_t;
-+
-+typedef struct {
-+ int32_t quotient;
-+ int32_t modulus;
-+} sdiv_result_t;
-+
-+typedef struct {
-+ uint64_t quotient;
-+ uint64_t modulus;
-+} udiv64_result_t;
-+
-+typedef struct {
-+ uint64_t quotient;
-+ uint64_t modulus;
-+} sdiv64_result_t;
-+
-+/* No inline or standalone assembly for halt on div by 0 -> do it ourselves */
-+typedef void(*__brkdiv0_t)(void);
-+static const uint32_t ___brkdiv0 = 0xe7f00ff9; // udf #249
-+static __brkdiv0_t __brkdiv0 = (__brkdiv0_t)&___brkdiv0;
-+
-+__inline void __rt_udiv_internal(udiv_result_t *result, uint32_t divisor, uint32_t dividend)
-+{
-+ uint32_t shift;
-+ uint32_t mask;
-+ uint32_t quotient;
-+
-+ if (divisor == 0) {
-+ /* Raise divide by zero error */
-+ __brkdiv0();
-+ }
-+
-+ if (divisor > dividend) {
-+ result->quotient = 0;
-+ result->modulus = dividend;
-+ return;
-+ }
-+
-+ /* Get the difference in count of leading zeros between dividend and divisor */
-+ shift = _CountLeadingZeros(divisor);
-+ shift -= _CountLeadingZeros(dividend);
-+
-+ /* Shift the divisor to the left, so that it's highest bit is the same as the
-+ highest bit of the dividend */
-+ divisor <<= shift;
-+
-+ mask = 1 << shift;
-+
-+ quotient = 0;
-+ do {
-+ if (dividend >= divisor) {
-+ quotient |= mask;
-+ dividend -= divisor;
-+ }
-+ divisor >>= 1;
-+ mask >>= 1;
-+ } while (mask);
-+
-+ result->quotient = quotient;
-+ result->modulus = dividend;
-+ return;
-+}
-+
-+uint64_t __rt_sdiv(int32_t divisor, int32_t dividend)
-+{
-+ sdiv_result_t result;
-+ int32_t divisor_sign, dividend_sign;
-+
-+ dividend_sign = divisor & 0x80000000;
-+ if (dividend_sign) {
-+ dividend = -dividend;
-+ }
-+
-+ divisor_sign = divisor & 0x80000000;
-+ if (divisor_sign) {
-+ divisor = -divisor;
-+ }
-+
-+ __rt_udiv_internal((udiv_result_t*)&result, divisor, dividend);
-+
-+ if (dividend_sign ^ divisor_sign) {
-+ result.quotient = -result.quotient;
-+ }
-+
-+ if (dividend_sign) {
-+ result.modulus = -result.modulus;
-+ }
-+
-+ return (((uint64_t)result.modulus) << 32) | ((uint32_t)result.quotient);
-+}
-+
-+uint64_t __rt_udiv(uint32_t divisor, uint32_t dividend)
-+{
-+ udiv_result_t result;
-+
-+ __rt_udiv_internal(&result, divisor, dividend);
-+
-+ return (((uint64_t)result.modulus) << 32) | ((uint32_t)result.quotient);
-+}
-+
-+static __inline void __rt_udiv64_internal(udiv64_result_t *result,
-+ uint64_t divisor, uint64_t dividend)
-+{
-+ uint32_t shift;
-+ uint64_t mask;
-+ uint64_t quotient;
-+
-+ if (divisor == 0) {
-+ /* Raise divide by zero error */
-+ __brkdiv0();
-+ }
-+
-+ if (divisor > dividend) {
-+ result->quotient = 0;
-+ result->modulus = dividend;
-+ return;
-+ }
-+
-+ /* Get the difference in count of leading zeros between dividend and divisor */
-+ shift = _CountLeadingZeros64(divisor);
-+ shift -= _CountLeadingZeros64(dividend);
-+
-+ /* Shift the divisor to the left, so that it's highest bit is the same as the
-+ highest bit of the dividend */
-+ divisor <<= shift;
-+
-+ mask = 1LL << shift;
-+
-+ quotient = 0;
-+ do {
-+ if (dividend >= divisor) {
-+ quotient |= mask;
-+ dividend -= divisor;
-+ }
-+ divisor >>= 1;
-+ mask >>= 1;
-+ } while (mask);
-+
-+ result->quotient = quotient;
-+ result->modulus = dividend;
-+ return;
-+}
-+
-+/*
-+ * Soooo, what do you do when you have an UNCOOPERATIVE compiler (Microsoft's
-+ * crippled version of Clang), compiling into some weird intermediate language
-+ * (C2 or LLVM or whatever), with NO FRIGGING ASSEMBLY, be it inline or
-+ * standalone, and you want to provide your own version of __rt_udiv64(), that
-+ * MUST return the result in ARM registers r0/r1/r2/r3?
-+ * Why, you "just" define an (uint64_t, uint64_t) function call, that points
-+ * to the binary code for 'mov pc, lr' (i.e. ARM's return from call instruction)
-+ * since you can then use this call to set r0/r1 to the first call parameter and
-+ * r2/r3 to the second.
-+ */
-+typedef void(*set_return_registers_t)(uint64_t, uint64_t);
-+static const uint32_t _set_return_registers = 0xe1a0f00e; // mov pc, lr
-+static set_return_registers_t set_return_registers = (set_return_registers_t)&_set_return_registers;
-+
-+void __rt_udiv64(uint64_t divisor, uint64_t dividend)
-+{
-+ udiv64_result_t result;
-+
-+ __rt_udiv64_internal(&result, divisor, dividend);
-+
-+ set_return_registers(result.quotient, result.modulus);
-+}
-+
-+/* Not sure if this one is also needed, but just in case... */
-+void __rt_sdiv64(int64_t divisor, int64_t dividend)
-+{
-+ udiv64_result_t result;
-+ int64_t divisor_sign, dividend_sign, quotient, modulus;
-+
-+ dividend_sign = divisor & 0x8000000000000000LL;
-+ if (dividend_sign) {
-+ dividend = -dividend;
-+ }
-+
-+ divisor_sign = divisor & 0x8000000000000000LL;
-+ if (divisor_sign) {
-+ divisor = -divisor;
-+ }
-+
-+ __rt_udiv64_internal(&result, divisor, dividend);
-+
-+ quotient = (dividend_sign ^ divisor_sign) ? -(int64_t)result.quotient : result.quotient;
-+ modulus = (dividend_sign) ? -(int64_t)result.modulus : result.modulus;
-+ set_return_registers((uint64_t)quotient, (uint64_t)modulus);
-+}
-diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/Arm/__rt_srsh.asm b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/__rt_srsh.asm
-new file mode 100644
-index 0000000..822a48c
---- /dev/null
-+++ b/ArmPkg/Library/CompilerIntrinsicsLib/Arm/__rt_srsh.asm
-@@ -0,0 +1,72 @@
-+/*
-+ * COPYRIGHT: BSD
-+ * PROJECT: ReactOS CRT library
-+ * PURPOSE: Implementation of __rt_srsh
-+ * PROGRAMMER: Timo Kreuzer (timo.kreuzer@reactos.org)
-+ */
-+
-+/*
-+ __int64
-+ __rt_srsh(
-+ __int64 value,
-+ uint32_t shift);
-+
-+ R0 = loword of value
-+ R1 = hiword of value
-+ R2 = shift
-+*/
-+
-+ EXPORT __rt_srsh
-+
-+ AREA Math, CODE, READONLY
-+
-+__rt_srsh
-+
-+ /* r3 = 32 - r2 */
-+ rsbs r3, r2, #32
-+
-+ /* Branch if minus (r2 > 32) */
-+ bmi __rt_srsh2
-+
-+ /* r0 = r0 >> r2 (logical shift!) */
-+ lsr r0, r0, r2
-+
-+ /* r3 = r1 << r3 */
-+ lsl r3, r1, r3
-+
-+ /* r0 |= r1 << (32 - r2) */
-+ orr r0, r0, r3
-+
-+ /* r1 = r1 >> r2 (arithmetic shift!) */
-+ asr r1, r1, r2
-+
-+ bx lr
-+
-+__rt_srsh2
-+
-+ /* Check if shift is > 64 */
-+ cmp r2, 64
-+ bhs __rt_srsh3
-+
-+ /* r3 = r2 - 32 */
-+ sub r3, r2, #32
-+
-+ /* r0 = r1 >> r3 (arithmetic shift!) */
-+ asr r0, r1, r3
-+
-+ /* r1 = r1 >> 32 (arithmetic shift!) */
-+ asr r1, r1, #32
-+
-+ bx lr
-+
-+__rt_srsh3
-+
-+ /* r1 = r1 >> 32 (arithmetic shift!) */
-+ asr r1, r1, #32
-+
-+ /* r0 = r1 */
-+ mov r0, r1
-+
-+ bx lr
-+
-+ END
-diff --git a/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf b/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
-index 4433314..bc55d8e 100644
---- a/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
-+++ b/ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf
-@@ -23,8 +23,10 @@
- LIBRARY_CLASS = CompilerIntrinsicsLib
-
- [Sources]
-- memcpy.c
-- memset.c
-+ memcpy.c | RVCT
-+ memcpy.c | GCC
-+ memset.c | RVCT
-+ memset.c | GCC
-
- [Sources.ARM]
- Arm/mullu.asm | RVCT
-@@ -94,6 +96,8 @@
- Arm/llsr.S | GCC
- Arm/llsl.S | GCC
-
-+ Arm/__rt_div.c | MSFT
-+ Arm/__rt_srsh.asm | MSFT
-
- [Packages]
- MdePkg/MdePkg.dec
-diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
-index aebd7d5..bdea096 100755
---- a/BaseTools/Conf/tools_def.template
-+++ b/BaseTools/Conf/tools_def.template
-@@ -74,6 +74,12 @@ DEFINE VS2015x86_BIN = ENV(VS2015_PREFIX)Vc\bin
- DEFINE VS2015x86_DLL = ENV(VS2015_PREFIX)Common7\IDE;DEF(VS2015x86_BIN)
- DEFINE VS2015x86_BINX64 = DEF(VS2015x86_BIN)\x86_amd64
-
-+DEFINE VS2017_BIN = ENV(VS2017_PREFIX)bin\Hostx64
-+DEFINE VS2017_BIN_IA32 = DEF(VS2017_BIN)\x86
-+DEFINE VS2017_BIN_X64 = DEF(VS2017_BIN)\x64
-+DEFINE VS2017_BIN_ARM = DEF(VS2017_BIN)\arm
-+DEFINE VS2017_BIN_AARCH64 = DEF(VS2017_BIN)\arm64
-+
- DEFINE WINSDK_BIN = ENV(WINSDK_PREFIX)
- DEFINE WINSDKx86_BIN = ENV(WINSDKx86_PREFIX)
-
-@@ -93,6 +99,10 @@ DEFINE WINSDK8x86_BIN = ENV(WINSDK8x86_PREFIX)x64
- DEFINE WINSDK81_BIN = ENV(WINSDK81_PREFIX)x86\
- DEFINE WINSDK81x86_BIN = ENV(WINSDK81x86_PREFIX)x64
-
-+# Microsoft Visual Studio 2017 Professional Edition
-+DEFINE WINSDK10_BIN = ENV(WINSDK10_PREFIX)x86\
-+DEFINE WINSDK10x86_BIN = ENV(WINSDK10x86_PREFIX)x64
-+
- # These defines are needed for certain Microsoft Visual Studio tools that
- # are used by other toolchains. An example is that ICC on Windows normally
- # uses Microsoft's nmake.exe.
-@@ -4060,6 +4070,168 @@ NOOPT_VS2015x86xASL_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT
- *_VS2015x86xASL_EBC_SLINK_FLAGS = /lib /NOLOGO /MACHINE:EBC
- *_VS2015x86xASL_EBC_DLINK_FLAGS = "C:\Program Files (x86)\Intel\EBC\Lib\EbcLib.lib" /NOLOGO /NODEFAULTLIB /MACHINE:EBC /OPT:REF /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /MAP /ALIGN:32 /DRIVER
-
-+####################################################################################
-+#
-+# Microsoft Visual Studio 2017
-+#
-+# VS2017 - Microsoft Visual Studio 2017 Professional Edition with Intel ASL
-+# ASL - Intel ACPI Source Language Compiler
-+####################################################################################
-+# VS2017 - Microsoft Visual Studio 2017 Professional Edition
-+*_VS2017_*_*_FAMILY = MSFT
-+
-+*_VS2017_*_MAKE_PATH = DEF(VS2017_BIN_X64)\nmake.exe
-+*_VS2017_*_MAKE_FLAGS = /nologo
-+*_VS2017_*_RC_PATH = DEF(WINSDK81_BIN)\rc.exe
-+
-+*_VS2017_*_SLINK_FLAGS = /NOLOGO /LTCG
-+*_VS2017_*_APP_FLAGS = /nologo /E /TC
-+*_VS2017_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
-+*_VS2017_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
-+*_VS2017_*_DLINK2_FLAGS =
-+
-+*_VS2017_*_ASM16_PATH = EF(VS2017_BIN_IA32)\ml.exe
-+
-+##################
-+# ASL definitions
-+##################
-+*_VS2017_*_ASL_PATH = DEF(DEFAULT_WIN_ASL_BIN)
-+*_VS2017_*_ASL_FLAGS = DEF(DEFAULT_WIN_ASL_FLAGS)
-+*_VS2017_*_ASL_OUTFLAGS = DEF(DEFAULT_WIN_ASL_OUTFLAGS)
-+*_VS2017_*_ASLCC_FLAGS = DEF(MSFT_ASLCC_FLAGS)
-+*_VS2017_*_ASLPP_FLAGS = DEF(MSFT_ASLPP_FLAGS)
-+*_VS2017_*_ASLDLINK_FLAGS = DEF(MSFT_ASLDLINK_FLAGS)
-+
-+##################
-+# IA32 definitions
-+##################
-+*_VS2017_IA32_*_DLL = DEF(VS2017_BIN_IA32)
-+
-+*_VS2017_IA32_CC_PATH = DEF(VS2017_BIN_IA32)\cl.exe
-+*_VS2017_IA32_VFRPP_PATH = DEF(VS2017_BIN_IA32)\cl.exe
-+*_VS2017_IA32_SLINK_PATH = DEF(VS2017_BIN_IA32)\lib.exe
-+*_VS2017_IA32_DLINK_PATH = DEF(VS2017_BIN_IA32)\link.exe
-+*_VS2017_IA32_APP_PATH = DEF(VS2017_BIN_IA32)\cl.exe
-+*_VS2017_IA32_PP_PATH = DEF(VS2017_BIN_IA32)\cl.exe
-+*_VS2017_IA32_ASM_PATH = DEF(VS2017_BIN_IA32)\ml.exe
-+*_VS2017_IA32_ASLCC_PATH = DEF(VS2017_BIN_IA32)\cl.exe
-+*_VS2017_IA32_ASLPP_PATH = DEF(VS2017_BIN_IA32)\cl.exe
-+*_VS2017_IA32_ASLDLINK_PATH = DEF(VS2017_BIN_IA32)\link.exe
-+
-+ *_VS2017_IA32_MAKE_FLAGS = /nologo
-+ DEBUG_VS2017_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Gw /Oi-
-+RELEASE_VS2017_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw /Oi-
-+NOOPT_VS2017_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od /Oi-
-+
-+ DEBUG_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
-+RELEASE_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
-+NOOPT_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
-+
-+ DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
-+RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
-+NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
-+
-+ DEBUG_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-+RELEASE_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
-+NOOPT_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-+
-+##################
-+# X64 definitions
-+##################
-+*_VS2017_X64_*_DLL = DEF(VS2017_BIN_X64)
-+
-+*_VS2017_X64_CC_PATH = DEF(VS2017_BIN_X64)\cl.exe
-+*_VS2017_X64_PP_PATH = DEF(VS2017_BIN_X64)\cl.exe
-+*_VS2017_X64_APP_PATH = DEF(VS2017_BIN_X64)\cl.exe
-+*_VS2017_X64_VFRPP_PATH = DEF(VS2017_BIN_X64)\cl.exe
-+*_VS2017_X64_ASM_PATH = DEF(VS2017_BIN_X64)\ml64.exe
-+*_VS2017_X64_SLINK_PATH = DEF(VS2017_BIN_X64)\lib.exe
-+*_VS2017_X64_DLINK_PATH = DEF(VS2017_BIN_X64)\link.exe
-+*_VS2017_X64_ASLCC_PATH = DEF(VS2017_BIN_X64)\cl.exe
-+*_VS2017_X64_ASLPP_PATH = DEF(VS2017_BIN_X64)\cl.exe
-+*_VS2017_X64_ASLDLINK_PATH = DEF(VS2017_BIN_X64)\link.exe
-+
-+ DEBUG_VS2017_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm /Gw /Oi-
-+RELEASE_VS2017_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw /Oi-
-+NOOPT_VS2017_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Zi /Gm /Od /Oi-
-+
-+ DEBUG_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
-+RELEASE_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
-+NOOPT_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
-+
-+ DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
-+RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
-+NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
-+
-+ DEBUG_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-+RELEASE_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
-+NOOPT_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-+
-+#################
-+# ARM definitions
-+#################
-+*_VS2017_ARM_*_DLL = DEF(VS2017_BIN_ARM)
-+
-+*_VS2017_ARM_CC_PATH = DEF(VS2017_BIN_ARM)\cl.exe
-+*_VS2017_ARM_VFRPP_PATH = DEF(VS2017_BIN_ARM)\cl.exe
-+*_VS2017_ARM_SLINK_PATH = DEF(VS2017_BIN_ARM)\lib.exe
-+*_VS2017_ARM_DLINK_PATH = DEF(VS2017_BIN_ARM)\link.exe
-+*_VS2017_ARM_APP_PATH = DEF(VS2017_BIN_ARM)\cl.exe
-+*_VS2017_ARM_PP_PATH = DEF(VS2017_BIN_ARM)\cl.exe
-+*_VS2017_ARM_ASM_PATH = DEF(VS2017_BIN_ARM)\armasm.exe
-+*_VS2017_ARM_ASLCC_PATH = DEF(VS2017_BIN_ARM)\cl.exe
-+*_VS2017_ARM_ASLPP_PATH = DEF(VS2017_BIN_ARM)\cl.exe
-+*_VS2017_ARM_ASLDLINK_PATH = DEF(VS2017_BIN_ARM)\link.exe
-+
-+ *_VS2017_ARM_MAKE_FLAGS = /nologo
-+ DEBUG_VS2017_ARM_CC_FLAGS = /nologo /c /WX /wd4100 /wd4127 /wd4214 /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Gw /Oi- /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
-+RELEASE_VS2017_ARM_CC_FLAGS = /nologo /c /WX /wd4100 /wd4127 /wd4214 /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw /Oi- /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
-+NOOPT_VS2017_ARM_CC_FLAGS = /nologo /c /WX /wd4100 /wd4127 /wd4214 /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od /Oi- /D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE
-+
-+ DEBUG_VS2017_ARM_ASM_FLAGS = /nologo -g
-+RELEASE_VS2017_ARM_ASM_FLAGS = /nologo
-+NOOPT_VS2017_ARM_ASM_FLAGS = /nologo
-+
-+ DEBUG_VS2017_ARM_NASM_FLAGS = -Ox -f win32 -g
-+RELEASE_VS2017_ARM_NASM_FLAGS = -Ox -f win32
-+NOOPT_VS2017_ARM_NASM_FLAGS = -O0 -f win32 -g
-+
-+ DEBUG_VS2017_ARM_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-+RELEASE_VS2017_ARM_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
-+NOOPT_VS2017_ARM_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-+
-+#####################
-+# AARCH64 definitions
-+#####################
-+*_VS2017_AARCH64_*_DLL = DEF(VS2017_BIN_AARCH64)
-+
-+*_VS2017_AARCH64_CC_PATH = DEF(VS2017_BIN_AARCH64)\cl.exe
-+*_VS2017_AARCH64_VFRPP_PATH = DEF(VS2017_BIN_AARCH64)\cl.exe
-+*_VS2017_AARCH64_SLINK_PATH = DEF(VS2017_BIN_AARCH64)\lib.exe
-+*_VS2017_AARCH64_DLINK_PATH = DEF(VS2017_BIN_AARCH64)\link.exe
-+*_VS2017_AARCH64_APP_PATH = DEF(VS2017_BIN_AARCH64)\cl.exe
-+*_VS2017_AARCH64_PP_PATH = DEF(VS2017_BIN_AARCH64)\cl.exe
-+*_VS2017_AARCH64_ASM_PATH = DEF(VS2017_BIN_AARCH64)\armasm64.exe
-+*_VS2017_AARCH64_ASLCC_PATH = DEF(VS2017_BIN_AARCH64)\cl.exe
-+*_VS2017_AARCH64_ASLPP_PATH = DEF(VS2017_BIN_AARCH64)\cl.exe
-+*_VS2017_AARCH64_ASLDLINK_PATH = DEF(VS2017_BIN_AARCH64)\link.exe
-+
-+ *_VS2017_AARCH64_MAKE_FLAGS = /nologo
-+ DEBUG_VS2017_AARCH64_CC_FLAGS = /nologo /c /WX /wd4100 /wd4127 /wd4214 /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Gw /Oi-
-+RELEASE_VS2017_AARCH64_CC_FLAGS = /nologo /c /WX /wd4100 /wd4127 /wd4214 /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw /Oi-
-+NOOPT_VS2017_AARCH64_CC_FLAGS = /nologo /c /WX /wd4100 /wd4127 /wd4214 /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /Od /Oi-
-+
-+ DEBUG_VS2017_AARCH64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
-+RELEASE_VS2017_AARCH64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
-+NOOPT_VS2017_AARCH64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
-+
-+ DEBUG_VS2017_AARCH64_NASM_FLAGS = -Ox -f win64 -g
-+RELEASE_VS2017_AARCH64_NASM_FLAGS = -Ox -f win64
-+NOOPT_VS2017_AARCH64_NASM_FLAGS = -O0 -f win64 -g
-+
-+ DEBUG_VS2017_AARCH64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-+RELEASE_VS2017_AARCH64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
-+NOOPT_VS2017_AARCH64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
-
- ####################################################################################
- #
-diff --git a/BaseTools/set_vsprefix_envs.bat b/BaseTools/set_vsprefix_envs.bat
-index b05b1d2..fcfdbb3 100644
---- a/BaseTools/set_vsprefix_envs.bat
-+++ b/BaseTools/set_vsprefix_envs.bat
-@@ -90,6 +90,18 @@ if defined VS140COMNTOOLS (
- )
- )
-
-+if defined VCToolsInstallDir (
-+ if not defined VS2017_PREFIX (
-+ set "VS2017_PREFIX=%VCToolsInstallDir%"
-+ )
-+ if not defined WINSDK10_PREFIX (
-+ set "WINSDK10_PREFIX=c:\Program Files\Windows Kits\10\bin\"
-+ )
-+ if not defined WINSDK10x86_PREFIX (
-+ set "WINSDK10x86_PREFIX=c:\Program Files (x86)\Windows Kits\10\bin\"
-+ )
-+)
-+
- if not defined WINDDK3790_PREFIX (
- set WINDDK3790_PREFIX=C:\WINDDK\3790.1830\bin\
- )
-diff --git a/MdePkg/Library/BaseLib/BaseLib.inf b/MdePkg/Library/BaseLib/BaseLib.inf
-index 320ac45..1808752 100644
---- a/MdePkg/Library/BaseLib/BaseLib.inf
-+++ b/MdePkg/Library/BaseLib/BaseLib.inf
-@@ -821,8 +821,9 @@
- [Sources.ARM]
- Arm/InternalSwitchStack.c
- Arm/Unaligned.c
-- Math64.c | RVCT
--
-+ Math64.c | RVCT
-+ Math64.c | MSFT
-+
- Arm/SwitchStack.asm | RVCT
- Arm/SetJumpLongJump.asm | RVCT
- Arm/DisableInterrupts.asm | RVCT
-@@ -870,3 +871,6 @@
-
- [FeaturePcd]
- gEfiMdePkgTokenSpaceGuid.PcdVerifyNodeInList ## CONSUMES
-+
-+[BuildOptions]
-+ MSFT:*_*_ARM_CC_FLAGS = /GL-
-\ No newline at end of file
---
-2.9.3.windows.2
-
diff --git a/edk2/ekd2_build_all_drivers.cmd b/ekd2_build_all_drivers.cmd
similarity index 90%
rename from edk2/ekd2_build_all_drivers.cmd
rename to ekd2_build_all_drivers.cmd
index 89fb874..f9fcc7c 100644
--- a/edk2/ekd2_build_all_drivers.cmd
+++ b/ekd2_build_all_drivers.cmd
@@ -1,3 +1,7 @@
+@rem This script builds all the drivers using the EDK2.
+@rem Requires an EDK2 that has been updated for VS2017 support,
+@rem such as the one from https://github.com/pbatard/edk2/commits/vs2017
+
@echo off
setlocal enabledelayedexpansion
cd /d "%~dp0"
diff --git a/src/driver.h b/src/driver.h
index 9303d6f..01fcc97 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -100,7 +100,7 @@
/* Driver version */
#define FS_DRIVER_VERSION_MAJOR 1
-#define FS_DRIVER_VERSION_MINOR 1
+#define FS_DRIVER_VERSION_MINOR 2
#ifndef ARRAYSIZE
#define ARRAYSIZE(A) (sizeof(A)/sizeof((A)[0]))
diff --git a/src/missing.c b/src/missing.c
index 6b41691..ce080ba 100644
--- a/src/missing.c
+++ b/src/missing.c
@@ -20,32 +20,16 @@
#include "driver.h"
-// Microsoft's intrinsics are a major pain in the ass
-// https://stackoverflow.com/a/2945619/1069307
-#if defined(_MSC_VER) && !defined(__MAKEWITH_GNUEFI)
-#include // For size_t
-
-void* memset(void *, int, size_t);
-#pragma intrinsic(memset)
-#pragma function(memset)
-void* memset(void *s, int c, size_t n)
-{
- SetMem(s, (UINTN)n, (UINT8)c);
- return s;
-}
+// EDK2 specifics
+#if !defined(__MAKEWITH_GNUEFI)
-void* memcpy(void *, const void *, size_t);
-#pragma intrinsic(memcpy)
-#pragma function(memcpy)
-void* memcpy(void *s1, const void *s2, size_t n)
-{
- CopyMem(s1, s2, (UINTN)n);
- return s1;
-}
+#if defined(_M_IX86)
+#pragma comment(linker, "/INCLUDE:_MultS64x64")
+#endif
-int memcmp(const void*, const void *, size_t);
-#pragma intrinsic(memcmp)
-#pragma function(memcmp)
+// Microsoft's intrinsics are a major pain in the ass
+#if defined(_MSC_VER)
+#include // For size_t
int memcmp(const void *s1, const void *s2, size_t n)
{
return (int)CompareMem(s1, s2, (UINTN)n);
@@ -56,32 +40,8 @@ void* memmove(void *s1, const void *s2, size_t n)
CopyMem(s1, s2, n);
return s1;
}
+#endif
-INT64 _allmul(INT64 a, INT64 b)
-{
- INT64 _a = (a>=0)?a:-a, _b = (b>=0)?b:-b;
- if (((a > 0) & (b < 0)) || ((a < 0) && (b > 0)))
- return -1LL * MultU64x32(_a, (UINTN)_b);
- return MultU64x32(_a, (UINTN)_b);
-}
-
-INT64 _allshl(INT64 a, INTN b)
-{
- return (b >= 0) ? (INT64)LShiftU64((UINT64)a, (UINTN)b) :
- (INT64)RShiftU64((UINT64)a, (UINTN)-b);
-}
-
-INT64 _allshr(INT64 a, INTN b)
-{
- return (b >= 0) ? (INT64)RShiftU64((UINT64)a, (UINTN)b) :
- (INT64)LShiftU64((UINT64)a, (UINTN)-b);
-}
-
-UINT64 _aullshr(UINT64 a, INTN b)
-{
- return (b >= 0) ? RShiftU64(a, (UINTN)b) :
- LShiftU64(a, (UINTN)-b);
-}
#endif
VOID