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/0435662ef8eb
branches:  trunk
changeset: 1023890:0435662ef8eb
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Thu Sep 30 19:02:47 2021 +0000

description:
merge conflicts

diffstat:

 sys/external/bsd/gnu-efi/dist/inc/aarch64/efibind.h         |   6 +-
 sys/external/bsd/gnu-efi/dist/inc/aarch64/efisetjmp_arch.h  |   4 +-
 sys/external/bsd/gnu-efi/dist/inc/arm/efibind.h             |   8 +-
 sys/external/bsd/gnu-efi/dist/inc/arm/efisetjmp_arch.h      |   4 +-
 sys/external/bsd/gnu-efi/dist/inc/efiapi.h                  |  19 ++-
 sys/external/bsd/gnu-efi/dist/inc/efilib.h                  |  55 ++++++-
 sys/external/bsd/gnu-efi/dist/inc/efishellparm.h            |  65 --------
 sys/external/bsd/gnu-efi/dist/inc/efistdarg.h               |   4 +-
 sys/external/bsd/gnu-efi/dist/inc/ia32/efibind.h            |   6 +-
 sys/external/bsd/gnu-efi/dist/inc/ia32/efisetjmp_arch.h     |   4 +-
 sys/external/bsd/gnu-efi/dist/inc/ia64/efibind.h            |   6 +-
 sys/external/bsd/gnu-efi/dist/inc/ia64/efisetjmp_arch.h     |   4 +-
 sys/external/bsd/gnu-efi/dist/inc/mips64el/efisetjmp_arch.h |   4 +-
 sys/external/bsd/gnu-efi/dist/inc/x86_64/efibind.h          |  12 +-
 sys/external/bsd/gnu-efi/dist/inc/x86_64/efisetjmp_arch.h   |   4 +-
 sys/external/bsd/gnu-efi/dist/lib/dpath.c                   |  28 ++-
 sys/external/bsd/gnu-efi/dist/lib/hand.c                    |   9 +-
 sys/external/bsd/gnu-efi/dist/lib/lib.h                     |  94 -------------
 sys/external/bsd/gnu-efi/dist/lib/misc.c                    |  12 +-
 sys/external/bsd/gnu-efi/dist/lib/print.c                   |  76 +++++++++-
 20 files changed, 199 insertions(+), 225 deletions(-)

diffs (truncated from 934 to 300 lines):

diff -r 5740a1072179 -r 0435662ef8eb sys/external/bsd/gnu-efi/dist/inc/aarch64/efibind.h
--- a/sys/external/bsd/gnu-efi/dist/inc/aarch64/efibind.h       Thu Sep 30 18:50:09 2021 +0000
+++ b/sys/external/bsd/gnu-efi/dist/inc/aarch64/efibind.h       Thu Sep 30 19:02:47 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efibind.h,v 1.2 2018/08/18 20:17:51 jmcneill Exp $     */
+/*     $NetBSD: efibind.h,v 1.3 2021/09/30 19:02:47 jmcneill Exp $     */
 
 /*
  * Copright (C) 2014 - 2015 Linaro Ltd.
@@ -17,7 +17,7 @@
  * either version 2 of the License, or (at your option) any later version.
  */
 
-#if !defined(_MSC_VER) && (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L ))
+#if !defined(_MSC_VER) && (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L )) && !defined(__cplusplus)
 
 // ANSI C 1999/2000 stdint.h integer width declarations
 
@@ -29,6 +29,8 @@
 typedef short               int16_t;
 typedef unsigned char       uint8_t;
 typedef signed char         int8_t;   // unqualified 'char' is unsigned on ARM
+typedef uint64_t            uintptr_t;
+typedef int64_t             intptr_t;
 
 #elif defined(__NetBSD__)
 #include <sys/stdint.h>
diff -r 5740a1072179 -r 0435662ef8eb sys/external/bsd/gnu-efi/dist/inc/aarch64/efisetjmp_arch.h
--- a/sys/external/bsd/gnu-efi/dist/inc/aarch64/efisetjmp_arch.h        Thu Sep 30 18:50:09 2021 +0000
+++ b/sys/external/bsd/gnu-efi/dist/inc/aarch64/efisetjmp_arch.h        Thu Sep 30 19:02:47 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efisetjmp_arch.h,v 1.2 2018/08/16 18:24:36 jmcneill Exp $      */
+/*     $NetBSD: efisetjmp_arch.h,v 1.3 2021/09/30 19:02:47 jmcneill Exp $      */
 
 #ifndef GNU_EFI_AARCH64_SETJMP_H
 #define GNU_EFI_AARCH64_SETJMP_H
@@ -30,6 +30,6 @@
        UINT64  D13;
        UINT64  D14;
        UINT64  D15;
-} EFI_ALIGN(JMPBUF_ALIGN) jmp_buf;
+} EFI_ALIGN(JMPBUF_ALIGN) jmp_buf[1];
 
 #endif /* GNU_EFI_AARCH64_SETJMP_H */
diff -r 5740a1072179 -r 0435662ef8eb sys/external/bsd/gnu-efi/dist/inc/arm/efibind.h
--- a/sys/external/bsd/gnu-efi/dist/inc/arm/efibind.h   Thu Sep 30 18:50:09 2021 +0000
+++ b/sys/external/bsd/gnu-efi/dist/inc/arm/efibind.h   Thu Sep 30 19:02:47 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efibind.h,v 1.2 2018/08/18 20:17:51 jmcneill Exp $     */
+/*     $NetBSD: efibind.h,v 1.3 2021/09/30 19:02:47 jmcneill Exp $     */
 
 /*
  * Copright (C) 2014 - 2015 Linaro Ltd.
@@ -17,7 +17,7 @@
  * either version 2 of the License, or (at your option) any later version.
  */
 
-#if !defined(_MSC_VER) && (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L ))
+#if !defined(_MSC_VER) && (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L )) && !defined(__cplusplus)
 
 // ANSI C 1999/2000 stdint.h integer width declarations
 
@@ -29,6 +29,8 @@
 typedef short               int16_t;
 typedef unsigned char       uint8_t;
 typedef signed char         int8_t;   // unqualified 'char' is unsigned on ARM
+typedef uint32_t            uintptr_t;
+typedef int32_t             intptr_t;
 
 #elif defined(__NetBSD__)
 #include <sys/stdint.h>
@@ -40,7 +42,7 @@
  * This prevents GCC from emitting GOT based relocations, and use R_ARM_REL32
  * relative relocations instead, which are more suitable for static binaries.
  */
-#ifdef __GNUC__
+#if defined(__GNUC__) && !__STDC_HOSTED__
 #pragma GCC visibility push (hidden)
 #endif
 
diff -r 5740a1072179 -r 0435662ef8eb sys/external/bsd/gnu-efi/dist/inc/arm/efisetjmp_arch.h
--- a/sys/external/bsd/gnu-efi/dist/inc/arm/efisetjmp_arch.h    Thu Sep 30 18:50:09 2021 +0000
+++ b/sys/external/bsd/gnu-efi/dist/inc/arm/efisetjmp_arch.h    Thu Sep 30 19:02:47 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efisetjmp_arch.h,v 1.2 2018/08/16 18:24:36 jmcneill Exp $      */
+/*     $NetBSD: efisetjmp_arch.h,v 1.3 2021/09/30 19:02:47 jmcneill Exp $      */
 
 #ifndef GNU_EFI_ARM_SETJMP_H
 #define GNU_EFI_ARM_SETJMP_H
@@ -18,6 +18,6 @@
        UINT32 R12;
        UINT32 R13;
        UINT32 R14;
-} EFI_ALIGN(JMPBUF_ALIGN) jmp_buf;
+} EFI_ALIGN(JMPBUF_ALIGN) jmp_buf[1];
 
 #endif /* GNU_EFI_ARM_SETJMP_H */
diff -r 5740a1072179 -r 0435662ef8eb sys/external/bsd/gnu-efi/dist/inc/efiapi.h
--- a/sys/external/bsd/gnu-efi/dist/inc/efiapi.h        Thu Sep 30 18:50:09 2021 +0000
+++ b/sys/external/bsd/gnu-efi/dist/inc/efiapi.h        Thu Sep 30 19:02:47 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efiapi.h,v 1.3 2018/08/16 18:22:05 jmcneill Exp $      */
+/*     $NetBSD: efiapi.h,v 1.4 2021/09/30 19:02:47 jmcneill Exp $      */
 
 #ifndef _EFI_API_H
 #define _EFI_API_H
@@ -344,6 +344,18 @@
 #define EFI_IMAGE_MACHINE_AARCH64   0xAA64
 #endif
 
+#if !defined(EFI_IMAGE_MACHINE_RISCV32)
+#define EFI_IMAGE_MACHINE_RISCV32   0x5032
+#endif
+
+#if !defined(EFI_IMAGE_MACHINE_RISCV64)
+#define EFI_IMAGE_MACHINE_RISCV64   0x5064
+#endif
+
+#if !defined(EFI_IMAGE_MACHINE_RISCV128)
+#define EFI_IMAGE_MACHINE_RISCV128  0x5128
+#endif
+
 // Image Entry prototype
 
 typedef 
@@ -578,7 +590,7 @@
     IN EFI_TPL                  NotifyTpl,
     IN EFI_EVENT_NOTIFY         NotifyFunction OPTIONAL,
     IN const VOID               *NotifyContext OPTIONAL,
-    IN const EFI_GUID           EventGroup OPTIONAL,
+    IN const EFI_GUID           *EventGroup OPTIONAL,
     OUT EFI_EVENT               *Event
     );
 
@@ -929,6 +941,9 @@
 #define        HCDP_TABLE_GUID    \
     { 0xf951938d, 0x620b, 0x42ef, {0x82, 0x79, 0xa8, 0x4b, 0x79, 0x61, 0x78, 0x98} }
 
+#define EFI_DTB_TABLE_GUID \
+    { 0xb1b621d5, 0xf19c, 0x41a5, {0x83, 0x0b, 0xd9, 0x15, 0x2c, 0x69, 0xaa, 0xe0} }
+
 typedef struct _EFI_CONFIGURATION_TABLE {
     EFI_GUID                VendorGuid;
     VOID                    *VendorTable;
diff -r 5740a1072179 -r 0435662ef8eb sys/external/bsd/gnu-efi/dist/inc/efilib.h
--- a/sys/external/bsd/gnu-efi/dist/inc/efilib.h        Thu Sep 30 18:50:09 2021 +0000
+++ b/sys/external/bsd/gnu-efi/dist/inc/efilib.h        Thu Sep 30 19:02:47 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: efilib.h,v 1.2 2018/08/19 14:50:24 jmcneill Exp $      */
+/*     $NetBSD: efilib.h,v 1.3 2021/09/30 19:02:47 jmcneill Exp $      */
 
 #ifndef _EFILIB_INCLUDE_
 #define _EFILIB_INCLUDE_
@@ -23,7 +23,21 @@
 
 #include "efidebug.h"
 #include "efipart.h"
-#include "efilibplat.h"
+#if defined(_M_X64) || defined(__x86_64__) || defined(__amd64__)
+#include "x86_64/efilibplat.h"
+#elif defined(_M_IX86) || defined(__i386__)
+#include "ia32/efilibplat.h"
+#elif defined(_M_IA64) || defined(__ia64__)
+#include "ia64/efilibplat.h"
+#elif defined (_M_ARM64) || defined(__aarch64__)
+#include "aarch64/efilibplat.h"
+#elif defined (_M_ARM) || defined(__arm__)
+#include "arm/efilibplat.h"
+#elif defined (_M_MIPS64) || defined(__mips64__)
+#include "mips64el/efilibplat.h"
+#elif defined (__riscv) && __riscv_xlen == 64
+#include "riscv64/efilibplat.h"
+#endif
 #include "efilink.h"
 #include "efirtlib.h"
 #include "efistdarg.h"
@@ -47,6 +61,8 @@
 #define DevicePathToTextProtocol gEfiDevicePathToTextProtocolGuid
 extern EFI_GUID gEfiDevicePathFromTextProtocolGuid;
 #define DevicePathFromTextProtocol gEfiDevicePathFromTextProtocolGuid
+extern EFI_GUID gEfiDevicePathUtilitiesProtocolGuid;
+#define DevicePathUtilitiesProtocol gEfiDevicePathUtilitiesProtocolGuid
 extern EFI_GUID gEfiLoadedImageProtocolGuid;
 #define LoadedImageProtocol gEfiLoadedImageProtocolGuid
 extern EFI_GUID gEfiSimpleTextInProtocolGuid;
@@ -139,7 +155,9 @@
 extern EFI_GUID MpsTableGuid;
 extern EFI_GUID AcpiTableGuid;
 extern EFI_GUID SMBIOSTableGuid;
+extern EFI_GUID SMBIOS3TableGuid;
 extern EFI_GUID SalSystemTableGuid;
+extern EFI_GUID EfiDtbTableGuid;
 
 extern EFI_GUID SimplePointerProtocol;
 extern EFI_GUID AbsolutePointerProtocol;
@@ -147,6 +165,12 @@
 extern EFI_GUID gEfiDebugImageInfoTableGuid;
 extern EFI_GUID gEfiDebugSupportProtocolGuid;
 
+extern EFI_GUID SimpleTextInputExProtocol;
+
+extern EFI_GUID ShellProtocolGuid;
+extern EFI_GUID ShellParametersProtocolGuid;
+extern EFI_GUID ShellDynamicCommandProtocolGuid;
+
 //
 // EFI Variable strings
 //
@@ -514,7 +538,7 @@
     );
 
 UINTN
-SPrint (
+UnicodeSPrint (
     OUT CHAR16        *Str,
     IN UINTN          StrSize,
     IN CONST CHAR16   *fmt,
@@ -522,7 +546,7 @@
     );
 
 UINTN
-VSPrint (
+UnicodeVSPrint (
     OUT CHAR16        *Str,
     IN UINTN          StrSize,
     IN CONST CHAR16   *fmt,
@@ -579,11 +603,26 @@
     );
 
 UINTN
-APrint (
+AsciiPrint (
     IN CONST CHAR8    *fmt,
     ...
     );
 
+UINTN
+AsciiVSPrint(
+    OUT CHAR8         *Str,
+    IN  UINTN         StrSize,
+    IN  CONST CHAR8   *fmt,
+    va_list           args
+);
+
+//
+// For compatibility with previous gnu-efi versions
+//
+#define SPrint      UnicodeSPrint
+#define VSPrint     UnicodeVSPrint
+#define APrint      AsciiPrint
+
 VOID
 ValueToHex (
     IN CHAR16   *Buffer,
@@ -1018,6 +1057,11 @@
         IN  UINTN                       Data
         );
 
+VOID
+Pause (
+    VOID
+);
+
 extern EFI_DEVICE_IO_INTERFACE  *GlobalIoFncs;
 
 #define outp(_Port, _DataByte)  (UINT8)WritePort(GlobalIoFncs,  IO_UINT8,  (UINTN)_Port, (UINTN)_DataByte)
@@ -1034,7 +1078,6 @@
 #define writepci32(_Addr, _DataByte) (UINT32)WritePciConfig(GlobalIoFncs, IO_UINT32, (UINTN)_Addr, (UINTN)_DataByte)
 #define readpci32(_Addr)             (UINT32)ReadPciConfig(GlobalIoFncs,  IO_UINT32, (UINTN)_Addr)
 
-#define Pause()             WaitForSingleEvent (ST->ConIn->WaitForKey, 0)
 #define Port80(_PostCode)   GlobalIoFncs->Io.Write (GlobalIoFncs, IO_UINT16, (UINT64)0x80, 1, &(_PostCode))
 
 #endif
diff -r 5740a1072179 -r 0435662ef8eb sys/external/bsd/gnu-efi/dist/inc/efishellparm.h
--- a/sys/external/bsd/gnu-efi/dist/inc/efishellparm.h  Thu Sep 30 18:50:09 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*     $NetBSD: efishellparm.h,v 1.1.1.1 2018/08/16 18:17:47 jmcneill Exp $    */
-
-/** @file
-  EFI_SHELL_PARAMETERS_PROTOCOL as defined in the UEFI Shell 2.0 specification.
-
-  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
-  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.
-
-**/
-/*
- * This is based on ShellPkg/Include/Protocol/EfiShellParameters.h from EDK II.
- */
-
-#ifndef __EFI_SHELL_PARAMETERS_PROTOCOL__
-#define __EFI_SHELL_PARAMETERS_PROTOCOL__
-



Home | Main Index | Thread Index | Old Index