Re: [edk2] HII ORDERED_LIST support

2014-08-24 Thread Dong, Eric
Tim,

Add my comments below.

From: Tim Lewis [mailto:tim.le...@insyde.com]
Sent: Friday, August 22, 2014 12:40 AM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] HII ORDERED_LIST support

In DriverSampleDxe, the boot order item is listed in storage as:

  UINT16  BootOrder[8];

And here is the ordered list which manipulates this item:

  orderedlist
varid   = MyIfrNVData.BootOrder,
prompt  = STRING_TOKEN(0x006D),
help= STRING_TOKEN(0x0059),
option text = STRING_TOKEN(0x006F), value = 2, flags = 
RESET_REQUIRED;
option text = STRING_TOKEN(0x006E), value = 1, flags = 
RESET_REQUIRED;
option text = STRING_TOKEN(0x0070), value = 3, flags = 
RESET_REQUIRED;
  suppressif ideqval MyIfrNVData.BootOrderLarge == 0;
option text = STRING_TOKEN(0x0071), value = 4, flags = 
RESET_REQUIRED;
  endif
  endlist;

This leads to a number of questions:


1)  The BootOrder is defined as UINT16, but the UEFI specification clearly 
states that an orderedlist will work on a buffer with one byte per container.  
(See 29.2.5.4.8 where it says, "The set questions are stored as a Buffer with 
one byte for each Container."

[[[Eric]]] Truly spec has this description but vfrcompile and browser not do 
this check, also current code may already has samples which already violate 
this rule, so I need more discussion to provide a good proposal for this case.



[TIM] I am not worried about the actual struct members. BootOrder is 16 bytes 
(8 x sizeof(UINT16). So that means that MaxContainers will be 16, right? The 
VFR spec says: "NOTE: maxcontainers is optional, and the default value depends 
on the variable size defined by varid in vfrQuestionHeader" So it seems that, 
even though the code will work, using UINT8

BootOrder[16] would be easier to understand than UINT16 BootOrder[8]"

[[[Eric]]] Base on current implementation, the maxcontainer value is the array 
size. So for "UINT16 BootOrder[8]", the maxcontainer = 8 and for "UINT8 
BootOrder[16]", the maxcontainer = 16. I think we need to add check for the 
code first, only support one byte for each container.



2)  The option values are all integers. But the storage type of an ordered 
list is a BUFFER. To me this implies (I haven't looked this up) that the value 
an option is being used as the option for a single container. That makes sense, 
but it is not the behavior described in the UEFI specification. Also, there 
seems to be no way to create a value for a question of type buffer.

[[[Eric]]] no catch what's your mean is.

[TIM] For example, for "oneof" the value storage size is UINT8/UINT16/UINT32 or 
UINT64. The value storage size for "checkbox" is BOOLEAN. But what is the value 
storage size of "orderedlist" When I read the UEFI specification, the "value 
storage size" of orderedlist is maxcontainers x sizeof(UINT8). So, if 
maxcontainers is 16, then 16 bytes. BUT: the size of the value in an "option" 
inside the "orderedlist" in these examples is sizeof(UINT8), not maxcontainers 
x sizeof(UINT8).



According to the UEFI specification, as I read it today, the value in a 
ONE_OF_OPTION is the value for the entire value storage, not just one byte of 
the value storage.  So every container  in the ordered list value should be set 
to 2 when the first "ONE_OF_OPTION" (in the example above) is selected by the 
user.

[[[Eric]]] I can't find this information from the spec, which page in UEFI spec 
2.4b describe it?



But I do not believe this is what the EDK2 Form browser does today. I believe 
that it only changes a single container to the value 2 (not the whole buffer).



3)  Likewise, there seems to be no way to provide a default for an ordered 
list.

[[[Eric]]] yes, ordered list opcode just base on the current option order to 
set the default value. For your above example, the default value is 2,1,3,4.



[TIM] If I put a "default = 2" in the example above, will it set one container 
to "2" or all containers to "2" Again, this is a problem with the way the 
specification describes values for ordered list opcodes. It is fairly clear 
that the EDK2 form browser takes a different approach than the current 
specification.



Here is an example display:



Boot Order: [boot order 1] [boot order 2][boot order 3][boot order 4][boot 
order 5][boot order 6][boot order 7][boot order 8]



Each [boot order x] is a container. If the user goes to [boot order 2] and uses 
one of the ONE_OF_OPTION pre-defined values, does it change only [boot order 2] 
or all [boot order x]?  Now, what does the UEFI specification say should happen?

[[[Eric]]] what's your mean of "uses one of the ONE_OF_OPTION pre-defined 
values"?  for ordered list opcode, we can only change the order of the options, 
can't only select one option, I don't know your means about this sample?

Tim
-

Re: [edk2] "suppressif" "endif" grammar different between Form, FormSet and Question usage.

2014-08-24 Thread Dong, Eric
Tim,

Thanks for your report, I will follow up to update it.

Thanks,
Eric
From: Tim Lewis [mailto:tim.le...@insyde.com]
Sent: Monday, August 25, 2014 1:05 PM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] "suppressif" "endif" grammar different between Form, FormSet 
and Question usage.

Compare the following. Notice that the question does not require it to be 
present, but the statement and formset do. I suggest that these be made 
consistent by making the ";" optional in all cases, and the examples in 
DriverSampleDxe be updated to always include it.


vfrStatementSuppressIfQuest ::=

"suppressif" vfrStatementExpression ";"

vfrStatementQuestionOptionList
"endif"


vfrStatementSuppressIfStat ::=

"suppressif" vfrStatementExpression ";"

( vfrStatementStatList )*
"endif" ";"


vfrStatementSuppressIfFormSet ::=

"suppressif" vfrStatementExpression ";"

vfrFormSetList
"endif" ";"

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] [PATCH 0/3] CryptoPkg: Fix and Add support for ARM & AARCH64

2014-08-24 Thread Long, Qin
Hi, Martin,

Thanks for the updates.
I will help to follow the process to check-in this patchset. 


Best Regards & Thanks,
LONG, Qin

-Original Message-
From: Olivier Martin [mailto:olivier.mar...@arm.com] 
Sent: Thursday, August 21, 2014 6:48 PM
To: Ye, Ting
Cc: ronald.c...@arm.com; edk2-devel@lists.sourceforge.net
Subject: [edk2] [PATCH 0/3] CryptoPkg: Fix and Add support for ARM & AARCH64

This patchset adds support for ARM and AARCH64 GCC.
And it also fixes ARM RVCT support.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ronald Cron 
Reviewed-By: Olivier Martin 

Ronald Cron (3):
  Update CryptoPkg build with RVCT
  CryptoPkg: Add support to build with ARM GCC
  Add support of AARCH64 architecture in CryptoPkg

 CryptoPkg/CryptoPkg.dsc| 28 +++---
 CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf|  5 +++-
 CryptoPkg/Library/BaseCryptLib/RuntimeCryptLib.inf |  5 +++-
 CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf |  5 +++-
 CryptoPkg/Library/OpensslLib/OpensslLib.inf|  8 +--
 5 files changed, 43 insertions(+), 8 deletions(-)

-- 
1.8.5


--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


[edk2] "suppressif" "endif" grammar different between Form, FormSet and Question usage.

2014-08-24 Thread Tim Lewis
Compare the following. Notice that the question does not require it to be 
present, but the statement and formset do. I suggest that these be made 
consistent by making the ";" optional in all cases, and the examples in 
DriverSampleDxe be updated to always include it.


vfrStatementSuppressIfQuest ::=

"suppressif" vfrStatementExpression ";"

vfrStatementQuestionOptionList
"endif"


vfrStatementSuppressIfStat ::=

"suppressif" vfrStatementExpression ";"

( vfrStatementStatList )*
"endif" ";"


vfrStatementSuppressIfFormSet ::=

"suppressif" vfrStatementExpression ";"

vfrFormSetList
"endif" ";"

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


[edk2] [Patch][ShellPkg]Fix invalid character in ShellPkg

2014-08-24 Thread Qiu, Shumin
Hi Jaben,
Can you help to review this patch?

For Invalid character '-' in Pci.c line 806 and line 8011, using ASCII encoding 
byte 0x2d to replace.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin mailto:shumin@intel.com>>

Thanks
Shumin



ShellPkg_Pci.c.patch
Description: ShellPkg_Pci.c.patch
--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] [Patch RFC] Update Versions Strings for 3 C-based tools

2014-08-24 Thread Gao, Liming
Larry:
  The patch is good.

  Reviewed-by: Gao, Liming liming@intel.com

Thanks
Liming

From: Hauch, Larry [mailto:larry.ha...@intel.com]
Sent: Saturday, August 23, 2014 5:00 AM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] [Patch RFC] Update Versions Strings for 3 C-based tools

Updated patch based on feedback.

Cheers,
Larry

From: Hauch, Larry [mailto:larry.ha...@intel.com]
Sent: Friday, August 22, 2014 1:44 PM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] [Patch RFC] Update Versions Strings for 3 C-based tools

Dennis, Liming,
Please review that attached patch.

BootSectImage.exe, EfiLdrImage.exe and Split.exe tools have incorrect output 
from the --version option.
This patch fixes the --version option output and corrects the description 
displayed.


Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lhauch mailto:larry.ha...@intel.com>>
Reviewed-by:

Larry Hauch
Intel Corporation
SSG, STO, Platform Software Infrastructure
2800 Center Dr.
DuPont, WA 98327
Work: (253) 371-8550

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


[edk2] [BaseTools]Support a force binary build mode

2014-08-24 Thread Chen, Hesheng
Hello all,
Could you help review this patch?

This patch is going to:

1.   Support a force binary build mode by adding "--ignore-source" to 
command line options.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Hess Chen mailto:hesheng.c...@intel.com>>
Best Regards,
Chen, Hess
Intel China Software Center
Tel: +86-21-6116-6740
Email: hesheng.c...@intel.com



build.patch
Description: build.patch
--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] [PATCH RFC 0/4] UDF filesystem driver

2014-08-24 Thread Paulo Alcantara
Hi Jordan,

On Aug 24, 2014 10:20 PM, "Jordan Justen"  wrote:
> To restate, the plan would be to re-factor the driver to work well
> with PartitionDxe. You'll add a MdeModulePkg feature PCD for UDF and
> update PartitionDxe to enable UDF support when the PCD is enabled. The
> default for the PCD would be disabled. Enabling the PCD should not
> break any existing features of PartitionDxe.

Yes. Looks like you got it right. I will work on this so that the UDF will
work on either partiton on GPT or on the whole disk.

-pcacjr
--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] [PATCH RFC 0/4] UDF filesystem driver

2014-08-24 Thread Jordan Justen
On Fri, Aug 22, 2014 at 6:10 AM, Paulo Alcantara  wrote:
> On Aug 22, 2014 2:58 AM, "Tian, Feng"  wrote:
>>
>> Looks good for me:-).
>
> Jordan, Andrew, et al.?

To restate, the plan would be to re-factor the driver to work well
with PartitionDxe. You'll add a MdeModulePkg feature PCD for UDF and
update PartitionDxe to enable UDF support when the PCD is enabled. The
default for the PCD would be disabled. Enabling the PCD should not
break any existing features of PartitionDxe.

If I got that right, then it sounds like a good plan to me.

-Jordan

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] [ECC]Add some checkpoints for ECC tool

2014-08-24 Thread Liu, Yingke D
Reviewed-by: Yingke Liu 

Dennis

From: Chen, Hesheng [mailto:hesheng.c...@intel.com]
Sent: Thursday, August 21, 2014 2:44 PM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] [ECC]Add some checkpoints for ECC tool

Hello all,
Could you help review this patch?
This patch is going to:

1.   Add a checkpoint to check if an UNI file is a valid UTF-16 file

2.   Add a checkpoint to check if a GUID/PPI/PROTOCOL/PCD is in a valid 
format.

3.   Some other minor changes.

Best Regards,
Chen, Hess
Intel China Software Center
Tel: +86-21-6116-6740
Email: hesheng.c...@intel.com

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] [PATCH] MdePkg: Add DDR4 SMBIOS enumeration

2014-08-24 Thread Li, Elvin
Hi,
From 
http://www.dmtf.org/sites/default/files/standards/documents/DSP0134_2.8.0.pdf, 
the DDR4 fields in the patch have not been in this public spec. We may wait for 
a while.

Thanks
Elvin
From: El-Haj-Mahmoud, Samer [mailto:samer.el-haj-mahm...@hp.com]
Sent: Saturday, August 23, 2014 7:11 AM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] [PATCH] MdePkg: Add DDR4 SMBIOS enumeration

Dear MdePkg maintainers,

Please find the attached patch that adds DDR4 memory type enumeration from 
SMBIOS 2.8.0.



Add DDR4 memory type enumeration from SMBIOS 2.8.0.


Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud el...@hp.com



Samer El-Haj-Mahmoud
UEFI System Firmware Architect
HP - Industry Standard Servers (ISS)

el...@hp.com
T +1 281 514 5973
Hewlett-Packard Company
CCM07:M74-B228
Houston, TX 77070

[Description: C:\Users\elhajmah\HpLogo.png]

--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] [PATCH v2 1/6] MdeModulePkg: Check D2H register status in AhciPioTransfer

2014-08-24 Thread Tian, Feng
My understanding is when D2H or PIO Setup FIS is received, the PxTFD gets 
updated with the content of these two FISes. So checking D2H FIS Status 
register is enough, am I right?

Thanks
Feng

From: A. Sava [mailto:asava@gmail.com]
Sent: Friday, August 22, 2014 17:28
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] [PATCH v2 1/6] MdeModulePkg: Check D2H register status in 
AhciPioTransfer

Regarding this, don't you think there's also need to check PxTFD for error in 
the case D2H is received?

On Friday, August 22, 2014, Tian, Feng 
mailto:feng.t...@intel.com>> wrote:
Good to me.

Reviewed-by: Feng Tian >

-Original Message-
From: reza.jel...@tuhh.de 
[mailto:reza.jel...@tuhh.de]
Sent: Thursday, August 21, 2014 17:56
To: edk2-devel@lists.sourceforge.net
Cc: ag...@suse.de
Subject: [edk2] [PATCH v2 1/6] MdeModulePkg: Check D2H register status in 
AhciPioTransfer

From: Reza Jelveh >

Some AHCI controllers such as the Marvel 9230 controllers do not send PIO Setup 
FIS when the PIO data-in command is completed. Instead they just send a D2H FIS.

To accomodate for this possibility the status code of the D2H FIS is checked.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Reza Jelveh >
---
 MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c | 14 --  
MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h |  3 +++
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c 
b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
index 7fc7a28..487f516 100644
--- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
+++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
@@ -703,6 +703,7 @@ AhciPioTransfer (
   EFI_AHCI_COMMAND_LIST CmdList;
   UINT32PortTfd;
   UINT32PrdCount;
+  UINT8 D2HStatus;
   BOOLEAN   InfiniteWait;

   if (Timeout == 0) {
@@ -804,8 +805,17 @@ AhciPioTransfer (
   Offset = FisBaseAddr + EFI_AHCI_D2H_FIS_OFFSET;
   Status = AhciCheckMemSet (Offset, EFI_AHCI_FIS_TYPE_MASK, 
EFI_AHCI_FIS_REGISTER_D2H, NULL);
   if (!EFI_ERROR (Status)) {
-Status = EFI_DEVICE_ERROR;
-break;
+D2HStatus = *(volatile UINT8 *) (Offset +
+ EFI_AHCI_D2H_FIS_STATUS_OFFSET);
+
+if ((D2HStatus & EFI_AHCI_D2H_FIS_ERR) != 0) {
+  Status = EFI_DEVICE_ERROR;
+  break;
+}
+
+PrdCount = *(volatile UINT32 *) 
(&(AhciRegisters->AhciCmdList[0].AhciCmdPrdbc));
+if (PrdCount == DataCount) {
+  break;
+}
   }

   //
diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h 
b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h
index 485b647..9fe1fb3 100644
--- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h
+++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h
@@ -78,12 +78,15 @@ typedef union {
 #define   EFI_AHCI_FIS_SET_DEVICE_LENGTH   8

 #define EFI_AHCI_D2H_FIS_OFFSET0x40
+#define   EFI_AHCI_D2H_FIS_STATUS_OFFSET   0x02
+#define   EFI_AHCI_D2H_FIS_ERR BIT0
 #define EFI_AHCI_DMA_FIS_OFFSET0x00
 #define EFI_AHCI_PIO_FIS_OFFSET0x20
 #define EFI_AHCI_SDB_FIS_OFFSET0x58
 #define EFI_AHCI_FIS_TYPE_MASK 0xFF
 #define EFI_AHCI_U_FIS_OFFSET  0x60

+
 //
 // Port register
 //
--
1.9.2


--
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

--
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel
--
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel