Zhichao Gao
d821151e81
MdePkg/PeiServicesLib.c: Change comments of PeiServicesResetSystem2
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
or not.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-28 09:40:12 +08:00
Zhichao Gao
1abe0959f0
MdePkg/PeiServicesLib.h: Change comments of PeiServicesResetSystem2
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
or not.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-28 09:40:12 +08:00
Zhichao Gao
efaed0ab67
MdePkg/PiPeiCis.h: Change comments of EFI_PEI_RESET2_SYSTEM
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
or not.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-28 09:40:11 +08:00
Zhichao Gao
228a9c2999
MdePkg/UefiSpec.h: Change comments of EFI_RESET_SYSTEM
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1460
Refer to Uefi spec 2.8, the ResetData is valid while ResetStatus
is EFI_SUCCESS regardless of the ResetType is EfiResetPlatformSpecific
or not.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-28 09:40:11 +08:00
Laszlo Ersek
1fd227dd26
MdePkg/PiFirmwareFile: fix undefined behavior in FFS_FILE_SIZE
...
Accessing "EFI_FFS_FILE_HEADER.Size", which is of type UINT8[3], through a
(UINT32*), is undefined behavior. Fix it by accessing the array elements
individually.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1710
Signed-off-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
2019-04-24 17:31:00 +02:00
Laszlo Ersek
fc76bbd94d
MdePkg/PiFirmwareFile: fix undefined behavior in SECTION_SIZE
...
RH covscan justifiedly reports that accessing
"EFI_COMMON_SECTION_HEADER.Size", which is of type UINT8[3], through a
(UINT32*), is undefined behavior:
> Error: OVERRUN (CWE-119):
> edk2-89910a39dcfd/OvmfPkg/Sec/SecMain.c:178: overrun-local: Overrunning
> array of 3 bytes at byte offset 3 by dereferencing pointer
> "(UINT32 *)((EFI_COMMON_SECTION_HEADER *)(UINTN)Section)->Size".
> # 176| Section = (EFI_COMMON_SECTION_HEADER*)(UINTN) CurrentAddress;
> # 177|
> # 178|-> Size = SECTION_SIZE (Section);
> # 179| if (Size < sizeof (*Section)) {
> # 180| return EFI_VOLUME_CORRUPTED;
Fix this by accessing the array elements individually.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1710
Issue: scan-1007.txt
Signed-off-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
2019-04-24 17:30:54 +02:00
Laszlo Ersek
d976f09d99
MdePkg/PiFirmwareFile: express IS_SECTION2 in terms of SECTION_SIZE
...
The IS_SECTION2() function-like macro duplicates the SECTION_SIZE()
calculation, just to compare the computed size against 0xFFFFFF. Invoke
SECTION_SIZE() instead; only preserve the comparison.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1710
Signed-off-by: Laszlo Ersek <lersek@redhat.com >
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
2019-04-24 17:30:46 +02:00
Shenglei Zhang
5b7255e3d9
MdePkg/BaseLib: Remove support of INTEL tool chain
...
As Intel tool chain will be removed, support of INTEL tool chain
should be removed first.
https://bugzilla.tianocore.org/show_bug.cgi?id=1666
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
(cherry picked from commit dd611bfeaac249cebb6c12ffdcbbf510f8ed1980)
2019-04-24 10:23:21 +08:00
Shenglei Zhang
e7ee4e0da1
MdePkg/BaseIoLibIntrinsic: Remove IoLibIcc.c
...
As ICC tool chain will be removed, IoLibIcc.c should
also be removed.
https://bugzilla.tianocore.org/show_bug.cgi?id=1666
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
(cherry picked from commit 9b5be294b93f7ff7fe1bcafdc3c57016f58ee4e8)
2019-04-24 10:23:21 +08:00
Aaron Antone
e72920ec61
MdePkg/UefiDebugLibStdErr: Make it runtime safe
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1416
After ExitBootServices, some pointer would be invalid such as
the Protocol pointer and gST. The function depend on those should
be prevent. So disable the related function while after
ExitBootServices.
Change the gST to a internal one, because there will be a cycle
consume between UefiBootServicesTableLib and DebugLib due to the
library constructors.
Also remove the SMM support for this instance.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-22 09:52:54 +08:00
Aaron Antone
452702d0bc
MdePkg/UefidebugLibConOut: Make it runtime safe
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1416
After ExitBootServices, some pointer would be invalid such as
the Protocol pointer and gST. The function depend on those should
be prevent. So disable the related function while after
ExitBootServices.
Change the gST to a internal one, because there will be a cycle
consume between UefiBootServicesTableLib and DebugLib due to the
library constructors.
Also remove the SMM support for this instance.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-22 09:52:54 +08:00
Aaron Antone
2b5778c68b
MdePkg/UefiDebugLibDebugPortProtocol: Make it runtime safe
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1416
After ExitBootServices, some pointer would be invalid such as
the Protocol pointer and gBS. The function depend on those should
be prevent. So disable the related function while after
ExitBootServices.
Change the gBS to a internal one, because there will be a cycle
consume between UefiBootServicesTableLib and DebugLib due to the
library constructors.
Also remove the SMM support for this instance.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-22 09:52:54 +08:00
Ard Biesheuvel
431390dc1f
MdePkg/UefiBaseType.h: treat EBC as a non-native machine type
...
Instead of classifying EBC as a supported machine type and have special
handling in DXE core for loading EBC images, make it a foreign type and
rely on the EDK2 PE/COFF image emulator protocol to claim the image when
the DXE core finds that it cannot be supported natively.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Hao Wu <hao.a.wu@intel.com >
2019-04-14 18:37:36 -07:00
Shenglei Zhang
174232fa9a
MdePkg/BaseLib: Remove LongJump.c and SetJump.c
...
MdePkg BaseLib still uses the inline X86 assembly code
in C code files.For now, inline SetJump/LongJump() can be removed.
https://bugzilla.tianocore.org/show_bug.cgi?id=1163
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-15 09:12:44 +08:00
Michael D Kinney
9344f09215
MdePkg: Replace BSD License with BSD+Patent License
...
https://bugzilla.tianocore.org/show_bug.cgi?id=1373
Replace BSD 2-Clause License with BSD+Patent License. This change is
based on the following emails:
https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html
RFCs with detailed process for the license change:
V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-09 10:58:13 -07:00
Shenglei Zhang
94cf7d235a
MdePkg/BaseMemoryLibSse2: Remove .S files for IA32 and X64 arch
...
.nasm file has been added for X86 arch. .S assembly code
is not required any more.
https://bugzilla.tianocore.org/show_bug.cgi?id=1594
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-03 13:27:44 +08:00
Shenglei Zhang
42b7b15d27
MdePkg/BaseMemoryLibRepStr: Remove .S files for IA32 and X64 arch
...
.nasm file has been added for X86 arch. .S assembly code
is not required any more.
https://bugzilla.tianocore.org/show_bug.cgi?id=1594
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-03 13:27:44 +08:00
Shenglei Zhang
ef008cd706
MdePkg/BaseMemoryLibOptPei: Remove .S files for IA32 and X64 arch
...
.nasm file has been added for X86 arch. .S assembly code
is not required any more.
https://bugzilla.tianocore.org/show_bug.cgi?id=1594
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-03 13:27:44 +08:00
Shenglei Zhang
fbce3e064c
MdePkg/BaseMemoryLibOptDxe: Remove .S files for IA32 and X64 arch
...
.nasm file has been added for X86 arch. .S assembly code
is not required any more.
https://bugzilla.tianocore.org/show_bug.cgi?id=1594
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-03 13:27:43 +08:00
Shenglei Zhang
f578386cc4
MdePkg/BaseMemoryLibMmx: Remove .S files for IA32 and X64 arch
...
.nasm file has been added for X86 arch. .S assembly code
is not required any more.
https://bugzilla.tianocore.org/show_bug.cgi?id=1594
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-03 13:27:43 +08:00
Shenglei Zhang
1ee58b7103
MdePkg/BaseLib: Remove .S files for IA32 and X64 arch
...
.nasm file has been added for X86 arch. .S assembly code
is not required any more.
https://bugzilla.tianocore.org/show_bug.cgi?id=1594
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-03 13:27:43 +08:00
Shenglei Zhang
4eea7627ef
MdePkg/BaseCpuLib: Remove .S files for IA32 and X64 arch
...
.nasm file has been added for X86 arch. .S assembly code
is not required any more.
https://bugzilla.tianocore.org/show_bug.cgi?id=1594
v2: Remove CpuSleep.nasm| GCC and CpuFlushTlb.nasm| GCC in X64 arch
in BaseCpuLib.inf.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-03 13:27:43 +08:00
Bret Barkelew
27d86bc12b
MdePkg/UefiDebuglibDebugPortProtocol: Add new APIs
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1395
Add new APIs' implementation (DebugVPrint, DebugBPrint)
in the DebugLib instance. These APIs would expose print
routines with VaList parameter and BaseList parameter.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-02 12:49:28 +08:00
Bret Barkelew
b22b4f5aee
MdePkg/DxeRuntimeDebugLibSerialPort: Add new APIs
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1395
Add new APIs' implementation (DebugVPrint, DebugBPrint)
in the DebugLib instance. These APIs would expose print
routines with VaList parameter and BaseList parameter.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-02 12:49:28 +08:00
Bret Barkelew
8055c3d5ee
MdePkg/UefiDebugLibStdErr: Add new APIs
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1395
Add new APIs' implementation (DebugVPrint, DebugBPrint)
in the DebugLib instance. These APIs would expose print
routines with VaList parameter and BaseList parameter.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-02 12:49:28 +08:00
Bret Barkelew
ec81dba51f
MdePkg/UefidebugLibConOut: Add new APIs
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1395
Add new APIs' implementation (DebugVPrint, DebugBPrint)
in the DebugLib instance. These APIs would expose print
routines with VaList parameter and BaseList parameter.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-02 12:49:27 +08:00
Bret Barkelew
f13202874c
MdePkg/BaseDebugLibSerialPort: Add new APIs
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1395
Add new APIs' implementation (DebugVPrint, DebugBPrint)
in the DebugLib instance. These APIs would expose print
routines with VaList parameter and BaseList parameter.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-02 12:49:27 +08:00
Bret Barkelew
b04bdd154a
MdePkg/BaseDebugLibNull: Add new APIs for DebugLib
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1395
Add new APIs' implementation (DebugVPrint, DebugBPrint)
in the DebugLib instance. These APIs would expose print
routines with VaList parameter and BaseList parameter.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-02 12:49:27 +08:00
Bret Barkelew
b87a9a76eb
MdePkg/DebugLib.h: Add new APIs for DebugLib
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1395
Add new APIs DebugVPrint and DebugBPrint prototype
definition in the DebugLib header file. These APIs
would expose a print routine with VaList parameter
and BaseList parameter.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-04-02 12:49:27 +08:00
Shenglei Zhang
8028f03032
MdePkg/BaseUefiDecompressLib: Improve performance of boundary validation
...
The boundary validation checking in MakeTable() performs on
every loop iteration. This could be improved by checking
just once before the loop.
https://bugzilla.tianocore.org/show_bug.cgi?id=1329
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-03-27 20:11:22 +08:00
Shenglei Zhang
2ac896a67b
MdePkg/PciSegmentLibSegmentInfo: Change parameters type
...
The current structure can lead to dependency on VC++ compiler support
functions when build for "IA32" with "/Od" switch, such as _aullshr().
So change the type of parameters in structure
PCI_SEGMENT_LIB_ADDRESS_STRUCTURE from UINT64 to UINT32.
https://bugzilla.tianocore.org/show_bug.cgi?id=1532
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-03-19 15:22:07 +08:00
Shenglei Zhang
d0abf8bb3e
MdePkg/MdePkg.uni: Add the prompt and help information
...
The prompt and help information are missing in MdePkg.uni.
https://bugzilla.tianocore.org/show_bug.cgi?id=1600
v2:Fix the error message of help and prompt information.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com >
2019-03-19 15:21:59 +08:00
Yao, Jiewen
0aac2f777a
MdePkg/BaseLib: Add Shadow Stack Support for X86.
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1521
This patch adds SSP - shadow stack pointer to JumpBuffer.
It will be used for the platform that enabled CET/ShadowStack.
We add gEfiMdePkgTokenSpaceGuid.PcdControlFlowEnforcementPropertyMask
to control the global enable/disable.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Eric Dong <eric.dong@intel.com >
Cc: Ray Ni <ray.ni@intel.com >
Cc: Laszlo Ersek <lersek@redhat.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yao Jiewen <jiewen.yao@intel.com >
Reviewed-by: Ray Ni <ray.ni@intel.com >
Regression-tested-by: Laszlo Ersek <lersek@redhat.com >
2019-02-28 09:39:47 +08:00
Yao, Jiewen
68edd7dbad
MdePkg/Include: Add Nasm.inc
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1521
This is to add CET related instruction in Nasm
because CET instruction is not supported yet.
See https://www.nasm.us/xdoc/2.14.02/html/nasmdocb.html
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Eric Dong <eric.dong@intel.com >
Cc: Ray Ni <ray.ni@intel.com >
Cc: Laszlo Ersek <lersek@redhat.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yao Jiewen <jiewen.yao@intel.com >
Reviewed-by: Ray Ni <ray.ni@intel.com >
Regression-tested-by: Laszlo Ersek <lersek@redhat.com >
2019-02-28 09:39:06 +08:00
Jian J Wang
7c0e8053f2
MdePkg/UefiDevicePathLibDevicePathProtocol: Add sanity check for FilePath device path
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1497
Current implementation of IsDevicePathValid() is not enough for type
of MEDIA_FILEPATH_DP, which has NULL-terminated string in the device
path. This patch add a simple NULL character check at Length position.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Ray Ni <ray.ni@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
Reviewed-by: Ray Ni <ray.ni@intel.com >
2019-02-21 20:54:31 +08:00
Jian J Wang
2f7a96d6ec
MdePkg/UefiDevicePathLib: Add sanity check for FilePath device path
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1497
Current implementation of IsDevicePathValid() is not enough for type
of MEDIA_FILEPATH_DP, which has NULL-terminated string in the device
path. This patch add a simple NULL character check at Length position.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Ray Ni <ray.ni@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
Reviewed-by: Ray Ni <ray.ni@intel.com >
2019-02-21 20:54:31 +08:00
Shenglei Zhang
e5bc83f5e7
MdePkg/BaseLib: Change a variable type in a bitwise operation
...
Change the type of variable Chr from CHAR8 to UINT32 in a
bitwise operation, to make the two variables in the operation
have the same size.
https://bugzilla.tianocore.org/show_bug.cgi?id=1527
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-02-19 16:15:15 +08:00
Dandan Bi
2b005f41fd
MdePkg/StatusCodeDataTypeId.h: Add new definition per PI1.7 Spec
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1398
According to PI1.7 Spec, add the new definition
EFI_RETURN_STATUS_EXTENDED_DATA in StatusCodeDataTypeId.h
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Laszlo Ersek <lersek@redhat.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Ray Ni <ray.ni@intel.com >
2019-02-19 16:15:05 +08:00
Chasel, Chiu
c93c0dc1d5
MdePkg: Support EFI_PEI_CORE_FV_LOCATION_PPI
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1524
Add EFI_PEI_CORE_FV_LOCATION_PPI definition basing on
PI spec 1.7, Section 6.3.9.
This PPI can support the secnario that PEI Foundation
not in BFV.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com >
Reviewed-by: Star Zeng <star.zeng@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
Reviewed-by: Ray Ni <ray.ni@intel.com >
2019-02-15 13:39:38 +08:00
Shenglei Zhang
9843305c14
MdePkg: Change function parameter type
...
Change type of parameter Opcode from UINT16 to UINTN
in EFI_S3_SAVE_STATE_WRITE and EFI_S3_SAVE_STATE_INSERT.
According to PI 1.6(Errata A), the type of Opcode in
EFI_S3_SAVE_STATE_WRITE and EFI_S3_SAVE_STATE_INSERT should
be UINTN not UINT16.
https://bugzilla.tianocore.org/show_bug.cgi?id=1517
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-02-14 15:38:44 +08:00
Ard Biesheuvel
c0959b4426
MdePkg/BaseLib: implement SpeculationBarrier() for ARM and AArch64
...
Replace the dummy C implementation of SpeculationBarrier() with
implementations consisting of the recommended DSB SY + ISB sequence,
as recommended by ARM in the whitepaper "Cache Speculation Side-channels"
version 2.4, dated October 2018.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Reviewed-by: Liming Gao <liming.gao@intel.com >
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org >
2019-02-12 22:49:20 +01:00
Bi, Dandan
6c61ec4c62
MdePkg: Fix coding style issues
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1478
Fix issues that reported by Edk2 coding style check tool(ECC) that:
in Comment, <@param SystemTable> does NOT consistent with parameter
name MmSystemTable.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com >
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-02-02 21:41:47 +08:00
Mike Turner
1f7af69d10
MdePkg/BaseLib: Add Base64Encode() and Base64Decode()
...
Introduce public functions Base64Encode and Base64Decode.
https://bugzilla.tianocore.org/show_bug.cgi?id=1370
v2:1.Remove some white space.
2.Add unit test with test vectors in RFC 4648.
https://github.com/shenglei10/edk2/tree/encode_test
https://github.com/shenglei10/edk2/tree/decode_test
v3:1.Align white space.
2.Update comments of Base64Encode and Base64Decode.
3.Change the use of macro RETURN_DEVICE_ERROR to
RETURN_INVALID_PARAMETER in string.c.
v4:Change parameters' names.
v5:1.Update usage of variables.
2.Remove debug message in Base64Decode().
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Ray Ni <ray.ni@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-02-02 21:41:11 +08:00
Bret Barkelew
37bf678761
MdePkg/UefiLib: Add a new API GetVariable3
...
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1396
Add a new API GetVariable3, which can return the attributes of a variable during reading it.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jiansong Xu <jiansongx.xu@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-01-31 20:19:24 +08:00
Mike Turner
fd02394228
MdePkg/UefiDevicePathLib: Add a checking step
...
Add a checking step in DevicePathUtilities.c to verify DevicePath.
https://bugzilla.tianocore.org/show_bug.cgi?id=1372
v2: Remove ASSERT() and the redundant checking step. Update related
description.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com >
2019-01-31 20:19:21 +08:00
Shenglei Zhang
8c9b49500d
MdePkg/BaseLib: Remove definitions of two functions
...
InternalCharToUpper and InternalBaseLibAsciiToUpper are internal functions
and now we will introduce public functions that have the same effects.
So I remove their definitions in BaseLibInternals.h.
https://bugzilla.tianocore.org/show_bug.cgi?id=1369
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
Reviewed-by: Ray Ni <ray.ni@intel.com >
2019-01-31 20:19:15 +08:00
Mike Turner
5dbfa01e2e
MdePkg/BaseLib: Introduce CharToUpper and AsciiCharToUpper publicly
...
Introduce two public functions CharToUpper and AsciiCharToUpper.
They have the same functions as InternalCharToUpper and
InternalBaseLibAsciiToUpper.Considering the internal functions will
be removed,so directly I change their function names to the public ones'.
https://bugzilla.tianocore.org/show_bug.cgi?id=1369
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Ray Ni <ray.ni@intel.com >
2019-01-31 20:19:14 +08:00
Bret Barkelew
41dfc44dc6
MdePkg/IndustryStandard: Remove an incorrectly spelled macro
...
EFI_RETURNING_FROM_EFI_APPLICATOIN is not correctly spelled,
so now remove it.
https://bugzilla.tianocore.org/show_bug.cgi?id=1368
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-01-31 20:19:11 +08:00
Bret Barkelew
341d442c0b
MdePkg/IndustryStandard: Introduce a correctly spelled macro
...
EFI_RETURNING_FROM_EFI_APPLICATOIN is incorrect.
Before removing it, introduce the correctly spelled one,
EFI_RETURNING_FROM_EFI_APPLICATION.
https://bugzilla.tianocore.org/show_bug.cgi?id=1368
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2019-01-31 20:19:09 +08:00
Chen A Chen
1cf40fbcf6
MdePkg/UefiSpec.h: Add definition to support Capsule-on-Disk feature
...
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1482
UEFI Spec define this definition to support Capsule-on-Disk.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Zhang Chao B <chao.b.zhang@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chen A Chen <chen.a.chen@intel.com >
Reviewed-by: Ray Ni <ray.ni@intel.com >
2019-01-31 14:07:58 +08:00