Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/gnu-efi/dist Merge conflicts



details:   https://anonhg.NetBSD.org/src/rev/ba924498559e
branches:  trunk
changeset: 992173:ba924498559e
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Thu Aug 16 18:22:05 2018 +0000

description:
Merge conflicts

diffstat:

 sys/external/bsd/gnu-efi/dist/inc/efiapi.h         |  119 +++++-
 sys/external/bsd/gnu-efi/dist/inc/efidef.h         |   15 +-
 sys/external/bsd/gnu-efi/dist/inc/efistdarg.h      |   22 +-
 sys/external/bsd/gnu-efi/dist/inc/ia32/efibind.h   |   13 +-
 sys/external/bsd/gnu-efi/dist/inc/ia64/efibind.h   |   46 +-
 sys/external/bsd/gnu-efi/dist/inc/x86_64/efibind.h |   26 +-
 sys/external/bsd/gnu-efi/dist/lib/dpath.c          |  363 +++++++++++++++++---
 sys/external/bsd/gnu-efi/dist/lib/event.c          |   13 +-
 sys/external/bsd/gnu-efi/dist/lib/hand.c           |    9 +-
 sys/external/bsd/gnu-efi/dist/lib/hw.c             |   32 +-
 10 files changed, 498 insertions(+), 160 deletions(-)

diffs (truncated from 1424 to 300 lines):

diff -r 7ae89a964aa9 -r ba924498559e sys/external/bsd/gnu-efi/dist/inc/efiapi.h
--- a/sys/external/bsd/gnu-efi/dist/inc/efiapi.h        Thu Aug 16 18:17:47 2018 +0000
+++ b/sys/external/bsd/gnu-efi/dist/inc/efiapi.h        Thu Aug 16 18:22:05 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efiapi.h,v 1.2 2016/08/04 18:08:12 scole Exp $ */
+/*     $NetBSD: efiapi.h,v 1.3 2018/08/16 18:22:05 jmcneill Exp $      */
 
 #ifndef _EFI_API_H
 #define _EFI_API_H
@@ -109,8 +109,6 @@
 // EFI Events
 //
 
-
-
 #define EVT_TIMER                           0x80000000
 #define EVT_RUNTIME                         0x40000000
 #define EVT_RUNTIME_CONTEXT                 0x20000000
@@ -122,7 +120,18 @@
 #define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE   0x60000202
 
 #define EVT_EFI_SIGNAL_MASK                 0x000000FF
-#define EVT_EFI_SIGNAL_MAX                  2
+#define EVT_EFI_SIGNAL_MAX                  4
+
+#define EFI_EVENT_TIMER                         EVT_TIMER
+#define EFI_EVENT_RUNTIME                       EVT_RUNTIME
+#define EFI_EVENT_RUNTIME_CONTEXT               EVT_RUNTIME_CONTEXT
+#define EFI_EVENT_NOTIFY_WAIT                   EVT_NOTIFY_WAIT
+#define EFI_EVENT_NOTIFY_SIGNAL                 EVT_NOTIFY_SIGNAL
+#define EFI_EVENT_SIGNAL_EXIT_BOOT_SERVICES     EVT_SIGNAL_EXIT_BOOT_SERVICES
+#define EFI_EVENT_SIGNAL_VIRTUAL_ADDRESS_CHANGE EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE
+#define EFI_EVENT_EFI_SIGNAL_MASK               EVT_EFI_SIGNAL_MASK
+#define EFI_EVENT_EFI_SIGNAL_MAX                EVT_EFI_SIGNAL_MAX
+
 
 typedef
 VOID
@@ -186,11 +195,14 @@
 // Task priority level
 //
 
-#define TPL_APPLICATION    4
-#define TPL_CALLBACK       8
-#define TPL_NOTIFY        16 
-#define TPL_HIGH_LEVEL    31 
-
+#define TPL_APPLICATION       4
+#define TPL_CALLBACK          8
+#define TPL_NOTIFY           16
+#define TPL_HIGH_LEVEL       31
+#define EFI_TPL_APPLICATION  TPL_APPLICATION
+#define EFI_TPL_CALLBACK     TPL_CALLBACK
+#define EFI_TPL_NOTIFY       TPL_NOTIFY
+#define EFI_TPL_HIGH_LEVEL   TPL_HIGH_LEVEL
 typedef
 EFI_TPL
 (EFIAPI *EFI_RAISE_TPL) (
@@ -212,9 +224,13 @@
     { 0x8BE4DF61, 0x93CA, 0x11d2, {0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C} }
 
 // Variable attributes
-#define EFI_VARIABLE_NON_VOLATILE           0x00000001
-#define EFI_VARIABLE_BOOTSERVICE_ACCESS     0x00000002
-#define EFI_VARIABLE_RUNTIME_ACCESS         0x00000004
+#define EFI_VARIABLE_NON_VOLATILE                          0x00000001
+#define EFI_VARIABLE_BOOTSERVICE_ACCESS                    0x00000002
+#define EFI_VARIABLE_RUNTIME_ACCESS                        0x00000004
+#define EFI_VARIABLE_HARDWARE_ERROR_RECORD                 0x00000008
+#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS            0x00000010
+#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020
+#define EFI_VARIABLE_APPEND_WRITE                          0x00000040
 
 // Variable size limitation
 #define EFI_MAXIMUM_VARIABLE_SIZE           1024
@@ -312,6 +328,22 @@
 #define EFI_IMAGE_MACHINE_IA64      0x0200
 #endif
 
+#if !defined(EFI_IMAGE_MACHINE_EBC)
+#define EFI_IMAGE_MACHINE_EBC      0x0EBC
+#endif
+
+#if !defined(EFI_IMAGE_MACHINE_X64)
+#define EFI_IMAGE_MACHINE_X64       0x8664
+#endif
+
+#if !defined(EFI_IMAGE_MACHINE_ARMTHUMB_MIXED)
+#define EFI_IMAGE_MACHINE_ARMTHUMB_MIXED 0x01C2
+#endif
+
+#if !defined(EFI_IMAGE_MACHINE_AARCH64)
+#define EFI_IMAGE_MACHINE_AARCH64   0xAA64
+#endif
+
 // Image Entry prototype
 
 typedef 
@@ -349,15 +381,9 @@
     IN CHAR16                       *ExitData OPTIONAL
     );
 
-typedef 
-EFI_STATUS
-(EFIAPI *EFI_IMAGE_UNLOAD) (
-    IN EFI_HANDLE                   ImageHandle
-    );
-
 
 // Image handle
-#define LOADED_IMAGE_PROTOCOL      \
+/*#define LOADED_IMAGE_PROTOCOL      \
     { 0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B} }
 
 #define EFI_IMAGE_INFORMATION_REVISION      0x1000
@@ -384,7 +410,7 @@
     // If the driver image supports a dynamic unload request
     EFI_IMAGE_UNLOAD                Unload;
 
-} EFI_LOADED_IMAGE;
+} EFI_LOADED_IMAGE;*/
 
 
 typedef
@@ -583,6 +609,51 @@
     OUT UINT32                  *HighCount
     );
 
+typedef struct {
+    UINT64                      Length;
+    union {
+        EFI_PHYSICAL_ADDRESS    DataBlock;
+       EFI_PHYSICAL_ADDRESS    ContinuationPointer;
+    } Union;
+} EFI_CAPSULE_BLOCK_DESCRIPTOR;
+
+typedef struct {
+    EFI_GUID                    CapsuleGuid;
+    UINT32                      HeaderSize;
+    UINT32                      Flags;
+    UINT32                      CapsuleImageSize;
+} EFI_CAPSULE_HEADER;
+
+#define CAPSULE_FLAGS_PERSIST_ACROSS_RESET    0x00010000
+#define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE   0x00020000
+#define CAPSULE_FLAGS_INITIATE_RESET          0x00040000
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UPDATE_CAPSULE) (
+    IN EFI_CAPSULE_HEADER       **CapsuleHeaderArray,
+    IN UINTN                    CapsuleCount,
+    IN EFI_PHYSICAL_ADDRESS     ScatterGatherList OPTIONAL
+    );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_QUERY_CAPSULE_CAPABILITIES) (
+    IN  EFI_CAPSULE_HEADER       **CapsuleHeaderArray,
+    IN  UINTN                    CapsuleCount,
+    OUT UINT64                   *MaximumCapsuleSize,
+    OUT EFI_RESET_TYPE           *ResetType
+    );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_QUERY_VARIABLE_INFO) (
+    IN  UINT32                  Attributes,
+    OUT UINT64                  *MaximumVariableStorageSize,
+    OUT UINT64                  *RemainingVariableStorageSize,
+    OUT UINT64                  *MaximumVariableSize
+    );
+
 //
 // Protocol handler functions
 //
@@ -668,7 +739,7 @@
 // Standard EFI table header
 //
 
-typedef struct _EFI_TABLE_HEARDER {
+typedef struct _EFI_TABLE_HEADER {
     UINT64                      Signature;
     UINT32                      Revision;
     UINT32                      HeaderSize;
@@ -718,6 +789,9 @@
     EFI_GET_NEXT_HIGH_MONO_COUNT    GetNextHighMonotonicCount;
     EFI_RESET_SYSTEM                ResetSystem;
 
+    EFI_UPDATE_CAPSULE              UpdateCapsule;
+    EFI_QUERY_CAPSULE_CAPABILITIES  QueryCapsuleCapabilities;
+    EFI_QUERY_VARIABLE_INFO         QueryVariableInfo;
 } EFI_RUNTIME_SERVICES;
 
 
@@ -845,6 +919,9 @@
 #define SMBIOS_TABLE_GUID    \
     { 0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
 
+#define SMBIOS3_TABLE_GUID    \
+    { 0xf2fd1544, 0x9794, 0x4a2c, {0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94} }
+
 #define SAL_SYSTEM_TABLE_GUID    \
     { 0xeb9d2d32, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d} }
 
diff -r 7ae89a964aa9 -r ba924498559e sys/external/bsd/gnu-efi/dist/inc/efidef.h
--- a/sys/external/bsd/gnu-efi/dist/inc/efidef.h        Thu Aug 16 18:17:47 2018 +0000
+++ b/sys/external/bsd/gnu-efi/dist/inc/efidef.h        Thu Aug 16 18:22:05 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efidef.h,v 1.2 2017/02/14 13:29:09 nonaka Exp $        */
+/*     $NetBSD: efidef.h,v 1.3 2018/08/16 18:22:05 jmcneill Exp $      */
 
 #ifndef _EFI_DEF_H
 #define _EFI_DEF_H
@@ -25,7 +25,9 @@
 typedef UINT16          CHAR16;
 typedef UINT8           CHAR8;
 typedef UINT8           BOOLEAN;
-
+#ifndef CONST
+   #define CONST const
+#endif
 #ifndef TRUE
     #define TRUE    ((BOOLEAN) 1)
     #define FALSE   ((BOOLEAN) 0)
@@ -209,4 +211,13 @@
 #define EFI_SIZE_TO_PAGES(a)  \
     ( ((a) >> EFI_PAGE_SHIFT) + ((a) & EFI_PAGE_MASK ? 1 : 0) )
 
+#define EFI_OS_INDICATIONS_BOOT_TO_FW_UI        0x0000000000000001
+#define EFI_OS_INDICATIONS_TIMESTAMP_REVOCATION 0x0000000000000002
+#define EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED \
+                                                0x0000000000000004
+#define EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED \
+                                                0x0000000000000008
+#define EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED \
+                                                0x0000000000000010
+
 #endif
diff -r 7ae89a964aa9 -r ba924498559e sys/external/bsd/gnu-efi/dist/inc/efistdarg.h
--- a/sys/external/bsd/gnu-efi/dist/inc/efistdarg.h     Thu Aug 16 18:17:47 2018 +0000
+++ b/sys/external/bsd/gnu-efi/dist/inc/efistdarg.h     Thu Aug 16 18:22:05 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efistdarg.h,v 1.2 2014/04/08 17:55:18 jakllsch Exp $   */
+/*     $NetBSD: efistdarg.h,v 1.3 2018/08/16 18:22:05 jmcneill Exp $   */
 
 #ifndef _EFISTDARG_H_
 #define _EFISTDARG_H_
@@ -20,20 +20,20 @@
 Revision History
 
 --*/
-#ifdef __GNUC__
+
+#ifndef GNU_EFI_USE_EXTERNAL_STDARG
 #ifdef __NetBSD__
 #include <sys/stdarg.h>
 #else
-#include "stdarg.h"
+typedef __builtin_va_list va_list;
+
+# define va_start(v,l) __builtin_va_start(v,l)
+# define va_end(v)     __builtin_va_end(v)
+# define va_arg(v,l)   __builtin_va_arg(v,l)
+# define va_copy(d,s)  __builtin_va_copy(d,s)
 #endif
 #else
-#define _INTSIZEOF(n)   ( (sizeof(n) + sizeof(UINTN) - 1) & ~(sizeof(UINTN) - 1) )
-
-typedef CHAR8 * va_list;
-
-#define va_start(ap,v)  ( ap = (va_list)&v + _INTSIZEOF(v) )
-#define va_arg(ap,t)    ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) )
-#define va_end(ap)  ( ap = (va_list)0 )
+# include <stdarg.h>
 #endif
 
-#endif  /* _INC_STDARG */
+#endif
diff -r 7ae89a964aa9 -r ba924498559e sys/external/bsd/gnu-efi/dist/inc/ia32/efibind.h
--- a/sys/external/bsd/gnu-efi/dist/inc/ia32/efibind.h  Thu Aug 16 18:17:47 2018 +0000
+++ b/sys/external/bsd/gnu-efi/dist/inc/ia32/efibind.h  Thu Aug 16 18:22:05 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efibind.h,v 1.2 2014/04/01 16:22:45 jakllsch Exp $     */
+/*     $NetBSD: efibind.h,v 1.3 2018/08/16 18:22:05 jmcneill Exp $     */
 
 /*++
 
@@ -237,9 +237,13 @@
 
 //
 // When build similiar to FW, then link everything together as
-// one big module.
+// one big module. For the MSVC toolchain, we simply tell the
+// linker what our driver init function is using /ENTRY.
 //
-
+#if defined(_MSC_EXTENSIONS)
+    #define EFI_DRIVER_ENTRY_POINT(InitFunction) \
+        __pragma(comment(linker, "/ENTRY:" # InitFunction))



Home | Main Index | Thread Index | Old Index