Revision: 14223
http://edk2.svn.sourceforge.net/edk2/?rev=14223&view=rev
Author: vanjeff
Date: 2013-03-28 07:20:28 +0000 (Thu, 28 Mar 2013)
Log Message:
-----------
Sync patches r13532, r14037, r14134 and r14213 main trunk.
1. Update HobLib and Hob Service to avoid data over flow.
2. Current Thunk16.asm implementation clears reserved bits, which does not
follow IA32 SDM. Now the fix is to only clear PAE and PSE bit of CR4 for real
mode.
3. Fix CpuIdEx.asm to return correct ECX/EDX value.
4. Fix EFI_ERROR_SECTION_DESCRIPTOR definition in CPER to match UEFI 2.3.1
specification.
Revision Links:
--------------
http://edk2.svn.sourceforge.net/edk2/?rev=13532&view=rev
http://edk2.svn.sourceforge.net/edk2/?rev=14037&view=rev
http://edk2.svn.sourceforge.net/edk2/?rev=14134&view=rev
http://edk2.svn.sourceforge.net/edk2/?rev=14213&view=rev
Modified Paths:
--------------
branches/UDK2010.SR1/MdePkg/Include/Guid/Cper.h
branches/UDK2010.SR1/MdePkg/Include/Library/HobLib.h
branches/UDK2010.SR1/MdePkg/Library/BaseLib/Ia32/CpuIdEx.asm
branches/UDK2010.SR1/MdePkg/Library/BaseLib/Ia32/Thunk16.S
branches/UDK2010.SR1/MdePkg/Library/BaseLib/Ia32/Thunk16.asm
branches/UDK2010.SR1/MdePkg/Library/BaseLib/X64/Thunk16.S
branches/UDK2010.SR1/MdePkg/Library/BaseLib/X64/Thunk16.asm
branches/UDK2010.SR1/MdePkg/Library/DxeCoreHobLib/HobLib.c
branches/UDK2010.SR1/MdePkg/Library/DxeHobLib/HobLib.c
branches/UDK2010.SR1/MdePkg/Library/PeiHobLib/HobLib.c
Modified: branches/UDK2010.SR1/MdePkg/Include/Guid/Cper.h
===================================================================
--- branches/UDK2010.SR1/MdePkg/Include/Guid/Cper.h 2013-03-28 07:02:01 UTC
(rev 14222)
+++ branches/UDK2010.SR1/MdePkg/Include/Guid/Cper.h 2013-03-28 07:20:28 UTC
(rev 14223)
@@ -11,7 +11,7 @@
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
- GUIDs introduced from UEFI 2.1 Specification.
+ GUIDs introduced from UEFI 2.3.1 Specification.
**/
@@ -209,7 +209,6 @@
UINT8 SecValidMask;
UINT8 Resv1;
UINT32 SectionFlags;
- UINT8 Resv2[3];
EFI_GUID SectionType;
EFI_GUID FruId;
UINT32 Severity;
Modified: branches/UDK2010.SR1/MdePkg/Include/Library/HobLib.h
===================================================================
--- branches/UDK2010.SR1/MdePkg/Include/Library/HobLib.h 2013-03-28
07:02:01 UTC (rev 14222)
+++ branches/UDK2010.SR1/MdePkg/Include/Library/HobLib.h 2013-03-28
07:20:28 UTC (rev 14223)
@@ -8,7 +8,7 @@
allows the PEI phase to pass information to the DXE phase. HOBs are position
independent and can be relocated easily to different memory memory locations.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, 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
@@ -220,7 +220,8 @@
If Guid is NULL, then ASSERT().
If there is no additional space for HOB creation, then ASSERT().
- If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
+ If DataLength > (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
+ HobLength is UINT16 and multiples of 8 bytes, so the max HobLength is 0xFFF8.
@param Guid The GUID to tag the customized HOB.
@param DataLength The size of the data payload for the GUID HOB.
@@ -250,7 +251,8 @@
If Guid is NULL, then ASSERT().
If Data is NULL and DataLength > 0, then ASSERT().
If there is no additional space for HOB creation, then ASSERT().
- If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
+ If DataLength > (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
+ HobLength is UINT16 and multiples of 8 bytes, so the max HobLength is 0xFFF8.
@param Guid The GUID to tag the customized HOB.
@param Data The data to be copied into the data field of the GUID
HOB.
Modified: branches/UDK2010.SR1/MdePkg/Library/BaseLib/Ia32/CpuIdEx.asm
===================================================================
--- branches/UDK2010.SR1/MdePkg/Library/BaseLib/Ia32/CpuIdEx.asm
2013-03-28 07:02:01 UTC (rev 14222)
+++ branches/UDK2010.SR1/MdePkg/Library/BaseLib/Ia32/CpuIdEx.asm
2013-03-28 07:20:28 UTC (rev 14223)
@@ -1,6 +1,6 @@
;------------------------------------------------------------------------------
;
-; Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2006 - 2013, 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
@@ -56,7 +56,7 @@
jecxz @F
mov [ecx], edx
@@:
- mov edx, [ebp + 28]
+ mov ecx, [ebp + 28]
jecxz @F
pop [ecx]
@@:
Modified: branches/UDK2010.SR1/MdePkg/Library/BaseLib/Ia32/Thunk16.S
===================================================================
--- branches/UDK2010.SR1/MdePkg/Library/BaseLib/Ia32/Thunk16.S 2013-03-28
07:02:01 UTC (rev 14222)
+++ branches/UDK2010.SR1/MdePkg/Library/BaseLib/Ia32/Thunk16.S 2013-03-28
07:20:28 UTC (rev 14223)
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2013, 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
@@ -175,7 +175,7 @@
andl $0x7ffffffe, %eax # clear PE, PG bits
movl %cr4, %ebp
mov %ebp, 0xfffffff1(%edx)
- andl $0x300, %ebp # clear all but PCE and OSFXSR bits
+ andl $0xffffffcf, %ebp # clear PAE, PSE bits
pushl $0x10
pop %ecx # ecx <- selector for data segments
lgdtl 0x20(%edx)
Modified: branches/UDK2010.SR1/MdePkg/Library/BaseLib/Ia32/Thunk16.asm
===================================================================
--- branches/UDK2010.SR1/MdePkg/Library/BaseLib/Ia32/Thunk16.asm
2013-03-28 07:02:01 UTC (rev 14222)
+++ branches/UDK2010.SR1/MdePkg/Library/BaseLib/Ia32/Thunk16.asm
2013-03-28 07:20:28 UTC (rev 14223)
@@ -3,7 +3,7 @@
;------------------------------------------------------------------------------
;
-; Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2006 - 2013, 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
@@ -237,7 +237,7 @@
and eax, 7ffffffeh ; clear PE, PG bits
mov ebp, cr4
mov [edx + (SavedCr4 - SavedCr0)], ebp
- and ebp, 300h ; clear all but PCE and OSFXSR bits
+ and ebp, NOT 30h ; clear PAE, PSE bits
push 10h
pop ecx ; ecx <- selector for data segments
lgdt fword ptr [edx + (_16Gdtr - SavedCr0)]
Modified: branches/UDK2010.SR1/MdePkg/Library/BaseLib/X64/Thunk16.S
===================================================================
--- branches/UDK2010.SR1/MdePkg/Library/BaseLib/X64/Thunk16.S 2013-03-28
07:02:01 UTC (rev 14222)
+++ branches/UDK2010.SR1/MdePkg/Library/BaseLib/X64/Thunk16.S 2013-03-28
07:20:28 UTC (rev 14223)
@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2013, 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
@@ -295,7 +295,7 @@
andl $0x7ffffffe,%eax # clear PE, PG bits
movq %cr4, %rbp
movl %ebp, (%rcx) # save CR4 in SavedCr4
- andl $0x300,%ebp # clear all but PCE and OSFXSR bits
+ andl $0xffffffcf,%ebp # clear PAE, PSE bits
movl %r8d, %esi # esi <- 16-bit stack segment
.byte 0x6a, DATA32
popq %rdx
Modified: branches/UDK2010.SR1/MdePkg/Library/BaseLib/X64/Thunk16.asm
===================================================================
--- branches/UDK2010.SR1/MdePkg/Library/BaseLib/X64/Thunk16.asm 2013-03-28
07:02:01 UTC (rev 14222)
+++ branches/UDK2010.SR1/MdePkg/Library/BaseLib/X64/Thunk16.asm 2013-03-28
07:20:28 UTC (rev 14223)
@@ -3,7 +3,7 @@
;------------------------------------------------------------------------------
;
-; Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2006 - 2013, 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
@@ -282,7 +282,7 @@
and eax, 7ffffffeh ; clear PE, PG bits
mov rbp, cr4
mov [rcx], ebp ; save CR4 in SavedCr4
- and ebp, 300h ; clear all but PCE and OSFXSR bits
+ and ebp, NOT 30h ; clear PAE, PSE bits
mov esi, r8d ; esi <- 16-bit stack segment
DB 6ah, DATA32 ; push DATA32
pop rdx ; rdx <- 32-bit data segment selector
Modified: branches/UDK2010.SR1/MdePkg/Library/DxeCoreHobLib/HobLib.c
===================================================================
--- branches/UDK2010.SR1/MdePkg/Library/DxeCoreHobLib/HobLib.c 2013-03-28
07:02:01 UTC (rev 14222)
+++ branches/UDK2010.SR1/MdePkg/Library/DxeCoreHobLib/HobLib.c 2013-03-28
07:20:28 UTC (rev 14223)
@@ -1,7 +1,7 @@
/** @file
HOB Library implementation for DxeCore driver.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, 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
@@ -281,7 +281,8 @@
If Guid is NULL, then ASSERT().
If there is no additional space for HOB creation, then ASSERT().
- If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
+ If DataLength > (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
+ HobLength is UINT16 and multiples of 8 bytes, so the max HobLength is 0xFFF8.
@param Guid The GUID to tag the customized HOB.
@param DataLength The size of the data payload for the GUID HOB.
@@ -318,7 +319,8 @@
If Guid is NULL, then ASSERT().
If Data is NULL and DataLength > 0, then ASSERT().
If there is no additional space for HOB creation, then ASSERT().
- If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
+ If DataLength > (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
+ HobLength is UINT16 and multiples of 8 bytes, so the max HobLength is 0xFFF8.
@param Guid The GUID to tag the customized HOB.
@param Data The data to be copied into the data field of the GUID
HOB.
Modified: branches/UDK2010.SR1/MdePkg/Library/DxeHobLib/HobLib.c
===================================================================
--- branches/UDK2010.SR1/MdePkg/Library/DxeHobLib/HobLib.c 2013-03-28
07:02:01 UTC (rev 14222)
+++ branches/UDK2010.SR1/MdePkg/Library/DxeHobLib/HobLib.c 2013-03-28
07:20:28 UTC (rev 14223)
@@ -1,7 +1,7 @@
/** @file
HOB Library implemenation for Dxe Phase.
-Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2012, 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
@@ -314,7 +314,8 @@
If Guid is NULL, then ASSERT().
If there is no additional space for HOB creation, then ASSERT().
- If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
+ If DataLength > (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
+ HobLength is UINT16 and multiples of 8 bytes, so the max HobLength is 0xFFF8.
@param Guid The GUID to tag the customized HOB.
@param DataLength The size of the data payload for the GUID HOB.
@@ -351,7 +352,8 @@
If Guid is NULL, then ASSERT().
If Data is NULL and DataLength > 0, then ASSERT().
If there is no additional space for HOB creation, then ASSERT().
- If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
+ If DataLength > (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
+ HobLength is UINT16 and multiples of 8 bytes, so the max HobLength is 0xFFF8.
@param Guid The GUID to tag the customized HOB.
@param Data The data to be copied into the data field of the GUID
HOB.
Modified: branches/UDK2010.SR1/MdePkg/Library/PeiHobLib/HobLib.c
===================================================================
--- branches/UDK2010.SR1/MdePkg/Library/PeiHobLib/HobLib.c 2013-03-28
07:02:01 UTC (rev 14222)
+++ branches/UDK2010.SR1/MdePkg/Library/PeiHobLib/HobLib.c 2013-03-28
07:20:28 UTC (rev 14223)
@@ -1,7 +1,7 @@
/** @file
Provide Hob Library functions for Pei phase.
-Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2007 - 2012, 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
@@ -349,7 +349,8 @@
If Guid is NULL, then ASSERT().
If there is no additional space for HOB creation, then ASSERT().
- If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
+ If DataLength > (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
+ HobLength is UINT16 and multiples of 8 bytes, so the max HobLength is 0xFFF8.
@param Guid The GUID to tag the customized HOB.
@param DataLength The size of the data payload for the GUID HOB.
@@ -375,7 +376,7 @@
//
// Make sure that data length is not too long.
//
- ASSERT (DataLength <= (0xffff - sizeof (EFI_HOB_GUID_TYPE)));
+ ASSERT (DataLength <= (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE)));
Hob = InternalPeiCreateHob (EFI_HOB_TYPE_GUID_EXTENSION, (UINT16) (sizeof
(EFI_HOB_GUID_TYPE) + DataLength));
if (Hob == NULL) {
@@ -399,7 +400,8 @@
If Guid is NULL, then ASSERT().
If Data is NULL and DataLength > 0, then ASSERT().
If there is no additional space for HOB creation, then ASSERT().
- If DataLength >= (0x10000 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
+ If DataLength > (0xFFF8 - sizeof (EFI_HOB_GUID_TYPE)), then ASSERT().
+ HobLength is UINT16 and multiples of 8 bytes, so the max HobLength is 0xFFF8.
@param Guid The GUID to tag the customized HOB.
@param Data The data to be copied into the data field of the GUID
HOB.
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game
on Steam. $5K grand prize plus 10 genre and skill prizes.
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits