Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143254654
D53799.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D53799.diff
View Options
diff --git a/sys/sys/efi-edk2.h b/sys/sys/efi-edk2.h
--- a/sys/sys/efi-edk2.h
+++ b/sys/sys/efi-edk2.h
@@ -41,7 +41,20 @@
/* We can't actually call this stuff, so snip out API syntactic sugar */
#define INTERFACE_DECL(x) struct x
+#ifdef _STANDALONE
+#if defined(__amd64__)
+#define EFIAPI __attribute__((ms_abi))
+#endif
+#ifndef EFIAPI // Forces EFI calling conventions reguardless of compiler options
+ #ifdef _MSC_EXTENSIONS
+ #define EFIAPI __cdecl // Force C calling convention for Microsoft C compiler
+ #else
+ #define EFIAPI // Substitute expresion to force C calling convention
+ #endif
+#endif
+#else
#define EFIAPI
+#endif
#define IN
#define OUT
#define CONST const
@@ -64,11 +77,13 @@
#define PACKED
/*
- * Since we're not compiling for the UEFI boot time (which use ms abi
- * conventions), tell EDK2 to define VA_START correctly. For the boot
- * loader, this likely needs to be different.
+ * For userland and the kernel, we're not compiling for the UEFI boot time
+ * (which use ms abi conventions on amd64), tell EDK2 to define VA_START
+ * correctly. For the boot loader, we can't do that, so don't.
*/
+#ifndef _STANDALONE
#define NO_MSABI_VA_FUNCS 1
+#endif
/*
* Finally, we need to define the processor we are in EDK2 terms.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jan 29, 3:45 AM (7 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25596561
Default Alt Text
D53799.diff (1 KB)
Attached To
Mode
D53799: stand: Add back missing EFIAPI define
Attached
Detach File
Event Timeline
Log In to Comment