Re: [edk2] Issues with HTTPS Boot
Naveen, Are you using the latest code form the edk2-staging branch? -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Santhapur Naveen Sent: Thursday, September 22, 2016 7:07 AM To: Palmer, Thomas; edk2-devel@lists.01.org Subject: Re: [edk2] Issues with HTTPS Boot Hi Thomas, Regarding your previous question about the server certificates, please find my response as below: Do you have the appropriate certificate installed in UEFI for the target TLS server? Yes, I do have the appropriate certificate installed on my server. I have followed the section 2.2 titles " Self-Generated Certificate" in the white paper to generate the certificates. I have debugged a bit further and went inside TlsConnectSession() to see where exactly it is failing and I found out like it fails in TlsDoHandshake() and gives PROTOCOL ERROR. To be precise, it gives error as "TlsDoHandshake ERROR 0x14171105=L14:F171:R105". If I'm missing anything anywhere, would you please provide your comments. Thank you, Naveen -Original Message- From: Palmer, Thomas [mailto:thomas.pal...@hpe.com] Sent: Thursday, September 22, 2016 12:56 AM To: Santhapur Naveen; edk2-devel@lists.01.org Subject: RE: Issues with HTTPS Boot >From what you describe, it sounds like they should not have an issue >negotiating TLS version and cipher. Do you have the appropriate certificate installed in UEFI for the target TLS server? Either we need the 3rd part CA that signed the web server certificate, or you could install the self-signed certificate of the web server. Also, are you able to see the any DEBUG statements from TlsLib.c? Regards, Thomas Palmer "I have only made this letter longer because I have not had the time to make it shorter" - Blaise Pascal -Original Message- From: Santhapur Naveen [mailto:nave...@amiindia.co.in] Sent: Wednesday, September 21, 2016 8:09 AM To: Palmer, Thomas ; edk2-devel@lists.01.org Subject: RE: Issues with HTTPS Boot Hi Thomas, Regarding my previous mail, after TCP handshake, Client Says Hello to sever and the Server replies its Hello to the client with TLSv1. Client says hello with the following Cipher Suites: 1. TLS_DHE_RSA_WITH_AES_256_CBC_SHA (0x0039) 2. TLS_DHE_RSA_WITH_AES_128_CBC_SHA (0x0033) 3. TLS_RSA_WITH_AES_256_CBC_SHA (0x0035) 4. TLS_RSA_WITH_AES_128_CBC_SHA (0x002f) 5. TLS_EMPTY_RENEGOTIATION_INFO_SCSV (0x00ff) For the Client Hello, Server responds with its Hello and chooses TLS_RSA_WITH_AES_128_CBC_SHA (0x002f) using TLSv1. The client sends an acknowledgement to the server and then immediately sends RST. After some debugging, it was found that it fails in TlsConnectSession(). Would you please provide your comments on this? Thanks, Naveen -Original Message- From: Palmer, Thomas [mailto:thomas.pal...@hpe.com] Sent: Tuesday, September 20, 2016 9:30 PM To: Santhapur Naveen; edk2-devel@lists.01.org Subject: RE: Issues with HTTPS Boot Naveen, I cannot see attachments on this email. What TLS versions and ciphers does your web server support? Depending on when you built the UEFI image, your server may need to have TLS v1.0 enabled and support one of the non-SHA256 ciphers listed at the top of TlsLib.c. Regards, Thomas Palmer "I have only made this letter longer because I have not had the time to make it shorter" - Blaise Pascal -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Santhapur Naveen Sent: Tuesday, September 20, 2016 6:42 AM To: edk2-devel@lists.01.org Subject: [edk2] Issues with HTTPS Boot Hello All, Since the HTTPS Boot came into picture, I was very enthusiastic to try it. I configured the server as-is explained in the white paper https://github.com/tianocore/tianocore.github.io/wiki/EDK%20II%20White%20papers But when I try to go for an HTTPS boot, it stops after the TCP handshake. Attached is the Wireshark log. Please help me out and also let me know if any other details are needed. Thank you, Naveen ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [staging/HTTPS-TLS][PATCH 0/2] Readme.MD and TlsAuthConfigDxe update
Series reviewed-by: Samer El-Haj-Mahmoud <smahm...@lenovo.com> Samer El-Haj-Mahmoud SESM - OS / SW Architect Systems Management Development, Data Center Group Lenovo United States +1.919.908.5833 +1.512.659.1523 smahm...@lenovo.com Lenovo.com /us Twitter | Facebook | Instagram | Blogs | Forums -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Jiaxin Wu Sent: Tuesday, August 16, 2016 3:20 AM To: edk2-devel@lists.01.org Cc: Ye Ting <ting...@intel.com>; Fu Siyuan <siyuan...@intel.com>; Long Qin <qin.l...@intel.com> Subject: [edk2] [staging/HTTPS-TLS][PATCH 0/2] Readme.MD and TlsAuthConfigDxe update Cc: Palmer Thomas <thomas.pal...@hpe.com> Cc: Long Qin <qin.l...@intel.com> Cc: Ye Ting <ting...@intel.com> Cc: Fu Siyuan <siyuan...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin...@intel.com> Jiaxin Wu (2): Readme.MD: Clarify the feature support scope NetworkPkg/TlsAuthConfigDxe: TlsCaCertificate variable attribute update NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c | 2 +- NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h | 2 ++ Readme.MD | 8 +++- 3 files changed, 10 insertions(+), 2 deletions(-) -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] DHCP Automatic Configure at Driver Connect
I agree that this is problematic. I thought last time we discussed this, we did try to request a PCD to set the default policy. I recall some hesitation in introducing a new PCD, but do not remember the details. I will try to dig up that thread. Thanks, --Samer Samer El-Haj-Mahmoud SESM - OS / SW Architect Systems Management Development, Data Center Group Lenovo United States +1.919.908.5833 +1.512.659.1523 smahm...@lenovo.com Lenovo.com /us Twitter | Facebook | Instagram | Blogs | Forums -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Cohen, Eugene Sent: Thursday, August 11, 2016 10:23 AM To: Wu, Jiaxin <jiaxin...@intel.com>; Ye, Ting <ting...@intel.com>; edk2-devel@lists.01.org Subject: Re: [edk2] DHCP Automatic Configure at Driver Connect Ting and Jiaxin, thank you both for clarifying. In our situation DHCP is being set on a previous boot and we are now observing DHCP being attempted on every boot (since the controllers are connected). So this is consistent with the behavior you describe - even though the default was originally static/manual the fact that we configured DHCP once causes this to be stored to NVRAM and perform dhcp process at every boot. The issue is not just a performance issue around DHCP timing. Even with a static IP address set the fact that the network interface comes "up" at each boot is problematic because our requirement is only to enable the network interface when directed to by an application. Modifying the IP configuration dynamically to suppress the interface coming up at every boot is also problematic because it means we would need to store the IP address configuration in another NVRAM location. In other words, the combining of the IP address settings storage *and* the policy of whether to configure at boot or wait until explicitly requested is problematic - we really would like to control these settings independently. Is that possible within the scope of the spec? Could we just have a PCD that suppresses the automatic configure at boot under any circumstance? Thanks, Eugene > -Original Message- > From: Wu, Jiaxin [mailto:jiaxin...@intel.com] > Sent: Thursday, August 11, 2016 12:00 AM > To: Ye, Ting <ting...@intel.com>; Cohen, Eugene <eug...@hp.com>; > edk2-devel@lists.01.org > Subject: RE: DHCP Automatic Configure at Driver Connect > > Thanks Ting's more background clarification. > > I assume the difference you mentioned is between "SHA-1: > 3d0a49ad47619c30c84bbee8a33f54b64dddbcec" and "SHA-1: > 7648748e99eeeadec38fda7568adb260c4acc861". The two commits does cause > the different behavior as Ting said below. Git version 3d0a49ad will > only set the policy to dhcp but don't trigger D.O.R.A while 7648748e > always trigger D.O.R.A if policy is DHCP. > > Version 7648748e commit is also the current behavior of Ip4Config2: > DHCP policy together with D.O.R.A process, which is similar to the old > Ip4Config behavior. The version 3d0a49ad did was trying to resolve the > Ip4Dxe performance but it's not workable for IPv6, so we reverted it. > > Thanks, > Jiaxin > > > -Original Message- > > From: Ye, Ting > > Sent: Thursday, August 11, 2016 11:03 AM > > To: Cohen, Eugene <eug...@hp.com>; edk2-devel@lists.01.org; > Wu, Jiaxin > > <jiaxin...@intel.com> > > Subject: RE: DHCP Automatic Configure at Driver Connect > > > > Hi Eugene, > > > > Actually this is exactly the problem Samer raised to the mailing > > list in > Aug 2015. > > We ever fixed it with following patch: > > > > SHA-1: 3d0a49ad47619c30c84bbee8a33f54b64dddbcec > > > > * MdeModulePkg: Fix issue about current Ip4Dxe implementation > for DHCP > > DORA process > > > > DHCP policy is applied as default at boot time on all NICs in the > system, which > > results in all NIC ports attempting DHCP and trying to acquire IP > addresses > > during boot. > > Ip4 driver should only set dhcp as default policy, and not trigger > DORA at > > driver binding start(). We should start DORA until one IP child is > configured to > > use default address. > > > > Later HP raised the same performance impact in IPv6 stack. We > realized we > > couldn't use the same logic to defer DHCP6 SARR process. > > Instead, we discussed the issue in spec group and we removed the > > restriction from UEFI specification that the default policy should > > be Ip4Config2PolicyDhcp or Ip6ConfigPolicyAutomatic. It's up to > > implementation's choice. > > The EDKII implementation was later updated that the default policy > was > > changed to Ip4Config2PolicyStatic and IP6ConfigPolicy
Re: [edk2] [PATCH] [staging/HTTPS-TLS] Delete extra TlsCipherMappingTable entries
Reviewed-by: Samer El-Haj-Mahmoud <smahm...@lenovo.com> Samer El-Haj-Mahmoud SESM - OS / SW Architect Systems Management Development, Data Center Group Lenovo United States +1.919.908.5833 +1.512.659.1523 smahm...@lenovo.com Lenovo.com /us Twitter | Facebook | Instagram | Blogs | Forums -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Thomas Palmer Sent: Tuesday, August 2, 2016 5:34 PM To: edk2-devel@lists.01.org Cc: jiaxin...@intel.com; qin.l...@intel.com Subject: [edk2] [PATCH] [staging/HTTPS-TLS] Delete extra TlsCipherMappingTable entries The TlsCipherMappingTable will be used to control which ciphers UEFI officially supports. When a user configures the ciphers, each cipher is checked against this table and if not found is sent the EFI_UNSUPPORTED error. However, when an entry is present in TlsCipherMappingTable, but our library does not have support for it, the user will not see any error if other ciphers are being set at the same time. This patch will remove entries from TlsLib's TlsCipherMappingTable that our OpenSSL library is not configured to support. This restores behavior of immediate feedback to user. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Palmer <thomas.pal...@hpe.com> --- CryptoPkg/Library/TlsLib/TlsLib.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/CryptoPkg/Library/TlsLib/TlsLib.c b/CryptoPkg/Library/TlsLib/TlsLib.c index 1f3554a..aa08595 100644 --- a/CryptoPkg/Library/TlsLib/TlsLib.c +++ b/CryptoPkg/Library/TlsLib/TlsLib.c @@ -57,31 +57,24 @@ STATIC CONST TLS_CIPHER_PAIR TlsCipherMappingTable[] = { { 0x0002, "NULL-SHA" }, /// TLS_RSA_WITH_NULL_SHA { 0x0004, "RC4-MD5" }, /// TLS_RSA_WITH_RC4_128_MD5 { 0x0005, "RC4-SHA" }, /// TLS_RSA_WITH_RC4_128_SHA - { 0x0007, "IDEA-CBC-SHA" }, /// TLS_RSA_WITH_IDEA_CBC_SHA - { 0x0009, "DES-CBC-SHA" }, /// TLS_RSA_WITH_DES_CBC_SHA { 0x000A, "DES-CBC3-SHA" }, /// TLS_RSA_WITH_3DES_EDE_CBC_SHA, mandatory TLS 1.1 - { 0x0013, "DHE-DSS-DES-CBC3-SHA" }, /// TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA, mandatory TLS 1.0 { 0x0016, "DHE-RSA-DES-CBC3-SHA" }, /// TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA { 0x002F, "AES128-SHA" }, /// TLS_RSA_WITH_AES_128_CBC_SHA, mandatory TLS 1.2 { 0x0030, "DH-DSS-AES128-SHA" },/// TLS_DH_DSS_WITH_AES_128_CBC_SHA { 0x0031, "DH-RSA-AES128-SHA" },/// TLS_DH_RSA_WITH_AES_128_CBC_SHA - { 0x0032, "DHE-DSS-AES128-SHA" }, /// TLS_DHE_DSS_WITH_AES_128_CBC_SHA { 0x0033, "DHE-RSA-AES128-SHA" }, /// TLS_DHE_RSA_WITH_AES_128_CBC_SHA { 0x0035, "AES256-SHA" }, /// TLS_RSA_WITH_AES_256_CBC_SHA { 0x0036, "DH-DSS-AES256-SHA" },/// TLS_DH_DSS_WITH_AES_256_CBC_SHA { 0x0037, "DH-RSA-AES256-SHA" },/// TLS_DH_RSA_WITH_AES_256_CBC_SHA - { 0x0038, "DHE-DSS-AES256-SHA" }, /// TLS_DHE_DSS_WITH_AES_256_CBC_SHA { 0x0039, "DHE-RSA-AES256-SHA" }, /// TLS_DHE_RSA_WITH_AES_256_CBC_SHA { 0x003B, "NULL-SHA256" }, /// TLS_RSA_WITH_NULL_SHA256 { 0x003C, "AES128-SHA256" },/// TLS_RSA_WITH_AES_128_CBC_SHA256 { 0x003D, "AES256-SHA256" },/// TLS_RSA_WITH_AES_256_CBC_SHA256 { 0x003E, "DH-DSS-AES128-SHA256" }, /// TLS_DH_DSS_WITH_AES_128_CBC_SHA256 { 0x003F, "DH-RSA-AES128-SHA256" }, /// TLS_DH_RSA_WITH_AES_128_CBC_SHA256 - { 0x0040, "DHE-DSS-AES128-SHA256" },/// TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 { 0x0067, "DHE-RSA-AES128-SHA256" },/// TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 { 0x0068, "DH-DSS-AES256-SHA256" }, /// TLS_DH_DSS_WITH_AES_256_CBC_SHA256 { 0x0069, "DH-RSA-AES256-SHA256" }, /// TLS_DH_RSA_WITH_AES_256_CBC_SHA256 - { 0x006A, "DHE-DSS-AES256-SHA256" },/// TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 { 0x006B, "DHE-RSA-AES256-SHA256" } /// TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 }; -- 1.9.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [staging/HTTPS-TLS][PATCH 1/2] CryptoPkg/Library/TlsLib: Refine the coding style
Reviewed-by : Samer El-Haj-Mahmoud <smahm...@lenovo.com> -Original Message- From: Jiaxin Wu [jiaxin...@intel.com] Received: Monday, 11 Jul 2016, 1:43AM To: edk2-devel@lists.01.org [edk2-devel@lists.01.org] CC: Palmer Thomas [thomas.pal...@hpe.com]; Samer El Haj Mahmoud [smahm...@lenovo.com]; Long Qin [qin.l...@intel.com]; Ye Ting [ting...@intel.com] Subject: [staging/HTTPS-TLS][PATCH 1/2] CryptoPkg/Library/TlsLib: Refine the coding style Cc: Palmer Thomas <thomas.pal...@hpe.com> Cc: Samer El-Haj-Mahmoud <smahm...@lenovo.com> Cc: Long Qin <qin.l...@intel.com> Cc: Ye Ting <ting...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin...@intel.com> --- CryptoPkg/Library/TlsLib/TlsLib.c | 52 +++ 1 file changed, 31 insertions(+), 21 deletions(-) diff --git a/CryptoPkg/Library/TlsLib/TlsLib.c b/CryptoPkg/Library/TlsLib/TlsLib.c index 814c358..f007882 100644 --- a/CryptoPkg/Library/TlsLib/TlsLib.c +++ b/CryptoPkg/Library/TlsLib/TlsLib.c @@ -614,65 +614,75 @@ TlsDoHandshake ( IN OUT UINTN*BufferOutSize ) { TLS_CONNECTION *TlsConn; UINTN PendingBufferSize; - int ret; - unsigned long e; + INTNRet; + unsigned long ErrorCode; TlsConn = (TLS_CONNECTION *) Tls; PendingBufferSize = 0; + Ret = 1; if (TlsConn == NULL || \ TlsConn->Ssl == NULL || TlsConn->InBio == NULL || TlsConn->OutBio == NULL || \ BufferOutSize == NULL || \ (BufferIn == NULL && BufferInSize != 0) || \ (BufferIn != NULL && BufferInSize == 0) || \ (BufferOut == NULL && *BufferOutSize != 0)) { return EFI_INVALID_PARAMETER; } - ret = 1; if(BufferIn == NULL && BufferInSize == 0) { // // If RequestBuffer is NULL and RequestSize is 0, and TLS session // status is EfiTlsSessionNotStarted, the TLS session will be initiated // and the response packet needs to be ClientHello. // PendingBufferSize = (UINTN) BIO_ctrl_pending (TlsConn->OutBio); if (PendingBufferSize == 0) { SSL_set_connect_state (TlsConn->Ssl); - ret = SSL_do_handshake (TlsConn->Ssl); + Ret = SSL_do_handshake (TlsConn->Ssl); PendingBufferSize = (UINTN) BIO_ctrl_pending (TlsConn->OutBio); } } else { PendingBufferSize = (UINTN) BIO_ctrl_pending (TlsConn->OutBio); if (PendingBufferSize == 0) { BIO_write (TlsConn->InBio, BufferIn, (UINT32) BufferInSize); - ret = SSL_do_handshake (TlsConn->Ssl); + Ret = SSL_do_handshake (TlsConn->Ssl); PendingBufferSize = (UINTN) BIO_ctrl_pending (TlsConn->OutBio); } } - if (ret < 1) { -ret = SSL_get_error (TlsConn->Ssl, ret); -if (ret == SSL_ERROR_SSL || -ret == SSL_ERROR_SYSCALL || -ret == SSL_ERROR_ZERO_RETURN) { - DEBUG ((DEBUG_ERROR, "%a SSL_HANDSHAKE_ERROR State=0x%x SSL_ERROR_%a\n", __FUNCTION__, SSL_state (TlsConn->Ssl), -ret == SSL_ERROR_SSL ? "SSL": -ret == SSL_ERROR_SYSCALL ? "SYSCALL": -"ZERO_RETURN" -)); + if (Ret < 1) { +Ret = SSL_get_error (TlsConn->Ssl, Ret); +if (Ret == SSL_ERROR_SSL || +Ret == SSL_ERROR_SYSCALL || +Ret == SSL_ERROR_ZERO_RETURN) { + DEBUG (( +DEBUG_ERROR, +"%a SSL_HANDSHAKE_ERROR State=0x%x SSL_ERROR_%a\n", +__FUNCTION__, +SSL_state (TlsConn->Ssl), +Ret == SSL_ERROR_SSL ? "SSL" : Ret == SSL_ERROR_SYSCALL ? "SYSCALL" : "ZERO_RETURN" +)); DEBUG_CODE_BEGIN (); - while (1) { -e = ERR_get_error (); -if (e == 0) { - break; +while (TRUE) { + ErrorCode = ERR_get_error (); + if (ErrorCode == 0) { +break; + } + DEBUG (( +DEBUG_ERROR, +"%a ERROR 0x%x=L%x:F%x:R%x\n", +__FUNCTION__, +ErrorCode, +ERR_GET_LIB (ErrorCode), +ERR_GET_FUNC (ErrorCode), +ERR_GET_REASON (ErrorCode) +)); } -DEBUG ((DEBUG_ERROR, "%a ERROR 0x%x=L%x:F%x:R%x\n", __FUNCTION__, e, ERR_GET_LIB (e), ERR_GET_FUNC (e), ERR_GET_REASON (e))); - } DEBUG_CODE_END (); return EFI_PROTOCOL_ERROR; } } -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [staging/HTTPS-TLS][PATCH] NetworkPkg: Centralize TlsCaCertificate name and guid
Reviewed-by: Samer El-Haj-Mahmoud <smahm...@lenovo.com> -Original Message- From: Wu, Jiaxin [jiaxin...@intel.com] Received: Monday, 04 Jul 2016, 9:45PM To: Palmer, Thomas [thomas.pal...@hpe.com]; Wu, Jiaxin [jiaxin...@intel.com]; edk2-devel@lists.01.org [edk2-devel@lists.01.org] CC: Ye, Ting [ting...@intel.com]; Fu, Siyuan [siyuan...@intel.com] Subject: Re: [edk2] [staging/HTTPS-TLS][PATCH] NetworkPkg: Centralize TlsCaCertificate name and guid It should be "[edk2-staging/HTTPS-TLS][PATCH]". Sorry for incorrect subject-prefix. Jiaxin > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > Jiaxin Wu > Sent: Tuesday, July 5, 2016 9:41 AM > To: edk2-devel@lists.01.org > Cc: Ye, Ting <ting...@intel.com>; Fu, Siyuan <siyuan...@intel.com> > Subject: [edk2] [staging/HTTPS-TLS][PATCH] NetworkPkg: Centralize > TlsCaCertificate name and guid > > This patch is used to centralize TlsCaCertificate name and guid to > TlsAuthentication.h > > Cc: Palmer Thomas <thomas.pal...@hpe.com> > Cc: Ye Ting <ting...@intel.com> > Cc: Fu Siyuan <siyuan...@intel.com> > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Jiaxin Wu <jiaxin...@intel.com> > --- > NetworkPkg/HttpDxe/HttpDriver.h | 2 ++ > NetworkPkg/HttpDxe/HttpDxe.inf | 4 > NetworkPkg/HttpDxe/HttpsSupport.c| 7 ++ > NetworkPkg/HttpDxe/HttpsSupport.h| 10 > NetworkPkg/Include/Guid/TlsAuthentication.h | 29 > > NetworkPkg/NetworkPkg.dec| 5 +++- > NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf | 1 + > NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.c | 14 +--- > NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigImpl.h | 12 ++ > 9 files changed, 50 insertions(+), 34 deletions(-) create mode 100644 > NetworkPkg/Include/Guid/TlsAuthentication.h > > diff --git a/NetworkPkg/HttpDxe/HttpDriver.h > b/NetworkPkg/HttpDxe/HttpDriver.h index 3c30c12..73c211a 100644 > --- a/NetworkPkg/HttpDxe/HttpDriver.h > +++ b/NetworkPkg/HttpDxe/HttpDriver.h > @@ -58,10 +58,12 @@ > // > // Produced Protocols > // > #include > > +#include > + > // > // Driver Version > // > #define HTTP_DRIVER_VERSION 0xa > > diff --git a/NetworkPkg/HttpDxe/HttpDxe.inf > b/NetworkPkg/HttpDxe/HttpDxe.inf index a228c3d..1118181 100644 > --- a/NetworkPkg/HttpDxe/HttpDxe.inf > +++ b/NetworkPkg/HttpDxe/HttpDxe.inf > @@ -24,10 +24,11 @@ >MODULE_UNI_FILE = HttpDxe.uni > > [Packages] >MdePkg/MdePkg.dec >MdeModulePkg/MdeModulePkg.dec > + NetworkPkg/NetworkPkg.dec > > [Sources] >ComponentName.h >ComponentName.c >HttpDns.h > @@ -69,7 +70,10 @@ >gEfiIp6ConfigProtocolGuid## SOMETIMES_CONSUMES >gEfiTlsServiceBindingProtocolGuid## SOMETIMES_CONSUMES >gEfiTlsProtocolGuid ## SOMETIMES_CONSUMES >gEfiTlsConfigurationProtocolGuid ## SOMETIMES_CONSUMES > > +[Guids] > + gEfiTlsCaCertificateGuid ## CONSUMES ## GUID > + > [UserExtensions.TianoCore."ExtraFiles"] >HttpDxeExtra.uni > \ No newline at end of file > diff --git a/NetworkPkg/HttpDxe/HttpsSupport.c > b/NetworkPkg/HttpDxe/HttpsSupport.c > index 09aaa46..36f658c 100644 > --- a/NetworkPkg/HttpDxe/HttpsSupport.c > +++ b/NetworkPkg/HttpDxe/HttpsSupport.c > @@ -12,12 +12,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF > ANY KIND, EITHER EXPRESS OR IMPLIED. > > **/ > > #include "HttpDriver.h" > > -EFI_GUID mEfiTlsCaCertificateGuid = EFI_TLS_CA_CERTIFICATE_GUID; > - > /** >Returns the first occurrence of a Null-terminated ASCII sub-string in a > Null- > terminated >ASCII string and ignore case during the search process. > >This function scans the contents of the ASCII string specified by String > @@ - > 395,11 +393,11 @@ TlsConfigCertificate ( >// Try to read the TlsCaCertificate variable. >// >CACertSize = 0; >Status = gRT->GetVariable ( > EFI_TLS_CA_CERTIFICATE_VARIABLE, > - , > + , > NULL, > , > NULL > ); > > @@ -412,11 +410,11 @@ TlsConfigCertificate ( >return EFI_OUT_OF_RESOURCES; > } > > Status = gRT->GetVariable ( > EFI_TLS_CA_CERTIFICATE_VARIABLE, > -, > +, > NULL, >
Re: [edk2] [Patch 0/2] Update-PXE-driver-to-follow-edk2-coding-standards
Series Reviewed-by: Samer El-Haj-Mahmoud <smahm...@lenovo.com> -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Fu Siyuan Sent: Wednesday, June 29, 2016 10:08 PM To: edk2-devel@lists.01.org Subject: [edk2] [Patch 0/2] Update-PXE-driver-to-follow-edk2-coding-standards Fu Siyuan (2): MdeModulePkg: Update PXE driver to follow edk2 coding standards. NetworkPkg: Update PXE driver to follow edk2 coding standards. MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c | 4 ++-- MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h | 4 ++-- NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c | 6 +++--- NetworkPkg/UefiPxeBcDxe/PxeBcSupport.h | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) -- 2.7.4.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] SecurityPkg: Remove non-ASCII character from TPM warning strings
Remove a non-ASCII apostrophe character from TPM_WARNING_MAINTAIN message Cc: Chao Zhang <chao.b.zh...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- .../Library/DxeTcgPhysicalPresenceLib/PhysicalPresenceStrings.uni | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/PhysicalPresenceStrings.uni b/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/PhysicalPresenceStrings.uni index 00a09c1..065cd63 100644 --- a/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/PhysicalPresenceStrings.uni +++ b/SecurityPkg/Library/DxeTcgPhysicalPresenceLib/PhysicalPresenceStrings.uni @@ -2,6 +2,7 @@ String definitions for TPM 1.2 physical presence confirm text. Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved. +(C) Copyright 2016 Hewlett Packard Enterprise Development LP 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 @@ -42,7 +43,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #string TPM_NO_PPI_MAINTAIN #language en-US"maintain" #string TPM_NO_PPI_INFO #language en-US"to approve future Operating System requests " -#string TPM_WARNING_MAINTAIN #language en-US"WARNING: Allowing changes to the TPM’s firmware may affect the operation of the TPM and may erase information stored on the TPM.\nYou may lose all created keys and access to data encrypted by these keys.\n\n" +#string TPM_WARNING_MAINTAIN #language en-US"WARNING: Allowing changes to the TPM's firmware may affect the operation of the TPM and may erase information stored on the TPM.\nYou may lose all created keys and access to data encrypted by these keys.\n\n" #string TPM_WARNING #language en-US"WARNING: Doing so might prevent security applications that rely on the TPM from functioning as expected\n\n" #string TPM_WARNING_CLEAR #language en-US"WARNING: Clearing erases information stored on the TPM. You will lose all created keys and access to data encrypted by these keys. " #string TPM_WARNING_CLEAR_CONT#language en-US"Take ownership as soon as possible after this step.\n\n" -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] MdePkg: Add NFIT definition from ACPI 6.1
Add NFIT definition from ACPI 6.1 for the NVDIMM Control Region Structure Valid Fields for Manufacturing Location and Manufacturing Date Cc: Michael D Kinney <michael.d.kin...@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- MdePkg/Include/IndustryStandard/Acpi61.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MdePkg/Include/IndustryStandard/Acpi61.h b/MdePkg/Include/IndustryStandard/Acpi61.h index 1cedcc9..dc3153b 100644 --- a/MdePkg/Include/IndustryStandard/Acpi61.h +++ b/MdePkg/Include/IndustryStandard/Acpi61.h @@ -2,6 +2,7 @@ ACPI 6.1 definitions from the ACPI Specification Revision 6.1 January, 2016. Copyright (c) 2016, Intel Corporation. All rights reserved. + (C) Copyright 2016 Hewlett Packard Enterprise Development LP 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 @@ -1475,6 +1476,8 @@ typedef struct { // // Definition for NVDIMM Control Region Structure // +#define EFI_ACPI_6_1_NFIT_NVDIMM_CONTROL_REGION_VALID_FIELDS_MANUFACTURING BIT0 + #define EFI_ACPI_6_1_NFIT_NVDIMM_CONTROL_REGION_FLAGS_BLOCK_DATA_WINDOWS_BUFFERED BIT0 typedef struct { UINT16 Type; -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] MdePkg: Add HII definitions from UEFI 2.6
Add HII definitions from UEFI 2.6 for HII Image Variability and PNG Blocks Cc: Michael D Kinney <michael.d.kin...@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- MdePkg/Include/Uefi/UefiInternalFormRepresentation.h | 16 1 file changed, 16 insertions(+) diff --git a/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h b/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h index 1a77ea7..4ac 100644 --- a/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h +++ b/MdePkg/Include/Uefi/UefiInternalFormRepresentation.h @@ -4,6 +4,7 @@ internal application and drivers as well as all add-in card option-ROM drivers Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. +(C) Copyright 2016 Hewlett Packard Enterprise Development LP This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -209,6 +210,7 @@ typedef struct _EFI_HII_FONT_PACKAGE_HDR { #define EFI_HII_GIBT_GLYPHS 0x11 #define EFI_HII_GIBT_GLYPH_DEFAULT0x12 #define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13 +#define EFI_HII_GIBT_GLYPH_VARIABILITY0x14 #define EFI_HII_GIBT_DUPLICATE0x20 #define EFI_HII_GIBT_SKIP20x21 #define EFI_HII_GIBT_SKIP10x22 @@ -281,6 +283,13 @@ typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK { UINT8 BitmapData[1]; } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK; +typedef struct _EFI_HII_GIBT_VARIABILITY_BLOCK { + EFI_HII_GLYPH_BLOCKHeader; + EFI_HII_GLYPH_INFO Cell; + UINT8 GlyphPackInBits; + UINT8 BitmapData [1]; +} EFI_HII_GIBT_VARIABILITY_BLOCK; + typedef struct _EFI_HII_GIBT_SKIP1_BLOCK { EFI_HII_GLYPH_BLOCKHeader; UINT8 SkipCount; @@ -489,6 +498,7 @@ typedef struct _EFI_HII_IMAGE_BLOCK { #define EFI_HII_IIBT_IMAGE_24BIT 0x16 #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17 #define EFI_HII_IIBT_IMAGE_JPEG0x18 +#define EFI_HII_IIBT_IMAGE_PNG 0x19 #define EFI_HII_IIBT_DUPLICATE 0x20 #define EFI_HII_IIBT_SKIP2 0x21 #define EFI_HII_IIBT_SKIP1 0x22 @@ -609,6 +619,12 @@ typedef struct _EFI_HII_IIBT_JPEG_BLOCK { UINT8Data[1]; } EFI_HII_IIBT_JPEG_BLOCK; +typedef struct _EFI_HII_IIBT_PNG_BLOCK { + EFI_HII_IMAGE_BLOCK Header; + UINT32 Size; + UINT8Data[1]; +} EFI_HII_IIBT_PNG_BLOCK; + typedef struct _EFI_HII_IIBT_SKIP1_BLOCK { EFI_HII_IMAGE_BLOCK Header; UINT8SkipCount; -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] BaseTools: Add HII definitions from UEFI 2.6
Add HII definitions from UEFI 2.6 for HII Image Variability and PNG Blocks Cc: Yonghong Zhu <yonghong@intel.com> Cc: Liming Gao <liming@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- .../Common/UefiInternalFormRepresentation.h| 24 ++ 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h index 8c2edf2..4b585fd 100644 --- a/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h +++ b/BaseTools/Source/C/Include/Common/UefiInternalFormRepresentation.h @@ -3,11 +3,9 @@ IFR is primarily consumed by the EFI presentation engine, and produced by EFI internal application and drivers as well as all add-in card option-ROM drivers - @par Revision Reference: - These definitions are from UEFI2.1. - Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. - + (C) Copyright 2016 Hewlett Packard Enterprise Development LP + 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 @@ -16,6 +14,9 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + @par Revision Reference: + These definitions are from UEFI 2.6 + **/ #ifndef __UEFI_INTERNAL_FORMREPRESENTATION_H__ @@ -167,6 +168,7 @@ typedef struct _EFI_HII_FONT_PACKAGE_HDR { #define EFI_HII_GIBT_GLYPHS 0x11 #define EFI_HII_GIBT_GLYPH_DEFAULT0x12 #define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13 +#define EFI_HII_GIBT_GLYPH_VARIABILITY0x14 #define EFI_HII_GIBT_DUPLICATE0x20 #define EFI_HII_GIBT_SKIP20x21 #define EFI_HII_GIBT_SKIP10x22 @@ -235,6 +237,13 @@ typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK { UINT8 BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Global.Cell.Width+7)/8)*Global.Cell.Height } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK; +typedef struct _EFI_HII_GIBT_VARIABILITY_BLOCK { + EFI_HII_GLYPH_BLOCKHeader; + EFI_HII_GLYPH_INFO Cell; + UINT8 GlyphPackInBits; + UINT8 BitmapData [1]; +} EFI_HII_GIBT_VARIABILITY_BLOCK; + typedef struct _EFI_HII_GIBT_SKIP1_BLOCK { EFI_HII_GLYPH_BLOCKHeader; UINT8 SkipCount; @@ -416,6 +425,7 @@ typedef struct _EFI_HII_IMAGE_BLOCK { #define EFI_HII_IIBT_IMAGE_24BIT 0x16 #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17 #define EFI_HII_IIBT_IMAGE_JPEG0x18 +#define EFI_HII_IIBT_IMAGE_PNG 0x19 #define EFI_HII_IIBT_DUPLICATE 0x20 #define EFI_HII_IIBT_SKIP2 0x21 #define EFI_HII_IIBT_SKIP1 0x22 @@ -532,6 +542,12 @@ typedef struct _EFI_HII_IIBT_JPEG_BLOCK { UINT8Data[1]; } EFI_HII_IIBT_JPEG_BLOCK; +typedef struct _EFI_HII_IIBT_PNG_BLOCK { + EFI_HII_IMAGE_BLOCK Header; + UINT32 Size; + UINT8Data[1]; +} EFI_HII_IIBT_PNG_BLOCK; + typedef struct _EFI_HII_IIBT_SKIP1_BLOCK { EFI_HII_IMAGE_BLOCK Header; UINT8SkipCount; -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] SecurityPkg: Reduce TPM debug verbosity
Reduce several DEBUG messages verbosity in TPM, especially when no TPM HW is present Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- SecurityPkg/Tcg/TcgPei/TcgPei.c | 3 ++- SecurityPkg/Tcg/TcgSmm/TcgSmm.c | 3 ++- SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c | 43 --- SecurityPkg/Tcg/TrEEPei/TrEEPei.c | 5 +++-- 4 files changed, 29 insertions(+), 25 deletions(-) diff --git a/SecurityPkg/Tcg/TcgPei/TcgPei.c b/SecurityPkg/Tcg/TcgPei/TcgPei.c index 25724a6..69eb728 100644 --- a/SecurityPkg/Tcg/TcgPei/TcgPei.c +++ b/SecurityPkg/Tcg/TcgPei/TcgPei.c @@ -2,6 +2,7 @@ Initialize TPM device and measure FVs before handing off control to DXE. Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved. +(C) Copyright 2016 Hewlett Packard Enterprise Development LP 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 @@ -753,7 +754,7 @@ PeimEntryMA ( EFI_BOOT_MODE BootMode; if (!CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), )){ -DEBUG ((EFI_D_ERROR, "No TPM12 instance required!\n")); +DEBUG ((EFI_D_INFO, "No TPM12 instance required!\n")); return EFI_UNSUPPORTED; } diff --git a/SecurityPkg/Tcg/TcgSmm/TcgSmm.c b/SecurityPkg/Tcg/TcgSmm/TcgSmm.c index 96fb456..981db1c 100644 --- a/SecurityPkg/Tcg/TcgSmm/TcgSmm.c +++ b/SecurityPkg/Tcg/TcgSmm/TcgSmm.c @@ -9,6 +9,7 @@ PhysicalPresenceCallback() and MemoryClearCallback() will receive untrusted input and do some check. Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved. +(C) Copyright 2016 Hewlett Packard Enterprise Development LP 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 @@ -426,7 +427,7 @@ InitializeTcgSmm ( EFI_HANDLE SwHandle; if (!CompareGuid (PcdGetPtr(PcdTpmInstanceGuid), )){ -DEBUG ((EFI_D_ERROR, "No TPM12 instance required!\n")); +DEBUG ((EFI_D_INFO, "No TPM12 instance required!\n")); return EFI_UNSUPPORTED; } diff --git a/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c b/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c index dfdee04..f93c6d2 100644 --- a/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c +++ b/SecurityPkg/Tcg/TrEEDxe/TrEEDxe.c @@ -2,6 +2,7 @@ This module implements TrEE Protocol. Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. +(C) Copyright 2016 Hewlett Packard Enterprise Development LP 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 @@ -212,7 +213,7 @@ InternalDumpData ( { UINTN Index; for (Index = 0; Index < Size; Index++) { -DEBUG ((EFI_D_INFO, "%02x", (UINTN)Data[Index])); +DEBUG ((DEBUG_VERBOSE, "%02x", (UINTN)Data[Index])); } } @@ -239,15 +240,15 @@ InternalDumpHex ( Count = Size / COLUME_SIZE; Left = Size % COLUME_SIZE; for (Index = 0; Index < Count; Index++) { -DEBUG ((EFI_D_INFO, "%04x: ", Index * COLUME_SIZE)); +DEBUG ((DEBUG_VERBOSE, "%04x: ", Index * COLUME_SIZE)); InternalDumpData (Data + Index * COLUME_SIZE, COLUME_SIZE); -DEBUG ((EFI_D_INFO, "\n")); +DEBUG ((DEBUG_VERBOSE, "\n")); } if (Left != 0) { -DEBUG ((EFI_D_INFO, "%04x: ", Index * COLUME_SIZE)); +DEBUG ((DEBUG_VERBOSE, "%04x: ", Index * COLUME_SIZE)); InternalDumpData (Data + Index * COLUME_SIZE, Left); -DEBUG ((EFI_D_INFO, "\n")); +DEBUG ((DEBUG_VERBOSE, "\n")); } } @@ -392,21 +393,21 @@ DumpEventLog ( TCG_PCR_EVENT_HDR *EventHdr; UINTN Index; - DEBUG ((EFI_D_INFO, "EventLogFormat: (0x%x)\n", EventLogFormat)); + DEBUG ((DEBUG_VERBOSE, "EventLogFormat: (0x%x)\n", EventLogFormat)); switch (EventLogFormat) { case TREE_EVENT_LOG_FORMAT_TCG_1_2: EventHdr = (TCG_PCR_EVENT_HDR *)(UINTN)EventLogLocation; while ((UINTN)EventHdr <= EventLogLastEntry) { - DEBUG ((EFI_D_INFO, " Event:\n")); - DEBUG ((EFI_D_INFO, "PCRIndex - %d\n", EventHdr->PCRIndex)); - DEBUG ((EFI_D_INFO, "EventType - 0x%08x\n", EventHdr->EventType)); - DEBUG ((EFI_D_INFO, "Digest- ")); + DEBUG ((DEBUG_VERBOSE, " Event:\n")); + DEBUG ((DEBUG_VERBOSE, "PCRIndex - %d\n", EventHdr->PCRIndex)); + DEBUG ((DEBUG_VERBOSE, "EventType - 0x%08x\n", EventHdr->EventType));
[edk2] [PATCH] SecurityPkg: Reduce DEBUG verbosity in Tcg2Dxe
Reduce several DEBUG messages verbosity from INFO to VERBOSE to reduce debug spam when there is no TPM 2.0 part present Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> Signed-off-by: Derek Lin <derek.l...@hpe.com> --- SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c index 07f76af..6555df5 100644 --- a/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c +++ b/SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.c @@ -2,6 +2,7 @@ This module implements Tcg2 Protocol. Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. +(C) Copyright 2016 Hewlett Packard Enterprise Development LP 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 @@ -332,14 +333,14 @@ Tcg2GetCapability ( IN OUT EFI_TCG2_BOOT_SERVICE_CAPABILITY *ProtocolCapability ) { - DEBUG ((EFI_D_INFO, "Tcg2GetCapability ...\n")); + DEBUG ((DEBUG_VERBOSE, "Tcg2GetCapability ...\n")); if ((This == NULL) || (ProtocolCapability == NULL)) { return EFI_INVALID_PARAMETER; } - DEBUG ((EFI_D_INFO, "Size - 0x%x\n", ProtocolCapability->Size)); - DEBUG ((EFI_D_INFO, " 1.1 - 0x%x, 1.0 - 0x%x\n", sizeof(EFI_TCG2_BOOT_SERVICE_CAPABILITY), sizeof(TREE_BOOT_SERVICE_CAPABILITY_1_0))); + DEBUG ((DEBUG_VERBOSE, "Size - 0x%x\n", ProtocolCapability->Size)); + DEBUG ((DEBUG_VERBOSE, " 1.1 - 0x%x, 1.0 - 0x%x\n", sizeof(EFI_TCG2_BOOT_SERVICE_CAPABILITY), sizeof(TREE_BOOT_SERVICE_CAPABILITY_1_0))); if (ProtocolCapability->Size < mTcgDxeData.BsCap.Size) { // @@ -363,7 +364,7 @@ Tcg2GetCapability ( } CopyMem (ProtocolCapability, , mTcgDxeData.BsCap.Size); - DEBUG ((EFI_D_INFO, "Tcg2GetCapability - %r\n", EFI_SUCCESS)); + DEBUG ((DEBUG_VERBOSE, "Tcg2GetCapability - %r\n", EFI_SUCCESS)); return EFI_SUCCESS; } @@ -1237,7 +1238,7 @@ Tcg2HashLogExtendEvent ( TCG_PCR_EVENT_HDR NewEventHdr; TPML_DIGEST_VALUES DigestList; - DEBUG ((EFI_D_INFO, "Tcg2HashLogExtendEvent ...\n")); + DEBUG ((DEBUG_VERBOSE, "Tcg2HashLogExtendEvent ...\n")); if ((This == NULL) || (DataToHash == 0) || (Event == NULL)) { return EFI_INVALID_PARAMETER; @@ -1287,7 +1288,7 @@ Tcg2HashLogExtendEvent ( Event->Event ); } - DEBUG ((EFI_D_INFO, "Tcg2HashLogExtendEvent - %r\n", Status)); + DEBUG ((DEBUG_VERBOSE, "Tcg2HashLogExtendEvent - %r\n", Status)); return Status; } @@ -2530,10 +2531,10 @@ DriverEntry ( mTcgDxeData.BsCap.SupportedEventLogs &= ~EFI_TCG2_EVENT_LOG_FORMAT_TCG_1_2; } - DEBUG ((EFI_D_INFO, "Tcg2.SupportedEventLogs - 0x%08x\n", mTcgDxeData.BsCap.SupportedEventLogs)); - DEBUG ((EFI_D_INFO, "Tcg2.HashAlgorithmBitmap - 0x%08x\n", mTcgDxeData.BsCap.HashAlgorithmBitmap)); - DEBUG ((EFI_D_INFO, "Tcg2.NumberOfPCRBanks - 0x%08x\n", mTcgDxeData.BsCap.NumberOfPCRBanks)); - DEBUG ((EFI_D_INFO, "Tcg2.ActivePcrBanks- 0x%08x\n", mTcgDxeData.BsCap.ActivePcrBanks)); + DEBUG ((DEBUG_VERBOSE, "Tcg2.SupportedEventLogs - 0x%08x\n", mTcgDxeData.BsCap.SupportedEventLogs)); + DEBUG ((DEBUG_VERBOSE, "Tcg2.HashAlgorithmBitmap - 0x%08x\n", mTcgDxeData.BsCap.HashAlgorithmBitmap)); + DEBUG ((DEBUG_VERBOSE, "Tcg2.NumberOfPCRBanks - 0x%08x\n", mTcgDxeData.BsCap.NumberOfPCRBanks)); + DEBUG ((DEBUG_VERBOSE, "Tcg2.ActivePcrBanks- 0x%08x\n", mTcgDxeData.BsCap.ActivePcrBanks)); if (mTcgDxeData.BsCap.TPMPresentFlag) { // -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] SecurityPkg: Update servers TCG ACPI Table template to TCG 1.2
Update the TCG Spec in the the EFI_TCG_SERVER_ACPI_TABLE from TCG 1.0 to TCG 1.2 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> Signed-off-by: Derek Lin <derek.l...@hpe.com> --- SecurityPkg/Tcg/TcgDxe/TcgDxe.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c index 690f356..0d7e32a 100644 --- a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c +++ b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c @@ -9,6 +9,7 @@ buffer overflow, integer overflow. TcgDxePassThroughToTpm() will receive untrusted input and do basic validation. Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved. +(C) Copyright 2016 Hewlett Packard Enterprise Development LP 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 @@ -102,8 +103,8 @@ EFI_TCG_SERVER_ACPI_TABLE mTcgServerAcpiTemplate = { 0, // Reserved 0, // Log Area Max Length (EFI_PHYSICAL_ADDRESS) (SIZE_4GB - 1), // Log Area Start Address - 0x0100, // TCG Specification revision 1.0 - 2, // Device Flags + 0x0120, // TCG Specification revision 1.2 + 0, // Device Flags 0, // Interrupt Flags 0, // GPE {0},// Reserved 3 bytes @@ -353,9 +354,9 @@ TcgDxeHashAll ( } *HashedDataLen = sizeof (TPM_DIGEST); - if (*HashedDataResult == NULL) { - *HashedDataResult = AllocatePool ((UINTN) *HashedDataLen); - } + if (*HashedDataResult == NULL) { +*HashedDataResult = AllocatePool ((UINTN) *HashedDataLen); + } return TpmCommHashAll ( HashData, -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] SecurityPkg: Add DEBUG messages for TPM12Startup
Add DEBUG messages for TPM12Startup to distinguish between TPM_SUCCESS and TPM_INVALID_POSTINIT. This helps debugging some hardware problems. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> Signed-off-by: Derek Lin <derek.l...@hpe.com> --- SecurityPkg/Library/Tpm12CommandLib/Tpm12Startup.c | 5 + 1 file changed, 5 insertions(+) diff --git a/SecurityPkg/Library/Tpm12CommandLib/Tpm12Startup.c b/SecurityPkg/Library/Tpm12CommandLib/Tpm12Startup.c index bc10e45..098dd28 100644 --- a/SecurityPkg/Library/Tpm12CommandLib/Tpm12Startup.c +++ b/SecurityPkg/Library/Tpm12CommandLib/Tpm12Startup.c @@ -2,6 +2,7 @@ Implement TPM1.2 Startup related command. Copyright (c) 2013, Intel Corporation. All rights reserved. +(C) Copyright 2016 Hewlett Packard Enterprise Development LP 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 @@ -16,6 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include +#include #pragma pack(1) @@ -59,8 +61,11 @@ Tpm12Startup ( } switch (SwapBytes32(Response.returnCode)) { case TPM_SUCCESS: +DEBUG ((DEBUG_INFO, "TPM12Startup: TPM_SUCCESS\n")); +return EFI_SUCCESS; case TPM_INVALID_POSTINIT: // In warm reset, TPM may response TPM_INVALID_POSTINIT +DEBUG ((DEBUG_INFO, "TPM12Startup: TPM_INVALID_POSTINIT\n")); return EFI_SUCCESS; default: return EFI_DEVICE_ERROR; -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] SecurityPkg: Fix bug in TPM 1.2 SelfTest
Fix uninitialized command Length variable in TPM1.2 Self Test command Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> Signed-off-by: Derek Lin <derek.l...@hpe.com> --- SecurityPkg/Library/Tpm12CommandLib/Tpm12SelfTest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SecurityPkg/Library/Tpm12CommandLib/Tpm12SelfTest.c b/SecurityPkg/Library/Tpm12CommandLib/Tpm12SelfTest.c index cd08d19..8e232ee 100644 --- a/SecurityPkg/Library/Tpm12CommandLib/Tpm12SelfTest.c +++ b/SecurityPkg/Library/Tpm12CommandLib/Tpm12SelfTest.c @@ -2,6 +2,7 @@ Implement TPM1.2 NV Self Test related commands. Copyright (c) 2016, Intel Corporation. All rights reserved. +(C) Copyright 2016 Hewlett Packard Enterprise Development LP 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 @@ -42,5 +43,6 @@ Tpm12ContinueSelfTest ( Command.tag = SwapBytes16 (TPM_TAG_RQU_COMMAND); Command.paramSize = SwapBytes32 (sizeof (Command)); Command.ordinal = SwapBytes32 (TPM_ORD_ContinueSelfTest); + Length = sizeof (Response); return Tpm12SubmitCommand (sizeof (Command), (UINT8 *), , (UINT8 *)); } -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] SecurityPkg: Fix TPM 1.2 NV Storage Command Size byte order
Fix Tpm12NvWriteValue() command/response length byte order. Tpm12SubmitCommand() was using the value from Command.Hdr.paramSize which was swapped to be Big Endian, but the function was expecting it in UINT32 Little Endian Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> Signed-off-by: Derek Lin <derek.l...@hpe.com> --- SecurityPkg/Library/Tpm12CommandLib/Tpm12NvStorage.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/SecurityPkg/Library/Tpm12CommandLib/Tpm12NvStorage.c b/SecurityPkg/Library/Tpm12CommandLib/Tpm12NvStorage.c index 7baafa8..e176b00 100644 --- a/SecurityPkg/Library/Tpm12CommandLib/Tpm12NvStorage.c +++ b/SecurityPkg/Library/Tpm12CommandLib/Tpm12NvStorage.c @@ -2,6 +2,7 @@ Implement TPM1.2 NV storage related command. Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. +(C) Copyright 2016 Hewlett Packard Enterprise Development LP 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 @@ -199,8 +200,9 @@ Tpm12NvWriteValue ( { EFI_STATUS Status; TPM_CMD_NV_WRITE_VALUE Command; + UINT32 CommandLength; TPM_RSP_COMMAND_HDR Response; - UINT32 Length; + UINT32 ResponseLength; if (DataSize > sizeof (Command.Data)) { return EFI_UNSUPPORTED; @@ -210,14 +212,15 @@ Tpm12NvWriteValue ( // send Tpm command TPM_ORD_NV_WriteValue // Command.Hdr.tag = SwapBytes16 (TPM_TAG_RQU_COMMAND); - Command.Hdr.paramSize = SwapBytes32 (sizeof (Command) - sizeof(Command.Data) + DataSize); + CommandLength = sizeof (Command) - sizeof(Command.Data) + DataSize; + Command.Hdr.paramSize = SwapBytes32 (CommandLength); Command.Hdr.ordinal = SwapBytes32 (TPM_ORD_NV_WriteValue); Command.NvIndex = SwapBytes32 (NvIndex); Command.Offset= SwapBytes32 (Offset); Command.DataSize = SwapBytes32 (DataSize); CopyMem (Command.Data, Data, DataSize); - Length = sizeof (Response); - Status = Tpm12SubmitCommand (Command.Hdr.paramSize, (UINT8 *), , (UINT8 *)); + ResponseLength = sizeof (Response); + Status = Tpm12SubmitCommand (CommandLength, (UINT8 *), , (UINT8 *)); if (EFI_ERROR (Status)) { return Status; } -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] SecurityPkg: Add DEBUG messages for TPM2Startup
Add DEBUG messages for TPM2Startup to distinguish between TPM_RC_SUCCESS and TPM_RC_INITIALIZE. This helps debugging some hardware problems. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- SecurityPkg/Library/Tpm2CommandLib/Tpm2Startup.c | 4 1 file changed, 4 insertions(+) diff --git a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Startup.c b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Startup.c index f67043b..dc2c562 100644 --- a/SecurityPkg/Library/Tpm2CommandLib/Tpm2Startup.c +++ b/SecurityPkg/Library/Tpm2CommandLib/Tpm2Startup.c @@ -2,6 +2,7 @@ Implement TPM2 Startup related command. Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved. +(C) Copyright 2016 Hewlett Packard Enterprise Development LP 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 @@ -75,8 +76,11 @@ Tpm2Startup ( ResponseCode = SwapBytes32(Res.Header.responseCode); switch (ResponseCode) { case TPM_RC_SUCCESS: +DEBUG ((DEBUG_INFO, "TPM2Startup: TPM_RC_SUCCESS\n")); +return EFI_SUCCESS; case TPM_RC_INITIALIZE: // TPM_RC_INITIALIZE can be returned if Tpm2Startup is not required. +DEBUG ((DEBUG_INFO, "TPM2Startup: TPM_RC_INITIALIZE\n")); return EFI_SUCCESS; default: DEBUG ((EFI_D_ERROR, "Tpm2Startup: Response Code error! 0x%08x\r\n", ResponseCode)); -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [staging/HTTPS-TLS][PATCH] CryptPkg: Cleanup TlsLib X509Store initialization
Cleanup TlsLib to create a new X509 store only if needed in TlsNew(), and set its flags when created, not every time we are adding a certificate (in TlsSetCaCertificate) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> Signed-off-by: Thomas Palmer <thomas.pal...@hpe.com> --- CryptoPkg/Library/TlsLib/TlsLib.c | 41 ++- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/CryptoPkg/Library/TlsLib/TlsLib.c b/CryptoPkg/Library/TlsLib/TlsLib.c index 0818653..b91fee7 100644 --- a/CryptoPkg/Library/TlsLib/TlsLib.c +++ b/CryptoPkg/Library/TlsLib/TlsLib.c @@ -130,7 +130,7 @@ TlsInitialize ( // Loads error strings from both crypto and ssl library. // SSL_load_error_strings (); - + /// OpenSSL_add_all_algorithms(); // @@ -274,6 +274,7 @@ TlsNew ( ) { TLS_CONNECTION *TlsConn; + X509_STORE *X509Store; TlsConn = NULL; @@ -342,6 +343,28 @@ TlsNew ( // SSL_set_bio (TlsConn->Ssl, TlsConn->InBio, TlsConn->OutBio); + + // + // Create new X509 store if needed + // + X509Store = SSL_CTX_get_cert_store (TlsConn->Ssl->ctx); + if (X509Store == NULL) { +X509Store = X509_STORE_new (); +if (X509Store == NULL) { + TlsFree ((VOID *) TlsConn); + return NULL; +} +SSL_CTX_set1_verify_cert_store (TlsConn->Ssl->ctx, X509Store); +X509_STORE_free (X509Store); + } + + // + // Set X509_STORE flags used in certificate validation + // + X509_STORE_set_flags ( +X509Store, +X509_V_FLAG_PARTIAL_CHAIN | X509_V_FLAG_NO_CHECK_TIME +); return (VOID *) TlsConn; } @@ -1473,15 +1496,13 @@ TlsSetCaCertificate ( X509Store = SSL_CTX_get_cert_store(TlsConn->Ssl->ctx); if (X509Store == NULL) { -X509Store = X509_STORE_new(); -if (X509Store == NULL) { Status = EFI_ABORTED; goto ON_EXIT; -} - -SSL_CTX_set_cert_store(TlsConn->Ssl->ctx, X509Store); } + // + // Add certificate to X509 store + // Ret = X509_STORE_add_cert (X509Store, Cert); if (Ret != 1) { ErrorCode = ERR_peek_last_error (); @@ -1493,14 +1514,8 @@ TlsSetCaCertificate ( Status = EFI_ABORTED; goto ON_EXIT; } - } - - X509_STORE_set_flags ( -X509Store, -X509_V_FLAG_PARTIAL_CHAIN | X509_V_FLAG_NO_CHECK_TIME -); - + ON_EXIT: if (BioCert != NULL) { BIO_free (BioCert); -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] ShellPkg: Update smbiosview for latest Type 17 devices
Update smbiosview to understand latest SMBIOS Type 17 devices from SMBIOS 3.0.0 spec Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- .../SmbiosView/QueryTable.c | 21 + 1 file changed, 21 insertions(+) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c index 759f486..d0106c0 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/QueryTable.c @@ -3,6 +3,7 @@ And give a interface of query a string out of a table. Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved. + (C) Copyright 2016 Hewlett Packard Enterprise Development LP 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 @@ -2303,6 +2304,26 @@ TABLE_ITEM MemoryDeviceTypeTable[] = { { 0x19, L" FBD2" + }, + { +0x1A, +L" DDR4" + }, + { +0x1B, +L" LPDDR" + }, + { +0x1C, +L" LPDDR2" + }, + { +0x1D, +L" LPDDR3" + }, + { +0x1E, +L" LPDDR4" } }; -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] CryptoPkg: Fix TLS Lib issue when certificate is added to store multiple times
Removed unnecessary error condition in TLS Lib that that would report an error if a certificate is being added to the X509_STORE more than once. This causes HTTPS to fail on second attempt with the same certificate. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> Signed-off-by: Thomas Palmer <thomas.pal...@hpe.com> --- CryptoPkg/Library/TlsLib/TlsLib.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/CryptoPkg/Library/TlsLib/TlsLib.c b/CryptoPkg/Library/TlsLib/TlsLib.c index e661375..0818653 100644 --- a/CryptoPkg/Library/TlsLib/TlsLib.c +++ b/CryptoPkg/Library/TlsLib/TlsLib.c @@ -2,6 +2,7 @@ SSL/TLS Library Wrapper Implementation over OpenSSL. Copyright (c) 2016, Intel Corporation. All rights reserved. +(C) Copyright 2016 Hewlett Packard Enterprise Development LP 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 @@ -16,6 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include +#include #define MAX_BUFFER_SIZE 32768 @@ -1429,6 +1431,7 @@ TlsSetCaCertificate ( EFI_STATUS Status; TLS_CONNECTION *TlsConn; INTNRet; + unsigned long ErrorCode; BioCert = NULL; Cert = NULL; @@ -1481,8 +1484,16 @@ TlsSetCaCertificate ( Ret = X509_STORE_add_cert (X509Store, Cert); if (Ret != 1) { -Status = EFI_ABORTED; -goto ON_EXIT; +ErrorCode = ERR_peek_last_error (); +// +// Ignore "already in table" errors +// +if (!(ERR_GET_FUNC (ErrorCode) == X509_F_X509_STORE_ADD_CERT && +ERR_GET_REASON (ErrorCode) == X509_R_CERT_ALREADY_IN_HASH_TABLE)) { + Status = EFI_ABORTED; + goto ON_EXIT; +} + } X509_STORE_set_flags ( -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] MdeModulePkg : Fix a bug in BmpImageDecoderLib
Fix a bug in BmpHeader parameter check Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.c b/MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.c index 6445c06..4102de8 100644 --- a/MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.c +++ b/MdeModulePkg/Library/BmpImageDecoderLib/BmpImageDecoderLib.c @@ -2,6 +2,7 @@ This library provides BMP image decoding capability. Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved. +(C) Copyright 2016 Hewlett Packard Enterprise Development LP This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -105,7 +106,7 @@ BmpImageDecoderLibConvertBmpToGopBlt ( if ((BmpHeader->Size != BmpImageSize) || (BmpHeader->Size < BmpHeader->ImageOffset) || - (BmpHeader->Size - BmpHeader->ImageOffset != BmpHeader->PixelHeight * DataSizePerLine)) { + (BmpHeader->Size - BmpHeader->ImageOffset != BmpHeader->ImageSize)) { return EFI_INVALID_PARAMETER; } -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] MdeModulePkg: Add HttpUtilLib
Add new HttpUtilLib that contains helper functions for HTTP Request/Response processing. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- MdeModulePkg/Include/Library/HttpUtilLib.h | 140 ++ .../Library/DxeHttpUtilLib/DxeHttpUtilLib.c| 525 + .../Library/DxeHttpUtilLib/DxeHttpUtilLib.h| 34 ++ .../Library/DxeHttpUtilLib/DxeHttpUtilLib.inf | 48 ++ MdeModulePkg/MdeModulePkg.dec | 6 + 5 files changed, 753 insertions(+) create mode 100644 MdeModulePkg/Include/Library/HttpUtilLib.h create mode 100644 MdeModulePkg/Library/DxeHttpUtilLib/DxeHttpUtilLib.c create mode 100644 MdeModulePkg/Library/DxeHttpUtilLib/DxeHttpUtilLib.h create mode 100644 MdeModulePkg/Library/DxeHttpUtilLib/DxeHttpUtilLib.inf diff --git a/MdeModulePkg/Include/Library/HttpUtilLib.h b/MdeModulePkg/Include/Library/HttpUtilLib.h new file mode 100644 index 000..db3166d --- /dev/null +++ b/MdeModulePkg/Include/Library/HttpUtilLib.h @@ -0,0 +1,140 @@ +/** @file + Header file for HTTP helper functions for Messages request/responses. + + (C) Copyright 2016 Hewlett Packard Enterprise Development LP + Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +**/ + +#ifndef __HTTP_UTIL_LIB_H__ +#define __HTTP_UTIL_LIB_H__ + +#include + +/// +/// Local Host IP address +/// +#define LOCAL_HOST "127.0.0.1" + +/// +/// HTTP Request Format Strings +/// + +#define HTTP_EOL "\r\n" + +#define HTTP_REQUEST_LINE_FORMAT "%a %a %a"HTTP_EOL + +#define HTTP_HEADER_FIELD_FORMAT "%a: %a"HTTP_EOL + + +/** + Find a specified header field according to the field name. + + @param[in] HeaderCount Number of HTTP header structures in Headers list. + @param[in] Headers Array containing list of HTTP headers. + @param[in] FieldNameNull terminated string which describes a field name. + + @returnPointer to the found header or NULL. + +**/ +EFI_HTTP_HEADER * +HttpFindHeader ( + IN UINTNHeaderCount, + IN EFI_HTTP_HEADER *Headers, + IN CHAR8*FieldName + ); + +/** + Set FieldName and FieldValue into specified HttpHeader. + + @param[in,out] HttpHeader Specified HttpHeader. + @param[in] FieldName FieldName of this HttpHeader, a NULL terminated ASCII string. + @param[in] FieldValue FieldValue of this HttpHeader, a NULL terminated ASCII string. + + + @retval EFI_SUCCESS The FieldName and FieldValue are set into HttpHeader successfully. + @retval EFI_OUT_OF_RESOURCESFailed to allocate resources. + +**/ +EFI_STATUS +SetFieldNameAndValue ( + IN OUT EFI_HTTP_HEADER *HttpHeader, + IN CONST CHAR8 *FieldName, + IN CONST CHAR8 *FieldValue + ); + +/** + Get one key/value header pair from the raw string. + + @param[in] String Pointer to the raw string. + @param[out] FieldName Points directly to field name within 'HttpHeader'. + @param[out] FieldValue Points directly to field value within 'HttpHeader'. + + @return Pointer to the next raw string. + @return NULL if no key/value header pair from this raw string. + +**/ +CHAR8 * +GetFieldNameAndValue ( + IN CHAR8 *String, + OUT CHAR8 **FieldName, + OUT CHAR8 **FieldValue + ); + +/** + Free existing HeaderFields. + + @param[in] HeaderFields Pointer to array of key/value header pairs waiting for free. + @param[in] FieldCount The number of header pairs in HeaderFields. + +**/ +VOID +FreeHeaderFields ( + IN EFI_HTTP_HEADER *HeaderFields, + IN UINTNFieldCount + ); + +/** + Generate HTTP request string. + + @param[in] MessagePointer to storage containing HTTP message data. + @param[in] UrlThe URL of a remote host. + @param[out] RequestString Pointer to the created HTTP request string. + NULL if any error occured. + + @return EFI_SUCCESS If HTTP request string was created successfully + @retval EFI_OUT_OF_RESOURCESFailed to allocate resources. + @retval EFI_INVALID_PARAMETER The input arguments are invalid + +**/ +EFI_STATUS +EFIAPI +HttpGenRequestString ( + IN CONST EFI_HTTP_MESSAGE*Message, + IN CONST CHAR8 *Url, + OUT CHAR8 **RequestString + ); + +/** + Translate
[edk2] [PATCH] MdePkg: Fix incorrect PCIe Extended Capabilities definition
The HeaderLog field of the PCIe Extended Capabilities Advanced Error Reporting structure was incorrectly defined as a 32-bit field. The PCIe 2.1 Base Specification, section 7.10, lists this as 16 bytes, or 4 DWORDs. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- MdePkg/Include/IndustryStandard/PciExpress21.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/IndustryStandard/PciExpress21.h b/MdePkg/Include/IndustryStandard/PciExpress21.h index a9915e0..57cfab2 100644 --- a/MdePkg/Include/IndustryStandard/PciExpress21.h +++ b/MdePkg/Include/IndustryStandard/PciExpress21.h @@ -2,6 +2,7 @@ Support for the latest PCI standard. Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved. + (C) Copyright 2016 Hewlett Packard Enterprise Development LP 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 @@ -90,7 +91,7 @@ typedef struct { UINT32CorrectableErrorStatus; UINT32CorrectableErrorMask; UINT32 AdvancedErrorCapabilitiesAndControl; - UINT32HeaderLog; + UINT32HeaderLog[4]; UINT32RootErrorCommand; UINT32RootErrorStatus; UINT16ErrorSourceIdentification; -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] MdePkg: Fix CPER GUID definitions to match UEFI spec
Rename gEfiProcessorSpecificErrorSectionGuid to gEfiIa32X64ErrorSectionGuid and introduce gEfiArmErrorSectionGuid to match the definition in the UEFI 2.6 specification Table 249. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- MdePkg/Include/Guid/Cper.h | 13 +++-- MdePkg/MdePkg.dec | 5 - 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/MdePkg/Include/Guid/Cper.h b/MdePkg/Include/Guid/Cper.h index 62493ef..5b3dcef 100644 --- a/MdePkg/Include/Guid/Cper.h +++ b/MdePkg/Include/Guid/Cper.h @@ -2,6 +2,7 @@ GUIDs and definitions used for Common Platform Error Record. Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved. + (C) Copyright 2016 Hewlett Packard Enterprise Development LP 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 @@ -23,6 +24,8 @@ #define EFI_ERROR_RECORD_SIGNATURE_START SIGNATURE_32('C', 'P', 'E', 'R') #define EFI_ERROR_RECORD_SIGNATURE_END 0x +#define EFI_ERROR_RECORD_REVISION 0x0101 + /// /// Error Severity in Error Record Header and Error Section Descriptor ///@{ @@ -137,6 +140,7 @@ typedef struct { /// } EFI_COMMON_ERROR_RECORD_HEADER; +#define EFI_ERROR_SECTION_REVISION 0x0100 /// /// Validity Fields in Error Section Descriptor. /// @@ -161,10 +165,14 @@ typedef struct { { \ 0x9876ccad, 0x47b4, 0x4bdb, { 0xb6, 0x5e, 0x16, 0xf1, 0x93, 0xc4, 0xf3, 0xdb } \ } -#define EFI_ERROR_SECTION_PROCESSOR_SPECIFIC_GUID \ +#define EFI_ERROR_SECTION_PROCESSOR_SPECIFIC_IA32X64_GUID \ { \ 0xdc3ea0b0, 0xa144, 0x4797, { 0xb9, 0x5b, 0x53, 0xfa, 0x24, 0x2b, 0x6e, 0x1d } \ } +#define EFI_ERROR_SECTION_PROCESSOR_SPECIFIC_ARM_GUID \ + { \ +0xe19e3d16, 0xbc11, 0x11e4, { 0x9c, 0xaa, 0xc2, 0x05, 0x1d, 0x5d, 0x46, 0xb0 } \ + } #define EFI_ERROR_SECTION_PLATFORM_MEMORY_GUID \ { \ 0xa5bc1114, 0x6f64, 0x4ede, { 0xb8, 0x63, 0x3e, 0x83, 0xed, 0x7c, 0x83, 0xb1 } \ @@ -1177,7 +1185,8 @@ extern EFI_GUID gEfiEventNotificationTypeBootGuid; extern EFI_GUID gEfiEventNotificationTypeDmarGuid; extern EFI_GUID gEfiProcessorGenericErrorSectionGuid; -extern EFI_GUID gEfiProcessorSpecificErrorSectionGuid; +extern EFI_GUID gEfiIa32X64ErrorSectionGuid; +extern EFI_GUID gEfiArmErrorSectionGuid; extern EFI_GUID gEfiPlatformMemoryErrorSectionGuid; extern EFI_GUID gEfiPlatformMemory2ErrorSectionGuid; extern EFI_GUID gEfiPcieErrorSectionGuid; diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec index c49f1ce..3c1c8e9 100644 --- a/MdePkg/MdePkg.dec +++ b/MdePkg/MdePkg.dec @@ -6,6 +6,7 @@ # # Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved. # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved. +# (C) Copyright 2016 Hewlett Packard Enterprise Development LP # # This program and the accompanying materials are licensed and made available under # the terms and conditions of the BSD License which accompanies this distribution. @@ -427,9 +428,11 @@ gEfiProcessorGenericErrorSectionGuid = { 0x9876ccad, 0x47b4, 0x4bdb, { 0xb6, 0x5e, 0x16, 0xf1, 0x93, 0xc4, 0xf3, 0xdb }} ## Include/Guid/Cper.h - gEfiProcessorSpecificErrorSectionGuid = { 0xdc3ea0b0, 0xa144, 0x4797, { 0xb9, 0x5b, 0x53, 0xfa, 0x24, 0x2b, 0x6e, 0x1d }} + gEfiIa32X64ErrorSectionGuid= { 0xdc3ea0b0, 0xa144, 0x4797, { 0xb9, 0x5b, 0x53, 0xfa, 0x24, 0x2b, 0x6e, 0x1d }} ## Include/Guid/Cper.h + gEfiArmErrorSectionGuid= { 0xe19e3d16, 0xbc11, 0x11e4, { 0x9c, 0xaa, 0xc2, 0x05, 0x1d, 0x5d, 0x46, 0xb0 }} + ## Include/Guid/Cper.h gEfiPlatformMemoryErrorSectionGuid = { 0xa5bc1114, 0x6f64, 0x4ede, { 0xb8, 0x63, 0x3e, 0x83, 0xed, 0x7c, 0x83, 0xb1 }} ## Include/Guid/Cper.h -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2 2/2] NetworkPkg: Use Http11 definitions in HttpDxe and HttpBootDxe
Change HttpDxe and HttpBootDxe to use the standard definitions from Http11.h instead of private duplicate definitions. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- NetworkPkg/HttpBootDxe/HttpBootClient.c | 7 --- NetworkPkg/HttpBootDxe/HttpBootClient.h | 4 +--- NetworkPkg/HttpBootDxe/HttpBootDxe.h| 3 +++ NetworkPkg/HttpDxe/HttpDriver.h | 2 ++ NetworkPkg/HttpDxe/HttpImpl.h | 10 ++ NetworkPkg/HttpDxe/HttpProto.c | 16 ++-- 6 files changed, 22 insertions(+), 20 deletions(-) diff --git a/NetworkPkg/HttpBootDxe/HttpBootClient.c b/NetworkPkg/HttpBootDxe/HttpBootClient.c index dd835c4..2ccac8c 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootClient.c +++ b/NetworkPkg/HttpBootDxe/HttpBootClient.c @@ -2,6 +2,7 @@ Implementation of the boot file download function. Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. +(C) Copyright 2016 Hewlett Packard Enterprise Development LP This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -807,7 +808,7 @@ HttpBootGetBootFile ( } Status = HttpBootSetHeader ( HttpIoHeader, - HTTP_FIELD_NAME_HOST, + HTTP_HEADER_HOST, HostName ); FreePool (HostName); @@ -820,7 +821,7 @@ HttpBootGetBootFile ( // Status = HttpBootSetHeader ( HttpIoHeader, - HTTP_FIELD_NAME_ACCEPT, + HTTP_HEADER_ACCEPT, "*/*" ); if (EFI_ERROR (Status)) { @@ -832,7 +833,7 @@ HttpBootGetBootFile ( // Status = HttpBootSetHeader ( HttpIoHeader, - HTTP_FIELD_NAME_USER_AGENT, + HTTP_HEADER_USER_AGENT, HTTP_USER_AGENT_EFI_HTTP_BOOT ); if (EFI_ERROR (Status)) { diff --git a/NetworkPkg/HttpBootDxe/HttpBootClient.h b/NetworkPkg/HttpBootDxe/HttpBootClient.h index e618316..b929fa7 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootClient.h +++ b/NetworkPkg/HttpBootDxe/HttpBootClient.h @@ -2,6 +2,7 @@ Declaration of the boot file download function. Copyright (c) 2015, Intel Corporation. All rights reserved. +(C) Copyright 2016 Hewlett Packard Enterprise Development LP This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -18,9 +19,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define HTTP_BOOT_REQUEST_TIMEOUT5000 // 5 seconds in uints of millisecond. #define HTTP_BOOT_BLOCK_SIZE 1500 -#define HTTP_FIELD_NAME_USER_AGENT "User-Agent" -#define HTTP_FIELD_NAME_HOST "Host" -#define HTTP_FIELD_NAME_ACCEPT "Accept" #define HTTP_USER_AGENT_EFI_HTTP_BOOT"UefiHttpBoot/1.0" diff --git a/NetworkPkg/HttpBootDxe/HttpBootDxe.h b/NetworkPkg/HttpBootDxe/HttpBootDxe.h index 452c8f4..08f88c5 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootDxe.h +++ b/NetworkPkg/HttpBootDxe/HttpBootDxe.h @@ -2,6 +2,7 @@ UEFI HTTP boot driver's private data structure and interfaces declaration. Copyright (c) 2015, Intel Corporation. All rights reserved. +(C) Copyright 2016 Hewlett Packard Enterprise Development LP This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -17,6 +18,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include +#include + // // Libraries // diff --git a/NetworkPkg/HttpDxe/HttpDriver.h b/NetworkPkg/HttpDxe/HttpDriver.h index 138f56c..9c0002a 100644 --- a/NetworkPkg/HttpDxe/HttpDriver.h +++ b/NetworkPkg/HttpDxe/HttpDriver.h @@ -2,6 +2,7 @@ The header files of the driver binding and service binding protocol for HttpDxe driver. Copyright (c) 2015, Intel Corporation. All rights reserved. + (C) Copyright 2016 Hewlett Packard Enterprise Development LP This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -17,6 +18,7 @@ #define __EFI_HTTP_DRIVER_H__ #include +#include // // Libraries diff --git a/NetworkPkg/HttpDxe/HttpImpl.h b/NetworkPkg/HttpDxe/HttpImpl.h index 3822842..415b5e5 100644 --- a/NetworkPkg/HttpDxe/HttpImpl.h +++ b/NetworkPkg/HttpDxe/HttpImpl.h @@ -2,6 +2,7 @@ The header files of implementation of EFI_HTTP_PROTOCOL protocol interfaces. Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved. + (C) Copyright 2016 Hewle
[edk2] [PATCH v2 1/2] MdePkg: Update Http11 with additional useful definitions
Add additional HTTP 1.1 definitions that are useful in HTTP applications, such as User-Agent, Location, and x-Auth-Token Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- MdePkg/Include/IndustryStandard/Http11.h | 54 +--- 1 file changed, 43 insertions(+), 11 deletions(-) diff --git a/MdePkg/Include/IndustryStandard/Http11.h b/MdePkg/Include/IndustryStandard/Http11.h index 6c22f94..8a09f96 100644 --- a/MdePkg/Include/IndustryStandard/Http11.h +++ b/MdePkg/Include/IndustryStandard/Http11.h @@ -3,7 +3,7 @@ This file contains common HTTP 1.1 definitions from RFC 2616 - (C) Copyright 2015 Hewlett Packard Enterprise Development LP + (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP 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 @@ -26,7 +26,6 @@ /// #define HTTP_VERSION"HTTP/1.1" - /// /// HTTP Request Method definitions /// @@ -43,7 +42,11 @@ #define HTTP_METHOD_CONNECT "CONNECT" #define HTTP_METHOD_PATCH "PATCH" -#define HTTP_METHOD_MAXIMUM_LEN sizeof ("CONNECT") +/// +/// Connect method has maximum length according to EFI_HTTP_METHOD defined in +/// UEFI2.5 spec so use this. +/// +#define HTTP_METHOD_MAXIMUM_LEN sizeof (HTTP_METHOD_CONNECT) /// /// Accept Request Header @@ -106,7 +109,7 @@ #define HTTP_CONTENT_ENCODING_GZIP "gzip" /// Content-Encoding: GNU zip format (described in RFC 1952). #define HTTP_CONTENT_ENCODING_COMPRESS "compress" /// encoding format produced by the common UNIX file compression program "compress". #define HTTP_CONTENT_ENCODING_DEFLATE "deflate" /// The "zlib" format defined in RFC 1950 in combination with the "deflate" -/// compression mechanism described in RFC 1951. + /// compression mechanism described in RFC 1951. /// @@ -152,13 +155,37 @@ /// +/// User Agent Request Header +/// +/// The User-Agent request-header field contains information about the user agent originating +/// the request. This is for statistical purposes, the tracing of protocol violations, and +/// automated recognition of user agents for the sake of tailoring responses to avoid +/// particular user agent limitations. User agents SHOULD include this field with requests. +/// The field can contain multiple product tokens and comments identifying the agent and any +/// subproducts which form a significant part of the user agent. +/// By convention, the product tokens are listed in order of their significance for +/// identifying the application. +/// +#define HTTP_HEADER_USER_AGENT "User-Agent" + +/// /// Host Request Header /// /// The Host request-header field specifies the Internet host and port number of the resource /// being requested, as obtained from the original URI given by the user or referring resource /// -#define HTTP_HEADER_HOST "Host" +#define HTTP_HEADER_HOST "Host" +/// +/// Location Response Header +/// +/// The Location response-header field is used to redirect the recipient to a location other than +/// the Request-URI for completion of the request or identification of a new resource. +/// For 201 (Created) responses, the Location is that of the new resource which was created by +/// the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for +/// automatic redirection to the resource. The field value consists of a single absolute URI. +/// +#define HTTP_HEADER_LOCATION "Location" /// /// The If-Match request-header field is used with a method to make it conditional. @@ -170,7 +197,7 @@ /// to prevent inadvertent modification of the wrong version of a resource. /// As a special case, the value "*" matches any current entity of the resource. /// -#define HTTP_HEADER_IF_MATCH "If-Match" +#define HTTP_HEADER_IF_MATCH "If-Match" /// @@ -182,7 +209,7 @@ /// to prevent a method (e.g. PUT) from inadvertently modifying an existing resource when the /// client believes that the resource does not exist. /// -#define HTTP_HEADER_IF_NONE_MATCH "If-None-Match" +#define HTTP_HEADER_IF_NONE_MATCH "If-None-Match" @@ -192,17 +219,22 @@ /// containing the authentication information of the user agent for /// the realm of the resource being requested. /// -#define HTTP_HEADER_AUTHORIZATION "Authorization" +#define HTTP_HEADER_AUTHORIZATION "Authorization" /// /// ET
[edk2] [PATCH] NetworkPkg: better sanity check on Ipv6 prefix length
Fix a possible buffer overrun issue that could occur if PrefixLength > 128 . Changed == 128 to >= 128. Also remove check for Byte < 16, which is no longer possible because of the first change. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- NetworkPkg/Ip6Dxe/Ip6Icmp.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/NetworkPkg/Ip6Dxe/Ip6Icmp.c b/NetworkPkg/Ip6Dxe/Ip6Icmp.c index db40b81..f6a9bb4 100644 --- a/NetworkPkg/Ip6Dxe/Ip6Icmp.c +++ b/NetworkPkg/Ip6Dxe/Ip6Icmp.c @@ -2,7 +2,8 @@ The ICMPv6 handle routines to process the ICMPv6 control messages. Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved. - + (C) Copyright 2016 Hewlett Packard Enterprise Development LP + 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 @@ -479,7 +480,7 @@ Ip6GetPrefix ( return ; } - if (PrefixLength == IP6_PREFIX_NUM - 1) { + if (PrefixLength >= IP6_PREFIX_NUM - 1) { return ; } @@ -487,7 +488,7 @@ Ip6GetPrefix ( Bit = (UINT8) (PrefixLength % 8); Value = Prefix->Addr[Byte]; - if ((Byte > 0) && (Byte < 16)) { + if (Byte > 0) { ZeroMem (Prefix->Addr + Byte, 16 - Byte); } -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] NetworkPkg: Reword PXE download message
Fix a minor grammatical error in the PXE boot message. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c index 2531153..5be82dc 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcBoot.c @@ -2,6 +2,7 @@ Boot functions implementation for UefiPxeBc Driver. Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved. + (C) Copyright 2016 Hewlett Packard Enterprise Development LP This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -1228,7 +1229,7 @@ ON_EXIT: PxeBcUninstallCallback(Private, NewMakeCallback); if (Status == EFI_SUCCESS) { -AsciiPrint ("\n Succeed to download NBP file.\n"); +AsciiPrint ("\n NBP file downloaded successfully.\n"); return EFI_SUCCESS; } else if (Status == EFI_BUFFER_TOO_SMALL && Buffer != NULL) { AsciiPrint ("\n PXE-E05: Buffer size is smaller than the requested file.\n"); -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 1/2] MdePkg: Update Http11 with additional useful definitions
Add additional HTTP 1.1 definitions that are useful in HTTP applications, such as User-Agent, Location, and HTTP Version string with and without the CRLF. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- MdePkg/Include/IndustryStandard/Http11.h | 51 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/MdePkg/Include/IndustryStandard/Http11.h b/MdePkg/Include/IndustryStandard/Http11.h index 6c22f94..44de8c8 100644 --- a/MdePkg/Include/IndustryStandard/Http11.h +++ b/MdePkg/Include/IndustryStandard/Http11.h @@ -3,7 +3,7 @@ This file contains common HTTP 1.1 definitions from RFC 2616 - (C) Copyright 2015 Hewlett Packard Enterprise Development LP + (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP 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 @@ -24,8 +24,8 @@ /// The version of an HTTP message is indicated by an HTTP-Version field /// in the first line of the message. /// -#define HTTP_VERSION"HTTP/1.1" - +#define HTTP_VERSION_STR "HTTP/1.1" +#define HTTP_VERSION_CRLF_STR " HTTP/1.1\r\n" /// /// HTTP Request Method definitions @@ -43,7 +43,11 @@ #define HTTP_METHOD_CONNECT "CONNECT" #define HTTP_METHOD_PATCH "PATCH" -#define HTTP_METHOD_MAXIMUM_LEN sizeof ("CONNECT") +/// +/// Connect method has maximum length according to EFI_HTTP_METHOD defined in +/// UEFI2.5 spec so use this. +/// +#define HTTP_METHOD_MAXIMUM_LEN sizeof (HTTP_METHOD_CONNECT) /// /// Accept Request Header @@ -106,7 +110,7 @@ #define HTTP_CONTENT_ENCODING_GZIP "gzip" /// Content-Encoding: GNU zip format (described in RFC 1952). #define HTTP_CONTENT_ENCODING_COMPRESS "compress" /// encoding format produced by the common UNIX file compression program "compress". #define HTTP_CONTENT_ENCODING_DEFLATE "deflate" /// The "zlib" format defined in RFC 1950 in combination with the "deflate" -/// compression mechanism described in RFC 1951. + /// compression mechanism described in RFC 1951. /// @@ -152,13 +156,37 @@ /// +/// User Agent Request Header +/// +/// The User-Agent request-header field contains information about the user agent originating +/// the request. This is for statistical purposes, the tracing of protocol violations, and +/// automated recognition of user agents for the sake of tailoring responses to avoid +/// particular user agent limitations. User agents SHOULD include this field with requests. +/// The field can contain multiple product tokens and comments identifying the agent and any +/// subproducts which form a significant part of the user agent. +/// By convention, the product tokens are listed in order of their significance for +/// identifying the application. +/// +#define HTTP_HEADER_USER_AGENT "User-Agent" + +/// /// Host Request Header /// /// The Host request-header field specifies the Internet host and port number of the resource /// being requested, as obtained from the original URI given by the user or referring resource /// -#define HTTP_HEADER_HOST "Host" +#define HTTP_HEADER_HOST "Host" +/// +/// Location Response Header +/// +/// The Location response-header field is used to redirect the recipient to a location other than +/// the Request-URI for completion of the request or identification of a new resource. +/// For 201 (Created) responses, the Location is that of the new resource which was created by +/// the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for +/// automatic redirection to the resource. The field value consists of a single absolute URI. +/// +#define HTTP_HEADER_LOCATION "Location" /// /// The If-Match request-header field is used with a method to make it conditional. @@ -170,7 +198,7 @@ /// to prevent inadvertent modification of the wrong version of a resource. /// As a special case, the value "*" matches any current entity of the resource. /// -#define HTTP_HEADER_IF_MATCH "If-Match" +#define HTTP_HEADER_IF_MATCH "If-Match" /// @@ -182,7 +210,7 @@ /// to prevent a method (e.g. PUT) from inadvertently modifying an existing resource when the /// client believes that the resource does not exist. /// -#define HTTP_HEADER_IF_NONE_MATCH "If-None-Match" +#define HTTP_HEADER_IF_NONE_MATCH "If-None-Match" @@ -192,17 +220,16 @@ /// containing
[edk2] [PATCH v2] Add DEBUG messages in DxeImageerificationLib to help debug Secure Boot image verification failures
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- .../Library/DxeImageVerificationLib/DxeImageVerificationLib.c | 8 1 file changed, 8 insertions(+) diff --git a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c index 4b4d3bf..b694e10 100644 --- a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c +++ b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c @@ -13,6 +13,7 @@ untrusted PE/COFF image and validate its data structure within this image buffer before use. Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved. +(C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -2259,6 +2260,7 @@ DxeImageVerificationHandler ( // // The information can't be got from the invalid PeImage // +DEBUG ((DEBUG_ERROR, "DxeImageVerificationLib: PeImage invalid. Cannot retrieve image information.\n")); goto Done; } @@ -2282,6 +2284,7 @@ DxeImageVerificationHandler ( // // It is not a valid Pe/Coff file. // +DEBUG ((DEBUG_ERROR, "DxeImageVerificationLib: Not a valid PE/COFF image.\n")); goto Done; } @@ -2327,6 +2330,7 @@ DxeImageVerificationHandler ( // and not be reflected in the security data base "dbx". // if (!HashPeImage (HASHALG_SHA256)) { + DEBUG ((DEBUG_ERROR, "DxeImageVerificationLib: Failed to hash this image using SHA256.\n")); goto Done; } @@ -2334,6 +2338,7 @@ DxeImageVerificationHandler ( // // Image Hash is in forbidden database (DBX). // + DEBUG ((DEBUG_ERROR, "DxeImageVerificationLib: Image is not signed and SHA256 hash of image is in DBX.\n")); goto Done; } @@ -2347,6 +2352,7 @@ DxeImageVerificationHandler ( // // Image Hash is not found in both forbidden and allowed database. // +DEBUG ((DEBUG_ERROR, "DxeImageVerificationLib: Image is not signed and SHA256 hash of image is not found in DB/DBX.\n")); goto Done; } @@ -2409,6 +2415,7 @@ DxeImageVerificationHandler ( if (IsForbiddenByDbx (AuthData, AuthDataSize, FALSE, NULL, NULL)) { Action = EFI_IMAGE_EXECUTION_AUTH_SIG_FAILED; VerifyStatus = EFI_ACCESS_DENIED; + DEBUG ((DEBUG_ERROR, "DxeImageVerificationLib: Image is signed but signature is rejcected by DBX.\n")); break; } @@ -2426,6 +2433,7 @@ DxeImageVerificationHandler ( // if (IsSignatureFoundInDatabase (EFI_IMAGE_SECURITY_DATABASE1, mImageDigest, , mImageDigestSize)) { Action = EFI_IMAGE_EXECUTION_AUTH_SIG_FOUND; + DEBUG ((DEBUG_ERROR, "DxeImageVerificationLib: Image is signed but digital signature failed validation and SHA256 hash of image is in DBX.\n")); VerifyStatus = EFI_ACCESS_DENIED; break; } else if (EFI_ERROR (VerifyStatus)) { -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2] ShellPkg : Add UEFI_APPLICATION module type to UefiShellInstall1CommandsLib.inf
Using UEFI_APPLICATION for all Shell app and libraries allows the use of different compiler flags for the Shell application itself and for other applications that are built separately that use Shell libraries. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- .../UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf b/ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf index dc1b622..7ea306d 100644 --- a/ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf +++ b/ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf @@ -2,6 +2,7 @@ # Provides shell install1 functions # # Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved. +# (C) Copyright 2015 Hewlett Packard Enterprise Development LP # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -16,7 +17,7 @@ INF_VERSION= 0x00010006 BASE_NAME = UefiShellInstall1CommandsLib FILE_GUID = D250E364-51C6-49ed-AEBF-6D83F5130F74 - MODULE_TYPE= UEFI_DRIVER + MODULE_TYPE= UEFI_DRIVER UEFI_APPLICATION VERSION_STRING = 1.0 LIBRARY_CLASS = NULL|UEFI_APPLICATION UEFI_DRIVER CONSTRUCTOR= ShellInstall1CommandsLibConstructor -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] SecurityPkg : Add DEBUG messages in image verification
Add DEBUG messages in DxeImageerificationLib to help debug Secure Boot image verification failures Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- .../Library/DxeImageVerificationLib/DxeImageVerificationLib.c| 9 + 1 file changed, 9 insertions(+) diff --git a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c index 4b4d3bf..888cd04 100644 --- a/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c +++ b/SecurityPkg/Library/DxeImageVerificationLib/DxeImageVerificationLib.c @@ -13,6 +13,7 @@ untrusted PE/COFF image and validate its data structure within this image buffer before use. Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved. +(C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -2259,6 +2260,7 @@ DxeImageVerificationHandler ( // // The information can't be got from the invalid PeImage // +DEBUG ((DEBUG_ERROR, "PeImage invald. Cannot retrieve image information.\n")); goto Done; } @@ -2282,6 +2284,7 @@ DxeImageVerificationHandler ( // // It is not a valid Pe/Coff file. // +DEBUG ((DEBUG_ERROR, "Not a valid PE/COFF image.\n")); goto Done; } @@ -2327,6 +2330,7 @@ DxeImageVerificationHandler ( // and not be reflected in the security data base "dbx". // if (!HashPeImage (HASHALG_SHA256)) { + DEBUG ((DEBUG_ERROR, "Failed to hash this image.\n")); goto Done; } @@ -2334,6 +2338,7 @@ DxeImageVerificationHandler ( // // Image Hash is in forbidden database (DBX). // + DEBUG ((DEBUG_ERROR, "Image is not signed and hash is in DBX.\n")); goto Done; } @@ -2347,6 +2352,7 @@ DxeImageVerificationHandler ( // // Image Hash is not found in both forbidden and allowed database. // +DEBUG ((DEBUG_ERROR, "Image is not signed and hash is not found in DB/DBX.\n")); goto Done; } @@ -2409,6 +2415,7 @@ DxeImageVerificationHandler ( if (IsForbiddenByDbx (AuthData, AuthDataSize, FALSE, NULL, NULL)) { Action = EFI_IMAGE_EXECUTION_AUTH_SIG_FAILED; VerifyStatus = EFI_ACCESS_DENIED; + DEBUG ((DEBUG_ERROR, "Image is signed but digital signature is in DBX.\n")); break; } @@ -2426,11 +2433,13 @@ DxeImageVerificationHandler ( // if (IsSignatureFoundInDatabase (EFI_IMAGE_SECURITY_DATABASE1, mImageDigest, , mImageDigestSize)) { Action = EFI_IMAGE_EXECUTION_AUTH_SIG_FOUND; + DEBUG ((DEBUG_ERROR, "Image is signed but digital signature failed validation and hash is in DBX.\n")); VerifyStatus = EFI_ACCESS_DENIED; break; } else if (EFI_ERROR (VerifyStatus)) { if (IsSignatureFoundInDatabase (EFI_IMAGE_SECURITY_DATABASE, mImageDigest, , mImageDigestSize)) { VerifyStatus = EFI_SUCCESS; +DEBUG ((DEBUG_ERROR, "Image is signed but digital signature failed validation and hash is not found in DB/DBX.\n")); } } } -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] ShellPkg: Add AIP IPv6 UNDI support to Shell dh
Update Shell DH command to decode and print the value of gEfiAdapterInfoUndiIpv6SupportGuid AIP instance Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- .../UefiHandleParsingLib/UefiHandleParsingLib.c | 21 +++-- .../UefiHandleParsingLib/UefiHandleParsingLib.inf | 4 +++- .../UefiHandleParsingLib/UefiHandleParsingLib.uni | 4 +++- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c index 6f093ff..4c46e5e 100644 --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c @@ -1,9 +1,9 @@ /** @file Provides interface to advanced shell functionality for parsing both handle and protocol database. - (C) Copyright 2015 Hewlett Packard Enterprise Development LP - (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P. Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved. + (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P. + (C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -690,6 +690,10 @@ AdapterInformationDumpInformation ( TempRetVal = CatSPrint (RetVal, TempStr, L"gEfiAdapterInfoSanMacAddressGuid"); SHELL_FREE_NON_NULL (RetVal); RetVal = TempRetVal; + } else if (CompareGuid ([GuidIndex], )) { +TempRetVal = CatSPrint (RetVal, TempStr, L"gEfiAdapterInfoUndiIpv6SupportGuid"); +SHELL_FREE_NON_NULL (RetVal); +RetVal = TempRetVal; } else { GuidStr = GetStringNameFromGuid ([GuidIndex], NULL); @@ -782,6 +786,19 @@ AdapterInformationDumpInformation ( ); SHELL_FREE_NON_NULL (RetVal); RetVal = TempRetVal; +} else if (CompareGuid ([GuidIndex], ) == TRUE) { + TempStr = HiiGetString (mHandleParsingHiiHandle, STRING_TOKEN(STR_UNDI_IPV6_INFO), NULL); + if (TempStr == NULL) { +goto ERROR_EXIT; + } + + TempRetVal = CatSPrint ( + RetVal, + TempStr, + ((EFI_ADAPTER_INFO_UNDI_IPV6_SUPPORT *)InformationBlock)->Ipv6Support + ); + SHELL_FREE_NON_NULL (RetVal); + RetVal = TempRetVal; } else { TempStr = HiiGetString (mHandleParsingHiiHandle, STRING_TOKEN(STR_UNKNOWN_INFO_TYPE), NULL); if (TempStr == NULL) { diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf index 4a19e39..52eed86 100644 --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.inf @@ -1,7 +1,8 @@ ## @file # Provides interface to advanced shell functionality for parsing both handle and protocol database. -# (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P. # Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved. +# (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P. +# (C) Copyright 2015 Hewlett Packard Enterprise Development LP # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -309,6 +310,7 @@ gEfiAdapterInfoMediaStateGuid ## SOMETIMES_CONSUMES ## GUID gEfiAdapterInfoNetworkBootGuid ## SOMETIMES_CONSUMES ## GUID gEfiAdapterInfoSanMacAddressGuid## SOMETIMES_CONSUMES ## GUID + gEfiAdapterInfoUndiIpv6SupportGuid ## SOMETIMES_CONSUMES ## GUID [Pcd.common] gEfiShellPkgTokenSpaceGuid.PcdShellPrintBufferSize ## CONSUMES diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni index f7d5485..3dd8896 100644 --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.uni @@ -1,7 +1,8 @@ // /** // -// (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P. // Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved. +// (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P. +// (C) Copyright 2015 Hewlett Packard Enterprise Development LP // 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
[edk2] [PATCH] NetworkPkg : Remove unused local variables to fix gcc build errors
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- NetworkPkg/HttpDxe/HttpProto.c | 4 1 file changed, 4 deletions(-) diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c index 85f8401..7e959d5 100644 --- a/NetworkPkg/HttpDxe/HttpProto.c +++ b/NetworkPkg/HttpDxe/HttpProto.c @@ -562,13 +562,9 @@ HttpCloseTcpRxEvent ( ) { HTTP_PROTOCOL*HttpInstance; - EFI_TCP4_IO_TOKEN*Rx4Token; - EFI_TCP6_IO_TOKEN*Rx6Token; ASSERT (Wrap != NULL); HttpInstance = Wrap->HttpInstance; - Rx4Token = NULL; - Rx6Token = NULL; if (HttpInstance->LocalAddressIsIPv6) { if (Wrap->TcpWrap.Rx6Token.CompletionToken.Event != NULL) { -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] ShellPkg : Change UefiShellInstall1CommandsLib.inf type to UEFI_APPLICATION
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- .../UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf b/ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf index dc1b622..b2644c2 100644 --- a/ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf +++ b/ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf @@ -2,6 +2,7 @@ # Provides shell install1 functions # # Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved. +# (C) Copyright 2015 Hewlett Packard Enterprise Development LP # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -16,7 +17,7 @@ INF_VERSION= 0x00010006 BASE_NAME = UefiShellInstall1CommandsLib FILE_GUID = D250E364-51C6-49ed-AEBF-6D83F5130F74 - MODULE_TYPE= UEFI_DRIVER + MODULE_TYPE= UEFI_APPLICATION VERSION_STRING = 1.0 LIBRARY_CLASS = NULL|UEFI_APPLICATION UEFI_DRIVER CONSTRUCTOR= ShellInstall1CommandsLibConstructor -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] SecurityPkg - Rename TisTpmCommand to avoid name collision
Rename TisTpmCommand to Tpm2TisTpmCommand to naming collision with similar function name in other libraries. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Tis.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Tis.c b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Tis.c index b7dd57d..1276aea 100644 --- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Tis.c +++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Tis.c @@ -370,7 +370,7 @@ TisPcRequestUseTpm ( **/ EFI_STATUS -TisTpmCommand ( +Tpm2TisTpmCommand ( IN TIS_PC_REGISTERS_PTR TisReg, IN UINT8 *BufferIn, IN UINT32 SizeIn, @@ -478,7 +478,7 @@ TisTpmCommand ( } } DEBUG_CODE ( -DEBUG ((EFI_D_VERBOSE, "TisTpmCommand ReceiveHeader - ")); +DEBUG ((EFI_D_VERBOSE, "Tpm2TisTpmCommand ReceiveHeader - ")); for (Index = 0; Index < sizeof (TPM2_RESPONSE_HEADER); Index++) { DEBUG ((EFI_D_VERBOSE, "%02x ", BufferOut[Index])); } @@ -553,7 +553,7 @@ DTpm2SubmitCommand ( IN UINT8 *OutputParameterBlock ) { - return TisTpmCommand ( + return Tpm2TisTpmCommand ( (TIS_PC_REGISTERS_PTR) (UINTN) PcdGet64 (PcdTpmBaseAddress), InputParameterBlock, InputParameterBlockSize, -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] MdePkg : Update SPCR to use ACPI5 definition
Update BaseAddress in the SPCR structure to use EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h b/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h index bf29505..d57518d 100644 --- a/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h +++ b/MdePkg/Include/IndustryStandard/SerialPortConsoleRedirectionTable.h @@ -3,6 +3,7 @@ http://www.microsoft.com/whdc/system/platform/server/spcr.mspx Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved. + (C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -35,7 +36,7 @@ typedef struct { EFI_ACPI_DESCRIPTION_HEADER Header; UINT8 InterfaceType; UINT8 Reserved1[3]; - EFI_ACPI_2_0_GENERIC_ADDRESS_STRUCTURE BaseAddress; + EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE BaseAddress; UINT8 InterruptType; UINT8 Irq; UINT32 GlobalSystemInterrupt; -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v3] MdeModulePkg: Add HTTP 1.1 industry standard definitions
Add common HTTP 1.1 industry standard definitions for use in HTTP clients/applications. List includes: HTTP methods, request/response headers, and encodings. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- MdePkg/Include/IndustryStandard/Http11.h | 208 +++ 1 file changed, 208 insertions(+) create mode 100644 MdePkg/Include/IndustryStandard/Http11.h diff --git a/MdePkg/Include/IndustryStandard/Http11.h b/MdePkg/Include/IndustryStandard/Http11.h new file mode 100644 index 000..ddf6519 --- /dev/null +++ b/MdePkg/Include/IndustryStandard/Http11.h @@ -0,0 +1,208 @@ +/** @file + Hypertext Transfer Protocol -- HTTP/1.1 Standard definitions, from RFC 2616 + + This file contains common HTTP 1.1 definitions from RFC 2616 + + (C) Copyright 2015 Hewlett Packard Enterprise Development LP + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +**/ + +#ifndef __HTTP_11_H__ +#define __HTTP_11_H__ + +#pragma pack(1) + +/// +/// HTTP Version (currently HTTP 1.1) +/// +/// The version of an HTTP message is indicated by an HTTP-Version field +/// in the first line of the message. +/// +#define HTTP_VERSION"HTTP/1.1" + + +/// +/// HTTP Request Method definitions +/// +/// The Method token indicates the method to be performed on the +/// resource identified by the Request-URI. The method is case-sensitive. +/// +#define HTTP_METHOD_OPTIONS "OPTIONS" +#define HTTP_METHOD_GET "GET" +#define HTTP_METHOD_HEAD"HEAD" +#define HTTP_METHOD_POST"POST" +#define HTTP_METHOD_PUT "PUT" +#define HTTP_METHOD_DELETE "DELETE" +#define HTTP_METHOD_TRACE "TRACE" +#define HTTP_METHOD_CONNECT "CONNECT" +#define HTTP_METHOD_PATCH "PATCH" + +#define HTTP_METHOD_MAXIMUM_LEN sizeof ("CONNECT") + +/// +/// Accept Request Header +/// The Accept request-header field can be used to specify certain media types which are +/// acceptable for the response. Accept headers can be used to indicate that the request +/// is specifically limited to a small set of desired types, as in the case of a request +/// for an in-line image. +/// +#define HTTP_HEADER_ACCEPT "Accept" + + +/// +/// Accept-Charset Request Header +/// The Accept-Charset request-header field can be used to indicate what character sets +/// are acceptable for the response. This field allows clients capable of understanding +/// more comprehensive or special-purpose character sets to signal that capability to a +/// server which is capable of representing documents in those character sets. +/// +#define HTTP_HEADER_ACCEPT_CHARSET "Accept-Charset" + +/// +/// Accept-Language Request Header +/// The Accept-Language request-header field is similar to Accept, +/// but restricts the set of natural languages that are preferred +/// as a response to the request. +/// +#define HTTP_HEADER_ACCEPT_LANGUAGE"Accept-Language" + +/// +/// Accept-Ranges Request Header +/// The Accept-Ranges response-header field allows the server to +/// indicate its acceptance of range requests for a resource: +/// +#define HTTP_HEADER_ACCEPT_RANGES "Accept-Ranges" + + +/// +/// Accept-Encoding Request Header +/// The Accept-Encoding request-header field is similar to Accept, +/// but restricts the content-codings that are acceptable in the response. +/// +#define HTTP_HEADER_ACCEPT_ENCODING"Accept-Encoding" + +/// +/// Content-Encoding Header +/// The Content-Encoding entity-header field is used as a modifier to the media-type. +/// When present, its value indicates what additional content codings have been applied +/// to the entity-body, and thus what decoding mechanisms must be applied in order to +/// obtain the media-type referenced by the Content-Type header field. Content-Encoding +/// is primarily used to allow a document to be compressed without losing the identity +/// of its underlying media type. +/// +#define HTTP_HEADER_CONTENT_ENCODING "Content-Encoding" + +/// +/// HTTP Content-Encoding Compression types +/// + +#define HTTP_CONTENT_ENCODING_IDENTITY "identity" /// No transformation is used. This is the default value for content coding. +#define HTTP_CONTENT_ENCODING_GZIP "gzip" /// Content-Encoding: GNU zip format (described in RFC 1952). +#define HTTP_CONTENT_ENCODING_COMPRESS "compress"
[edk2] [PATCH] IntelFrameworkModulePkg : Allow ACPI tables to get installed above 4GB
Some ARM systems do not have available memory below 4GB, and still support ACPI. This patch allows the tables to get loaded above 4GB if the allocation below 4GB fails. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- .../AcpiSupportAcpiSupportProtocol.c | 69 -- 1 file changed, 65 insertions(+), 4 deletions(-) diff --git a/IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportAcpiSupportProtocol.c b/IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportAcpiSupportProtocol.c index 6443c3a..72a7fe1 100644 --- a/IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportAcpiSupportProtocol.c +++ b/IntelFrameworkModulePkg/Universal/Acpi/AcpiSupportDxe/AcpiSupportAcpiSupportProtocol.c @@ -2,6 +2,7 @@ ACPI Support Protocol implementation Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved. +(C) Copyright 2015 Hewlett Packard Enterprise Development LP This program and the accompanying materials are licensed and made available under the terms and conditions @@ -533,6 +534,14 @@ ReallocateAcpiTableBuffer ( ); if (EFI_ERROR (Status)) { +Status = gBS->AllocatePages ( +AllocateAnyPages, +EfiACPIReclaimMemory, +EFI_SIZE_TO_PAGES (TotalSize), + +); + } + if (EFI_ERROR (Status)) { return EFI_OUT_OF_RESOURCES; } @@ -548,8 +557,13 @@ ReallocateAcpiTableBuffer ( // // Update RSDP to point to the new Rsdt and Xsdt address. // - AcpiSupportInstance->Rsdp1->RsdtAddress = (UINT32) (UINTN) AcpiSupportInstance->Rsdt1; - AcpiSupportInstance->Rsdp3->RsdtAddress = (UINT32) (UINTN) AcpiSupportInstance->Rsdt3; + if ((UINTN) AcpiSupportInstance->Rsdt3 < BASE_4GB) { +AcpiSupportInstance->Rsdp1->RsdtAddress = (UINT32) (UINTN) AcpiSupportInstance->Rsdt1; +AcpiSupportInstance->Rsdp3->RsdtAddress = (UINT32) (UINTN) AcpiSupportInstance->Rsdt3; + } else { +AcpiSupportInstance->Rsdp1->RsdtAddress = 0; +AcpiSupportInstance->Rsdp3->RsdtAddress = 0; + } CurrentData = (UINT64) (UINTN) AcpiSupportInstance->Xsdt; CopyMem (>Rsdp3->XsdtAddress, , sizeof (UINT64)); @@ -669,6 +683,15 @@ AddTableToList ( CurrentTableList->NumberOfPages, >PageAddress ); + +if (EFI_ERROR (Status)) { + Status = gBS->AllocatePages ( + AllocateAnyPages, + EfiACPIMemoryNVS, + CurrentTableList->NumberOfPages, + >PageAddress + ); +} } else { // // All other tables are ACPI reclaim memory, no alignment requirements. @@ -679,6 +702,15 @@ AddTableToList ( CurrentTableList->NumberOfPages, >PageAddress ); + +if (EFI_ERROR (Status)) { + Status = gBS->AllocatePages ( + AllocateAnyPages, + EfiACPIReclaimMemory, + CurrentTableList->NumberOfPages, + >PageAddress + ); +} } // // Check return value from memory alloc. @@ -1785,6 +1817,15 @@ AcpiSupportAcpiSupportConstructor ( ); if (EFI_ERROR (Status)) { +Status = gBS->AllocatePages ( +AllocateAnyPages, +EfiACPIReclaimMemory, +EFI_SIZE_TO_PAGES (RsdpTableSize), + +); + } + + if (EFI_ERROR (Status)) { return EFI_OUT_OF_RESOURCES; } @@ -1823,6 +1864,15 @@ AcpiSupportAcpiSupportConstructor ( ); if (EFI_ERROR (Status)) { +Status = gBS->AllocatePages ( +AllocateAnyPages, +EfiACPIReclaimMemory, +EFI_SIZE_TO_PAGES (TotalSize), + +); + } + + if (EFI_ERROR (Status)) { gBS->FreePages ((EFI_PHYSICAL_ADDRESS)(UINTN)AcpiSupportInstance->Rsdp1, EFI_SIZE_TO_PAGES (RsdpTableSize)); return EFI_OUT_OF_RESOURCES; } @@ -1843,13 +1893,24 @@ AcpiSupportAcpiSupportConstructor ( CopyMem (>Rsdp1->Signature, , sizeof (UINT64)); CopyMem (AcpiSupportInstance->Rsdp1->OemId, PcdGetPtr (PcdAcpiDefaultOemId), sizeof (AcpiSupportInstance->Rsdp1->OemId)); AcpiSupportInstance->Rsdp1->Reserved= EFI_ACPI_RESERVED_BYTE; - AcpiSupportInstance->Rsdp1->RsdtAddress = (UINT32) (UINTN) AcpiSupportInstance->Rsdt1; + + if ((UINTN) AcpiSupportInstance->Rsdt1 < BASE_4GB) { +AcpiSupportInstance->Rsdp1->RsdtAddress = (UINT32) (UINTN) AcpiSupportInstance->Rsdt1; + } else { +AcpiSupportInstance->R
[edk2] [PATCH v2] MdePkg: Add missing SMBIOS definitions for SATA and SAS Ports
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- MdePkg/Include/IndustryStandard/SmBios.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MdePkg/Include/IndustryStandard/SmBios.h b/MdePkg/Include/IndustryStandard/SmBios.h index 0959247..b7c54f2 100644 --- a/MdePkg/Include/IndustryStandard/SmBios.h +++ b/MdePkg/Include/IndustryStandard/SmBios.h @@ -2,6 +2,7 @@ Industry Standard Definitions of SMBIOS Table Specification v3.0.0. Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. +(C) Copyright 2015 Hewlett Packard Enterprise Development LP This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -1077,6 +1078,8 @@ typedef enum { PortTypeAudioPort = 0x1D, PortTypeModemPort = 0x1E, PortTypeNetworkPort = 0x1F, + PortTypeSata = 0x20, + PortTypeSas = 0x21, PortType8251Compatible= 0xA0, PortType8251FifoCompatible= 0xA1, PortTypeOther = 0xFF -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] ShellPkg: Fix a bug in smbiosview PowerSupply Characteristics
Fix bit shifting when isolating the Characteristics of Power Supply information Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c index e348c6f..3f99dc4 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c @@ -3100,7 +3100,7 @@ DisplaySPSCharacteristics ( // Bits 13:10 - DMTF Power Supply Type // ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_TYPE), gShellDebug1HiiHandle); - Temp = (Characteristics & 0x1C00) << 10; + Temp = (Characteristics & 0x1C00) >> 10; switch (Temp) { case 1: ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER_SPACE), gShellDebug1HiiHandle); @@ -3141,7 +3141,7 @@ DisplaySPSCharacteristics ( // Bits 9:7 - Status // ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_STATUS_DASH), gShellDebug1HiiHandle); - Temp = (Characteristics & 0x380) << 7; + Temp = (Characteristics & 0x380) >> 7; switch (Temp) { case 1: ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER_SPACE), gShellDebug1HiiHandle); @@ -3170,7 +3170,7 @@ DisplaySPSCharacteristics ( // Bits 6:3 - DMTF Input Voltage Range Switching // ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_INPUT_VOLTAGE_RANGE), gShellDebug1HiiHandle); - Temp = (Characteristics & 0x78) << 3; + Temp = (Characteristics & 0x78) >> 3; switch (Temp) { case 1: ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_PRINTINFO_OTHER_SPACE), gShellDebug1HiiHandle); -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] MdePkg: Add missing SMBIOS definitions for SATA and SAS Ports
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- MdePkg/Include/IndustryStandard/SmBios.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MdePkg/Include/IndustryStandard/SmBios.h b/MdePkg/Include/IndustryStandard/SmBios.h index 0959247..1ca9d26 100644 --- a/MdePkg/Include/IndustryStandard/SmBios.h +++ b/MdePkg/Include/IndustryStandard/SmBios.h @@ -2,6 +2,7 @@ Industry Standard Definitions of SMBIOS Table Specification v3.0.0. Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. +(C) Copyright 2015 Hewlett Packard Enterprise Development LP This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -1077,6 +1078,8 @@ typedef enum { PortTypeAudioPort = 0x1D, PortTypeModemPort = 0x1E, PortTypeNetworkPort = 0x1F, + PortTypeSataPort = 0x20, + PortTypeSasPort = 0x21, PortType8251Compatible= 0xA0, PortType8251FifoCompatible= 0xA1, PortTypeOther = 0xFF -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] ShellPkg: Use %p for smbiosview SMBIOS table addresses
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- .../UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni index 24fca87..9811542 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/SmbiosViewStrings.uni @@ -2,6 +2,7 @@ // // Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved. // (C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P. +// (C) Copyright 2015 Hewlett Packard Enterprise Development LP // 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 @@ -78,7 +79,7 @@ #string STR_SMBIOSVIEW_PRINTINFO_DOCREV #language en-US "SMBIOS Docrev:0x%x\r\n" #string STR_SMBIOSVIEW_PRINTINFO_NUMBER_STRUCT #language en-US "Number of Structures: %d\r\n" #string STR_SMBIOSVIEW_PRINTINFO_MAX_STRUCT_SIZE#language en-US "Max Struct size: %d\r\n" -#string STR_SMBIOSVIEW_PRINTINFO_TABLE_ADDR #language en-US "Table Address:0x%x\r\n" +#string STR_SMBIOSVIEW_PRINTINFO_TABLE_ADDR #language en-US "Table Address:0x%p\r\n" #string STR_SMBIOSVIEW_PRINTINFO_TABLE_LENGTH #language en-US "Table Length: %d\r\n" #string STR_SMBIOSVIEW_PRINTINFO_TABLE_MAX_SIZE #language en-US "Table Max Size: %d\r\n" #string STR_SMBIOSVIEW_PRINTINFO_ANCHOR_STR #language en-US "Anchor String:%a\r\n" @@ -452,7 +453,7 @@ #string STR_SMBIOSVIEW_SMBIOSVIEW_SHOWTYPE #language en-US "ShowType= " #string STR_SMBIOSVIEW_SMBIOSVIEW_TYPE_HANDLE_DUMP_STRUCT #language en-US "Type=%d, Handle=0x%x\r\nDump Structure as:\r\n" #string STR_SMBIOSVIEW_SMBIOSVIEW_INDEX_LENGTH #language en-US "Index=%d,Length=0x%x," -#string STR_SMBIOSVIEW_SMBIOSVIEW_ADDR #language en-US "Addr=0x%x\r\n" +#string STR_SMBIOSVIEW_SMBIOSVIEW_ADDR #language en-US "Addr=0x%p\r\n" #string STR_SMBIOSVIEW_SMBIOSVIEW_ENTRYLEN #language en-US "Entry Length: 0x%x\r\n" #string STR_SMBIOSVIEW_SMBIOSVIEW_REFERENCEDHANDLE #language en-US "Referenced Handle: 0x%x\r\n" #string STR_SMBIOSVIEW_SMBIOSVIEW_REFERENCEDOFFSET #language en-US "Referenced Offset: 0x%x\r\n" -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] MdePkg: Add GIC version to ACPI and 6 definitions
The GicVersion field is defined in ACPI 5.0 and 6.0 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- MdePkg/Include/IndustryStandard/Acpi51.h | 12 +++- MdePkg/Include/IndustryStandard/Acpi60.h | 12 +++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/IndustryStandard/Acpi51.h b/MdePkg/Include/IndustryStandard/Acpi51.h index 9e643bc..034094e 100644 --- a/MdePkg/Include/IndustryStandard/Acpi51.h +++ b/MdePkg/Include/IndustryStandard/Acpi51.h @@ -3,6 +3,7 @@ Copyright (c) 2014 Hewlett-Packard Development Company, L.P. Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved. + (C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -529,10 +530,19 @@ typedef struct { UINT32 GicId; UINT64 PhysicalBaseAddress; UINT32 SystemVectorBase; - UINT32 Reserved2; + UINT8 GicVersion; + UINT8 Reserved2[3]; } EFI_ACPI_5_1_GIC_DISTRIBUTOR_STRUCTURE; /// +/// GIC Version +/// +#define EFI_ACPI_5_1_GIC_V2 0x01 +#define EFI_ACPI_5_1_GIC_V2m 0x02 +#define EFI_ACPI_5_1_GIC_V3 0x03 +#define EFI_ACPI_5_1_GIC_V4 0x04 + +/// /// GIC MSI Frame Structure /// typedef struct { diff --git a/MdePkg/Include/IndustryStandard/Acpi60.h b/MdePkg/Include/IndustryStandard/Acpi60.h index 3dac316..f0e4151 100644 --- a/MdePkg/Include/IndustryStandard/Acpi60.h +++ b/MdePkg/Include/IndustryStandard/Acpi60.h @@ -2,6 +2,7 @@ ACPI 6.0 definitions from the ACPI Specification Revision 6.0 April, 2015. Copyright (c) 2015, Intel Corporation. All rights reserved. + (C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -532,10 +533,19 @@ typedef struct { UINT32 GicId; UINT64 PhysicalBaseAddress; UINT32 SystemVectorBase; - UINT32 Reserved2; + UINT8 GicVersion; + UINT8 Reserved2[3]; } EFI_ACPI_6_0_GIC_DISTRIBUTOR_STRUCTURE; /// +/// GIC Version +/// +#define EFI_ACPI_6_0_GIC_V1 0x01 +#define EFI_ACPI_6_0_GIC_V2 0x02 +#define EFI_ACPI_6_0_GIC_V3 0x03 +#define EFI_ACPI_6_0_GIC_V4 0x04 + +/// /// GIC MSI Frame Structure /// typedef struct { -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] MdeModulePkg: Fix RegularExpressionDxe memcpy intrinsic
Use explicit CopyMem to resolve intrinsic memcpy errors on some compilers Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <el...@hpe.com> --- .../Universal/RegularExpressionDxe/Oniguruma/regcomp.c | 14 -- .../Universal/RegularExpressionDxe/Oniguruma/regparse.c| 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regcomp.c b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regcomp.c index 25b768b..a5d0cd4 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regcomp.c +++ b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regcomp.c @@ -70,7 +70,9 @@ static void swap_node(Node* a, Node* b) { Node c; - c = *a; *a = *b; *b = c; + CopyMem (, a, sizeof (Node)); + CopyMem (a, b, sizeof (Node)); + CopyMem (b, , sizeof (Node)); if (NTYPE(a) == NT_STR) { StrNode* sn = NSTR(a); @@ -4103,7 +4105,7 @@ alt_merge_mml(MinMaxLen* to, MinMaxLen* from) static void copy_opt_env(OptEnv* to, OptEnv* from) { - *to = *from; + CopyMem (to, from, sizeof (OptEnv)); } static void @@ -4116,7 +4118,7 @@ clear_opt_anc_info(OptAncInfo* anc) static void copy_opt_anc_info(OptAncInfo* to, OptAncInfo* from) { - *to = *from; + CopyMem (to, from, sizeof (OptAncInfo)); } static void @@ -4200,7 +4202,7 @@ clear_opt_exact_info(OptExactInfo* ex) static void copy_opt_exact_info(OptExactInfo* to, OptExactInfo* from) { - *to = *from; + CopyMem (to, from, sizeof (OptExactInfo)); } static void @@ -4348,7 +4350,7 @@ clear_opt_map_info(OptMapInfo* map) static void copy_opt_map_info(OptMapInfo* to, OptMapInfo* from) { - *to = *from; + CopyMem (to, from, sizeof (OptMapInfo)); } static void @@ -4463,7 +4465,7 @@ clear_node_opt_info(NodeOptInfo* opt) static void copy_node_opt_info(NodeOptInfo* to, NodeOptInfo* from) { - *to = *from; + CopyMem (to, from, sizeof (NodeOptInfo)); } static void diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c index 4be2f22..05cf2cc 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c +++ b/MdeModulePkg/Universal/RegularExpressionDxe/Oniguruma/regparse.c @@ -2211,7 +2211,7 @@ onig_reduce_nested_quantifier(Node* pnode, Node* cnode) switch(ReduceTypeTable[cnum][pnum]) { case RQ_DEL: -*pnode = *cnode; +CopyMem (pnode, cnode, sizeof (Node)); break; case RQ_A: p->target = c->target; -- 2.6.3.windows.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] Add common HTTP definitions for use in HTTP clients/applications. List includes: HTTP methods, request/response headers, and encodings.
Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahm...@hp.com> --- MdeModulePkg/Include/Library/HttpLib.h | 43 ++ 1 file changed, 43 insertions(+) diff --git a/MdeModulePkg/Include/Library/HttpLib.h b/MdeModulePkg/Include/Library/HttpLib.h index ce5a839..8d5412e 100644 --- a/MdeModulePkg/Include/Library/HttpLib.h +++ b/MdeModulePkg/Include/Library/HttpLib.h @@ -3,6 +3,7 @@ It provides the helper routines to parse the HTTP message byte stream. Copyright (c) 2015, Intel Corporation. All rights reserved. +(C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -18,6 +19,48 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include + +/// +/// HTTP Request Method definitions +/// +#define HTTP_METHOD_GET "GET" +#define HTTP_METHOD_POST"POST" +#define HTTP_METHOD_PATCH "PATCH" +#define HTTP_METHOD_OPTIONS "OPTIONS" +#define HTTP_METHOD_CONNECT "CONNECT" +#define HTTP_METHOD_HEAD"HEAD" +#define HTTP_METHOD_PUT "PUT" +#define HTTP_METHOD_DELETE "DELETE" +#define HTTP_METHOD_TRACE "TRACE" + +/// +/// HTTP Request Headers definitions +/// +#define HTTP_REQUEST_HEADER_ACCEPT "Accept" +#define HTTP_REQUEST_HEADER_ACCEPT_LANGUAGE "Accept-Language" +#define HTTP_REQUEST_HEADER_CONTENT_LENGTH "Content-Length" +#define HTTP_REQUEST_HEADER_CONTENT_TYPE"Content-Type" +#define HTTP_REQUEST_HEADER_CONTENT_ENCODING"Content-Encoding" +#define HTTP_REQUEST_HEADER_HOST"Host" +#define HTTP_REQUEST_HEADER_IF_MATCH"If-Match" +#define HTTP_REQUEST_HEADER_IF_NONE_MATCH "If-None-Match" +#define HTTP_REQUEST_HEADER_AUTHORIZATION "Authorization" + +/// +/// HTTP Response Header definitions +/// +#define HTTP_RESPONSE_HEADER_CONTENT_LENGTH "Content-Length" +#define HTTP_RESPONSE_HEADER_CONTENT_TYPE "Content-Type" +#define HTTP_RESPONSE_HEADER_LOCATION "Location" +#define HTTP_RESPONSE_HEADER_CACHE_CONTROL "Cache-Control" +#define HTTP_RESPONSE_HEADER_ETAG "ETag" + +/// +/// HTTP Content-Type encodings +/// +#define HTTP_CONTENT_TYPE_APP_JSON "application/json" +#define HTTP_CONTENT_TYPE_APP_JSON_UTF8 "application/json; charset=utf-8" + /** Decode a percent-encoded URI component to the ASCII character. -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2] MdeModulePkg: Add DEBUG statement when reaching max perf log entries
Add a DEBUG statement when the number of PEI perf log entries exceeds PcdMaxPeiPerformanceLogEntries Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahm...@hpe.com> --- MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c index 0b5a717..fdc0ae0 100644 --- a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c +++ b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c @@ -7,6 +7,7 @@ number of performance logging entry is specified by PcdMaxPeiPerformanceLogEntries. Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. +(C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -183,6 +184,7 @@ StartPerformanceMeasurementEx ( InternalGetPerformanceHobLog (, ); if (PeiPerformanceLog->NumberOfEntries >= PcdGet8 (PcdMaxPeiPerformanceLogEntries)) { +DEBUG ((DEBUG_ERROR, "PEI performance log arrray out of resources\n")); return RETURN_OUT_OF_RESOURCES; } Index = PeiPerformanceLog->NumberOfEntries++; -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] MdeModulePkg: Add DEBUG statement on reaching PEI perf log max entries
Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahm...@hp.com> --- MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c index 0b5a717..fdc0ae0 100644 --- a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c +++ b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c @@ -7,6 +7,7 @@ number of performance logging entry is specified by PcdMaxPeiPerformanceLogEntries. Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. +(C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -183,6 +184,7 @@ StartPerformanceMeasurementEx ( InternalGetPerformanceHobLog (, ); if (PeiPerformanceLog->NumberOfEntries >= PcdGet8 (PcdMaxPeiPerformanceLogEntries)) { +DEBUG ((DEBUG_ERROR, "PEI performance log arrray out of resources\n")); return RETURN_OUT_OF_RESOURCES; } Index = PeiPerformanceLog->NumberOfEntries++; -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH v2] MdeModulePkg: Add some common HTTP definitions
Add common HTTP definitions for use in HTTP clients/applications. List includes: HTTP methods, request/response headers, and encodings. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahm...@hpe.com> --- MdeModulePkg/Include/Library/HttpLib.h | 43 ++ 1 file changed, 43 insertions(+) diff --git a/MdeModulePkg/Include/Library/HttpLib.h b/MdeModulePkg/Include/Library/HttpLib.h index ce5a839..8d5412e 100644 --- a/MdeModulePkg/Include/Library/HttpLib.h +++ b/MdeModulePkg/Include/Library/HttpLib.h @@ -3,6 +3,7 @@ It provides the helper routines to parse the HTTP message byte stream. Copyright (c) 2015, Intel Corporation. All rights reserved. +(C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -18,6 +19,48 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include + +/// +/// HTTP Request Method definitions +/// +#define HTTP_METHOD_GET "GET" +#define HTTP_METHOD_POST"POST" +#define HTTP_METHOD_PATCH "PATCH" +#define HTTP_METHOD_OPTIONS "OPTIONS" +#define HTTP_METHOD_CONNECT "CONNECT" +#define HTTP_METHOD_HEAD"HEAD" +#define HTTP_METHOD_PUT "PUT" +#define HTTP_METHOD_DELETE "DELETE" +#define HTTP_METHOD_TRACE "TRACE" + +/// +/// HTTP Request Headers definitions +/// +#define HTTP_REQUEST_HEADER_ACCEPT "Accept" +#define HTTP_REQUEST_HEADER_ACCEPT_LANGUAGE "Accept-Language" +#define HTTP_REQUEST_HEADER_CONTENT_LENGTH "Content-Length" +#define HTTP_REQUEST_HEADER_CONTENT_TYPE"Content-Type" +#define HTTP_REQUEST_HEADER_CONTENT_ENCODING"Content-Encoding" +#define HTTP_REQUEST_HEADER_HOST"Host" +#define HTTP_REQUEST_HEADER_IF_MATCH"If-Match" +#define HTTP_REQUEST_HEADER_IF_NONE_MATCH "If-None-Match" +#define HTTP_REQUEST_HEADER_AUTHORIZATION "Authorization" + +/// +/// HTTP Response Header definitions +/// +#define HTTP_RESPONSE_HEADER_CONTENT_LENGTH "Content-Length" +#define HTTP_RESPONSE_HEADER_CONTENT_TYPE "Content-Type" +#define HTTP_RESPONSE_HEADER_LOCATION "Location" +#define HTTP_RESPONSE_HEADER_CACHE_CONTROL "Cache-Control" +#define HTTP_RESPONSE_HEADER_ETAG "ETag" + +/// +/// HTTP Content-Type encodings +/// +#define HTTP_CONTENT_TYPE_APP_JSON "application/json" +#define HTTP_CONTENT_TYPE_APP_JSON_UTF8 "application/json; charset=utf-8" + /** Decode a percent-encoded URI component to the ASCII character. -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] NetworkPkg: Remove unused local variables
Fix gcc build errors Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahm...@hpe.com> --- NetworkPkg/HttpDxe/HttpImpl.c | 3 +-- NetworkPkg/HttpDxe/HttpProto.c | 6 -- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c index 50c0617..588e1bb 100644 --- a/NetworkPkg/HttpDxe/HttpImpl.c +++ b/NetworkPkg/HttpDxe/HttpImpl.c @@ -2,6 +2,7 @@ Implementation of EFI_HTTP_PROTOCOL protocol interfaces. Copyright (c) 2015, Intel Corporation. All rights reserved. + (C) Copyright 2015 Hewlett Packard Enterprise Development LP This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -227,7 +228,6 @@ EfiHttpRequest ( UINTN UrlLen; CHAR16*HostNameStr; HTTP_TOKEN_WRAP *Wrap; - HTTP_TCP_TOKEN_WRAP *TcpWrap; CHAR8 *FileUrl; if ((This == NULL) || (Token == NULL)) { @@ -278,7 +278,6 @@ EfiHttpRequest ( HostName= NULL; Wrap= NULL; HostNameStr = NULL; - TcpWrap = NULL; // // Parse the URI of the remote host. diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c index 13d5748..57ea207 100644 --- a/NetworkPkg/HttpDxe/HttpProto.c +++ b/NetworkPkg/HttpDxe/HttpProto.c @@ -307,10 +307,8 @@ HttpCreateTcp4TxEvent ( ) { EFI_STATUS Status; - HTTP_PROTOCOL*HttpInstance; HTTP_TCP_TOKEN_WRAP *TcpWrap; - HttpInstance = Wrap->HttpInstance; TcpWrap = >TcpWrap; Status = gBS->CreateEvent ( @@ -383,10 +381,8 @@ HttpCreateTcp4RxEvent ( ) { EFI_STATUS Status; - HTTP_PROTOCOL*HttpInstance; HTTP_TCP_TOKEN_WRAP *TcpWrap; - HttpInstance = Wrap->HttpInstance; TcpWrap = >TcpWrap; Status = gBS->CreateEvent ( @@ -672,10 +668,8 @@ HttpConfigureTcp4 ( EFI_TCP4_CONFIG_DATA *Tcp4CfgData; EFI_TCP4_ACCESS_POINT *Tcp4AP; EFI_TCP4_OPTION*Tcp4Option; - HTTP_TCP_TOKEN_WRAP*TcpWrap; ASSERT (HttpInstance != NULL); - TcpWrap = >TcpWrap; Tcp4CfgData = >Tcp4CfgData; -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 1/1] ShellPkg: Added SMBIOS 3.0 support in dmem
Added SMBIOS 3.0 support in dmdem Shell command since SMBIOS 3.0 uses a different GUID in the System Configuration Table. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahm...@hpe.com> --- ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c index 05dc0d5..7693835 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c @@ -1,8 +1,9 @@ /** @file Main file for Dmem shell Debug1 function. - (C) Copyright 2015 Hewlett-Packard Development Company, L.P. Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved. + (C) Copyright 2015 Hewlett-Packard Development Company, L.P. + (C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -193,6 +194,10 @@ ShellCommandRunDmem ( SmbiosTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; continue; } +if (CompareGuid (>ConfigurationTable[TableWalker].VendorGuid, )) { + SmbiosTableAddress = (UINT64) (UINTN) gST->ConfigurationTable[TableWalker].VendorTable; + continue; +} if (CompareGuid(>ConfigurationTable[TableWalker].VendorGuid, )) { MpsTableAddress = (UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable; continue; -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 1/1] ShellPkg: Added SMBIOS 2.8 Type 17 changes to smbiosview
Updated smbiosview to decode SMBIOS Type 17 MinimumVoltage, MaximumVoltage, and ConfiguredVoltage Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahm...@hpe.com> --- .../Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c index 1494c47..e348c6f 100644 --- a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c +++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/PrintInfo.c @@ -2,7 +2,8 @@ Module for clarifying the content of the smbios structure element information. Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved. - (C) Copyright 2014 Hewlett-Packard Development Company, L.P. + (C) Copyright 2014 Hewlett-Packard Development Company, L.P. + (C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -721,6 +722,11 @@ SmbiosPrintStructure ( PRINT_STRUCT_VALUE (Struct, Type17, ExtendedSize); PRINT_STRUCT_VALUE (Struct, Type17, ConfiguredMemoryClockSpeed); } +if (AE_SMBIOS_VERSION (0x2, 0x8) && (Struct->Hdr->Length > 0x22)) { + PRINT_STRUCT_VALUE (Struct, Type17, MinimumVoltage); + PRINT_STRUCT_VALUE (Struct, Type17, MaximumVoltage); + PRINT_STRUCT_VALUE (Struct, Type17, ConfiguredVoltage); +} break; // -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] NetworkPkg: Fix typos in some EFI_HTTP_STATUS_CODE definitions
Fix spelling typos in EFI_HTTP_STATUS_CODE definitions for error 415 and 501 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahm...@hpe.com> --- MdePkg/Include/Protocol/Http.h | 4 ++-- NetworkPkg/HttpDxe/HttpProto.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/MdePkg/Include/Protocol/Http.h b/MdePkg/Include/Protocol/Http.h index c7a89b4..5588e4c 100644 --- a/MdePkg/Include/Protocol/Http.h +++ b/MdePkg/Include/Protocol/Http.h @@ -95,11 +95,11 @@ typedef enum { HTTP_STATUS_412_PRECONDITION_FAILED, HTTP_STATUS_413_REQUEST_ENTITY_TOO_LARGE, HTTP_STATUS_414_REQUEST_URI_TOO_LARGE, - HTTP_STATUS_415_UNSUPPORETD_MEDIA_TYPE, + HTTP_STATUS_415_UNSUPPORTED_MEDIA_TYPE, HTTP_STATUS_416_REQUESTED_RANGE_NOT_SATISFIED, HTTP_STATUS_417_EXPECTATION_FAILED, HTTP_STATUS_500_INTERNAL_SERVER_ERROR, - HTTP_STATUS_501_NOT_IMIPLEMENTED, + HTTP_STATUS_501_NOT_IMPLEMENTED, HTTP_STATUS_502_BAD_GATEWAY, HTTP_STATUS_503_SERVICE_UNAVAILABLE, HTTP_STATUS_504_GATEWAY_TIME_OUT, diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c index e8ce987..eca4a58 100644 --- a/NetworkPkg/HttpDxe/HttpProto.c +++ b/NetworkPkg/HttpDxe/HttpProto.c @@ -2,6 +2,7 @@ Miscellaneous routines for HttpDxe driver. Copyright (c) 2015, Intel Corporation. All rights reserved. +(C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -843,7 +844,7 @@ HttpMappingToStatusCode ( case 414: return HTTP_STATUS_414_REQUEST_URI_TOO_LARGE; case 415: -return HTTP_STATUS_415_UNSUPPORETD_MEDIA_TYPE; +return HTTP_STATUS_415_UNSUPPORTED_MEDIA_TYPE; case 416: return HTTP_STATUS_416_REQUESTED_RANGE_NOT_SATISFIED; case 417: @@ -851,7 +852,7 @@ HttpMappingToStatusCode ( case 500: return HTTP_STATUS_500_INTERNAL_SERVER_ERROR; case 501: -return HTTP_STATUS_501_NOT_IMIPLEMENTED; +return HTTP_STATUS_501_NOT_IMPLEMENTED; case 502: return HTTP_STATUS_502_BAD_GATEWAY; case 503: -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] MdePkg: Http.h - Add HttpMethodMax to EFI_HTTP_METHOD
Add HttpMethodMax enum value to EFI_HTTP_METHOD to make it easier to iterate through the HTTP methods using a loop Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahm...@hpe.com> --- MdePkg/Include/Protocol/Http.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Protocol/Http.h b/MdePkg/Include/Protocol/Http.h index b1f8c51..c7a89b4 100644 --- a/MdePkg/Include/Protocol/Http.h +++ b/MdePkg/Include/Protocol/Http.h @@ -5,6 +5,7 @@ HTTP Protocol (HTTP) Copyright (c) 2015, Intel Corporation. All rights reserved. + (C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -54,7 +55,8 @@ typedef enum { HttpMethodHead, HttpMethodPut, HttpMethodDelete, - HttpMethodTrace + HttpMethodTrace, + HttpMethodMax } EFI_HTTP_METHOD; /// -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] SecurityPkg: Reduce verbosity of TPM DEBUG messages
Some of the TPM/TPM2 DEBUG messages are at EFI_D_INFO level, even though they are simply tracing functions that run on every boot even if there is no TPM installed. Changed verbosity to EFI_D_VERBOSE. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahm...@hpe.com> --- .../DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c | 3 ++- SecurityPkg/Library/HashLibTpm2/HashLibTpm2.c | 13 ++-- SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c | 23 +++--- SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Tis.c| 23 +++--- 4 files changed, 33 insertions(+), 29 deletions(-) diff --git a/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c b/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c index 26bf6fb..1f2574e 100644 --- a/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c +++ b/SecurityPkg/Library/DxeTpm2MeasureBootLib/DxeTpm2MeasureBootLib.c @@ -16,6 +16,7 @@ partition data carefully. Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved. +(C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -447,7 +448,7 @@ DxeTpm2MeasureBootHandler ( // Tcg2 protocol is not installed. So, TPM2 is not present. // Don't do any measurement, and directly return EFI_SUCCESS. // -DEBUG ((EFI_D_INFO, "DxeTpm2MeasureBootHandler - Tcg2 - %r\n", Status)); +DEBUG ((EFI_D_VERBOSE, "DxeTpm2MeasureBootHandler - Tcg2 - %r\n", Status)); return EFI_SUCCESS; } diff --git a/SecurityPkg/Library/HashLibTpm2/HashLibTpm2.c b/SecurityPkg/Library/HashLibTpm2/HashLibTpm2.c index 379f2f7..075db4a 100644 --- a/SecurityPkg/Library/HashLibTpm2/HashLibTpm2.c +++ b/SecurityPkg/Library/HashLibTpm2/HashLibTpm2.c @@ -2,6 +2,7 @@ Ihis library uses TPM2 device to calculation hash. Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved. +(C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -242,7 +243,7 @@ HashAndExtend ( TPM2B_EVENTEventData; TPM2B_DIGEST Result; - DEBUG((EFI_D_INFO, "\n HashAndExtend Entry \n")); + DEBUG((EFI_D_VERBOSE, "\n HashAndExtend Entry \n")); SequenceHandle = 0x; // Know bad value @@ -262,7 +263,7 @@ HashAndExtend ( if (EFI_ERROR(Status)) { return EFI_DEVICE_ERROR; } - DEBUG((EFI_D_INFO, "\n Tpm2HashSequenceStart Success \n")); + DEBUG((EFI_D_VERBOSE, "\n Tpm2HashSequenceStart Success \n")); Buffer = (UINT8 *)(UINTN)DataToHash; for (HashLen = DataToHashLen; HashLen > sizeof(HashBuffer.buffer); HashLen -= sizeof(HashBuffer.buffer)) { @@ -276,7 +277,7 @@ HashAndExtend ( return EFI_DEVICE_ERROR; } } - DEBUG((EFI_D_INFO, "\n Tpm2SequenceUpdate Success \n")); + DEBUG((EFI_D_VERBOSE, "\n Tpm2SequenceUpdate Success \n")); HashBuffer.size = (UINT16)HashLen; CopyMem(HashBuffer.buffer, Buffer, (UINTN)HashLen); @@ -294,7 +295,7 @@ HashAndExtend ( if (EFI_ERROR(Status)) { return EFI_DEVICE_ERROR; } -DEBUG((EFI_D_INFO, "\n Tpm2EventSequenceComplete Success \n")); +DEBUG((EFI_D_VERBOSE, "\n Tpm2EventSequenceComplete Success \n")); } else { Status = Tpm2SequenceComplete ( SequenceHandle, @@ -304,7 +305,7 @@ HashAndExtend ( if (EFI_ERROR(Status)) { return EFI_DEVICE_ERROR; } -DEBUG((EFI_D_INFO, "\n Tpm2SequenceComplete Success \n")); +DEBUG((EFI_D_VERBOSE, "\n Tpm2SequenceComplete Success \n")); DigestList->count = 1; DigestList->digests[0].hashAlg = AlgoId; @@ -316,7 +317,7 @@ HashAndExtend ( if (EFI_ERROR(Status)) { return EFI_DEVICE_ERROR; } -DEBUG((EFI_D_INFO, "\n Tpm2PcrExtend Success \n")); +DEBUG((EFI_D_VERBOSE, "\n Tpm2PcrExtend Success \n")); } return EFI_SUCCESS; diff --git a/SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c b/SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c index 2fb360f..b8d13aa 100644 --- a/SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c +++ b/SecurityPkg/Library/Tpm12DeviceLibDTpm/Tpm12Tis.c @@ -2,6 +2,7 @@ TIS (TPM Interface Specification) functions used by TPM1.2. Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved. +(C) Copyright 2015 Hewlett Packard Enterprise Development LP This program and the accompanying materials are licensed and made available under the terms and con
[edk2] [PATCH] ShellPkg: Fix a command line unicode string type
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahm...@hpe.com> --- ShellPkg/Library/UefiShellDriver1CommandsLib/Reconnect.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ShellPkg/Library/UefiShellDriver1CommandsLib/Reconnect.c b/ShellPkg/Library/UefiShellDriver1CommandsLib/Reconnect.c index 092e2c9..d2ae8e8 100644 --- a/ShellPkg/Library/UefiShellDriver1CommandsLib/Reconnect.c +++ b/ShellPkg/Library/UefiShellDriver1CommandsLib/Reconnect.c @@ -1,8 +1,9 @@ /** @file Main file for Reconnect shell Driver1 function. - (C) Copyright 2015 Hewlett-Packard Development Company, L.P. Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved. + (C) Copyright 2015 Hewlett-Packard Development Company, L.P. + (C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -75,7 +76,7 @@ ShellCommandRunReconnect ( Status = ShellCommandLineParse (ParamList, , , TRUE); if (EFI_ERROR(Status)) { if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) { - ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, "reconnect", ProblemParam); + ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"reconnect", ProblemParam); FreePool(ProblemParam); ShellStatus = SHELL_INVALID_PARAMETER; } else { -- 1.9.5.msysgit.1 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH] MdeModulePkg: PciBusDxe: Properly exit PCI function loops early if the device is not a multifunction device.
From: "Shifflett, Joseph" <joseph.shiffl...@hpe.com> When looping through all PCI functions, code should not look for functions 1-7 if function 0 is not present or if function 0 indicates the device is not multifunction. Prior to this fix, the code would use stale data in a buffer to determine if a device is multifunction even if function 0 is not present. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahm...@hpe.com> --- MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c | 10 -- .../Bus/Pci/PciBusDxe/PciEnumeratorSupport.c | 38 ++ MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c| 11 ++- 3 files changed, 42 insertions(+), 17 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c index 7329143..e638014 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c @@ -2,6 +2,7 @@ PCI eunmeration implementation on entire PCI bus system for PCI Bus module. Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved. +(C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -382,6 +383,7 @@ PciAssignBusNumber ( UINT16 Register; UINT8 Register8; EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *PciRootBridgeIo; + BOOLEAN MultiFunctionDevice; PciRootBridgeIo = Bridge->PciRootBridgeIo; @@ -394,6 +396,7 @@ PciAssignBusNumber ( // First check to see whether the parent is ppb // for (Device = 0; Device <= PCI_MAX_DEVICE; Device++) { +MultiFunctionDevice = FALSE; for (Func = 0; Func <= PCI_MAX_FUNC; Func++) { // @@ -406,7 +409,9 @@ PciAssignBusNumber ( Device, Func ); - + if (Func == 0) { +MultiFunctionDevice = !EFI_ERROR (Status) && IS_PCI_MULTI_FUNC (); + } if (!EFI_ERROR (Status) && (IS_PCI_BRIDGE () || IS_CARDBUS_BRIDGE ())) { @@ -482,7 +487,8 @@ PciAssignBusNumber ( } - if (Func == 0 && !IS_PCI_MULTI_FUNC ()) { + if (Func == 0 && !MultiFunctionDevice) { + // // Skip sub functions, this is not a multi function device diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c index f46025e..7b57374 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c @@ -2,6 +2,7 @@ PCI emumeration support functions implementation for PCI Bus module. Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. +(C) Copyright 2015 Hewlett Packard Enterprise Development LP 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 @@ -101,12 +102,13 @@ PciPciDeviceInfoCollector ( UINT8 SecBus; PCI_IO_DEVICE *PciIoDevice; EFI_PCI_IO_PROTOCOL *PciIo; + BOOLEAN MultiFunctionDevice; Status = EFI_SUCCESS; SecBus = 0; for (Device = 0; Device <= PCI_MAX_DEVICE; Device++) { - +MultiFunctionDevice = FALSE; for (Func = 0; Func <= PCI_MAX_FUNC; Func++) { // @@ -119,6 +121,9 @@ PciPciDeviceInfoCollector ( (UINT8) Device, (UINT8) Func ); + if (Func == 0) { +MultiFunctionDevice = !EFI_ERROR (Status) && IS_PCI_MULTI_FUNC (); + } if (!EFI_ERROR (Status)) { // @@ -169,17 +174,17 @@ PciPciDeviceInfoCollector ( ); } - -if (Func == 0 && !IS_PCI_MULTI_FUNC ()) { - - // - // Skip sub functions, this is not a multi function device - // - Func = PCI_MAX_FUNC; -} } + + if (Func == 0 && !MultiFunctionDevice) { +// +// Skip sub functions, this is not a multi function device +// +Func = PCI_MAX_FUNC; + } } + } return EFI_SUCCESS; @@ -334,9 +339,9 @@ DumpPciBars ( DEBUG (( EFI_D_INFO, - " BAR[%d]: Type = %s; Alignment = 0x%lx;\tLength = 0x%lx;\tOffset = 0x%02x\n", + " BAR[%d]: Type = %s; Alignment = 0x%lx;\tLength = 0x%lx;\tOffset = 0x%02x;\tValue = 0x%lx\n", Index, mBarTypeStr[MIN (PciIoDevice->PciBar[Index].BarType, PciBarTypeMaxType)], - PciIoDevice->PciBar[Index].Alignment, PciIoDevice->PciBa