From: "André Hentschel" Subject: [PATCH 07/23] setupapi: Add support for PPC64 Message-Id: <20210131173433.114385-8-nerv@dawncrow.de> Date: Sun, 31 Jan 2021 18:34:17 +0100 In-Reply-To: <20210131173433.114385-1-nerv@dawncrow.de> References: <20210131173433.114385-1-nerv@dawncrow.de> Signed-off-by: André Hentschel --- dlls/setupapi/devinst.c | 2 ++ dlls/setupapi/fakedll.c | 4 ++++ include/winnt.h | 2 ++ 3 files changed, 8 insertions(+) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index de0413e74f5..3c72c82a26b 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -61,6 +61,8 @@ static const WCHAR NtPlatformExtension[] = {'.','N','T','a','m','d','6','4',0}; static const WCHAR NtPlatformExtension[] = {'.','N','T','a','r','m',0}; #elif defined(__aarch64__) static const WCHAR NtPlatformExtension[] = {'.','N','T','a','r','m','6','4',0}; +#elif defined(__powerpc64__) +static const WCHAR NtPlatformExtension[] = {'.','N','T','p','p','c','6','4',0}; #endif static const WCHAR Signature[] = {'S','i','g','n','a','t','u','r','e',0}; static const WCHAR Version[] = {'V','e','r','s','i','o','n',0}; diff --git a/dlls/setupapi/fakedll.c b/dlls/setupapi/fakedll.c index cf219916400..f020e275248 100644 --- a/dlls/setupapi/fakedll.c +++ b/dlls/setupapi/fakedll.c @@ -281,6 +281,8 @@ static BOOL build_fake_dll( HANDLE file, const WCHAR *name ) nt->FileHeader.Machine = IMAGE_FILE_MACHINE_ARM64; #elif defined __arm__ nt->FileHeader.Machine = IMAGE_FILE_MACHINE_ARMNT; +#elif defined __powerpc64__ + nt->FileHeader.Machine = IMAGE_FILE_MACHINE_POWERPC64; #else nt->FileHeader.Machine = IMAGE_FILE_MACHINE_I386; #endif @@ -711,6 +713,8 @@ static BOOL CALLBACK register_manifest( HMODULE module, const WCHAR *type, WCHAR static const char current_arch[] = "arm"; #elif defined __aarch64__ static const char current_arch[] = "arm64"; +#elif defined __powerpc64__ + static const char current_arch[] = "ppc64"; #else static const char current_arch[] = "none"; #endif diff --git a/include/winnt.h b/include/winnt.h index 5b3efe61385..0c9487bcffc 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -689,6 +689,7 @@ typedef DWORD FLONG; #define PROCESSOR_ARCHITECTURE_ARM64 12 #define PROCESSOR_ARCHITECTURE_ARM32_ON_WIN64 13 #define PROCESSOR_ARCHITECTURE_IA32_ON_ARM64 14 +#define PROCESSOR_ARCHITECTURE_PPC64 200 /* Wine extension */ #define PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF /* dwProcessorType */ @@ -3046,6 +3047,7 @@ typedef struct _IMAGE_VXD_HEADER { #define IMAGE_FILE_MACHINE_AM33 0x01d3 #define IMAGE_FILE_MACHINE_POWERPC 0x01f0 #define IMAGE_FILE_MACHINE_POWERPCFP 0x01f1 +#define IMAGE_FILE_MACHINE_POWERPC64 0x01f2 #define IMAGE_FILE_MACHINE_IA64 0x0200 #define IMAGE_FILE_MACHINE_MIPS16 0x0266 #define IMAGE_FILE_MACHINE_ALPHA64 0x0284 -- 2.25.1