VS2017 compatibility

Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
Sergey Isakov 2022-01-23 19:12:22 +03:00
parent 0bb2dd13be
commit b65ace3b58
10 changed files with 28029 additions and 10 deletions

View File

@ -1852,7 +1852,7 @@ AcpiTableAcpiTableConstructor (
// at the beginning of the list of tables. Some OS don't seem
// to find it correctly if it is too far down the list.
//
AcpiTableInstance->Rsdt1->Signature = EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE;
AcpiTableInstance->Rsdt1->SignatureCommon.Signature = EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE;
AcpiTableInstance->Rsdt1->Length = sizeof (EFI_ACPI_DESCRIPTION_HEADER);
AcpiTableInstance->Rsdt1->Revision = EFI_ACPI_1_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION;
CopyMem(AcpiTableInstance->Rsdt1->OemId, EFI_ACPI_OEM_ID, 6);
@ -1867,7 +1867,7 @@ AcpiTableAcpiTableConstructor (
AcpiTableInstance->NumberOfTableEntries1 = 1;
AcpiTableInstance->Rsdt1->Length = AcpiTableInstance->Rsdt1->Length + sizeof(UINT32);
AcpiTableInstance->Rsdt3->Signature = EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE;
AcpiTableInstance->Rsdt3->SignatureCommon.Signature = EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE;
AcpiTableInstance->Rsdt3->Length = sizeof (EFI_ACPI_DESCRIPTION_HEADER);
AcpiTableInstance->Rsdt3->Revision = EFI_ACPI_3_0_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION;
CopyMem(AcpiTableInstance->Rsdt3->OemId, EFI_ACPI_OEM_ID, 6);
@ -1885,7 +1885,7 @@ AcpiTableAcpiTableConstructor (
//
// Initialize Xsdt
//
AcpiTableInstance->Xsdt->Signature = EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE;
AcpiTableInstance->Xsdt->SignatureCommon.Signature = EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE;
AcpiTableInstance->Xsdt->Length = sizeof (EFI_ACPI_DESCRIPTION_HEADER);
AcpiTableInstance->Xsdt->Revision = EFI_ACPI_3_0_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION;
CopyMem(AcpiTableInstance->Xsdt->OemId, EFI_ACPI_OEM_ID, 6);

View File

@ -138,7 +138,7 @@ ScanTableInRSDT (
EntryPtr = &Rsdt->Entry;
for (Index = 0; Index < EntryCount; Index ++, EntryPtr ++) {
Table = (EFI_ACPI_DESCRIPTION_HEADER*)((UINTN)(*EntryPtr));
if (Table->Signature == Signature) {
if (Table->SignatureCommon.Signature == Signature) {
*FoundTable = Table;
break;
}
@ -168,7 +168,7 @@ ScanTableInXSDT (
for (Index = 0; Index < EntryCount; Index ++) {
CopyMem(&EntryPtr, (VOID *)(BasePtr + Index * sizeof(UINT64)), sizeof(UINT64));
Table = (EFI_ACPI_DESCRIPTION_HEADER*)((UINTN)(EntryPtr));
if (Table->Signature == Signature) {
if (Table->SignatureCommon.Signature == Signature) {
*FoundTable = Table;
break;
}

31
CloverVC.sln Normal file
View File

@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30104.148
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CloverVC", "CloverVC.vcxproj", "{0E2BE62E-9349-45B6-8D78-8F9BD2BE1E9A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0E2BE62E-9349-45B6-8D78-8F9BD2BE1E9A}.Debug|x64.ActiveCfg = Debug|x64
{0E2BE62E-9349-45B6-8D78-8F9BD2BE1E9A}.Debug|x64.Build.0 = Debug|x64
{0E2BE62E-9349-45B6-8D78-8F9BD2BE1E9A}.Debug|x86.ActiveCfg = Debug|Win32
{0E2BE62E-9349-45B6-8D78-8F9BD2BE1E9A}.Debug|x86.Build.0 = Debug|Win32
{0E2BE62E-9349-45B6-8D78-8F9BD2BE1E9A}.Release|x64.ActiveCfg = Release|x64
{0E2BE62E-9349-45B6-8D78-8F9BD2BE1E9A}.Release|x64.Build.0 = Release|x64
{0E2BE62E-9349-45B6-8D78-8F9BD2BE1E9A}.Release|x86.ActiveCfg = Release|Win32
{0E2BE62E-9349-45B6-8D78-8F9BD2BE1E9A}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B579F816-31C8-426E-9857-6407F522FFFF}
EndGlobalSection
EndGlobal

7056
CloverVC.vcxproj Normal file

File diff suppressed because it is too large Load Diff

20927
CloverVC.vcxproj.filters Normal file

File diff suppressed because it is too large Load Diff

4
CloverVC.vcxproj.user Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

View File

@ -25,9 +25,9 @@ typedef struct {
///
typedef struct {
union {
UINT32 Signature;
UINT32 Signature;
CHAR8 SignatureAs4Char[4];
};
} SignatureCommon;
UINT32 Length;
UINT8 Revision;
UINT8 Checksum;

@ -1 +1 @@
Subproject commit f75f093d13d2772d51a6e1fe9e75e6117bb0be35
Subproject commit 718db6190f93bacd4a4e19c96baed3cfd8070286

View File

@ -18,7 +18,7 @@ set EDK_BUILDINFOS=
set EDK2SHELL=
set BUILD_IA32=
set BUILD_X64=
set EDK2_BUILD_OPTIONS=-D NO_GRUB_DRIVERS
set EDK2_BUILD_OPTIONS=-D NO_GRUB_DRIVERS -D MDEPKG_NDEBUG
set VBIOSPATCHCLOVEREFI=0
set ONLY_SATA_0=0
set USE_BIOS_BLOCKIO=0

View File

@ -7,7 +7,8 @@
static_assert(sizeof(char) == 1, "sizeof(char) != 1");
static_assert(sizeof(short) == 2, "sizeof(short) != 2");
static_assert(sizeof(int) == 4, "sizeof(int) != 4");
static_assert(sizeof(long) == 8, "sizeof(long) != 8"); // Jief : I think this break on Windows. Conditional compilation rquired to restore Windows compatibility
//static_assert(sizeof(long) == 8, "sizeof(long) != 8"); // Jief : I think this break on Windows. Conditional compilation rquired to restore Windows compatibility
//so why EDK2 never used "long". It uses INT32.
static_assert(sizeof(long long) == 8, "sizeof(long long) != 8");
static_assert(true, "true");
#endif