Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package gnu-efi for openSUSE:Factory checked 
in at 2021-03-17 20:13:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnu-efi (Old)
 and      /work/SRC/openSUSE:Factory/.gnu-efi.new.2401 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gnu-efi"

Wed Mar 17 20:13:18 2021 rev:33 rq:878534 version:3.0.13

Changes:
--------
--- /work/SRC/openSUSE:Factory/gnu-efi/gnu-efi.changes  2021-01-11 
17:08:52.303947986 +0100
+++ /work/SRC/openSUSE:Factory/.gnu-efi.new.2401/gnu-efi.changes        
2021-03-17 20:13:19.514773806 +0100
@@ -1,0 +2,16 @@
+Fri Mar 12 08:34:48 UTC 2021 - Gary Ching-Pang Lin <g...@suse.com>
+
+- Update to gnu-efi 3.0.13
+  + Define UnicodeSPrint/UnicodeVSPrint as our main SPrint/VSPrint
+    calls
+  + Use EFI_FILE_SYSTEM_VOLUME_LABEL rather than
+    EFI_FILE_SYSTEM_VOLUME_LABEL_INFO 
+  + Define BASE_CR as a duplicate of the _CR macro
+  + Fix CopyMem() not handling overlaps
+  + Add AsciiPrint and AsciiVSPrint
+  + Replace Pause() macro with new library function
+  + Add Simple Text Input Ex Protocol support
+- Add gnu-efi-bsc1182057-support-sbat-section.patch to support
+  .sbat section (bsc#1182057)
+
+-------------------------------------------------------------------

Old:
----
  gnu-efi-3.0.12.tar.bz2

New:
----
  gnu-efi-3.0.13.tar.bz2
  gnu-efi-bsc1182057-support-sbat-section.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gnu-efi.spec ++++++
--- /var/tmp/diff_new_pack.imAyJy/_old  2021-03-17 20:13:20.442775075 +0100
+++ /var/tmp/diff_new_pack.imAyJy/_new  2021-03-17 20:13:20.446775080 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           gnu-efi
-Version:        3.0.12
+Version:        3.0.13
 Release:        0
 Summary:        Library for EFI Applications
 License:        BSD-3-Clause AND GPL-2.0-or-later
@@ -25,6 +25,7 @@
 URL:            https://sourceforge.net/projects/gnu-efi
 Source:         
https://download.sourceforge.net/project/gnu-efi/gnu-efi-%{version}.tar.bz2
 Source1:        %{name}-rpmlintrc
+Patch1:         gnu-efi-bsc1182057-support-sbat-section.patch
 BuildRequires:  kernel-source
 ExclusiveArch:  ia64 %{ix86} x86_64 aarch64 %{arm}
 
@@ -35,6 +36,7 @@
 
 %prep
 %setup -q
+%patch1 -p1
 
 %build
 ##########################

++++++ gnu-efi-3.0.12.tar.bz2 -> gnu-efi-3.0.13.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnu-efi-3.0.12/Makefile new/gnu-efi-3.0.13/Makefile
--- old/gnu-efi-3.0.12/Makefile 2020-05-11 17:05:20.000000000 +0200
+++ new/gnu-efi-3.0.13/Makefile 2021-03-08 21:05:36.000000000 +0100
@@ -34,7 +34,7 @@
 #    SUCH DAMAGE.
 #
 
-VERSION = 3.0.12
+VERSION = 3.0.13
 
 MKFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
 SRCDIR = $(dir $(MKFILE_PATH))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnu-efi-3.0.12/inc/efi.h new/gnu-efi-3.0.13/inc/efi.h
--- old/gnu-efi-3.0.12/inc/efi.h        2020-05-11 17:05:20.000000000 +0200
+++ new/gnu-efi-3.0.13/inc/efi.h        2021-03-08 21:05:36.000000000 +0100
@@ -38,13 +38,29 @@
 #define EFI_FIRMWARE_MINOR_REVISION 33
 #define EFI_FIRMWARE_REVISION ((EFI_FIRMWARE_MAJOR_REVISION <<16) | 
(EFI_FIRMWARE_MINOR_REVISION))
 
-#include "efibind.h"
+#if defined(_M_X64) || defined(__x86_64__) || defined(__amd64__)
+#include "x86_64/efibind.h"
+#elif defined(_M_IX86) || defined(__i386__)
+#include "ia32/efibind.h"
+#elif defined(_M_IA64) || defined(__ia64__)
+#include "ia64/efibind.h"
+#elif defined (_M_ARM64) || defined(__aarch64__)
+#include "aarch64/efibind.h"
+#elif defined (_M_ARM) || defined(__arm__)
+#include "arm/efibind.h"
+#elif defined (_M_MIPS64) || defined(__mips64__)
+#include "mips64el/efibind.h"
+#else
+#error Usupported architecture
+#endif
+
 #include "eficompiler.h"
 #include "efidef.h"
 #include "efidevp.h"
 #include "efipciio.h"
 #include "efiprot.h"
 #include "eficon.h"
+#include "eficonex.h"
 #include "efiser.h"
 #include "efi_nii.h"
 #include "efipxebc.h"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnu-efi-3.0.12/inc/eficonex.h 
new/gnu-efi-3.0.13/inc/eficonex.h
--- old/gnu-efi-3.0.12/inc/eficonex.h   1970-01-01 01:00:00.000000000 +0100
+++ new/gnu-efi-3.0.13/inc/eficonex.h   2021-03-08 21:05:36.000000000 +0100
@@ -0,0 +1,111 @@
+#ifndef _EFI_CONEX_H
+#define _EFI_CONEX_H
+
+/*++
+
+Copyright (c) 2020 Kagurazaka Kotori <kagurazakakot...@gmail.com>
+
+Module Name:
+
+    eficonex.h
+
+Abstract:
+
+    EFI console extension protocols
+
+--*/
+
+//
+// Simple Text Input Ex Protocol
+//
+
+#define EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID \
+    { 0xdd9e7534, 0x7762, 0x4698, {0x8c, 0x14, 0xf5, 0x85, 0x17, 0xa6, 0x25, 
0xaa} }
+
+INTERFACE_DECL(_EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL);
+
+typedef UINT8 EFI_KEY_TOGGLE_STATE;
+
+typedef struct EFI_KEY_STATE {
+    UINT32                                         KeyShiftState;
+    EFI_KEY_TOGGLE_STATE                           KeyToggleState;
+} EFI_KEY_STATE;
+
+typedef struct {
+    EFI_INPUT_KEY                                  Key;
+    EFI_KEY_STATE                                  KeyState;
+} EFI_KEY_DATA;
+
+// Shift states
+#define EFI_SHIFT_STATE_VALID                      0x80000000
+#define EFI_RIGHT_SHIFT_PRESSED                    0x00000001
+#define EFI_LEFT_SHIFT_PRESSED                     0x00000002
+#define EFI_RIGHT_CONTROL_PRESSED                  0x00000004
+#define EFI_LEFT_CONTROL_PRESSED                   0x00000008
+#define EFI_RIGHT_ALT_PRESSED                      0x00000010
+#define EFI_LEFT_ALT_PRESSED                       0x00000020
+#define EFI_RIGHT_LOGO_PRESSED                     0x00000040
+#define EFI_LEFT_LOGO_PRESSED                      0x00000080
+#define EFI_MENU_KEY_PRESSED                       0x00000100
+#define EFI_SYS_REQ_PRESSED                        0x00000200
+
+// Toggle states
+#define EFI_TOGGLE_STATE_VALID                     0x80
+#define EFI_KEY_STATE_EXPOSED                      0x40
+#define EFI_SCROLL_LOCK_ACTIVE                     0x01
+#define EFI_NUM_LOCK_ACTIVE                        0x02
+#define EFI_CAPS_LOCK_ACTIVE                       0x04
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_INPUT_RESET_EX) (
+    IN struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL   *This,
+    IN BOOLEAN                                     ExtendedVerification
+    );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_INPUT_READ_KEY_EX) (
+    IN struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL   *This,
+    OUT EFI_KEY_DATA                               *KeyData
+    );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_SET_STATE) (
+    IN struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL   *This,
+    IN EFI_KEY_TOGGLE_STATE                        *KeyToggleState
+    );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_KEY_NOTIFY_FUNCTION) (
+    IN EFI_KEY_DATA                                *KeyData
+    );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_REGISTER_KEYSTROKE_NOTIFY) (
+    IN struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL   *This,
+    IN EFI_KEY_DATA                                *KeyData,
+    IN EFI_KEY_NOTIFY_FUNCTION                     KeyNotificationFunction,
+    OUT VOID                                       **NotifyHandle
+    );
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY) (
+    IN struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL   *This,
+    IN VOID                                        *NotificationHandle
+    );
+
+typedef struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL{
+    EFI_INPUT_RESET_EX                             Reset;
+    EFI_INPUT_READ_KEY_EX                          ReadKeyStrokeEx;
+    EFI_EVENT                                      WaitForKeyEx;
+    EFI_SET_STATE                                  SetState;
+    EFI_REGISTER_KEYSTROKE_NOTIFY                  RegisterKeyNotify;
+    EFI_UNREGISTER_KEYSTROKE_NOTIFY                UnregisterKeyNotify;
+} EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL;
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnu-efi-3.0.12/inc/efilib.h 
new/gnu-efi-3.0.13/inc/efilib.h
--- old/gnu-efi-3.0.12/inc/efilib.h     2020-05-11 17:05:20.000000000 +0200
+++ new/gnu-efi-3.0.13/inc/efilib.h     2021-03-08 21:05:36.000000000 +0100
@@ -21,7 +21,19 @@
 
 #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"
+#endif
 #include "efilink.h"
 #include "efirtlib.h"
 #include "efistdarg.h"
@@ -146,6 +158,8 @@
 extern EFI_GUID gEfiDebugImageInfoTableGuid;
 extern EFI_GUID gEfiDebugSupportProtocolGuid;
 
+extern EFI_GUID SimpleTextInputExProtocol;
+
 //
 // EFI Variable strings
 //
@@ -513,7 +527,7 @@
     );
 
 UINTN
-SPrint (
+UnicodeSPrint (
     OUT CHAR16        *Str,
     IN UINTN          StrSize,
     IN CONST CHAR16   *fmt,
@@ -521,7 +535,7 @@
     );
 
 UINTN
-VSPrint (
+UnicodeVSPrint (
     OUT CHAR16        *Str,
     IN UINTN          StrSize,
     IN CONST CHAR16   *fmt,
@@ -578,11 +592,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,
@@ -1015,6 +1044,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)
@@ -1031,7 +1065,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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnu-efi-3.0.12/inc/efilink.h 
new/gnu-efi-3.0.13/inc/efilink.h
--- old/gnu-efi-3.0.12/inc/efilink.h    2020-05-11 17:05:20.000000000 +0200
+++ new/gnu-efi-3.0.13/inc/efilink.h    2021-03-08 21:05:36.000000000 +0100
@@ -152,6 +152,11 @@
 #define _CR(Record, TYPE, Field)  \
     ((TYPE *) ( (CHAR8 *)(Record) - (CHAR8 *) &(((TYPE *) 0)->Field)))
 
+//
+// EDK2 uses BASE_CR for the above
+//
+#define BASE_CR _CR
+
 #if EFI_DEBUG
     #define CR(Record, TYPE, Field, Sig)     \
         _CR(Record, TYPE, Field)->Signature != Sig ?        \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnu-efi-3.0.12/inc/efiprot.h 
new/gnu-efi-3.0.13/inc/efiprot.h
--- old/gnu-efi-3.0.12/inc/efiprot.h    2020-05-11 17:05:20.000000000 +0200
+++ new/gnu-efi-3.0.13/inc/efiprot.h    2021-03-08 21:05:36.000000000 +0100
@@ -517,14 +517,20 @@
 
 #define SIZE_OF_EFI_FILE_SYSTEM_INFO 
EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_INFO,VolumeLabel)
 
-#define EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID    \
+#define EFI_FILE_SYSTEM_VOLUME_LABEL_ID    \
     { 0xDB47D7D3,0xFE81, 0x11d3, {0x9A, 0x35, 0x00, 0x90, 0x27, 0x3F, 0xC1, 
0x4D} }
 
 typedef struct {
     CHAR16                  VolumeLabel[1];
-} EFI_FILE_SYSTEM_VOLUME_LABEL_INFO;
+} EFI_FILE_SYSTEM_VOLUME_LABEL;
 
-#define SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL_INFO 
EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_VOLUME_LABEL_INFO,VolumeLabel)
+#define SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL_INFO 
EFI_FIELD_OFFSET(EFI_FILE_SYSTEM_VOLUME_LABEL,VolumeLabel)
+
+//
+// For compatibility with older versions of gnu-efi
+//
+#define EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID EFI_FILE_SYSTEM_VOLUME_LABEL_ID
+#define EFI_FILE_SYSTEM_VOLUME_LABEL_INFO    EFI_FILE_SYSTEM_VOLUME_LABEL
 
 //
 // Load file protocol
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnu-efi-3.0.12/inc/efirtlib.h 
new/gnu-efi-3.0.13/inc/efirtlib.h
--- old/gnu-efi-3.0.12/inc/efirtlib.h   2020-05-11 17:05:20.000000000 +0200
+++ new/gnu-efi-3.0.13/inc/efirtlib.h   2021-03-08 21:05:36.000000000 +0100
@@ -20,7 +20,19 @@
 
 #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"
+#endif
 
 
 VOID
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnu-efi-3.0.12/inc/efistdarg.h 
new/gnu-efi-3.0.13/inc/efistdarg.h
--- old/gnu-efi-3.0.12/inc/efistdarg.h  2020-05-11 17:05:20.000000000 +0200
+++ new/gnu-efi-3.0.13/inc/efistdarg.h  2021-03-08 21:05:36.000000000 +0100
@@ -19,7 +19,7 @@
 
 --*/
 
-#ifndef GNU_EFI_USE_EXTERNAL_STDARG
+#if !defined(GNU_EFI_USE_EXTERNAL_STDARG) && !defined(_MSC_VER)
 typedef __builtin_va_list va_list;
 
 # define va_start(v,l) __builtin_va_start(v,l)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnu-efi-3.0.12/inc/lib.h new/gnu-efi-3.0.13/inc/lib.h
--- old/gnu-efi-3.0.12/inc/lib.h        1970-01-01 01:00:00.000000000 +0100
+++ new/gnu-efi-3.0.13/inc/lib.h        2021-03-08 21:05:36.000000000 +0100
@@ -0,0 +1,92 @@
+/*++
+
+Copyright (c) 1998  Intel Corporation
+
+Module Name:
+
+    lib.h
+
+Abstract:
+
+    EFI library header files
+
+
+
+Revision History
+
+--*/
+
+#ifdef __GNUC__
+#pragma GCC visibility push(hidden)
+#endif
+
+#include "efi.h"
+#include "efilib.h"
+#include "efirtlib.h"
+
+//
+// Include non architectural protocols
+//
+#include "protocol/efivar.h"
+#include "protocol/legacyboot.h"
+#include "protocol/intload.h"
+#include "protocol/vgaclass.h"
+#include "protocol/eficonsplit.h"
+#include "protocol/adapterdebug.h"
+#include "protocol/intload.h"
+
+#include "efigpt.h"
+#include "libsmbios.h"
+
+//
+// Prototypes
+//
+
+VOID
+InitializeGuid (
+    VOID
+    );
+
+INTN EFIAPI
+LibStubStriCmp (
+    IN EFI_UNICODE_COLLATION_INTERFACE  *This,
+    IN CHAR16                           *S1,
+    IN CHAR16                           *S2
+    );
+
+BOOLEAN EFIAPI
+LibStubMetaiMatch (
+    IN EFI_UNICODE_COLLATION_INTERFACE  *This,
+    IN CHAR16                           *String,
+    IN CHAR16                           *Pattern
+    );
+
+VOID EFIAPI
+LibStubStrLwrUpr (
+    IN EFI_UNICODE_COLLATION_INTERFACE  *This,
+    IN CHAR16                           *Str
+    );
+
+BOOLEAN
+LibMatchDevicePaths (
+    IN  EFI_DEVICE_PATH *Multi,
+    IN  EFI_DEVICE_PATH *Single
+    );
+
+EFI_DEVICE_PATH *
+LibDuplicateDevicePathInstance (
+    IN EFI_DEVICE_PATH  *DevPath
+    );
+
+
+//
+// Globals
+//
+extern BOOLEAN                          LibInitialized;
+extern BOOLEAN                          LibFwInstance;
+extern EFI_HANDLE                      LibImageHandle;
+extern SIMPLE_TEXT_OUTPUT_INTERFACE     *LibRuntimeDebugOut;
+extern EFI_UNICODE_COLLATION_INTERFACE  *UnicodeInterface;
+extern EFI_UNICODE_COLLATION_INTERFACE  LibStubUnicodeInterface;
+extern EFI_RAISE_TPL                    LibRuntimeRaiseTPL;
+extern EFI_RESTORE_TPL                  LibRuntimeRestoreTPL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnu-efi-3.0.12/inc/x86_64/efibind.h 
new/gnu-efi-3.0.13/inc/x86_64/efibind.h
--- old/gnu-efi-3.0.12/inc/x86_64/efibind.h     2020-05-11 17:05:20.000000000 
+0200
+++ new/gnu-efi-3.0.13/inc/x86_64/efibind.h     2021-03-08 21:05:36.000000000 
+0100
@@ -22,7 +22,9 @@
 #pragma pack()
 #endif
 
-#if defined(GNU_EFI_USE_MS_ABI)
+#if defined(_MSC_VER)
+    #define HAVE_USE_MS_ABI 1
+#elif defined(GNU_EFI_USE_MS_ABI)
     #if (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && 
__GNUC_MINOR__ >= 7)))||(defined(__clang__) && (__clang_major__ > 3 || 
(__clang_major__ == 3 && __clang_minor__ >= 2)))
         #define HAVE_USE_MS_ABI 1
     #else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnu-efi-3.0.12/lib/Makefile 
new/gnu-efi-3.0.13/lib/Makefile
--- old/gnu-efi-3.0.12/lib/Makefile     2020-05-11 17:05:20.000000000 +0200
+++ new/gnu-efi-3.0.13/lib/Makefile     2021-03-08 21:05:36.000000000 +0100
@@ -45,7 +45,7 @@
 CDIR = $(TOPDIR)/..
 FILES = boxdraw smbios console crc data debug dpath  \
         error event exit guid hand hw init lock   \
-        misc print sread str cmdline \
+        misc pause print sread str cmdline\
        runtime/rtlock runtime/efirtlib runtime/rtstr runtime/vm runtime/rtdata 
 \
        $(ARCH)/initplat $(ARCH)/math $(ARCH)/setjmp
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnu-efi-3.0.12/lib/data.c 
new/gnu-efi-3.0.13/lib/data.c
--- old/gnu-efi-3.0.12/lib/data.c       2020-05-11 17:05:20.000000000 +0200
+++ new/gnu-efi-3.0.13/lib/data.c       2021-03-08 21:05:36.000000000 +0100
@@ -129,7 +129,7 @@
 
 EFI_GUID gEfiFileInfoGuid                           = EFI_FILE_INFO_ID;
 EFI_GUID gEfiFileSystemInfoGuid                     = EFI_FILE_SYSTEM_INFO_ID;
-EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid        = 
EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID;
+EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid        = 
EFI_FILE_SYSTEM_VOLUME_LABEL_ID;
 
 //
 // Reference implementation public protocol IDs
@@ -202,3 +202,8 @@
 //
 EFI_GUID gEfiDebugImageInfoTableGuid           = 
EFI_DEBUG_IMAGE_INFO_TABLE_GUID;
 EFI_GUID gEfiDebugSupportProtocolGuid          = 
EFI_DEBUG_SUPPORT_PROTOCOL_GUID;
+
+//
+// Console extension protocol GUIDs
+//
+EFI_GUID SimpleTextInputExProtocol = EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnu-efi-3.0.12/lib/error.c 
new/gnu-efi-3.0.13/lib/error.c
--- old/gnu-efi-3.0.12/lib/error.c      2020-05-11 17:05:20.000000000 +0200
+++ new/gnu-efi-3.0.13/lib/error.c      2021-03-08 21:05:36.000000000 +0100
@@ -79,5 +79,5 @@
         }
     }
 
-    SPrint (Buffer, 0, L"%X", Status);
+    UnicodeSPrint (Buffer, 0, L"%X", Status);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnu-efi-3.0.12/lib/guid.c 
new/gnu-efi-3.0.13/lib/guid.c
--- old/gnu-efi-3.0.12/lib/guid.c       2020-05-11 17:05:20.000000000 +0200
+++ new/gnu-efi-3.0.13/lib/guid.c       2021-03-08 21:05:36.000000000 +0100
@@ -154,7 +154,7 @@
 
     for (Index=0; KnownGuids[Index].Guid; Index++) {
         if (CompareGuid(Guid, KnownGuids[Index].Guid) == 0) {
-            SPrint (Buffer, 0, KnownGuids[Index].GuidName);
+            UnicodeSPrint (Buffer, 0, KnownGuids[Index].GuidName);
             return ;
         }
     }
@@ -163,7 +163,7 @@
     // Else dump it
     //
 
-    SPrint (Buffer, 0, L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+    UnicodeSPrint (Buffer, 0, 
L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
         Guid->Data1,
         Guid->Data2,
         Guid->Data3,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnu-efi-3.0.12/lib/lib.h new/gnu-efi-3.0.13/lib/lib.h
--- old/gnu-efi-3.0.12/lib/lib.h        2020-05-11 17:05:20.000000000 +0200
+++ new/gnu-efi-3.0.13/lib/lib.h        1970-01-01 01:00:00.000000000 +0100
@@ -1,92 +0,0 @@
-/*++
-
-Copyright (c) 1998  Intel Corporation
-
-Module Name:
-
-    lib.h
-
-Abstract:
-
-    EFI library header files
-
-
-
-Revision History
-
---*/
-
-#ifdef __GNUC__
-#pragma GCC visibility push(hidden)
-#endif
-
-#include "efi.h"
-#include "efilib.h"
-#include "efirtlib.h"
-
-//
-// Include non architectural protocols
-//
-#include "efivar.h"
-#include "legacyboot.h"
-#include "intload.h"
-#include "vgaclass.h"
-#include "eficonsplit.h"
-#include "adapterdebug.h"
-#include "intload.h"
-
-#include "efigpt.h"
-#include "libsmbios.h"
-
-//
-// Prototypes
-//
-
-VOID
-InitializeGuid (
-    VOID
-    );
-
-INTN EFIAPI
-LibStubStriCmp (
-    IN EFI_UNICODE_COLLATION_INTERFACE  *This,
-    IN CHAR16                           *S1,
-    IN CHAR16                           *S2
-    );
-
-BOOLEAN EFIAPI
-LibStubMetaiMatch (
-    IN EFI_UNICODE_COLLATION_INTERFACE  *This,
-    IN CHAR16                           *String,
-    IN CHAR16                           *Pattern
-    );
-
-VOID EFIAPI
-LibStubStrLwrUpr (
-    IN EFI_UNICODE_COLLATION_INTERFACE  *This,
-    IN CHAR16                           *Str
-    );
-
-BOOLEAN
-LibMatchDevicePaths (
-    IN  EFI_DEVICE_PATH *Multi,
-    IN  EFI_DEVICE_PATH *Single
-    );
-
-EFI_DEVICE_PATH *
-LibDuplicateDevicePathInstance (
-    IN EFI_DEVICE_PATH  *DevPath
-    );
-
-
-//
-// Globals
-//
-extern BOOLEAN                          LibInitialized;
-extern BOOLEAN                          LibFwInstance;
-extern EFI_HANDLE                      LibImageHandle;
-extern SIMPLE_TEXT_OUTPUT_INTERFACE     *LibRuntimeDebugOut;
-extern EFI_UNICODE_COLLATION_INTERFACE  *UnicodeInterface;
-extern EFI_UNICODE_COLLATION_INTERFACE  LibStubUnicodeInterface;
-extern EFI_RAISE_TPL                    LibRuntimeRaiseTPL;
-extern EFI_RESTORE_TPL                  LibRuntimeRestoreTPL;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnu-efi-3.0.12/lib/pause.c 
new/gnu-efi-3.0.13/lib/pause.c
--- old/gnu-efi-3.0.12/lib/pause.c      1970-01-01 01:00:00.000000000 +0100
+++ new/gnu-efi-3.0.13/lib/pause.c      2021-03-08 21:05:36.000000000 +0100
@@ -0,0 +1,15 @@
+#include "lib.h"
+
+VOID
+Pause(
+    VOID
+)
+// Pause until any key is pressed
+{
+    EFI_INPUT_KEY Key;
+    EFI_STATUS    Status EFI_UNUSED;
+
+    WaitForSingleEvent(ST->ConIn->WaitForKey, 0);
+    Status = uefi_call_wrapper(ST->ConIn->ReadKeyStroke, 2, ST->ConIn, &Key);
+    ASSERT(!EFI_ERROR(Status));
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnu-efi-3.0.12/lib/print.c 
new/gnu-efi-3.0.13/lib/print.c
--- old/gnu-efi-3.0.12/lib/print.c      2020-05-11 17:05:20.000000000 +0200
+++ new/gnu-efi-3.0.13/lib/print.c      2021-03-08 21:05:36.000000000 +0100
@@ -315,7 +315,7 @@
     IN VOID     *Context,
     IN CHAR16   *Buffer
     )
-// Append string worker for SPrint, PoolPrint and CatPrint
+// Append string worker for UnicodeSPrint, PoolPrint and CatPrint
 {
     UINTN           len;
     POOL_PRINT      *spc;
@@ -405,7 +405,7 @@
     IN OUT POOL_PRINT   *spc,
     IN INTN             (EFIAPI *Output)(VOID *context, CHAR16 *str)
     )
-// Dispath function for SPrint, PoolPrint, and CatPrint
+// Dispatch function for UnicodeSPrint, PoolPrint, and CatPrint
 {
     PRINT_STATE         ps;
 
@@ -421,7 +421,7 @@
 
 
 UINTN
-VSPrint (
+UnicodeVSPrint (
     OUT CHAR16        *Str,
     IN UINTN          StrSize,
     IN CONST CHAR16   *fmt,
@@ -463,7 +463,7 @@
 }
 
 UINTN
-SPrint (
+UnicodeSPrint (
     OUT CHAR16        *Str,
     IN UINTN          StrSize,
     IN CONST CHAR16   *fmt,
@@ -494,7 +494,7 @@
     UINTN            len;
 
     va_start (args, fmt);
-    len = VSPrint(Str, StrSize, fmt, args);
+    len = UnicodeVSPrint(Str, StrSize, fmt, args);
     va_end (args);
 
     return len;
@@ -810,7 +810,7 @@
 
 
 UINTN
-APrint (
+AsciiPrint (
     IN CONST CHAR8    *fmt,
     ...
     )
@@ -842,6 +842,64 @@
 }
 
 
+UINTN
+AsciiVSPrint (
+    OUT CHAR8         *Str,
+    IN UINTN          StrSize,
+    IN CONST CHAR8    *fmt,
+    va_list           args
+)
+/*++
+
+Routine Description:
+
+    Prints a formatted ascii string to a buffer using a va_list
+
+Arguments:
+
+    Str         - Output buffer to print the formatted string into
+
+    StrSize     - Size of Str.  String is truncated to this size.
+                  A size of 0 means there is no limit
+
+    fmt         - The format string
+
+    args        - va_list
+
+
+Returns:
+
+    String length returned in buffer
+
+--*/
+// Use UnicodeVSPrint() and convert back to ASCII
+{
+    CHAR16 *UnicodeStr, *UnicodeFmt;
+    UINTN i, Len;
+
+    UnicodeStr = AllocatePool(StrSize * sizeof(CHAR16));
+    if (!UnicodeStr)
+        return 0;
+
+    UnicodeFmt = PoolPrint(L"%a", fmt);
+    if (!UnicodeFmt) {
+        FreePool(UnicodeStr);
+        return 0;
+    }
+
+    Len = UnicodeVSPrint(UnicodeStr, StrSize, UnicodeFmt, args);
+    FreePool(UnicodeFmt);
+
+    // The strings are ASCII so just do a plain Unicode conversion
+    for (i = 0; i < Len; i++)
+        Str[i] = (CHAR8)UnicodeStr[i];
+    Str[Len] = 0;
+    FreePool(UnicodeStr);
+
+    return Len;
+}
+
+
 STATIC
 VOID
 PFLUSH (
@@ -1409,7 +1467,7 @@
     Year = Time->Year % 100;
 
     // bugbug: for now just print it any old way
-    SPrint (Buffer, 0, L"%02d/%02d/%02d  %02d:%02d%c",
+    UnicodeSPrint (Buffer, 0, L"%02d/%02d/%02d  %02d:%02d%c",
         Time->Month,
         Time->Day,
         Year,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gnu-efi-3.0.12/lib/runtime/efirtlib.c 
new/gnu-efi-3.0.13/lib/runtime/efirtlib.c
--- old/gnu-efi-3.0.12/lib/runtime/efirtlib.c   2020-05-11 17:05:20.000000000 
+0200
+++ new/gnu-efi-3.0.13/lib/runtime/efirtlib.c   2021-03-08 21:05:36.000000000 
+0100
@@ -46,7 +46,7 @@
 RtSetMem (
     IN VOID     *Buffer,
     IN UINTN    Size,
-    IN UINT8    Value    
+    IN UINT8    Value
     )
 {
     INT8        *pt;
@@ -63,16 +63,26 @@
 VOID
 RUNTIMEFUNCTION
 RtCopyMem (
-    IN VOID     *Dest,
-    IN CONST VOID     *Src,
-    IN UINTN    len
+    IN VOID        *Dest,
+    IN CONST VOID  *Src,
+    IN UINTN       len
     )
 {
-    CHAR8   *d;
-    CONST CHAR8 *s = Src;
-    d = Dest;
-    while (len--) {
-        *(d++) = *(s++);
+    CHAR8 *d = (CHAR8*)Dest;
+    CHAR8 *s = (CHAR8*)Src;
+
+    if (d == NULL || s == NULL || s == d)
+        return;
+
+    // If the beginning of the destination range overlaps with the end of
+    // the source range, make sure to start the copy from the end so that
+    // we don't end up overwriting source data that we need for the copy.
+    if ((d > s) && (d < s + len)) {
+        for (d += len, s += len; len--; )
+            *--d = *--s;
+    } else {
+        while (len--)
+            *d++ = *s++;
     }
 }
 

++++++ gnu-efi-bsc1182057-support-sbat-section.patch ++++++
>From fb52c3207282f1b8b5ca2f445210bbd00ac8f42a Mon Sep 17 00:00:00 2001
From: Gary Lin <g...@suse.com>
Date: Fri, 12 Mar 2021 15:35:08 +0800
Subject: [PATCH 1/2] Update linker scripts to add .sbat section

Signed-off-by: Gary Lin <g...@suse.com>
---
 gnuefi/elf_aarch64_efi.lds |  9 +++++++++
 gnuefi/elf_arm_efi.lds     |  9 +++++++++
 gnuefi/elf_x86_64_efi.lds  | 10 ++++++++++
 3 files changed, 28 insertions(+)

diff --git a/gnuefi/elf_aarch64_efi.lds b/gnuefi/elf_aarch64_efi.lds
index 836d982..1ddec27 100644
--- a/gnuefi/elf_aarch64_efi.lds
+++ b/gnuefi/elf_aarch64_efi.lds
@@ -46,6 +46,15 @@ SECTIONS
   . = ALIGN(512);
   _edata = .;
   _data_size = . - _data;
+  . = ALIGN(4096);
+  .sbat :
+  {
+    _sbat = .;
+    *(.sbat)
+    *(.sbat.*)
+  }
+  _esbat = .;
+  _sbat_size = . - _sbat;
 
   . = ALIGN(4096);
   .dynsym   : { *(.dynsym) }
diff --git a/gnuefi/elf_arm_efi.lds b/gnuefi/elf_arm_efi.lds
index 665bbdb..d47a750 100644
--- a/gnuefi/elf_arm_efi.lds
+++ b/gnuefi/elf_arm_efi.lds
@@ -46,6 +46,15 @@ SECTIONS
   .rel.data : { *(.rel.data) *(.rel.data*) }
   _edata = .;
   _data_size = . - _etext;
+  . = ALIGN(4096);
+  .sbat :
+  {
+    _sbat = .;
+    *(.sbat)
+    *(.sbat.*)
+  }
+  _esbat = .;
+  _sbat_size = . - _sbat;
 
   . = ALIGN(4096);
   .dynsym   : { *(.dynsym) }
diff --git a/gnuefi/elf_x86_64_efi.lds b/gnuefi/elf_x86_64_efi.lds
index 7be5902..fad1939 100644
--- a/gnuefi/elf_x86_64_efi.lds
+++ b/gnuefi/elf_x86_64_efi.lds
@@ -61,6 +61,16 @@ SECTIONS
     *(.rela.got)
     *(.rela.stab)
   }
+  . = ALIGN(4096);
+  .sbat :
+  {
+    _sbat = .;
+    *(.sbat)
+    *(.sbat.*)
+  }
+  _esbat = .;
+  _sbat_size = . - _sbat;
+
   . = ALIGN(4096);
   .dynsym   : { *(.dynsym) }
   . = ALIGN(4096);
-- 
2.29.2


>From 6014f854bd3a083f866a6379c34711bd294202a2 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjo...@redhat.com>
Date: Thu, 11 Mar 2021 10:08:41 -0500
Subject: [PATCH 2/2] arm/aarch64: include .sbat in section headers.

Signed-off-by: Peter Jones <pjo...@redhat.com>
---
 gnuefi/crt0-efi-aarch64.S | 14 +++++++++++++-
 gnuefi/crt0-efi-arm.S     | 16 +++++++++++++++-
 2 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/gnuefi/crt0-efi-aarch64.S b/gnuefi/crt0-efi-aarch64.S
index c300d89..9d4ffcd 100644
--- a/gnuefi/crt0-efi-aarch64.S
+++ b/gnuefi/crt0-efi-aarch64.S
@@ -31,7 +31,7 @@ pe_header:
        .short  0
 coff_header:
        .short  0xaa64                          // AArch64
-       .short  2                               // nr_sections
+       .short  3                               // nr_sections
        .long   0                               // TimeDateStamp
        .long   0                               // PointerToSymbolTable
        .long   1                               // NumberOfSymbols
@@ -109,6 +109,18 @@ section_table:
        .short  0               // NumberOfLineNumbers  (0 for executables)
        .long   0xc0000040      // Characteristics (section flags)
 
+       .ascii  ".sbat\0\0\0"
+       .long   _sbat_size              // VirtualSize
+       .long   _sbat - ImageBase       // VirtualAddress
+       .long   _sbat_size              // SizeOfRawData
+       .long   _sbat - ImageBase       // PointerToRawData
+
+       .long   0               // PointerToRelocations (0 for executables)
+       .long   0               // PointerToLineNumbers (0 for executables)
+       .short  0               // NumberOfRelocations  (0 for executables)
+       .short  0               // NumberOfLineNumbers  (0 for executables)
+       .long   0x40400040      // Characteristics (section flags)
+
        .align          12
 _start:
        stp             x29, x30, [sp, #-32]!
diff --git a/gnuefi/crt0-efi-arm.S b/gnuefi/crt0-efi-arm.S
index c5bb6d4..0189868 100644
--- a/gnuefi/crt0-efi-arm.S
+++ b/gnuefi/crt0-efi-arm.S
@@ -31,7 +31,7 @@ pe_header:
        .short  0
 coff_header:
        .short  0x1c2                           // Mixed ARM/Thumb
-       .short  2                               // nr_sections
+       .short  3                               // nr_sections
        .long   0                               // TimeDateStamp
        .long   0                               // PointerToSymbolTable
        .long   1                               // NumberOfSymbols
@@ -122,6 +122,20 @@ section_table:
        .short  0               // NumberOfLineNumbers  (0 for executables)
        .long   0xe0500020      // Characteristics (section flags)
 
+
+       .ascii  ".sbat\0\0\0"
+       .long   _sbat_size              // VirtualSize
+       .long   _sbat - ImageBase       // VirtualAddress
+       .long   _sbat_size              // SizeOfRawData
+       .long   _sbat - ImageBase       // PointerToRawData
+
+       .long   0               // PointerToRelocations (0 for executables)
+       .long   0               // PointerToLineNumbers (0 for executables)
+       .short  0               // NumberOfRelocations  (0 for executables)
+       .short  0               // NumberOfLineNumbers  (0 for executables)
+       .long   0x40400040      // Characteristics (section flags)
+
+
 _start:
        stmfd           sp!, {r0-r2, lr}
 
-- 
2.29.2

Reply via email to