[edk2] [PATCH] ShellBinPkg: Arm/AArch64 Shell binary update.

2015-08-19 Thread Ard Biesheuvel
The binaries of ShellBinPkg are generated with ShellPkg project 18222.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org
---

These are built with the tiny code model, note the code size reduction
for AARCH64.

Branch:
https://git.linaro.org/people/ard.biesheuvel/uefi-next.git/shortlog/refs/heads/binshell

 ShellBinPkg/MinUefiShell/AArch64/Shell.efi | Bin 408416 - 387808 bytes
 ShellBinPkg/MinUefiShell/Arm/Shell.efi | Bin 324480 - 330208 bytes
 ShellBinPkg/UefiShell/AArch64/Shell.efi| Bin 945152 - 887136 bytes
 ShellBinPkg/UefiShell/Arm/Shell.efi| Bin 757728 - 769536 bytes
 4 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/ShellBinPkg/MinUefiShell/AArch64/Shell.efi 
b/ShellBinPkg/MinUefiShell/AArch64/Shell.efi
index 7f63d86230e8..d5756e101342 100755
Binary files a/ShellBinPkg/MinUefiShell/AArch64/Shell.efi and 
b/ShellBinPkg/MinUefiShell/AArch64/Shell.efi differ
diff --git a/ShellBinPkg/MinUefiShell/Arm/Shell.efi 
b/ShellBinPkg/MinUefiShell/Arm/Shell.efi
index 782489af6960..8a7d7e5b7946 100755
Binary files a/ShellBinPkg/MinUefiShell/Arm/Shell.efi and 
b/ShellBinPkg/MinUefiShell/Arm/Shell.efi differ
diff --git a/ShellBinPkg/UefiShell/AArch64/Shell.efi 
b/ShellBinPkg/UefiShell/AArch64/Shell.efi
index 5a44a8ca6189..056da8d2932a 100755
Binary files a/ShellBinPkg/UefiShell/AArch64/Shell.efi and 
b/ShellBinPkg/UefiShell/AArch64/Shell.efi differ
diff --git a/ShellBinPkg/UefiShell/Arm/Shell.efi 
b/ShellBinPkg/UefiShell/Arm/Shell.efi
index 5a61df621047..afa91c4d6caf 100755
Binary files a/ShellBinPkg/UefiShell/Arm/Shell.efi and 
b/ShellBinPkg/UefiShell/Arm/Shell.efi differ
-- 
1.9.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v2] MdeModulePkg:Full support F10 hot key in UiApp.

2015-08-19 Thread Dandan Bi
In current UiApp/Boot Maintenance manager,some pages don't support F10,
they use Commit Changes and Exit menu to save changes.Now support F10
in these pages.Compared with previous patch,mainly update the console page.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi dandan...@intel.com
---
 .../Application/UiApp/BootMaint/Bmstring.uni   | Bin 41522 - 42370 bytes
 .../Application/UiApp/BootMaint/BootMaint.c| 433 ++---
 .../Application/UiApp/BootMaint/BootMaint.h| 123 +-
 .../Application/UiApp/BootMaint/ConsoleOption.c| 147 +++
 MdeModulePkg/Application/UiApp/BootMaint/Data.c|  13 +
 MdeModulePkg/Application/UiApp/BootMaint/FE.vfr|  24 +-
 .../Application/UiApp/BootMaint/FileExplorer.c | 187 +++--
 .../Application/UiApp/BootMaint/FormGuid.h |  32 +-
 .../Application/UiApp/BootMaint/UpdatePage.c   | 176 ++---
 .../Application/UiApp/BootMaint/Variable.c |  26 +-
 10 files changed, 804 insertions(+), 357 deletions(-)

diff --git a/MdeModulePkg/Application/UiApp/BootMaint/Bmstring.uni 
b/MdeModulePkg/Application/UiApp/BootMaint/Bmstring.uni
index 
8d9544db450322835972597234a07d76207e1102..f64837b7735f247eb0704c7d21d6639e4eac181b
 100644
GIT binary patch
delta 272
zcmdmVgsJH?(}o2p;%*E+4E_w^4Dk%kK-!NXgdqq`%F$`6Q4YRO=WU|0|XKBo3gu
z9EN;`as~yUx_pK_h7yJ%Ae}S$p;;qd`M_Mu$y3~CI=*$O`ek~u~{m$%Vsi%k%XoP
zgCo!?7ogQ3+7;*koKE30n@k1X`E^bO4Z^ESQ=-c}8eKZ+rg2*`Wm!MGW(CG+
WPCmdTFuAOu0AvD?=9|1^VIKf3g+yrp

delta 18
acmZoV9vzV(}o2pn;)dI*iQbkqz?dBZV7Gx

diff --git a/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.c 
b/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.c
index 0a6eb6c..0a187f5 100644
--- a/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.c
+++ b/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.c
@@ -294,13 +294,16 @@ BootMaintRouteConfig (
   EFI_STATUS  Status;
   UINTN   BufferSize;
   EFI_HII_CONFIG_ROUTING_PROTOCOL *ConfigRouting;
   BMM_FAKE_NV_DATA*NewBmmData;
   BMM_FAKE_NV_DATA*OldBmmData;
+  BM_CONSOLE_CONTEXT  *NewConsoleContext;
+  BM_TERMINAL_CONTEXT *NewTerminalContext;
   BM_MENU_ENTRY   *NewMenuEntry;
   BM_LOAD_CONTEXT *NewLoadContext;
-  UINT16  Index;  
+  UINT16  Index;
+  BOOLEAN TerminalAttChange;
   BMM_CALLBACK_DATA   *Private; 
 
   if (Progress == NULL) {
 return EFI_INVALID_PARAMETER;
   }
@@ -366,18 +369,32 @@ BootMaintRouteConfig (
  Index ++) {
   NewMenuEntry= BOpt_GetMenuEntry (BootOptionMenu, Index);
   NewLoadContext  = (BM_LOAD_CONTEXT *) 
NewMenuEntry-VariableContext;
   NewLoadContext-Deleted = NewBmmData-BootOptionDel[Index];
   NewBmmData-BootOptionDel[Index] = FALSE;
+  NewBmmData-BootOptionDelMark[Index] = FALSE;
 }
 
 Var_DelBootOption ();
   }
   
   if (CompareMem (NewBmmData-BootOptionOrder, OldBmmData-BootOptionOrder, 
sizeof (NewBmmData-BootOptionOrder)) != 0) {  
 Status = Var_UpdateBootOrder (Private);
-  } 
+  }
+
+  if (CompareMem (NewBmmData-BootTimeOut, OldBmmData-BootTimeOut, sizeof 
(NewBmmData-BootTimeOut)) != 0){
+Status = gRT-SetVariable(
+LTimeout,
+gEfiGlobalVariableGuid,
+EFI_VARIABLE_BOOTSERVICE_ACCESS | 
EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
+sizeof(UINT16),
+(NewBmmData-BootTimeOut)
+);
+ASSERT_EFI_ERROR(Status);
+
+Private-BmmOldFakeNVData.BootTimeOut = NewBmmData-BootTimeOut;
+  }
 
   //
   // Check data which located in Driver Options Menu and save the settings if 
need
   //  
   if (CompareMem (NewBmmData-DriverOptionDel, OldBmmData-DriverOptionDel, 
sizeof (NewBmmData-DriverOptionDel)) != 0) {   
@@ -386,17 +403,116 @@ BootMaintRouteConfig (
  Index++) {
   NewMenuEntry= BOpt_GetMenuEntry (DriverOptionMenu, Index);
   NewLoadContext  = (BM_LOAD_CONTEXT *) 
NewMenuEntry-VariableContext;
   NewLoadContext-Deleted = NewBmmData-DriverOptionDel[Index];
   NewBmmData-DriverOptionDel[Index] = FALSE;
+  NewBmmData-DriverOptionDelMark[Index] = FALSE;
 }
 Var_DelDriverOption ();  
   }
   
   if (CompareMem (NewBmmData-DriverOptionOrder, 
OldBmmData-DriverOptionOrder, sizeof (NewBmmData-DriverOptionOrder)) != 0) {  
 Status = Var_UpdateDriverOrder (Private);
-  }  
+  }
+
+  if (CompareMem (NewBmmData-ConsoleOutMode, OldBmmData-ConsoleOutMode, 
sizeof (NewBmmData-ConsoleOutMode)) != 0){
+Var_UpdateConMode(Private);
+  }
+
+  TerminalAttChange = FALSE;
+  for (Index = 0; Index  TerminalMenu.MenuNumber; Index++) {
+
+//
+// only need update modified items
+//
+if (CompareMem (NewBmmData-COMBaudRate[Index], 

Re: [edk2] [PATCH v2 00/16] unify GCC command line options

2015-08-19 Thread Ard Biesheuvel
On 19 August 2015 at 09:53, Ard Biesheuvel ard.biesheu...@linaro.org wrote:
 On 18 August 2015 at 22:29, Ard Biesheuvel ard.biesheu...@linaro.org wrote:
 On 18 August 2015 at 22:03, Ard Biesheuvel ard.biesheu...@linaro.org wrote:
 On 18 August 2015 at 19:35, David Woodhouse dw...@infradead.org wrote:
 On Tue, 2015-08-18 at 17:52 +0200, Ard Biesheuvel wrote:
 On 18 August 2015 at 17:19, Jordan Justen jordan.l.jus...@intel.com 
 wrote:
  Last time I checked, GCC44 ~ GCC49 all produced images roughly in the
  same ball park size-wise. UNIXGCC produced much larger images because
  it could not strip unused functions/data.

 Yeah, that is still true, unfortunately.

 Is it really still true?

 https://sourceware.org/bugzilla/show_bug.cgi?id=11539#c14

 If the patch that Nick committed to fix this *isn't* working, please
 add a comment telling him that :)


 I did a quick test with the gdb-7.10-branch of binutils-gdb, and while
 it does make some difference, it is still not sufficient

 Building OvmfX64 in RELEASE mode gives me

 Before:
   the required fv image size 0xd67c0 exceeds the set fv image size 0xcc000

 After:
   the required fv image size 0xd2a18 exceeds the set fv image size 0xcc000

 where GCC/ELF obviously produces something  0xcc000


 I had mistakenly omitted the -ffunction-sections -fdata-sections
 switches, but adding those makes it even worse

   the required fv image size 0xdbf98 exceeds the set fv image size 0xcc000

 so there is definitely something dodgy going on here.


 I managed to make this work by also adding the
 -fno-asynchronous-unwind-tables option. It appears that
 (unsurprisingly) the unwinding info is preventing code from being
 pruned.

 So with  -Os -ffunction-sections -fdata-sections
 -fno-asynchronous-unwind-tables, we get even better results than
 GCC49, since we can actually turn on size optimization for MinGW.
 On GCC49, we can only enable optimization if we also enable
 -maccumulate-outgoing-args, which -according to the man page- results
 in a notable increase in code size. (I assume this is the reason we
 don't optimize the GCC49 X64 builds at all)

 If I just look at VolInfo of the FVMAIN_COMPACT.Fv generated by each
 build (UNIXGCC with mingw 4.9 vs GCC49), I get 767 KB for MinGW for
 the file length of the first embedded FV, where GCC49 takes up 794 KB.
 Maybe not spectacular, but more than significant.

As it turns out, the -mcmodel=large we use for GCC4x/X64 is causing
much of the bloat here. If I remove it, the GCC49 build shrinks to 751
KB (Again, the size of the first FV. Note that this is compressed
size, but it is relevant nonetheless)

Does anyone remember why we use that? My build runs fine without it
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] ShellBinPkg: Arm/AArch64 Shell binary update.

2015-08-19 Thread Leif Lindholm
On Wed, Aug 19, 2015 at 01:46:42PM +0200, Ard Biesheuvel wrote:
 The binaries of ShellBinPkg are generated with ShellPkg project 18222.
 
 Contributed-under: TianoCore Contribution Agreement 1.0
 Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org
 ---
 
 These are built with the tiny code model, note the code size reduction
 for AARCH64.

Hmm...

I would prefer to not update the binaries with this until the
-mcmode=tiny patch for BaseTools goes in, though.

 Branch:
 https://git.linaro.org/people/ard.biesheuvel/uefi-next.git/shortlog/refs/heads/binshell
 
  ShellBinPkg/MinUefiShell/AArch64/Shell.efi | Bin 408416 - 387808 bytes
  ShellBinPkg/MinUefiShell/Arm/Shell.efi | Bin 324480 - 330208 bytes
  ShellBinPkg/UefiShell/AArch64/Shell.efi| Bin 945152 - 887136 bytes
  ShellBinPkg/UefiShell/Arm/Shell.efi| Bin 757728 - 769536 bytes
  4 files changed, 0 insertions(+), 0 deletions(-)

Very nice!

 diff --git a/ShellBinPkg/MinUefiShell/AArch64/Shell.efi 
 b/ShellBinPkg/MinUefiShell/AArch64/Shell.efi
 index 7f63d86230e8..d5756e101342 100755
 Binary files a/ShellBinPkg/MinUefiShell/AArch64/Shell.efi and 
 b/ShellBinPkg/MinUefiShell/AArch64/Shell.efi differ
 diff --git a/ShellBinPkg/MinUefiShell/Arm/Shell.efi 
 b/ShellBinPkg/MinUefiShell/Arm/Shell.efi
 index 782489af6960..8a7d7e5b7946 100755
 Binary files a/ShellBinPkg/MinUefiShell/Arm/Shell.efi and 
 b/ShellBinPkg/MinUefiShell/Arm/Shell.efi differ
 diff --git a/ShellBinPkg/UefiShell/AArch64/Shell.efi 
 b/ShellBinPkg/UefiShell/AArch64/Shell.efi
 index 5a44a8ca6189..056da8d2932a 100755
 Binary files a/ShellBinPkg/UefiShell/AArch64/Shell.efi and 
 b/ShellBinPkg/UefiShell/AArch64/Shell.efi differ
 diff --git a/ShellBinPkg/UefiShell/Arm/Shell.efi 
 b/ShellBinPkg/UefiShell/Arm/Shell.efi
 index 5a61df621047..afa91c4d6caf 100755
 Binary files a/ShellBinPkg/UefiShell/Arm/Shell.efi and 
 b/ShellBinPkg/UefiShell/Arm/Shell.efi differ
 -- 
 1.9.1
 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 1/2] ShellPkg: force use of AARCH64 small model when building DEBUG shell

2015-08-19 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey jaben.car...@intel.com

 -Original Message-
 From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
 Ard Biesheuvel
 Sent: Wednesday, August 19, 2015 2:48 AM
 To: edk2-devel@lists.01.org; leif.lindh...@linaro.org
 Cc: Carsey, Jaben jaben.car...@intel.com; Qiu, Shumin
 shumin@intel.com; ler...@redhat.com; Ard Biesheuvel
 ard.biesheu...@linaro.org
 Subject: [edk2] [PATCH v2 1/2] ShellPkg: force use of AARCH64 small model
 when building DEBUG shell
 Importance: High
 
 The tiny code model used by AARCH64 only supports binaries of up to
 1 MB in size. Since the Shell application exceeds that when built in
 DEBUG mode, make sure we build it using the small code model instead.
 
 Cc: Jaben Carsey jaben.car...@intel.com,
 Cc: Shumin Qiu shumin@intel.com
 Contributed-under: TianoCore Contribution Agreement 1.0
 Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org
 Reviewed-by: Leif Lindholm leif.lindh...@linaro.org
 Tested-by: Leif Lindholm leif.lindh...@linaro.org
 ---
  ShellPkg/Application/Shell/Shell.inf | 6 ++
  1 file changed, 6 insertions(+)
 
 diff --git a/ShellPkg/Application/Shell/Shell.inf
 b/ShellPkg/Application/Shell/Shell.inf
 index f7039369227c..09aecf717bd7 100644
 --- a/ShellPkg/Application/Shell/Shell.inf
 +++ b/ShellPkg/Application/Shell/Shell.inf
 @@ -108,3 +108,9 @@ [Pcd]
gEfiShellPkgTokenSpaceGuid.PcdShellForceConsole ## CONSUMES
gEfiShellPkgTokenSpaceGuid.PcdShellSupplier ## CONSUMES
 
 +[BuildOptions.AARCH64]
 +  # The tiny code model used by AARCH64 only supports binaries of up to 1
 MB in
 +  # size. Since the Shell application exceeds that when built in DEBUG mode,
 +  # make sure we build it using the small code model instead.
 +  GCC:DEBUG_*_*_CC_FLAGS = -mcmodel=small
 +  GCC:DEBUG_*_*_DLINK_FLAGS = -z common-page-size=0x1000
 --
 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] [PATCH] ArmPkg: Fix GCC5 build fail

2015-08-19 Thread Leif Lindholm
Hi Scott,

Thanks for this. Apologies, I somehow missed it going past.
This same fix went in as part of Ard's CLANG series (r18193).

Regards,

Leif

On Sun, Jul 19, 2015 at 03:23:17PM -0500, Scott Duplichan wrote:
 Add type cast to fix new GCC5 warning for discarded-array-qualifiers.
 Also remove an unneeded ''.
 
 Contributed-under: TianoCore Contribution Agreement 1.0
 Signed-off-by: Scott Duplichan sc...@notabs.org
 ---
 
  ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c 
 b/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c
 index b1d9c02..296d5c6 100644
 --- a/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c
 +++ b/ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.c
 @@ -111,7 +111,7 @@ WatchdogInterruptHandler (
   EfiResetCold,
   EFI_TIMEOUT,
   StrSize (ResetString),
 - ResetString
 + (VOID *)ResetString
   );
  
// If we got here then the reset didn't work
 
 
 ___
 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] [PATCH] ShellBinPkg: Arm/AArch64 Shell binary update.

2015-08-19 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey jaben.car...@intel.com

 -Original Message-
 From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of
 Leif Lindholm
 Sent: Wednesday, August 19, 2015 8:53 AM
 To: Ard Biesheuvel ard.biesheu...@linaro.org
 Cc: edk2-devel@lists.01.org; ryan.har...@linaro.org
 Subject: Re: [edk2] [PATCH] ShellBinPkg: Arm/AArch64 Shell binary update.
 Importance: High
 
 On Wed, Aug 19, 2015 at 01:46:42PM +0200, Ard Biesheuvel wrote:
  The binaries of ShellBinPkg are generated with ShellPkg project 18222.
 
  Contributed-under: TianoCore Contribution Agreement 1.0
  Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org
  ---
 
  These are built with the tiny code model, note the code size reduction
  for AARCH64.
 
 Hmm...
 
 I would prefer to not update the binaries with this until the
 -mcmode=tiny patch for BaseTools goes in, though.
 
  Branch:
  https://git.linaro.org/people/ard.biesheuvel/uefi-
 next.git/shortlog/refs/heads/binshell
 
   ShellBinPkg/MinUefiShell/AArch64/Shell.efi | Bin 408416 - 387808 bytes
   ShellBinPkg/MinUefiShell/Arm/Shell.efi | Bin 324480 - 330208 bytes
   ShellBinPkg/UefiShell/AArch64/Shell.efi| Bin 945152 - 887136 bytes
   ShellBinPkg/UefiShell/Arm/Shell.efi| Bin 757728 - 769536 bytes
   4 files changed, 0 insertions(+), 0 deletions(-)
 
 Very nice!
 
  diff --git a/ShellBinPkg/MinUefiShell/AArch64/Shell.efi
 b/ShellBinPkg/MinUefiShell/AArch64/Shell.efi
  index 7f63d86230e8..d5756e101342 100755
  Binary files a/ShellBinPkg/MinUefiShell/AArch64/Shell.efi and
 b/ShellBinPkg/MinUefiShell/AArch64/Shell.efi differ
  diff --git a/ShellBinPkg/MinUefiShell/Arm/Shell.efi
 b/ShellBinPkg/MinUefiShell/Arm/Shell.efi
  index 782489af6960..8a7d7e5b7946 100755
  Binary files a/ShellBinPkg/MinUefiShell/Arm/Shell.efi and
 b/ShellBinPkg/MinUefiShell/Arm/Shell.efi differ
  diff --git a/ShellBinPkg/UefiShell/AArch64/Shell.efi
 b/ShellBinPkg/UefiShell/AArch64/Shell.efi
  index 5a44a8ca6189..056da8d2932a 100755
  Binary files a/ShellBinPkg/UefiShell/AArch64/Shell.efi and
 b/ShellBinPkg/UefiShell/AArch64/Shell.efi differ
  diff --git a/ShellBinPkg/UefiShell/Arm/Shell.efi
 b/ShellBinPkg/UefiShell/Arm/Shell.efi
  index 5a61df621047..afa91c4d6caf 100755
  Binary files a/ShellBinPkg/UefiShell/Arm/Shell.efi and
 b/ShellBinPkg/UefiShell/Arm/Shell.efi differ
  --
  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] Help debugging PEIM on Minnowboard Max

2015-08-19 Thread Tian, Feng
EDKII mass storage PEIM drivers were developed for recovery mode, that's why 
you can see a gEfiPeiBootInRecoveryModePpiGuid dependency in their INF files.

So they don't meet your usage model and you need make some code changes and 
introduce a usb host controller PEIM driver like I said before.

As for the BAR, a simple way is booting to shell and see which bar is used in 
DXE phase and then hardcode it in your usb host controller PEIM driver.

Last, as far as I know there is no reference platform enabling pure xhci pei 
support.

-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Eric 
Wittmayer
Sent: Tuesday, August 18, 2015 13:00
To: Tian, Feng; edk2-devel@lists.01.org
Subject: Re: [edk2] Help debugging PEIM on Minnowboard Max

Hi Feng,
   Now I understand the concept.  I was expecting that PEIM would already be 
available for the Minnowboard Max.  Is Usb in the PEI phase not supported in 
Minnowboard?

From my digging in the code today, it seems to enable the xhci controller, 
it's PCI BAR needs to be set and enabled for memory access.  I found memory 
base addresses for some devices in 
Vlv2DeviceRefCodePkg\ValleyView2Soc\NorthCluster\Include\PlatformBaseAddress
es.h but not for XHCI.  From looking at the Atom E3800 datasheet, the xhci 
memory base doesn't have a fixed location so I believe I need to pick an unused 
range in the Low MMIO space to set as the xhci BAR. 

If you or someone else on the list can recommend a different platform that 
already supports xhci in the PEI phase to use as a development platform that 
might be a better option for me.

Thank you again for your patience and prompt responses.

Eric

 -Original Message-
 From: Tian, Feng [mailto:feng.t...@intel.com]
 Sent: Sunday, August 16, 2015 10:20 PM
 To: Eric Wittmayer; edk2-devel@lists.01.org
 Cc: Tian, Feng
 Subject: RE: [edk2] Help debugging PEIM on Minnowboard Max
 
 Do you look into the UsbController.h in MdeModulePkg/Include/Ppi 
 directory?
 
 typedef
 EFI_STATUS
 (EFIAPI *PEI_GET_USB_CONTROLLER)(
   IN  EFI_PEI_SERVICES**PeiServices,
   IN  PEI_USB_CONTROLLER_PPI  *This,
   IN  UINT8   UsbControllerId,
   OUT UINTN   *ControllerType,
   OUT UINTN   *BaseAddress
   );
 
 You need write a PEIM to produce this PPI and implement the above 
 interface according to your platform setting.
 
 For how to write a PEIM module, you can refer to EDKII Module Writer's 
 Guide in edk2.sourceforge.net
 
 Thanks
 Feng
 
 -Original Message-
 From: Eric Wittmayer [mailto:e...@frescologic.com]
 Sent: Monday, August 17, 2015 11:50
 To: Tian, Feng; edk2-devel@lists.01.org
 Subject: RE: [edk2] Help debugging PEIM on Minnowboard Max
 
 Hi Feng,
I see now that XhciPei needs gPeiUsbControllerPpiGuid and creates 
 gPeiUsbHostControllerPpiGuid  which UsbBusPei needs.
 
 I can't seem to figure out what creates gPeiUsbControllerPpiGuid?  I 
 see
it
 listed in the .dec file I'm using but that apparently isn't enough to
 install the Ppi.   What should be installing the gPeiUsbControllerPpiGuid?
 
 Thanks,
 Eric
 
  -Original Message-
  From: Tian, Feng [mailto:feng.t...@intel.com]
  Sent: Sunday, August 16, 2015 6:09 PM
  To: Eric Wittmayer; edk2-devel@lists.01.org
  Cc: Tian, Feng
  Subject: RE: [edk2] Help debugging PEIM on Minnowboard Max
 
  Eric,
 
  I must agree the naming of these usb pei related ppi guids are not 
  good, which misleads you.
 
  There is no the chicken and egg problem. 
  gPeiUsbHostControllerPpiGuid and gPeiUsbControllerPpiGuid are two 
  different ppis. The former is consumed by UsbPei and the latter is 
  consumed by XhciPei. You need write a pei module to produce 
  PeiUsbControllerPpi (see MdeModulePkg/Include/Ppi for
  definitions) at first.
 
  Thanks
  Feng
 
  -Original Message-
  From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf 
  Of Eric Wittmayer
  Sent: Saturday, August 15, 2015 08:12
  To: edk2-devel@lists.01.org
  Subject: [edk2] Help debugging PEIM on Minnowboard Max
 
  I'm writing a PEIM for a USB3 device but having trouble even getting 
  the UsbBusPie and XhciPei modules to load during boot.
 
  I thought getting the existing Usb Peims to load would be a good 
  first
 step.
  I looked at the DEPEX for both of the above modules and tried 
  removing gEfiPeiBootInRecoveryModePpiGuid but I didn't see them 
  load.  If I set both of their DEPEX == TRUE then I see some print 
  statements that show they are at least trying to load but then I 
  have a chicken and egg problem
 in
  that UsbBusPie needs either gPeiUsbHostControllerPpiGuid or 
  gPeiUsb2HostControllerPpiGuid which come from XhciPei.  However, 
  XhciPei needs gPeiUsbControllerPpiGuid which comes from UsbBusPei 
  before  it will install the gPeiUsb2HostControllerPpiGuid.  The same 
  cross dependency is shown in the DEPEX for these two modules.
 
  I feel like I'm missing something simple and 

Re: [edk2] [PATCH v2 2/2] OvmfPkg: Add HttpBoot support

2015-08-19 Thread Fu, Siyuan
Reviewed-by: Fu Siyuan siyuan...@intel.com

-Original Message-
From: Gary Ching-Pang Lin [mailto:g...@suse.com] 
Sent: Monday, August 17, 2015 4:21 PM
To: edk2-devel@lists.01.org
Cc: Laszlo Ersek; Justen, Jordan L; Fu, Siyuan
Subject: [PATCH v2 2/2] OvmfPkg: Add HttpBoot support

This commit introdues a new build option to OvmfPkg: HTTP_BOOT_ENABLE.
When HttpBoot is enabled, a new Network boot option will show in the boot 
manager menu with the device path like this:

PciRoot(0x0)/Pci(0x3,0x0)/MAC(525400123456,0x1)/IPv4(0.0.0.0)/Uri()

It works like the PXE one but fetches the NBP from the given http url instead 
of the tftp service.

A simple testing environment can be set up with the QEMU tap network and 
dnsmasq + lighttpd.

Here is the example of the dnsmasq config:

  interface=tap interface
  dhcp-range=192.168.111.100,192.168.111.120,12h
  dhcp-option=60,HTTPClient
  dhcp-boot=http://tap ip/efi file

It's similar to the PXE server settings except the tftp function is disabled, 
the option 60 must be HTTPClient, and the boot uri is a http url.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Ching-Pang Lin g...@suse.com
---
 OvmfPkg/OvmfPkgIa32.dsc| 10 ++
 OvmfPkg/OvmfPkgIa32.fdf|  5 +
 OvmfPkg/OvmfPkgIa32X64.dsc | 10 ++  OvmfPkg/OvmfPkgIa32X64.fdf |  5 
+
 OvmfPkg/OvmfPkgX64.dsc | 10 ++
 OvmfPkg/OvmfPkgX64.fdf |  5 +
 6 files changed, 45 insertions(+)

diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc index 
4ab618d..9a6de15 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -35,6 +35,7 @@ [Defines]
   #
   DEFINE SECURE_BOOT_ENABLE  = FALSE
   DEFINE NETWORK_IP6_ENABLE  = FALSE
+  DEFINE HTTP_BOOT_ENABLE= FALSE
 
 [BuildOptions]
   GCC:*_UNIXGCC_*_CC_FLAGS = -DMDEPKG_NDEBUG
@@ -129,6 +130,10 @@ [LibraryClasses]
   
AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
 !endif
 
+!if $(HTTP_BOOT_ENABLE) == TRUE
+  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
+!endif
+
   
S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
   SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
   
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
@@ -551,6 +556,11 @@ [Components]
   MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
   MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
+!if $(HTTP_BOOT_ENABLE) == TRUE
+  NetworkPkg/DnsDxe/DnsDxe.inf
+  NetworkPkg/HttpDxe/HttpDxe.inf
+  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
+!endif
   OvmfPkg/VirtioNetDxe/VirtioNet.inf
 
   #
diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf index 
16675f8..0e4ee49 100644
--- a/OvmfPkg/OvmfPkgIa32.fdf
+++ b/OvmfPkg/OvmfPkgIa32.fdf
@@ -324,6 +324,11 @@ [FV.DXEFV]
   INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
   INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
+!if $(HTTP_BOOT_ENABLE) == TRUE
+  INF  NetworkPkg/DnsDxe/DnsDxe.inf
+  INF  NetworkPkg/HttpDxe/HttpDxe.inf
+  INF  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
+!endif
   INF  OvmfPkg/VirtioNetDxe/VirtioNet.inf
 
 #
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc index 
90ca42a..2f8006d 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -35,6 +35,7 @@ [Defines]
   #
   DEFINE SECURE_BOOT_ENABLE  = FALSE
   DEFINE NETWORK_IP6_ENABLE  = FALSE
+  DEFINE HTTP_BOOT_ENABLE= FALSE
 
 [BuildOptions]
   GCC:*_UNIXGCC_*_CC_FLAGS = -DMDEPKG_NDEBUG
@@ -134,6 +135,10 @@ [LibraryClasses]
   
AuthVariableLib|MdeModulePkg/Library/AuthVariableLibNull/AuthVariableLibNull.inf
 !endif
 
+!if $(HTTP_BOOT_ENABLE) == TRUE
+  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
+!endif
+
   
S3BootScriptLib|MdeModulePkg/Library/PiDxeS3BootScriptLib/DxeS3BootScriptLib.inf
   SmbusLib|MdePkg/Library/BaseSmbusLibNull/BaseSmbusLibNull.inf
   
OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
@@ -558,6 +563,11 @@ [Components.X64]
   MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
   MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
+!if $(HTTP_BOOT_ENABLE) == TRUE
+  NetworkPkg/DnsDxe/DnsDxe.inf
+  NetworkPkg/HttpDxe/HttpDxe.inf
+  NetworkPkg/HttpBootDxe/HttpBootDxe.inf
+!endif
   OvmfPkg/VirtioNetDxe/VirtioNet.inf
 
   #
diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf index 
e6c525a..74412d4 100644
--- a/OvmfPkg/OvmfPkgIa32X64.fdf
+++ b/OvmfPkg/OvmfPkgIa32X64.fdf
@@ -324,6 +324,11 @@ [FV.DXEFV]
   INF  MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
   INF  MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
 !endif
+!if $(HTTP_BOOT_ENABLE) == TRUE
+  INF  NetworkPkg/DnsDxe/DnsDxe.inf
+  INF  NetworkPkg/HttpDxe/HttpDxe.inf
+  INF  

Re: [edk2] [patch] IntelFrameworkModulePkg: Update DEC and DSC version from 0.94 to 0.96

2015-08-19 Thread Gao, Liming
Reviewed-by: Liming Gao liming@intel.com

-Original Message-
From: Tian, Feng 
Sent: Thursday, August 20, 2015 9:26 AM
To: Gao, Liming
Cc: edk2-devel@lists.01.org; Tian, Feng
Subject: [patch] IntelFrameworkModulePkg: Update DEC and DSC version from 0.94 
to 0.96

Update DEC and DSC version to reflect new changes.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian feng.t...@intel.com
---
 IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec | 2 +-  
IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec 
b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
index 66310e6..8bbde8e 100644
--- a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
+++ b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
@@ -21,7 +21,7 @@
   PACKAGE_NAME   = IntelFrameworkModulePkg
   PACKAGE_UNI_FILE   = IntelFrameworkModulePkg.uni
   PACKAGE_GUID   = 88894582-7553-4822-B484-624E24B6DECF
-  PACKAGE_VERSION= 0.94
+  PACKAGE_VERSION= 0.96
 
 [Includes]
   Include# Root include for the package
diff --git a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc 
b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
index 3e1297c..b4adab1 100644
--- a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
+++ b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
@@ -22,7 +22,7 @@
 [Defines]
   PLATFORM_NAME  = IntelFrameworkModuleAll
   PLATFORM_GUID  = FFF87D9A-E5BB-4AFF-9ADE-8645492E8087
-  PLATFORM_VERSION   = 0.94
+  PLATFORM_VERSION   = 0.96
   DSC_SPECIFICATION  = 0x00010005
   OUTPUT_DIRECTORY   = Build/IntelFrameworkModuleAll
   SUPPORTED_ARCHITECTURES= IA32|IPF|X64|EBC|ARM
--
1.9.5.msysgit.0

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH] SecurityPkg: Update Package version to 0.96

2015-08-19 Thread Long, Qin
Reviewed-by: Qin Long qin.l...@intel.com


 -Original Message-
 From: Zhang, Chao B
 Sent: Thursday, August 20, 2015 10:11 AM
 To: edk2-devel@lists.01.org
 Cc: Long, Qin; Zhang, Chao B
 Subject: [PATCH] SecurityPkg: Update Package version to 0.96
 
 Update Package version to 0.96
 
 Contributed-under: TianoCore Contribution Agreement 1.0
 Signed-off-by: Chao Zhang chao.b.zh...@intel.com
 ---
  SecurityPkg/SecurityPkg.dec | 2 +-
  SecurityPkg/SecurityPkg.dsc | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/SecurityPkg/SecurityPkg.dec b/SecurityPkg/SecurityPkg.dec index
 b0ef20b..0601954 100644
 --- a/SecurityPkg/SecurityPkg.dec
 +++ b/SecurityPkg/SecurityPkg.dec
 @@ -21,7 +21,7 @@
PACKAGE_NAME   = SecurityPkg
PACKAGE_UNI_FILE   = SecurityPkg.uni
PACKAGE_GUID   = 4EFC4F66-6219-4427-B780-FB99F470767F
 -  PACKAGE_VERSION= 0.95
 +  PACKAGE_VERSION= 0.96
 
  [Includes]
Include
 diff --git a/SecurityPkg/SecurityPkg.dsc b/SecurityPkg/SecurityPkg.dsc index
 fa94d90..f885dd9 100644
 --- a/SecurityPkg/SecurityPkg.dsc
 +++ b/SecurityPkg/SecurityPkg.dsc
 @@ -15,7 +15,7 @@
  [Defines]
PLATFORM_NAME  = SecurityPkg
PLATFORM_GUID  = B2C4614D-AE76-47ba-B876-5988BFED064F
 -  PLATFORM_VERSION   = 0.95
 +  PLATFORM_VERSION   = 0.96
DSC_SPECIFICATION  = 0x00010005
OUTPUT_DIRECTORY   = Build/SecurityPkg
SUPPORTED_ARCHITECTURES= IA32|IPF|X64|EBC
 --
 1.9.5.msysgit.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [patch] IntelFrameworkPkg: Update DEC and DSC version from 0.94 to 0.96

2015-08-19 Thread Gao, Liming
Reviewed-by: Liming Gao liming@intel.com

-Original Message-
From: Tian, Feng 
Sent: Thursday, August 20, 2015 9:26 AM
To: Gao, Liming
Cc: edk2-devel@lists.01.org; Tian, Feng
Subject: [patch] IntelFrameworkPkg: Update DEC and DSC version from 0.94 to 0.96

Update DEC and DSC version to reflect new changes.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian feng.t...@intel.com
---
 IntelFrameworkPkg/IntelFrameworkPkg.dec | 4 ++--  
IntelFrameworkPkg/IntelFrameworkPkg.dsc | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/IntelFrameworkPkg/IntelFrameworkPkg.dec 
b/IntelFrameworkPkg/IntelFrameworkPkg.dec
index 7620ec8..5cfe99c 100644
--- a/IntelFrameworkPkg/IntelFrameworkPkg.dec
+++ b/IntelFrameworkPkg/IntelFrameworkPkg.dec
@@ -2,7 +2,7 @@
 # Intel Framework Package Reference Implementations  #  # This package 
provides definitions and libraries that comply to Intel Framework 
Specifications.
-# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.BR
+# Copyright (c) 2007 - 2015, Intel Corporation. All rights 
+reserved.BR
 #
 #This program and the accompanying materials are licensed and made 
available
 #under the terms and conditions of the BSD License which accompanies this 
distribution.
@@ -17,7 +17,7 @@
   PACKAGE_NAME   = IntelFrameworkPkg
   PACKAGE_UNI_FILE   = IntelFrameworkPkg.uni
   PACKAGE_GUID   = 2759ded5-bb57-4b06-af4f-c398fa552719
-  PACKAGE_VERSION= 0.94
+  PACKAGE_VERSION= 0.96
 
 [Includes]
   Include# Root include for the package
diff --git a/IntelFrameworkPkg/IntelFrameworkPkg.dsc 
b/IntelFrameworkPkg/IntelFrameworkPkg.dsc
index 15f4665..93a76d6 100644
--- a/IntelFrameworkPkg/IntelFrameworkPkg.dsc
+++ b/IntelFrameworkPkg/IntelFrameworkPkg.dsc
@@ -3,7 +3,7 @@
 #
 # This DSC file is used for Package Level build.
 #
-# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.BR
+# Copyright (c) 2007 - 2015, Intel Corporation. All rights 
+reserved.BR
 #
 #This program and the accompanying materials
 #are licensed and made available under the terms and conditions of the BSD 
License
@@ -23,7 +23,7 @@
 [Defines]
   PLATFORM_NAME  = IntelFramework
   PLATFORM_GUID  = E76EB141-6EDB-43f3-A455-EF24A79673DD
-  PLATFORM_VERSION   = 0.94
+  PLATFORM_VERSION   = 0.96
   DSC_SPECIFICATION  = 0x00010005
   OUTPUT_DIRECTORY   = Build/IntelFramework
   SUPPORTED_ARCHITECTURES= IA32|IPF|X64|EBC|ARM
--
1.9.5.msysgit.0

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 1/2] NetworkPkg: Remove the hostname from the http request url

2015-08-19 Thread Fu, Siyuan
Hi, Gray

The URI in the request line could be either an absolute URI or an abs path, 
both are allowed according to RFC2616 section 5.1.2, so we let the caller of 
EFI_HTTP_PROTOCOL to decide what kind of the URI they want to use, and not 
modify it. In your patch you assume the input RequestData-Url is always an abs 
path so I think it's not a correct fix.

Quote from RFC2616:

Request-URI= * | absoluteURI | abs_path | authority

example would be
OPTIONS * HTTP/1.1
Or
GET http://www.w3.org/pub/WWW/TheProject.html HTTP/1.1
Or
GET /pub/WWW/TheProject.html HTTP/1.1

Siyuan

-Original Message-
From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Gary 
Ching-Pang Lin
Sent: Monday, August 17, 2015 4:21 PM
To: edk2-devel@lists.01.org
Cc: Justen, Jordan L; Fu, Siyuan; Laszlo Ersek
Subject: [edk2] [PATCH v2 1/2] NetworkPkg: Remove the hostname from the http 
request url

The hostname is already set in the header of the http request.
The url shouldn't contain the hostname since the hostname will be prepended to 
the url when the server interprets the request.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Ching-Pang Lin g...@suse.com
Reviewed-by: Ye Ting ting...@intel.com
---
 NetworkPkg/HttpDxe/HttpImpl.c | 14 +-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c 
index 545fe42..030dcfe 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.c
+++ b/NetworkPkg/HttpDxe/HttpImpl.c
@@ -227,6 +227,7 @@ EfiHttpRequest (
   CHAR16*HostNameStr;
   HTTP_TOKEN_WRAP   *Wrap;
   HTTP_TCP_TOKEN_WRAP   *TcpWrap;
+  CHAR8 *FileUrl;
 
   if ((This == NULL) || (Token == NULL)) {
 return EFI_INVALID_PARAMETER;
@@ -450,7 +451,18 @@ EfiHttpRequest (
   //
   // Create request message.
   //
-  RequestStr = HttpGenRequestString (HttpInstance, HttpMsg, Url);
+  FileUrl = Url;
+  while (*FileUrl != ':')
+FileUrl++;
+  if ((*(FileUrl+1) == '/')  (*(FileUrl+2) == '/')) {
+FileUrl += 3;
+while (*FileUrl != '/')
+  FileUrl++;
+  } else {
+Status = EFI_INVALID_PARAMETER;
+goto Error3;
+  }
+  RequestStr = HttpGenRequestString (HttpInstance, HttpMsg, FileUrl);
   if (RequestStr == NULL) {
 Status = EFI_OUT_OF_RESOURCES;
 goto Error3;
--
2.1.4

___
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] MdeModulePkg: Update DSC version from 0.94 to 0.96

2015-08-19 Thread Tian Feng
Update DSC version to reflect new changes for UEFI2.5 and PI1.4.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian feng.t...@intel.com
---
 MdeModulePkg/MdeModulePkg.dsc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc
index 20edc08..c99167b 100644
--- a/MdeModulePkg/MdeModulePkg.dsc
+++ b/MdeModulePkg/MdeModulePkg.dsc
@@ -17,7 +17,7 @@
 [Defines]
   PLATFORM_NAME  = MdeModule
   PLATFORM_GUID  = 587CE499-6CBE-43cd-94E2-186218569478
-  PLATFORM_VERSION   = 0.94
+  PLATFORM_VERSION   = 0.96
   DSC_SPECIFICATION  = 0x00010005
   OUTPUT_DIRECTORY   = Build/MdeModule
   SUPPORTED_ARCHITECTURES= IA32|IPF|X64|EBC|ARM|AARCH64
-- 
1.9.5.msysgit.0

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [patch] IntelFrameworkModulePkg: Update DEC and DSC version from 0.94 to 0.96

2015-08-19 Thread Tian Feng
Update DEC and DSC version to reflect new changes.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian feng.t...@intel.com
---
 IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec | 2 +-
 IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec 
b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
index 66310e6..8bbde8e 100644
--- a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
+++ b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
@@ -21,7 +21,7 @@
   PACKAGE_NAME   = IntelFrameworkModulePkg
   PACKAGE_UNI_FILE   = IntelFrameworkModulePkg.uni
   PACKAGE_GUID   = 88894582-7553-4822-B484-624E24B6DECF
-  PACKAGE_VERSION= 0.94
+  PACKAGE_VERSION= 0.96
 
 [Includes]
   Include# Root include for the package
diff --git a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc 
b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
index 3e1297c..b4adab1 100644
--- a/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
+++ b/IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
@@ -22,7 +22,7 @@
 [Defines]
   PLATFORM_NAME  = IntelFrameworkModuleAll
   PLATFORM_GUID  = FFF87D9A-E5BB-4AFF-9ADE-8645492E8087
-  PLATFORM_VERSION   = 0.94
+  PLATFORM_VERSION   = 0.96
   DSC_SPECIFICATION  = 0x00010005
   OUTPUT_DIRECTORY   = Build/IntelFrameworkModuleAll
   SUPPORTED_ARCHITECTURES= IA32|IPF|X64|EBC|ARM
-- 
1.9.5.msysgit.0

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH] SecurityPkg: Update Package version to 0.96

2015-08-19 Thread Zhang, Chao B
Update Package version to 0.96

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang chao.b.zh...@intel.com
---
 SecurityPkg/SecurityPkg.dec | 2 +-
 SecurityPkg/SecurityPkg.dsc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/SecurityPkg/SecurityPkg.dec b/SecurityPkg/SecurityPkg.dec
index b0ef20b..0601954 100644
--- a/SecurityPkg/SecurityPkg.dec
+++ b/SecurityPkg/SecurityPkg.dec
@@ -21,7 +21,7 @@
   PACKAGE_NAME   = SecurityPkg
   PACKAGE_UNI_FILE   = SecurityPkg.uni
   PACKAGE_GUID   = 4EFC4F66-6219-4427-B780-FB99F470767F
-  PACKAGE_VERSION= 0.95
+  PACKAGE_VERSION= 0.96
 
 [Includes]
   Include
diff --git a/SecurityPkg/SecurityPkg.dsc b/SecurityPkg/SecurityPkg.dsc
index fa94d90..f885dd9 100644
--- a/SecurityPkg/SecurityPkg.dsc
+++ b/SecurityPkg/SecurityPkg.dsc
@@ -15,7 +15,7 @@
 [Defines]
   PLATFORM_NAME  = SecurityPkg
   PLATFORM_GUID  = B2C4614D-AE76-47ba-B876-5988BFED064F
-  PLATFORM_VERSION   = 0.95
+  PLATFORM_VERSION   = 0.96
   DSC_SPECIFICATION  = 0x00010005
   OUTPUT_DIRECTORY   = Build/SecurityPkg
   SUPPORTED_ARCHITECTURES= IA32|IPF|X64|EBC
-- 
1.9.5.msysgit.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2] ArmPkg: remove ARMv6 support code

2015-08-19 Thread Ard Biesheuvel
On 19 August 2015 at 12:47, Leif Lindholm leif.lindh...@linaro.org wrote:
 On Wed, Aug 19, 2015 at 11:51:46AM +0200, Ard Biesheuvel wrote:
 No platforms use the ARMv6 (ARM11) support code anymore. In fact, the
 only reference to it in ArmPkg.dsc was commented out by Andrew in SVN
 r11298 (2011-02-03) so it may well be broken. So remove it.

 48h have passed.
 Reviewed-by: Leif Lindholm leif.lindh...@linaro.org


Thanks
Committed as SVN r18237

-- 
Ard.

 Contributed-under: TianoCore Contribution Agreement 1.0
 Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org
 ---
 v2: remove more outdated '#ifdef ARM_CPU_ARMv6' from ArmLib

  ArmPkg/ArmPkg.dsc  |   4 -
  ArmPkg/Drivers/ArmCpuLib/Arm11MpCoreLib/Arm11Lib.c |  37 ---
  ArmPkg/Drivers/ArmCpuLib/Arm11MpCoreLib/Arm11MpCoreLib.inf |  32 ---
  ArmPkg/Include/Library/ArmLib.h|   6 +-
  ArmPkg/Library/ArmLib/Arm11/Arm11Lib.c |  49 
  ArmPkg/Library/ArmLib/Arm11/Arm11Lib.inf   |  50 
  ArmPkg/Library/ArmLib/Arm11/Arm11LibMem.c  | 135 --
  ArmPkg/Library/ArmLib/Arm11/Arm11LibPrePi.inf  |  50 
  ArmPkg/Library/ArmLib/Arm11/Arm11LibSec.inf|  46 
  ArmPkg/Library/ArmLib/Arm11/Arm11Support.S | 257 
 
  ArmPkg/Library/ArmLib/Arm11/Arm11Support.asm   | 157 
 
  ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.S   |   6 -
  ArmPkg/Library/ArmLib/Common/Arm/ArmLibSupport.asm |   6 -
  13 files changed, 1 insertion(+), 834 deletions(-)

 diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc
 index 10e8a1a83d46..1237eed65953 100644
 --- a/ArmPkg/ArmPkg.dsc
 +++ b/ArmPkg/ArmPkg.dsc
 @@ -152,10 +152,6 @@ [Components.ARM]
ArmPkg/Drivers/ArmCpuLib/ArmCortexA9Lib/ArmCortexA9Lib.inf
ArmPkg/Drivers/ArmCpuLib/ArmCortexA15Lib/ArmCortexA15Lib.inf

 -#  ArmPkg/Library/ArmLib/Arm11/Arm11ArmLib.inf
 -#  ArmPkg/Library/ArmLib/Arm11/Arm11ArmLibPrePi.inf
 -#  ArmPkg/Library/ArmLib/Arm9/Arm9ArmLib.inf
 -#  ArmPkg/Library/ArmLib/Arm9/Arm9ArmLibPrePi.inf
ArmPkg/Library/ArmLib/ArmV7/ArmV7LibSec.inf
ArmPkg/Library/ArmLib/ArmV7/ArmV7LibPrePi.inf

 diff --git a/ArmPkg/Drivers/ArmCpuLib/Arm11MpCoreLib/Arm11Lib.c 
 b/ArmPkg/Drivers/ArmCpuLib/Arm11MpCoreLib/Arm11Lib.c
 deleted file mode 100644
 index a08b7b1aee3f..
 --- a/ArmPkg/Drivers/ArmCpuLib/Arm11MpCoreLib/Arm11Lib.c
 +++ /dev/null
 @@ -1,37 +0,0 @@
 -/** @file
 -
 -  Copyright (c) 2011-2012, ARM Limited. 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.
 -
 -**/
 -
 -#include Base.h
 -#include Library/ArmLib.h
 -#include Library/ArmCpuLib.h
 -#include Library/IoLib.h
 -#include Library/PcdLib.h
 -
 -VOID
 -ArmCpuSetup (
 -  IN  UINTN MpId
 -  )
 -{
 -  ASSERT(0); //TODO: Implement me
 -}
 -
 -
 -VOID
 -ArmCpuSetupSmpNonSecure (
 -  IN  UINTN MpId
 -  )
 -{
 -  ASSERT(0); //TODO: Implement me
 -}
 -
 diff --git a/ArmPkg/Drivers/ArmCpuLib/Arm11MpCoreLib/Arm11MpCoreLib.inf 
 b/ArmPkg/Drivers/ArmCpuLib/Arm11MpCoreLib/Arm11MpCoreLib.inf
 deleted file mode 100644
 index 3a796c19d0cc..
 --- a/ArmPkg/Drivers/ArmCpuLib/Arm11MpCoreLib/Arm11MpCoreLib.inf
 +++ /dev/null
 @@ -1,32 +0,0 @@
 -#/* @file
 -#  Copyright (c) 2011-2012, ARM Limited. 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.
 -#
 -#*/
 -
 -[Defines]
 -  INF_VERSION= 0x00010005
 -  BASE_NAME  = Arm11MpCoreLib
 -  FILE_GUID  = dc8a69e0-6be0-469c-94d3-5e6d71aa9808
 -  MODULE_TYPE= BASE
 -  VERSION_STRING = 1.0
 -  LIBRARY_CLASS  = ArmCpuLib
 -
 -[Packages]
 -  MdePkg/MdePkg.dec
 -  ArmPkg/ArmPkg.dec
 -
 -[LibraryClasses]
 -  ArmLib
 -  IoLib
 -  PcdLib
 -
 -[Sources.common]
 -  Arm11Lib.c
 diff --git a/ArmPkg/Include/Library/ArmLib.h 
 b/ArmPkg/Include/Library/ArmLib.h
 index 9effb3eea9bf..c83a5a7f1b3c 100644
 --- a/ArmPkg/Include/Library/ArmLib.h
 +++ b/ArmPkg/Include/Library/ArmLib.h
 @@ -19,11 +19,7 @@
  #include Uefi/UefiBaseType.h

  #ifdef MDE_CPU_ARM
 -  #ifdef 

Re: [edk2] [PATCH v3 1/2] NetworkPkg: Remove the hostname from the http request URL

2015-08-19 Thread Fu, Siyuan
The patch is good, do you have access authority of edk2? Or I can help to 
commit this patch.

Reviewed-by: Fu Siyuan siyuan...@intel.com




-Original Message-
From: Gary Ching-Pang Lin [mailto:g...@suse.com] 
Sent: Thursday, August 20, 2015 11:49 AM
To: edk2-devel@lists.01.org
Cc: Laszlo Ersek; Justen, Jordan L; Fu, Siyuan
Subject: [PATCH v3 1/2] NetworkPkg: Remove the hostname from the http request 
URL

Per RFC7230, the URL must be a absolute-path when making a request directly to 
the server. Since proxy is not supported now, all requests to the HTTP driver 
are actually direct requests. This commit removes the scheme and the hostname 
from the URL in the http request if the URL is an absolute-URI so that the HTTP 
server can interpret the request properly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Ching-Pang Lin g...@suse.com
Reviewed-by: Ye Ting ting...@intel.com
---
 NetworkPkg/HttpDxe/HttpImpl.c | 19 ++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c 
index 545fe42..6684f77 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.c
+++ b/NetworkPkg/HttpDxe/HttpImpl.c
@@ -227,6 +227,7 @@ EfiHttpRequest (
   CHAR16*HostNameStr;
   HTTP_TOKEN_WRAP   *Wrap;
   HTTP_TCP_TOKEN_WRAP   *TcpWrap;
+  CHAR8 *FileUrl;
 
   if ((This == NULL) || (Token == NULL)) {
 return EFI_INVALID_PARAMETER;
@@ -450,7 +451,23 @@ EfiHttpRequest (
   //
   // Create request message.
   //
-  RequestStr = HttpGenRequestString (HttpInstance, HttpMsg, Url);
+  FileUrl = Url;
+  if (*FileUrl != '/') {
+//
+// Convert the absolute-URI to the absolute-path
+//
+while (*FileUrl != ':')
+  FileUrl++;
+if ((*(FileUrl+1) == '/')  (*(FileUrl+2) == '/')) {
+  FileUrl += 3;
+  while (*FileUrl != '/')
+FileUrl++;
+} else {
+  Status = EFI_INVALID_PARAMETER;
+  goto Error3;
+}
+  }
+  RequestStr = HttpGenRequestString (HttpInstance, HttpMsg, FileUrl);
   if (RequestStr == NULL) {
 Status = EFI_OUT_OF_RESOURCES;
 goto Error3;
--
2.1.4

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2] NetworkPkg: Fix DHCP TransmitReceive EFI_NO_MAPPING return in DnsDxe

2015-08-19 Thread Wu, Jiaxin
Becase EFI_TIMEOUT and EFI_NO_MAPPING are not the returned code in 
Dns4Configure according UEFI spec. That is also the reason why DNS  driver 
should handle this case. We can use EFI_DEVICE_ERROR instead since it means an 
unexpected network error occurred.

For the DnsStartIp4(), I will add the error code description before checkin my 
code.

Thanks.
Jiaxin

-Original Message-
From: Ye, Ting 
Sent: Wednesday, August 19, 2015 2:38 PM
To: Wu, Jiaxin; edk2-devel@lists.01.org
Cc: Zhang, Lubo
Subject: RE: [PATCH v2] NetworkPkg: Fix DHCP TransmitReceive EFI_NO_MAPPING 
return in DnsDxe

When timeout, why don't use EFI_TIMEOUT as error code? Also, the error code is 
missed in function description of DnsStartIp4().
Other parts are good to me.

Reviewed-by: Ye Ting ting...@intel.com 

-Original Message-
From: Wu, Jiaxin
Sent: Wednesday, August 19, 2015 1:49 PM
To: edk2-devel@lists.01.org
Cc: Ye, Ting; Zhang, Lubo
Subject: [PATCH v2] NetworkPkg: Fix DHCP TransmitReceive EFI_NO_MAPPING return 
in DnsDxe

v2:
* Add Timeout check, if time out, return EFI_DEVICE_ERROR.

If the default station address is not available, TransmitReceive function will 
return EFI_NO_MAPPING. DNS driver should handle this case. This issue is caused 
by the r18201 fix.

Cc: Ye Ting ting...@intel.com
Cc: Zhang Lubo lubo.zh...@intel.com
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu jiaxin...@intel.com
---
 NetworkPkg/DnsDxe/DnsDhcp.c  | 155 +++
 NetworkPkg/DnsDxe/DnsDxe.inf |   2 +
 2 files changed, 157 insertions(+)

diff --git a/NetworkPkg/DnsDxe/DnsDhcp.c b/NetworkPkg/DnsDxe/DnsDhcp.c index 
1cc337f..d0a0888 100644
--- a/NetworkPkg/DnsDxe/DnsDhcp.c
+++ b/NetworkPkg/DnsDxe/DnsDhcp.c
@@ -13,10 +13,155 @@ Intel Corporation.
 **/
 
 #include DnsImpl.h
 
 /**
+  The callback function for the timer event used to get map.
+
+  @param[in] EventThe event this function is registered to.
+  @param[in] Context  The context registered to the event.
+**/
+VOID
+EFIAPI
+TimeoutToGetMap (
+  IN EFI_EVENT  Event,
+  IN VOID   *Context
+  )
+{
+  *((BOOLEAN *) Context) = TRUE;
+  return ;
+}
+
+/**
+  Create an IP child, use it to start the auto configuration, then destroy it.
+
+  @param[in] Controller   The controller which has the service installed.
+  @param[in] ImageThe image handle used to open service.
+
+  @retval EFI_SUCCESS The configuration is done.
+**/
+EFI_STATUS
+EFIAPI
+DnsStartIp4(
+  IN  EFI_HANDLEController,
+  IN  EFI_HANDLEImage
+  )
+{
+  EFI_IP4_PROTOCOL  *Ip4;
+  EFI_HANDLEIp4Handle;
+  EFI_EVENT TimerToGetMap;
+  EFI_IP4_CONFIG_DATA   Ip4ConfigData;
+  EFI_IP4_MODE_DATA Ip4Mode;
+  EFI_STATUSStatus;
+
+  BOOLEAN   Timeout;
+
+  //
+  // Get the Ip4ServiceBinding Protocol  //
+  Ip4Handle = NULL;
+  Ip4   = NULL;
+  TimerToGetMap = NULL;
+  
+  Timeout  = FALSE;
+
+  Status = NetLibCreateServiceChild (
+ Controller,
+ Image,
+ gEfiIp4ServiceBindingProtocolGuid,
+ Ip4Handle
+ );
+
+  if (EFI_ERROR (Status)) {
+return Status;
+  }
+
+  Status = gBS-OpenProtocol (
+ Ip4Handle,
+ gEfiIp4ProtocolGuid,
+ (VOID **) Ip4,
+ Controller,
+ Image,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+
+  if (EFI_ERROR (Status)) {
+goto ON_EXIT;
+  }
+
+  Ip4ConfigData.DefaultProtocol  = EFI_IP_PROTO_ICMP;
+  Ip4ConfigData.AcceptAnyProtocol= FALSE;
+  Ip4ConfigData.AcceptIcmpErrors = FALSE;
+  Ip4ConfigData.AcceptBroadcast  = FALSE;
+  Ip4ConfigData.AcceptPromiscuous= FALSE;
+  Ip4ConfigData.UseDefaultAddress= TRUE;
+  ZeroMem (Ip4ConfigData.StationAddress, sizeof (EFI_IPv4_ADDRESS));  
+ ZeroMem (Ip4ConfigData.SubnetMask, sizeof (EFI_IPv4_ADDRESS));
+  Ip4ConfigData.TypeOfService= 0;
+  Ip4ConfigData.TimeToLive   = 1;
+  Ip4ConfigData.DoNotFragment= FALSE;
+  Ip4ConfigData.RawData  = FALSE;
+  Ip4ConfigData.ReceiveTimeout   = 0;
+  Ip4ConfigData.TransmitTimeout  = 0;
+
+  Status = Ip4-Configure (Ip4, Ip4ConfigData);
+
+  if (Status == EFI_NO_MAPPING) {
+Status  = gBS-CreateEvent (
+EVT_NOTIFY_SIGNAL | EVT_TIMER,
+TPL_CALLBACK,
+TimeoutToGetMap,
+Timeout,
+TimerToGetMap
+);
+
+if (EFI_ERROR (Status)) {
+  goto ON_EXIT;
+}
+
+Status = gBS-SetTimer (
+   TimerToGetMap,
+   TimerRelative,
+   MultU64x32 (1000, 5)
+   );
+
+if (EFI_ERROR (Status)) {
+  goto ON_EXIT;
+}

[edk2] [Patch] NetworkPkg: Update the NetworkPkg package version

2015-08-19 Thread Jiaxin Wu
This patch is used to update the NetworkPkg package version.

Cc: Fu Siyuan siyuan...@intel.com
Cc: Ye Ting ting...@intel.com
Cc: Chao Zhangchao.b.zh...@intel.com
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu jiaxin...@intel.com
---
 NetworkPkg/NetworkPkg.dec | 2 +-
 NetworkPkg/NetworkPkg.dsc | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/NetworkPkg/NetworkPkg.dec b/NetworkPkg/NetworkPkg.dec
index e7f86bd..de5dabe 100644
--- a/NetworkPkg/NetworkPkg.dec
+++ b/NetworkPkg/NetworkPkg.dec
@@ -18,11 +18,11 @@
 
 [Defines]
   DEC_SPECIFICATION  = 0x00010005
   PACKAGE_NAME   = NetworkPkg
   PACKAGE_GUID   = 947988BE-8D5C-471a-893D-AD181C46BEBB
-  PACKAGE_VERSION= 0.95
+  PACKAGE_VERSION= 0.96
   PACKAGE_UNI_FILE   = NetworkPkg.uni
 
 [Includes]
   Include
 
diff --git a/NetworkPkg/NetworkPkg.dsc b/NetworkPkg/NetworkPkg.dsc
index 1d7fd85..0fa91f5 100644
--- a/NetworkPkg/NetworkPkg.dsc
+++ b/NetworkPkg/NetworkPkg.dsc
@@ -1,10 +1,10 @@
 ## @file
 # UEFI 2.4 Network Module Package for All Architectures
 #
 # (C) Copyright 2014 Hewlett-Packard Development Company, L.P.BR
-# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.BR
+# Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.BR
 #
 #This program and the accompanying materials
 #are licensed and made available under the terms and conditions of the BSD 
License
 #which accompanies this distribution. The full text of the license may be 
found at
 #http://opensource.org/licenses/bsd-license.php
@@ -15,11 +15,11 @@
 ##
 
 [Defines]
   PLATFORM_NAME  = NetworkPkg
   PLATFORM_GUID  = 3FD34E9B-E90C-44e1-B510-1F632A509F10
-  PLATFORM_VERSION   = 0.95
+  PLATFORM_VERSION   = 0.96
   DSC_SPECIFICATION  = 0x00010005
   OUTPUT_DIRECTORY   = Build/NetworkPkg
   SUPPORTED_ARCHITECTURES= IA32|IPF|X64|EBC|ARM|AARCH64
   BUILD_TARGETS  = DEBUG|RELEASE
   SKUID_IDENTIFIER   = DEFAULT
-- 
1.9.5.msysgit.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2] NetworkPkg: Fix DHCP TransmitReceive EFI_NO_MAPPING return in DnsDxe

2015-08-19 Thread Zhang, Lubo
Reviewed-by: Lubo Zhang  lubo.zh...@intel.com 

-Original Message-
From: Wu, Jiaxin 
Sent: Wednesday, August 19, 2015 1:49 PM
To: edk2-devel@lists.01.org
Cc: Ye, Ting; Zhang, Lubo
Subject: [PATCH v2] NetworkPkg: Fix DHCP TransmitReceive EFI_NO_MAPPING return 
in DnsDxe

v2:
* Add Timeout check, if time out, return EFI_DEVICE_ERROR.

If the default station address is not available, TransmitReceive function will 
return EFI_NO_MAPPING. DNS driver should handle this case. This issue is caused 
by the r18201 fix.

Cc: Ye Ting ting...@intel.com
Cc: Zhang Lubo lubo.zh...@intel.com
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu jiaxin...@intel.com
---
 NetworkPkg/DnsDxe/DnsDhcp.c  | 155 +++
 NetworkPkg/DnsDxe/DnsDxe.inf |   2 +
 2 files changed, 157 insertions(+)

diff --git a/NetworkPkg/DnsDxe/DnsDhcp.c b/NetworkPkg/DnsDxe/DnsDhcp.c index 
1cc337f..d0a0888 100644
--- a/NetworkPkg/DnsDxe/DnsDhcp.c
+++ b/NetworkPkg/DnsDxe/DnsDhcp.c
@@ -13,10 +13,155 @@ Intel Corporation.
 **/
 
 #include DnsImpl.h
 
 /**
+  The callback function for the timer event used to get map.
+
+  @param[in] EventThe event this function is registered to.
+  @param[in] Context  The context registered to the event.
+**/
+VOID
+EFIAPI
+TimeoutToGetMap (
+  IN EFI_EVENT  Event,
+  IN VOID   *Context
+  )
+{
+  *((BOOLEAN *) Context) = TRUE;
+  return ;
+}
+
+/**
+  Create an IP child, use it to start the auto configuration, then destroy it.
+
+  @param[in] Controller   The controller which has the service installed.
+  @param[in] ImageThe image handle used to open service.
+
+  @retval EFI_SUCCESS The configuration is done.
+**/
+EFI_STATUS
+EFIAPI
+DnsStartIp4(
+  IN  EFI_HANDLEController,
+  IN  EFI_HANDLEImage
+  )
+{
+  EFI_IP4_PROTOCOL  *Ip4;
+  EFI_HANDLEIp4Handle;
+  EFI_EVENT TimerToGetMap;
+  EFI_IP4_CONFIG_DATA   Ip4ConfigData;
+  EFI_IP4_MODE_DATA Ip4Mode;
+  EFI_STATUSStatus;
+
+  BOOLEAN   Timeout;
+
+  //
+  // Get the Ip4ServiceBinding Protocol  //
+  Ip4Handle = NULL;
+  Ip4   = NULL;
+  TimerToGetMap = NULL;
+  
+  Timeout  = FALSE;
+
+  Status = NetLibCreateServiceChild (
+ Controller,
+ Image,
+ gEfiIp4ServiceBindingProtocolGuid,
+ Ip4Handle
+ );
+
+  if (EFI_ERROR (Status)) {
+return Status;
+  }
+
+  Status = gBS-OpenProtocol (
+ Ip4Handle,
+ gEfiIp4ProtocolGuid,
+ (VOID **) Ip4,
+ Controller,
+ Image,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+
+  if (EFI_ERROR (Status)) {
+goto ON_EXIT;
+  }
+
+  Ip4ConfigData.DefaultProtocol  = EFI_IP_PROTO_ICMP;
+  Ip4ConfigData.AcceptAnyProtocol= FALSE;
+  Ip4ConfigData.AcceptIcmpErrors = FALSE;
+  Ip4ConfigData.AcceptBroadcast  = FALSE;
+  Ip4ConfigData.AcceptPromiscuous= FALSE;
+  Ip4ConfigData.UseDefaultAddress= TRUE;
+  ZeroMem (Ip4ConfigData.StationAddress, sizeof (EFI_IPv4_ADDRESS));  
+ ZeroMem (Ip4ConfigData.SubnetMask, sizeof (EFI_IPv4_ADDRESS));
+  Ip4ConfigData.TypeOfService= 0;
+  Ip4ConfigData.TimeToLive   = 1;
+  Ip4ConfigData.DoNotFragment= FALSE;
+  Ip4ConfigData.RawData  = FALSE;
+  Ip4ConfigData.ReceiveTimeout   = 0;
+  Ip4ConfigData.TransmitTimeout  = 0;
+
+  Status = Ip4-Configure (Ip4, Ip4ConfigData);
+
+  if (Status == EFI_NO_MAPPING) {
+Status  = gBS-CreateEvent (
+EVT_NOTIFY_SIGNAL | EVT_TIMER,
+TPL_CALLBACK,
+TimeoutToGetMap,
+Timeout,
+TimerToGetMap
+);
+
+if (EFI_ERROR (Status)) {
+  goto ON_EXIT;
+}
+
+Status = gBS-SetTimer (
+   TimerToGetMap,
+   TimerRelative,
+   MultU64x32 (1000, 5)
+   );
+
+if (EFI_ERROR (Status)) {
+  goto ON_EXIT;
+}
+
+while (!Timeout) {
+  Ip4-Poll (Ip4);
+  
+  if (!EFI_ERROR (Ip4-GetModeData (Ip4, Ip4Mode, NULL, NULL))  
+  Ip4Mode.IsConfigured) {   
+break;
+  }
+}
+
+if (Timeout) {
+  Status = EFI_DEVICE_ERROR;
+}
+  }
+  
+ON_EXIT: 
+
+  if (TimerToGetMap != NULL) {
+gBS-SetTimer (TimerToGetMap, TimerCancel, 0);
+gBS-CloseEvent (TimerToGetMap);
+  }
+
+  NetLibDestroyServiceChild (
+Controller,
+Image,
+gEfiIp4ServiceBindingProtocolGuid,
+Ip4Handle
+);
+  
+  return Status;
+}
+
+/**
   This function initialize the DHCP4 message instance.
 
   This function will pad each item of dhcp4 message packet.
 
   @param  Seed Pointer to the message instance 

[edk2] [Patch] MdeModulePkg: Update UiApp to handle terminal type TtyTerm

2015-08-19 Thread Ruiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni ruiyu...@intel.com
Cc: Eric Dong eric.d...@intel.com
---
 .../Application/UiApp/BootMaint/Bmstring.uni| Bin 41522 - 41794 bytes
 .../Application/UiApp/BootMaint/BootMaint.h |   8 +---
 .../Application/UiApp/BootMaint/ConsoleOption.c |   9 +++--
 MdeModulePkg/Application/UiApp/BootMaint/Data.c |   6 --
 .../Application/UiApp/BootMaint/UpdatePage.c|   2 +-
 5 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/MdeModulePkg/Application/UiApp/BootMaint/Bmstring.uni 
b/MdeModulePkg/Application/UiApp/BootMaint/Bmstring.uni
index 
8d9544db450322835972597234a07d76207e1102..a208127ac6ea76ec5dde6824babf05583a1cfa8d
 100644
GIT binary patch
delta 66
zcmdmVgz3;RrVSN6lLNYh7)T8vMEoVz^1|!Vtm`$q)}DT^WKHd?z0at#4)VKkE8
JT+yj6ad0a6I=iQ

delta 14
WcmX?fjA_#mrVSN6n%`Ui2?vQ4+l;F

diff --git a/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.h 
b/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.h
index 69cf760..e1ac307 100644
--- a/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.h
+++ b/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.h
@@ -18,6 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 #include Ui.h
 #include FormGuid.h
 #include FrontPage.h
+#include Guid/TtyTerm.h
 
 //
 // Constants which are variable names used to access variables
@@ -81,7 +82,8 @@ typedef enum _TYPE_OF_TERMINAL {
   TerminalTypePcAnsi = 0,
   TerminalTypeVt100,
   TerminalTypeVt100Plus,
-  TerminalTypeVtUtf8
+  TerminalTypeVtUtf8,
+  TerminalTypeTtyTerm
 } TYPE_OF_TERMINAL;
 
 typedef enum _FILE_EXPLORER_STATE {
@@ -1452,12 +1454,12 @@ extern BM_MENU_OPTION ConsoleErrMenu;
 extern BM_MENU_OPTION DirectoryMenu;
 extern BM_MENU_OPTION DriverMenu;
 extern BM_MENU_OPTION TerminalMenu;
-extern UINT16 TerminalType[];
+extern UINT16 TerminalType[5];
 extern COM_ATTR   BaudRateList[19];
 extern COM_ATTR   DataBitsList[4];
 extern COM_ATTR   ParityList[5];
 extern COM_ATTR   StopBitsList[3];
-extern EFI_GUID   TerminalTypeGuid[4];
+extern EFI_GUID   TerminalTypeGuid[5];
 extern STRING_DEPOSITORY  *FileOptionStrDepository;
 extern STRING_DEPOSITORY  *ConsoleOptionStrDepository;
 extern STRING_DEPOSITORY  *BootOptionStrDepository;
diff --git a/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c 
b/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
index d86c733..f164db2 100644
--- a/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
+++ b/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
@@ -564,7 +564,7 @@ LocateSerialIo (
 Vendor.Header.Type= MESSAGING_DEVICE_PATH;
 Vendor.Header.SubType = MSG_VENDOR_DP;
 
-for (Index2 = 0; Index2  4; Index2++) {
+for (Index2 = 0; Index2  (sizeof (TerminalTypeGuid) / sizeof 
(TerminalTypeGuid[0])); Index2++) {
   CopyMem (Vendor.Guid, TerminalTypeGuid[Index2], sizeof (EFI_GUID));
   SetDevicePathNodeLength (Vendor.Header, sizeof (VENDOR_DEVICE_PATH));
   NewDevicePath = AppendDevicePathNode (
@@ -940,7 +940,12 @@ IsTerminalDevicePath (
   *Termi  = TerminalTypeVtUtf8;
   IsTerminal  = TRUE;
 } else {
-  IsTerminal = FALSE;
+  if (CompareGuid (Vendor-Guid, TerminalTypeGuid[4])) {
+*Termi  = TerminalTypeTtyTerm;
+IsTerminal  = TRUE;
+  } else {
+IsTerminal = FALSE;
+  }
 }
   }
 }
diff --git a/MdeModulePkg/Application/UiApp/BootMaint/Data.c 
b/MdeModulePkg/Application/UiApp/BootMaint/Data.c
index 7e86211..caf6c60 100644
--- a/MdeModulePkg/Application/UiApp/BootMaint/Data.c
+++ b/MdeModulePkg/Application/UiApp/BootMaint/Data.c
@@ -35,6 +35,7 @@ UINT16  TerminalType[] = {
   STRING_TOKEN(STR_COM_TYPE_1),
   STRING_TOKEN(STR_COM_TYPE_2),
   STRING_TOKEN(STR_COM_TYPE_3),
+  STRING_TOKEN(STR_COM_TYPE_4),
 };
 
 ///
@@ -266,9 +267,10 @@ COM_ATTRStopBitsList[3] = {
 ///
 /// Guid for messaging path, used in Serial port setting.
 ///
-EFI_GUIDTerminalTypeGuid[4] = {
+EFI_GUIDTerminalTypeGuid[] = {
   DEVICE_PATH_MESSAGING_PC_ANSI,
   DEVICE_PATH_MESSAGING_VT_100,
   DEVICE_PATH_MESSAGING_VT_100_PLUS,
-  DEVICE_PATH_MESSAGING_VT_UTF8
+  DEVICE_PATH_MESSAGING_VT_UTF8,
+  EFI_TTY_TERM_GUID
 };
diff --git a/MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c 
b/MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c
index d85f2ea..26de91b 100644
--- a/MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c
+++ b/MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c
@@ -1056,7 +1056,7 @@ UpdateTerminalPage (
   OptionsOpCodeHandle = HiiAllocateOpCodeHandle ();
   ASSERT (OptionsOpCodeHandle 

[edk2] [PATCH v2 1/2] ShellPkg: force use of AARCH64 small model when building DEBUG shell

2015-08-19 Thread Ard Biesheuvel
The tiny code model used by AARCH64 only supports binaries of up to
1 MB in size. Since the Shell application exceeds that when built in
DEBUG mode, make sure we build it using the small code model instead.

Cc: Jaben Carsey jaben.car...@intel.com,
Cc: Shumin Qiu shumin@intel.com
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org
Reviewed-by: Leif Lindholm leif.lindh...@linaro.org
Tested-by: Leif Lindholm leif.lindh...@linaro.org
---
 ShellPkg/Application/Shell/Shell.inf | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/ShellPkg/Application/Shell/Shell.inf 
b/ShellPkg/Application/Shell/Shell.inf
index f7039369227c..09aecf717bd7 100644
--- a/ShellPkg/Application/Shell/Shell.inf
+++ b/ShellPkg/Application/Shell/Shell.inf
@@ -108,3 +108,9 @@ [Pcd]
   gEfiShellPkgTokenSpaceGuid.PcdShellForceConsole ## CONSUMES
   gEfiShellPkgTokenSpaceGuid.PcdShellSupplier ## CONSUMES
 
+[BuildOptions.AARCH64]
+  # The tiny code model used by AARCH64 only supports binaries of up to 1 MB in
+  # size. Since the Shell application exceeds that when built in DEBUG mode,
+  # make sure we build it using the small code model instead.
+  GCC:DEBUG_*_*_CC_FLAGS = -mcmodel=small
+  GCC:DEBUG_*_*_DLINK_FLAGS = -z common-page-size=0x1000
-- 
1.9.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [Patch] MdeModulePkg: Update UiApp to handle terminal type TtyTerm

2015-08-19 Thread Dong, Eric
Reviewed-by: Eric Dong eric.d...@intel.com

-Original Message-
From: Ni, Ruiyu 
Sent: Wednesday, August 19, 2015 5:35 PM
To: edk2-devel@lists.01.org
Cc: Ni, Ruiyu; Dong, Eric
Subject: [Patch] MdeModulePkg: Update UiApp to handle terminal type TtyTerm

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni ruiyu...@intel.com
Cc: Eric Dong eric.d...@intel.com
---
 .../Application/UiApp/BootMaint/Bmstring.uni| Bin 41522 - 41794 bytes
 .../Application/UiApp/BootMaint/BootMaint.h |   8 +---
 .../Application/UiApp/BootMaint/ConsoleOption.c |   9 +++--
 MdeModulePkg/Application/UiApp/BootMaint/Data.c |   6 --
 .../Application/UiApp/BootMaint/UpdatePage.c|   2 +-
 5 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/MdeModulePkg/Application/UiApp/BootMaint/Bmstring.uni 
b/MdeModulePkg/Application/UiApp/BootMaint/Bmstring.uni
index 
8d9544db450322835972597234a07d76207e1102..a208127ac6ea76ec5dde6824babf05583a1cfa8d
 100644 GIT binary patch delta 66
zcmdmVgz3;RrVSN6lLNYh7)T8vMEoVz^1|!Vtm`$q)}DT^WKHd?z0at#4)VKkE8
JT+yj6ad0a6I=iQ

delta 14
WcmX?fjA_#mrVSN6n%`Ui2?vQ4+l;F

diff --git a/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.h 
b/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.h
index 69cf760..e1ac307 100644
--- a/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.h
+++ b/MdeModulePkg/Application/UiApp/BootMaint/BootMaint.h
@@ -18,6 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER 
EXPRESS OR IMPLIED.
 #include Ui.h
 #include FormGuid.h
 #include FrontPage.h
+#include Guid/TtyTerm.h
 
 //
 // Constants which are variable names used to access variables @@ -81,7 +82,8 
@@ typedef enum _TYPE_OF_TERMINAL {
   TerminalTypePcAnsi = 0,
   TerminalTypeVt100,
   TerminalTypeVt100Plus,
-  TerminalTypeVtUtf8
+  TerminalTypeVtUtf8,
+  TerminalTypeTtyTerm
 } TYPE_OF_TERMINAL;
 
 typedef enum _FILE_EXPLORER_STATE {
@@ -1452,12 +1454,12 @@ extern BM_MENU_OPTION ConsoleErrMenu;
 extern BM_MENU_OPTION DirectoryMenu;
 extern BM_MENU_OPTION DriverMenu;
 extern BM_MENU_OPTION TerminalMenu;
-extern UINT16 TerminalType[];
+extern UINT16 TerminalType[5];
 extern COM_ATTR   BaudRateList[19];
 extern COM_ATTR   DataBitsList[4];
 extern COM_ATTR   ParityList[5];
 extern COM_ATTR   StopBitsList[3];
-extern EFI_GUID   TerminalTypeGuid[4];
+extern EFI_GUID   TerminalTypeGuid[5];
 extern STRING_DEPOSITORY  *FileOptionStrDepository;
 extern STRING_DEPOSITORY  *ConsoleOptionStrDepository;
 extern STRING_DEPOSITORY  *BootOptionStrDepository;
diff --git a/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c 
b/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
index d86c733..f164db2 100644
--- a/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
+++ b/MdeModulePkg/Application/UiApp/BootMaint/ConsoleOption.c
@@ -564,7 +564,7 @@ LocateSerialIo (
 Vendor.Header.Type= MESSAGING_DEVICE_PATH;
 Vendor.Header.SubType = MSG_VENDOR_DP;
 
-for (Index2 = 0; Index2  4; Index2++) {
+for (Index2 = 0; Index2  (sizeof (TerminalTypeGuid) / sizeof 
+ (TerminalTypeGuid[0])); Index2++) {
   CopyMem (Vendor.Guid, TerminalTypeGuid[Index2], sizeof (EFI_GUID));
   SetDevicePathNodeLength (Vendor.Header, sizeof (VENDOR_DEVICE_PATH));
   NewDevicePath = AppendDevicePathNode ( @@ -940,7 +940,12 @@ 
IsTerminalDevicePath (
   *Termi  = TerminalTypeVtUtf8;
   IsTerminal  = TRUE;
 } else {
-  IsTerminal = FALSE;
+  if (CompareGuid (Vendor-Guid, TerminalTypeGuid[4])) {
+*Termi  = TerminalTypeTtyTerm;
+IsTerminal  = TRUE;
+  } else {
+IsTerminal = FALSE;
+  }
 }
   }
 }
diff --git a/MdeModulePkg/Application/UiApp/BootMaint/Data.c 
b/MdeModulePkg/Application/UiApp/BootMaint/Data.c
index 7e86211..caf6c60 100644
--- a/MdeModulePkg/Application/UiApp/BootMaint/Data.c
+++ b/MdeModulePkg/Application/UiApp/BootMaint/Data.c
@@ -35,6 +35,7 @@ UINT16  TerminalType[] = {
   STRING_TOKEN(STR_COM_TYPE_1),
   STRING_TOKEN(STR_COM_TYPE_2),
   STRING_TOKEN(STR_COM_TYPE_3),
+  STRING_TOKEN(STR_COM_TYPE_4),
 };
 
 ///
@@ -266,9 +267,10 @@ COM_ATTRStopBitsList[3] = {
 ///
 /// Guid for messaging path, used in Serial port setting.
 ///
-EFI_GUIDTerminalTypeGuid[4] = {
+EFI_GUIDTerminalTypeGuid[] = {
   DEVICE_PATH_MESSAGING_PC_ANSI,
   DEVICE_PATH_MESSAGING_VT_100,
   DEVICE_PATH_MESSAGING_VT_100_PLUS,
-  DEVICE_PATH_MESSAGING_VT_UTF8
+  DEVICE_PATH_MESSAGING_VT_UTF8,
+  EFI_TTY_TERM_GUID
 };
diff --git a/MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c 
b/MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c
index 

[edk2] [PATCH v4 3/3] ArmPlatformPkg: PL061: support multiple controller

2015-08-19 Thread Haojian Zhuang
Support multiple PL061 controllers. If platform gpio driver couldn't be found,
PL061 gpio driver will continue to load PcdPL061GpioBase as the register base.
It could be compatible with the use case of current PL061 gpio driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Haojian Zhuang haojian.zhu...@linaro.org
---
 ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c| 137 +++--
 .../Drivers/PL061GpioDxe/PL061GpioDxe.inf  |   1 +
 ArmPlatformPkg/Include/Drivers/PL061Gpio.h |  47 ---
 3 files changed, 125 insertions(+), 60 deletions(-)

diff --git a/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c 
b/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c
index 042fc76..02da8e1 100644
--- a/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c
+++ b/ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c
@@ -19,6 +19,7 @@
 #include Library/BaseMemoryLib.h
 #include Library/DebugLib.h
 #include Library/IoLib.h
+#include Library/MemoryAllocationLib.h
 #include Library/PcdLib.h
 #include Library/UefiBootServicesTableLib.h
 #include Library/UefiLib.h
@@ -28,6 +29,7 @@
 #include Drivers/PL061Gpio.h
 
 BOOLEAN mPL061Initialized = FALSE;
+PLATFORM_GPIO_CONTROLLER *mPL061PlatformGpio;
 
 /**
   Function implementations
@@ -38,20 +40,36 @@ PL061Identify (
   VOID
   )
 {
-  // Check if this is a PrimeCell Peripheral
-  if ((MmioRead8 (PL061_GPIO_PCELL_ID0) != 0x0D)
-  ||  (MmioRead8 (PL061_GPIO_PCELL_ID1) != 0xF0)
-  ||  (MmioRead8 (PL061_GPIO_PCELL_ID2) != 0x05)
-  ||  (MmioRead8 (PL061_GPIO_PCELL_ID3) != 0xB1)) {
-return EFI_NOT_FOUND;
+  UINTNIndex;
+  UINTNRegisterBase;
+
+  if (   (mPL061PlatformGpio-GpioCount == 0)
+  || (mPL061PlatformGpio-GpioControllerCount == 0)) {
+ return EFI_NOT_FOUND;
   }
 
-  // Check if this PrimeCell Peripheral is the PL061 GPIO
-  if ((MmioRead8 (PL061_GPIO_PERIPH_ID0) != 0x61)
-  ||  (MmioRead8 (PL061_GPIO_PERIPH_ID1) != 0x10)
-  ||  ((MmioRead8 (PL061_GPIO_PERIPH_ID2)  0xF) != 0x04)
-  ||  (MmioRead8 (PL061_GPIO_PERIPH_ID3) != 0x00)) {
-return EFI_NOT_FOUND;
+  for (Index = 0; Index  mPL061PlatformGpio-GpioControllerCount; Index++) {
+if (mPL061PlatformGpio-GpioController[Index].InternalGpioCount != 
PL061_GPIO_PINS) {
+  return EFI_INVALID_PARAMETER;
+}
+
+RegisterBase = mPL061PlatformGpio-GpioController[Index].RegisterBase;
+
+// Check if this is a PrimeCell Peripheral
+if ((MmioRead8 (RegisterBase + PL061_GPIO_PCELL_ID0) != 0x0D)
+||  (MmioRead8 (RegisterBase + PL061_GPIO_PCELL_ID1) != 0xF0)
+||  (MmioRead8 (RegisterBase + PL061_GPIO_PCELL_ID2) != 0x05)
+||  (MmioRead8 (RegisterBase + PL061_GPIO_PCELL_ID3) != 0xB1)) {
+  return EFI_NOT_FOUND;
+}
+   
+// Check if this PrimeCell Peripheral is the PL061 GPIO
+if ((MmioRead8 (RegisterBase + PL061_GPIO_PERIPH_ID0) != 0x61)
+||  (MmioRead8 (RegisterBase + PL061_GPIO_PERIPH_ID1) != 0x10)
+||  ((MmioRead8 (RegisterBase + PL061_GPIO_PERIPH_ID2)  0xF) != 0x04)
+||  (MmioRead8 (RegisterBase + PL061_GPIO_PERIPH_ID3) != 0x00)) {
+  return EFI_NOT_FOUND;
+}
   }
 
   return EFI_SUCCESS;
@@ -84,6 +102,31 @@ PL061Initialize (
   return Status;
 }
 
+EFI_STATUS
+EFIAPI
+PL061Locate (
+  IN  EMBEDDED_GPIO_PIN Gpio,
+  OUT UINTN *ControllerIndex,
+  OUT UINTN *ControllerOffset,
+  OUT UINTN *RegisterBase
+  )
+{
+  UINT32Index;
+
+  for (Index = 0; Index  mPL061PlatformGpio-GpioControllerCount; Index++) {
+if ((Gpio = mPL061PlatformGpio-GpioController[Index].GpioIndex)
+  (Gpio  mPL061PlatformGpio-GpioController[Index].GpioIndex
+ + mPL061PlatformGpio-GpioController[Index].InternalGpioCount)) {
+  *ControllerIndex = Index;
+  *ControllerOffset = Gpio % 
mPL061PlatformGpio-GpioController[Index].InternalGpioCount;
+  *RegisterBase = mPL061PlatformGpio-GpioController[Index].RegisterBase;
+  return EFI_SUCCESS;
+}
+  }
+  DEBUG ((EFI_D_ERROR, %a, failed to locate gpio %d\n, __func__, Gpio));
+  return EFI_INVALID_PARAMETER;
+}
+
 /**
 
 Routine Description:
@@ -110,11 +153,15 @@ Get (
   )
 {
   EFI_STATUSStatus = EFI_SUCCESS;
+  UINTN Index, Offset, RegisterBase;
 
-  if ((Value == NULL)
-  ||  (Gpio  LAST_GPIO_PIN))
-  {
-return EFI_INVALID_PARAMETER;
+  Status = PL061Locate (Gpio, Index, Offset, RegisterBase);
+  if (EFI_ERROR (Status))
+goto EXIT;
+
+  if (Value == NULL) {
+Status = EFI_INVALID_PARAMETER;
+goto EXIT;
   }
 
   // Initialize the hardware if not already done
@@ -125,7 +172,7 @@ Get (
 }
   }
 
-  if (MmioRead8 (PL061_GPIO_DATA_REG + (GPIO_PIN_MASK(Gpio)  2))) {
+  if (MmioRead8 (RegisterBase + PL061_GPIO_DATA_REG + (GPIO_PIN_MASK(Offset) 
 2))) {
 *Value = 1;
   } else {
 *Value = 0;
@@ -162,12 +209,11 @@ Set (
   )
 {
   EFI_STATUSStatus = EFI_SUCCESS;
+  UINTN Index, Offset, 

[edk2] [PATCH v4 2/3] EmbeddedPkg: enhance for multiple gpio controllers

2015-08-19 Thread Haojian Zhuang
EmbeddedGpio only supports one gpio controller in one platform. Now create
PLATFORM_GPIO_CONTROLLER to support multiple gpio controllers in one platform.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Haojian Zhuang haojian.zhu...@linaro.org
---
 EmbeddedPkg/EmbeddedPkg.dec |  1 +
 EmbeddedPkg/Include/Protocol/EmbeddedGpio.h | 17 +
 2 files changed, 18 insertions(+)

diff --git a/EmbeddedPkg/EmbeddedPkg.dec b/EmbeddedPkg/EmbeddedPkg.dec
index 4bac580..bd3e301 100644
--- a/EmbeddedPkg/EmbeddedPkg.dec
+++ b/EmbeddedPkg/EmbeddedPkg.dec
@@ -65,6 +65,7 @@
   gAndroidFastbootTransportProtocolGuid = { 0x74bd9fe0, 0x8902, 0x11e3, {0xb9, 
0xd3, 0xf7, 0x22, 0x38, 0xfc, 0x9a, 0x31}}
   gAndroidFastbootPlatformProtocolGuid =  { 0x524685a0, 0x89a0, 0x11e3, {0x9d, 
0x4d, 0xbf, 0xa9, 0xf6, 0xa4, 0x03, 0x08}}
   gUsbDeviceProtocolGuid =  { 0x021bd2ca, 0x51d2, 0x11e3, {0x8e, 0x56, 0xb7, 
0x54, 0x17, 0xc7,  0x0b, 0x44 }}
+  gPlatformGpioProtocolGuid = { 0x52ce9845, 0x5af4, 0x43e2, {0xba, 0xfd, 0x23, 
0x08, 0x12, 0x54, 0x7a, 0xc2 }}
 
 [PcdsFeatureFlag.common]
   gEmbeddedTokenSpaceGuid.PcdEmbeddedMacBoot|FALSE|BOOLEAN|0x0001
diff --git a/EmbeddedPkg/Include/Protocol/EmbeddedGpio.h 
b/EmbeddedPkg/Include/Protocol/EmbeddedGpio.h
index 4e7c8db..b8bc929 100644
--- a/EmbeddedPkg/Include/Protocol/EmbeddedGpio.h
+++ b/EmbeddedPkg/Include/Protocol/EmbeddedGpio.h
@@ -164,4 +164,21 @@ struct _EMBEDDED_GPIO {
 
 extern EFI_GUID gEmbeddedGpioProtocolGuid;
 
+typedef struct _GPIO_CONTROLLER  GPIO_CONTROLLER;
+typedef struct _PLATFORM_GPIO_CONTROLLER PLATFORM_GPIO_CONTROLLER;
+
+struct _GPIO_CONTROLLER {
+  UINTN   RegisterBase;
+  UINTN   GpioIndex;
+  UINTN   InternalGpioCount;
+};
+
+struct _PLATFORM_GPIO_CONTROLLER {
+  UINTN   GpioCount;
+  UINTN   GpioControllerCount;
+  GPIO_CONTROLLER *GpioController;
+};
+
+extern EFI_GUID gPlatformGpioProtocolGuid;
+
 #endif
-- 
2.1.4

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [Patch] BaseTools: Add NULL pointer check in AutoGen code

2015-08-19 Thread Liming Gao
For DynamicEx PCD, if NULL pointer is specified as token space GUID,
it will directly be used to compare GUID value in AutoGen code.
To avoid access NULL pointer, NULL pointer will be checked first.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao liming@intel.com
---
 BaseTools/Source/Python/AutoGen/GenC.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/BaseTools/Source/Python/AutoGen/GenC.py 
b/BaseTools/Source/Python/AutoGen/GenC.py
index b76d315..66756a3 100644
--- a/BaseTools/Source/Python/AutoGen/GenC.py
+++ b/BaseTools/Source/Python/AutoGen/GenC.py
@@ -715,10 +715,11 @@ def DynExPcdTokenNumberMapping(Info, AutoGenH):
 for Pcd in PcdExList:
 if Pcd.Type in gDynamicExPcd and Pcd.TokenCName == TokenCName:
 Index = Index + 1
 if Index == 1:
 AutoGenH.Append('\n#define __PCD_%s_VAL_CMP(GuidPtr)  (' % 
(Pcd.TokenCName))
+AutoGenH.Append('\\\n  (GuidPtr == NULL) ? 0:')
 AutoGenH.Append('\\\n  COMPAREGUID (GuidPtr, %s) ? 
_PCD_TOKEN_%s_%s:' 
 % (Pcd.TokenSpaceGuidCName, 
Pcd.TokenSpaceGuidCName, Pcd.TokenCName))
 else:
 AutoGenH.Append('\\\n  COMPAREGUID (GuidPtr, %s) ? 
_PCD_TOKEN_%s_%s:' 
 % (Pcd.TokenSpaceGuidCName, 
Pcd.TokenSpaceGuidCName, Pcd.TokenCName))
-- 
1.9.5.msysgit.0

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 1/2] ArmVirtPkg: build our DEBUG Shell using the small code model

2015-08-19 Thread Leif Lindholm
Hi Ard,

Apologies for tardiness.

Could we move this into ShellPkg instead, since the mcmodel=tiny is
globally applied for AARCH64, and any other direct consumers would
also be affected by 2/2?

/
Leif

On Mon, Aug 10, 2015 at 12:27:26PM +0200, Ard Biesheuvel wrote:
 The DEBUG build of the Shell exceeds 1 MB in size, which means that
 it cannot be built using the tiny code model. So force the use of
 the code model in this case.
 
 Contributed-under: TianoCore Contribution Agreement 1.0
 Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org
 ---
  ArmVirtPkg/ArmVirt.dsc.inc | 9 +
  1 file changed, 9 insertions(+)
 
 diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
 index 7bba6eba05a8..1ff126b2f6dc 100644
 --- a/ArmVirtPkg/ArmVirt.dsc.inc
 +++ b/ArmVirtPkg/ArmVirt.dsc.inc
 @@ -406,4 +406,13 @@ [Components.common]
gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xFF
gEfiShellPkgTokenSpaceGuid.PcdShellLibAutoInitialize|FALSE
gEfiMdePkgTokenSpaceGuid.PcdUefiLibMaxPrintBufferSize|8000
 +
 +BuildOptions
 +  #
 +  # The DEBUG target of the Shell module may well end up being over 1 MB
 +  # in size, which exceeds the range of the AArch64 tiny code model. So
 +  # override the code model to 'small' in this case.
 +  #
 +  GCC:DEBUG_*_AARCH64_CC_FLAGS = -mcmodel=small
 +  GCC:DEBUG_*_AARCH64_DLINK_FLAGS = -z common-page-size=0x1000
}
 -- 
 1.9.1
 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH 2/2] BaseTools AARCH64: use tiny code model by default

2015-08-19 Thread Leif Lindholm
On Mon, Aug 10, 2015 at 12:27:27PM +0200, Ard Biesheuvel wrote:
 The AARCH64 tiny code model produces more efficient code, since it
 uses relative symbol references rather than absolute references, i.e.,
 an emitted relative reference refers to the symbol directly rather
 than a literal containing its 64-bit absolute address. This saves
 space in the binary, and reduces the number of relocation fixups that
 need to be applied by the PE/COFF loader.
 
 So now that we support relative relocations in GenFw, move to the
 tiny code model by default. Note that the large model can still be
 selected by individual modules by adding -mcmodel=large to the
 appropriate CC_FLAGS.

Once ShellPkg situation resolves one way or the other:
Reviewed-by: Leif Lindholm leif.lindh...@linaro.org
Tested-by: Leif Lindholm leif.lindh...@linaro.org

Thanks for this.

/
Leif

 Contributed-under: TianoCore Contribution Agreement 1.0
 Signed-off-by: Ard Biesheuvel ard.biesheu...@linaro.org
 ---
  BaseTools/Conf/tools_def.template | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/BaseTools/Conf/tools_def.template 
 b/BaseTools/Conf/tools_def.template
 index 0c41c862af83..918348757767 100644
 --- a/BaseTools/Conf/tools_def.template
 +++ b/BaseTools/Conf/tools_def.template
 @@ -3824,7 +3824,7 @@ DEFINE GCC_IA32_CC_FLAGS   = 
 DEF(GCC_ALL_CC_FLAGS) -m32 -malign-double -
  DEFINE GCC_X64_CC_FLAGS= DEF(GCC_ALL_CC_FLAGS) -mno-red-zone 
 -Wno-address -mno-stack-arg-probe
  DEFINE GCC_IPF_CC_FLAGS= DEF(GCC_ALL_CC_FLAGS) 
 -minline-int-divide-min-latency
  DEFINE GCC_ARM_CC_FLAGS= DEF(GCC_ALL_CC_FLAGS) 
 -mword-relocations -mlittle-endian -mabi=aapcs -mapcs -fno-short-enums 
 -save-temps -fsigned-char -ffunction-sections -fdata-sections 
 -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft
 -DEFINE GCC_AARCH64_CC_FLAGS= DEF(GCC_ALL_CC_FLAGS) -mcmodel=large 
 -mlittle-endian -fno-short-enums -save-temps -fverbose-asm -fsigned-char  
 -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-builtin 
 -Wno-address -fno-asynchronous-unwind-tables
 +DEFINE GCC_AARCH64_CC_FLAGS= DEF(GCC_ALL_CC_FLAGS) -mcmodel=tiny 
 -mlittle-endian -fno-short-enums -save-temps -fverbose-asm -fsigned-char  
 -ffunction-sections -fdata-sections -fomit-frame-pointer -fno-builtin 
 -Wno-address -fno-asynchronous-unwind-tables
  DEFINE GCC_DLINK_FLAGS_COMMON  = -nostdlib --pie
  DEFINE GCC_DLINK2_FLAGS_COMMON = 
 --script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds
  DEFINE GCC_IA32_X64_DLINK_COMMON   = DEF(GCC_DLINK_FLAGS_COMMON) 
 --gc-sections
 -- 
 1.9.1
 
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


Re: [edk2] [PATCH v2 00/16] unify GCC command line options

2015-08-19 Thread Ard Biesheuvel
On 18 August 2015 at 22:29, Ard Biesheuvel ard.biesheu...@linaro.org wrote:
 On 18 August 2015 at 22:03, Ard Biesheuvel ard.biesheu...@linaro.org wrote:
 On 18 August 2015 at 19:35, David Woodhouse dw...@infradead.org wrote:
 On Tue, 2015-08-18 at 17:52 +0200, Ard Biesheuvel wrote:
 On 18 August 2015 at 17:19, Jordan Justen jordan.l.jus...@intel.com 
 wrote:
  Last time I checked, GCC44 ~ GCC49 all produced images roughly in the
  same ball park size-wise. UNIXGCC produced much larger images because
  it could not strip unused functions/data.

 Yeah, that is still true, unfortunately.

 Is it really still true?

 https://sourceware.org/bugzilla/show_bug.cgi?id=11539#c14

 If the patch that Nick committed to fix this *isn't* working, please
 add a comment telling him that :)


 I did a quick test with the gdb-7.10-branch of binutils-gdb, and while
 it does make some difference, it is still not sufficient

 Building OvmfX64 in RELEASE mode gives me

 Before:
   the required fv image size 0xd67c0 exceeds the set fv image size 0xcc000

 After:
   the required fv image size 0xd2a18 exceeds the set fv image size 0xcc000

 where GCC/ELF obviously produces something  0xcc000


 I had mistakenly omitted the -ffunction-sections -fdata-sections
 switches, but adding those makes it even worse

   the required fv image size 0xdbf98 exceeds the set fv image size 0xcc000

 so there is definitely something dodgy going on here.


I managed to make this work by also adding the
-fno-asynchronous-unwind-tables option. It appears that
(unsurprisingly) the unwinding info is preventing code from being
pruned.

So with  -Os -ffunction-sections -fdata-sections
-fno-asynchronous-unwind-tables, we get even better results than
GCC49, since we can actually turn on size optimization for MinGW.
On GCC49, we can only enable optimization if we also enable
-maccumulate-outgoing-args, which -according to the man page- results
in a notable increase in code size. (I assume this is the reason we
don't optimize the GCC49 X64 builds at all)

If I just look at VolInfo of the FVMAIN_COMPACT.Fv generated by each
build (UNIXGCC with mingw 4.9 vs GCC49), I get 767 KB for MinGW for
the file length of the first embedded FV, where GCC49 takes up 794 KB.
Maybe not spectacular, but more than significant.
___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [Patch] MdePkg: Update DEC and DSC version from 1.05 to 1.06

2015-08-19 Thread Liming Gao
UEFI2.5 and PI1.4 have been added in MdePkg. Update DEC and DSC version
to reflect those changes in MdePkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao liming@intel.com
---
 MdePkg/MdePkg.dec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 64dc5f9..c2e3ebe 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -21,11 +21,11 @@
 [Defines]
   DEC_SPECIFICATION  = 0x00010005
   PACKAGE_NAME   = MdePkg
   PACKAGE_UNI_FILE   = MdePkg.uni
   PACKAGE_GUID   = 1E73767F-8F52-4603-AEB4-F29B510B6766
-  PACKAGE_VERSION= 1.05
+  PACKAGE_VERSION= 1.06
 
 
 [Includes]
   Include
 
-- 
1.9.5.msysgit.0

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v2] MdePkg: Update DEC and DSC version from 1.05 to 1.06

2015-08-19 Thread Liming Gao
UEFI2.5 and PI1.4 have been added in MdePkg. Update DEC and DSC version
to reflect those changes in MdePkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao liming@intel.com
---
 MdePkg/MdePkg.dec | 2 +-
 MdePkg/MdePkg.dsc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 64dc5f9..c2e3ebe 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -21,11 +21,11 @@
 [Defines]
   DEC_SPECIFICATION  = 0x00010005
   PACKAGE_NAME   = MdePkg
   PACKAGE_UNI_FILE   = MdePkg.uni
   PACKAGE_GUID   = 1E73767F-8F52-4603-AEB4-F29B510B6766
-  PACKAGE_VERSION= 1.05
+  PACKAGE_VERSION= 1.06
 
 
 [Includes]
   Include
 
diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc
index a9301fb..89fc630 100644
--- a/MdePkg/MdePkg.dsc
+++ b/MdePkg/MdePkg.dsc
@@ -15,11 +15,11 @@
 ##
 
 [Defines]
   PLATFORM_NAME  = Mde
   PLATFORM_GUID  = 082F8BFC-0455-4859-AE3C-ECD64FB81642
-  PLATFORM_VERSION   = 1.05
+  PLATFORM_VERSION   = 1.06
   DSC_SPECIFICATION  = 0x00010005
   OUTPUT_DIRECTORY   = Build/Mde
   SUPPORTED_ARCHITECTURES= IA32|IPF|X64|EBC|ARM|AARCH64
   BUILD_TARGETS  = DEBUG|RELEASE
   SKUID_IDENTIFIER   = DEFAULT
-- 
1.9.5.msysgit.0

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v4 0/3] support multiple PL061 gpio controllers

2015-08-19 Thread Haojian Zhuang
Changelog:
  v4:
* Use 64-bit value on PL061 register base address.
* Use fallback to be compatible with current PcdPL061GpioBase value
  when platform gpio driver isn't present.
* Remove the dependancy on PL061. Move the dependancy to platform
  gpio driver instead.
  v3:
* Remove GPIO_PIN_MASK_HIGH_8BIT() and GPIO_PIN_MASK_LOW_8BIT().
* Avoid to use MmioAnd8() on updating GPIO DATA register, since PL061
  could access each bit by specified register offset.
* Add PLATFORM_GPIO_CONTROLLER structure in embedded gpio.
* Support multiple PL061 gpio controllers in one platform.
  v2:
* Append the patch to fix gpio pin mask macro.

Haojian Zhuang (3):
  ArmPlatformPkg: PL061: fix accessing GPIO DATA
  EmbeddedPkg: enhance for multiple gpio controllers
  ArmPlatformPkg: PL061: support multiple controller

 ArmPlatformPkg/Drivers/PL061GpioDxe/PL061Gpio.c| 137 +++--
 .../Drivers/PL061GpioDxe/PL061GpioDxe.inf  |   1 +
 ArmPlatformPkg/Include/Drivers/PL061Gpio.h |  51 
 EmbeddedPkg/EmbeddedPkg.dec|   1 +
 EmbeddedPkg/Include/Protocol/EmbeddedGpio.h|  17 +++
 5 files changed, 143 insertions(+), 64 deletions(-)

-- 
2.1.4

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH] ArmPlatformPkg: Bds: delete BootNext when fail

2015-08-19 Thread Haojian Zhuang
If Bds launches BootNext with failure, delete it.

Otherwise, we'll create BootNext variable by BdsStartOption()  delete
it in BdsEntry() for each boot. It doesn't make sense to update
this variable in non-volatile variable area for each boot. And the
non-volatile variable area may be full of this message until overflow.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Haojian Zhuang haojian.zhu...@linaro.org
---
 ArmPlatformPkg/Bds/Bds.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/ArmPlatformPkg/Bds/Bds.c b/ArmPlatformPkg/Bds/Bds.c
index ffae4bc..512e8e1 100644
--- a/ArmPlatformPkg/Bds/Bds.c
+++ b/ArmPlatformPkg/Bds/Bds.c
@@ -530,12 +530,12 @@ BdsEntry (
   // BootNext has not been succeeded launched
   if (EFI_ERROR(Status)) {
 Print(LFail to start BootNext.\n);
-  }
 
-  // Delete the BootNext environment variable
-  gRT-SetVariable (LBootNext, gEfiGlobalVariableGuid,
-  EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | 
EFI_VARIABLE_RUNTIME_ACCESS,
-  0, NULL);
+// Delete the BootNext environment variable
+gRT-SetVariable (LBootNext, gEfiGlobalVariableGuid,
+EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | 
EFI_VARIABLE_RUNTIME_ACCESS,
+0, NULL);
+  }
 }
 
 // Clear BootCurrent variable
-- 
2.1.4

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [Patch] ShellPkg: Fix 'ifconfig' getting the address from dhcp error

2015-08-19 Thread Jiaxin Wu
R18201 fix caused ifconfig in shell failed to get the address from dhcp with the
command ifconfig -s eth0 dhcp since the default policy is dhcp already.
We can fix it by following the rule to starting the Ip4 auto configuration.

Cc: Ye Ting ting...@intel.com
Cc: Zhang Lubo lubo.zh...@intel.com
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu jiaxin...@intel.com
---
 .../UefiShellNetwork1CommandsLib/Ifconfig.c| 115 ++---
 1 file changed, 100 insertions(+), 15 deletions(-)

diff --git a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c 
b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
index df19a9f..273f1a8 100644
--- a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
+++ b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
@@ -273,10 +273,89 @@ IfConfigManualAddressNotify (
   *((BOOLEAN *) Context) = TRUE;
 }
 
 
 /**
+  Create an IP child, use it to start the auto configuration, then destroy it.
+
+  @param[in] Controller   The controller which has the service installed.
+  @param[in] ImageThe image handle used to open service.
+
+  @retval EFI_SUCCESS The configuration is done.
+**/
+EFI_STATUS
+EFIAPI
+IfConfigStartIp4(
+  IN  EFI_HANDLEController,
+  IN  EFI_HANDLEImage
+  )
+{
+  EFI_IP4_PROTOCOL  *Ip4;
+  EFI_HANDLEIp4Handle;
+  EFI_IP4_CONFIG_DATA   Ip4ConfigData;
+  EFI_STATUSStatus;
+
+  //
+  // Get the Ip4ServiceBinding Protocol
+  //
+  Ip4Handle = NULL;
+  Ip4   = NULL;
+
+  Status = NetLibCreateServiceChild (
+ Controller,
+ Image,
+ gEfiIp4ServiceBindingProtocolGuid,
+ Ip4Handle
+ );
+
+  if (EFI_ERROR (Status)) {
+return Status;
+  }
+
+  Status = gBS-OpenProtocol (
+ Ip4Handle,
+ gEfiIp4ProtocolGuid,
+ (VOID **) Ip4,
+ Controller,
+ Image,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+
+  if (EFI_ERROR (Status)) {
+goto ON_EXIT;
+  }
+
+  Ip4ConfigData.DefaultProtocol  = EFI_IP_PROTO_ICMP;
+  Ip4ConfigData.AcceptAnyProtocol= FALSE;
+  Ip4ConfigData.AcceptIcmpErrors = FALSE;
+  Ip4ConfigData.AcceptBroadcast  = FALSE;
+  Ip4ConfigData.AcceptPromiscuous= FALSE;
+  Ip4ConfigData.UseDefaultAddress= TRUE;
+  ZeroMem (Ip4ConfigData.StationAddress, sizeof (EFI_IPv4_ADDRESS));
+  ZeroMem (Ip4ConfigData.SubnetMask, sizeof (EFI_IPv4_ADDRESS));
+  Ip4ConfigData.TypeOfService= 0;
+  Ip4ConfigData.TimeToLive   = 1;
+  Ip4ConfigData.DoNotFragment= FALSE;
+  Ip4ConfigData.RawData  = FALSE;
+  Ip4ConfigData.ReceiveTimeout   = 0;
+  Ip4ConfigData.TransmitTimeout  = 0;
+
+  Ip4-Configure (Ip4, Ip4ConfigData);
+  
+ON_EXIT: 
+  NetLibDestroyServiceChild (
+Controller,
+Image,
+gEfiIp4ServiceBindingProtocolGuid,
+Ip4Handle
+);
+  
+  return Status;
+}
+
+
+/**
   Print MAC address.
 
   @param[in]NodeThe pointer of MAC address buffer.
   @param[in]SizeThe size of MAC address buffer.
 
@@ -872,25 +951,31 @@ IfConfigSetInterfaceInfo (
 
 //
 // Process valid variables.
 //
 if (StrCmp(VarArg-Arg, Ldhcp) == 0) {
-  //
-  // Set dhcp config policy
-  //
-  Policy = Ip4Config2PolicyDhcp;
-  Status = IfCb-IfCfg-SetData (
-  IfCb-IfCfg,
-  Ip4Config2DataTypePolicy,
-  sizeof (EFI_IP4_CONFIG2_POLICY),
-  Policy
-  );
-
-  if (EFI_ERROR(Status)) {
-goto ON_EXIT;
+  if (IfCb-Policy == Ip4Config2PolicyDhcp) {
+Status = IfConfigStartIp4 (IfCb-NicHandle, gImageHandle);
+if (EFI_ERROR(Status)) {
+  goto ON_EXIT;
+}
+  } else {
+//
+// Set dhcp config policy
+//
+Policy = Ip4Config2PolicyDhcp;
+Status = IfCb-IfCfg-SetData (
+IfCb-IfCfg,
+Ip4Config2DataTypePolicy,
+sizeof (EFI_IP4_CONFIG2_POLICY),
+Policy
+);
+if (EFI_ERROR(Status)) {
+  goto ON_EXIT;
+}
   }
-
+  
   VarArg= VarArg-Next;
 
 } else if (StrCmp (VarArg-Arg, Lstatic) == 0) {
   //
   // Set manual config policy.
@@ -1036,11 +1121,11 @@ IfConfigSetInterfaceInfo (
 ON_EXIT:
   if (Dns != NULL) {
 FreePool (Dns);
   }
   
-  return EFI_SUCCESS;
+  return Status;
 
 }
 
 /**
   The ifconfig command main process.
-- 
1.9.5.msysgit.1

___
edk2-devel mailing list
edk2-devel@lists.01.org

Re: [edk2] [Patch] MdeModulePkg: Fix default router table and interface missing error

2015-08-19 Thread Ye, Ting
Reviwed-by: Ye Ting ting...@intel.com 

-Original Message-
From: Wu, Jiaxin 
Sent: Wednesday, August 19, 2015 4:55 PM
To: edk2-devel@lists.01.org
Cc: Ye, Ting; Zhang, Lubo
Subject: [Patch] MdeModulePkg: Fix default router table and interface missing 
error

Ip4StartAutoConfig() will always free its default router table and interface,
which may cause IP instance missing its correct default interface. e.g. when
the policy is dhcp, and one child is configured to use default address.

Cc: Ye Ting ting...@intel.com
Cc: Zhang Lubo lubo.zh...@intel.com
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu jiaxin...@intel.com
---
 .../Universal/Network/Ip4Dxe/Ip4Config2Impl.c  | 74 --
 MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c  |  4 ++
 MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c|  2 +
 MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h|  2 +
 4 files changed, 49 insertions(+), 33 deletions(-)

diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c 
b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
index caf84fb..637d7cd 100644
--- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
+++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
@@ -147,10 +147,11 @@ Ip4Config2OnPolicyChanged (
 
   //
   // Start the dhcp configuration.
   //
   if (NewPolicy == Ip4Config2PolicyDhcp) {
+IpSb-Reconfig = TRUE;
 Ip4StartAutoConfig (IpSb-Ip4Config2Instance);
   }
 
 }
 
@@ -461,72 +462,72 @@ Ip4Config2OnDhcp4SbInstalled (
 }
 
 /**
   Set the station address and subnetmask for the default interface.
 
-  @param[in]  Instance   The pointer to the IP4 config2 instance data.
+  @param[in]  IpSb   The pointer to the IP4 service binding 
instance.
   @param[in]  StationAddress Ip address to be set.
   @param[in]  SubnetMask Subnet to be set.
 
   @retval EFI_SUCCESS   Set default address successful. 
   @retval OthersSome errors occur in setting. 
 
 **/
 EFI_STATUS
 Ip4Config2SetDefaultAddr (
-  IN IP4_CONFIG2_INSTANCE   *Instance,
+  IN IP4_SERVICE*IpSb,
   IN IP4_ADDR   StationAddress,
   IN IP4_ADDR   SubnetMask
   )
 {
   EFI_STATUSStatus;
-  IP4_SERVICE   *IpSb;
   IP4_INTERFACE *IpIf;
   IP4_PROTOCOL  *Ip4Instance;
   EFI_ARP_PROTOCOL  *Arp;
   LIST_ENTRY*Entry;
   IP4_ADDR  Subnet;
   IP4_ROUTE_TABLE   *RouteTable;
 
-  IpSb = IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance);
   IpIf = IpSb-DefaultInterface;
   ASSERT (IpIf != NULL);
 
   if ((IpIf-Ip == StationAddress)  (IpIf-SubnetMask == SubnetMask)) {
 IpSb-State = IP4_SERVICE_CONFIGED;
 return EFI_SUCCESS;
   }
 
-  //
-  // The default address is changed, free the previous interface first.
-  //
-  if (IpSb-DefaultRouteTable != NULL) {
-Ip4FreeRouteTable (IpSb-DefaultRouteTable);
-IpSb-DefaultRouteTable = NULL;
-  }
+  if (IpSb-Reconfig) {
+//
+// The default address is changed, free the previous interface first.
+//
+if (IpSb-DefaultRouteTable != NULL) {
+  Ip4FreeRouteTable (IpSb-DefaultRouteTable);
+  IpSb-DefaultRouteTable = NULL;
+}
 
-  Ip4CancelReceive (IpSb-DefaultInterface);
-  Ip4FreeInterface (IpSb-DefaultInterface, NULL);
-  IpSb-DefaultInterface = NULL;
-  //
-  // Create new default interface and route table.
-  //
-  IpIf = Ip4CreateInterface (IpSb-Mnp, IpSb-Controller, IpSb-Image);
-  if (IpIf == NULL) {
-return EFI_OUT_OF_RESOURCES;
-  }
+Ip4CancelReceive (IpSb-DefaultInterface);
+Ip4FreeInterface (IpSb-DefaultInterface, NULL);
+IpSb-DefaultInterface = NULL;
+//
+// Create new default interface and route table.
+//
+IpIf = Ip4CreateInterface (IpSb-Mnp, IpSb-Controller, IpSb-Image);
+if (IpIf == NULL) {
+  return EFI_OUT_OF_RESOURCES;
+}
 
-  RouteTable = Ip4CreateRouteTable ();
-  if (RouteTable == NULL) {
-Ip4FreeInterface (IpIf, NULL);
-return EFI_OUT_OF_RESOURCES;
+RouteTable = Ip4CreateRouteTable ();
+if (RouteTable == NULL) {
+  Ip4FreeInterface (IpIf, NULL);
+  return EFI_OUT_OF_RESOURCES;
+}
+
+IpSb-DefaultInterface  = IpIf;
+InsertHeadList (IpSb-Interfaces, IpIf-Link);
+IpSb-DefaultRouteTable = RouteTable;
+Ip4ReceiveFrame (IpIf, NULL, Ip4AccpetFrame, IpSb);
   }
-  
-  IpSb-DefaultInterface  = IpIf;
-  InsertHeadList (IpSb-Interfaces, IpIf-Link);
-  IpSb-DefaultRouteTable = RouteTable;
-  Ip4ReceiveFrame (IpIf, NULL, Ip4AccpetFrame, IpSb);
 
   if (IpSb-State == IP4_SERVICE_CONFIGED) {
 IpSb-State = IP4_SERVICE_UNSTARTED;
   }
 
@@ -576,10 +577,12 @@ Ip4Config2SetDefaultAddr (
 SubnetMask,
 IP4_ALLZERO_ADDRESS
 );
 
   IpSb-State = IP4_SERVICE_CONFIGED;
+  IpSb-Reconfig = FALSE;
+  
   return EFI_SUCCESS;
 }
 
 /**
   Set the station address, subnetmask and gateway address for the 

Re: [edk2] [Patch] ShellPkg: Fix 'ifconfig' getting the address from dhcp error

2015-08-19 Thread Ye, Ting
Reviewed-by: Ye Ting ting...@intel.com


-Original Message-
From: Wu, Jiaxin 
Sent: Wednesday, August 19, 2015 4:56 PM
To: edk2-devel@lists.01.org
Cc: Ye, Ting; Zhang, Lubo
Subject: [Patch] ShellPkg: Fix 'ifconfig' getting the address from dhcp error

R18201 fix caused ifconfig in shell failed to get the address from dhcp with the
command ifconfig -s eth0 dhcp since the default policy is dhcp already.
We can fix it by following the rule to starting the Ip4 auto configuration.

Cc: Ye Ting ting...@intel.com
Cc: Zhang Lubo lubo.zh...@intel.com
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu jiaxin...@intel.com
---
 .../UefiShellNetwork1CommandsLib/Ifconfig.c| 115 ++---
 1 file changed, 100 insertions(+), 15 deletions(-)

diff --git a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c 
b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
index df19a9f..273f1a8 100644
--- a/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
+++ b/ShellPkg/Library/UefiShellNetwork1CommandsLib/Ifconfig.c
@@ -273,10 +273,89 @@ IfConfigManualAddressNotify (
   *((BOOLEAN *) Context) = TRUE;
 }
 
 
 /**
+  Create an IP child, use it to start the auto configuration, then destroy it.
+
+  @param[in] Controller   The controller which has the service installed.
+  @param[in] ImageThe image handle used to open service.
+
+  @retval EFI_SUCCESS The configuration is done.
+**/
+EFI_STATUS
+EFIAPI
+IfConfigStartIp4(
+  IN  EFI_HANDLEController,
+  IN  EFI_HANDLEImage
+  )
+{
+  EFI_IP4_PROTOCOL  *Ip4;
+  EFI_HANDLEIp4Handle;
+  EFI_IP4_CONFIG_DATA   Ip4ConfigData;
+  EFI_STATUSStatus;
+
+  //
+  // Get the Ip4ServiceBinding Protocol
+  //
+  Ip4Handle = NULL;
+  Ip4   = NULL;
+
+  Status = NetLibCreateServiceChild (
+ Controller,
+ Image,
+ gEfiIp4ServiceBindingProtocolGuid,
+ Ip4Handle
+ );
+
+  if (EFI_ERROR (Status)) {
+return Status;
+  }
+
+  Status = gBS-OpenProtocol (
+ Ip4Handle,
+ gEfiIp4ProtocolGuid,
+ (VOID **) Ip4,
+ Controller,
+ Image,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
+
+  if (EFI_ERROR (Status)) {
+goto ON_EXIT;
+  }
+
+  Ip4ConfigData.DefaultProtocol  = EFI_IP_PROTO_ICMP;
+  Ip4ConfigData.AcceptAnyProtocol= FALSE;
+  Ip4ConfigData.AcceptIcmpErrors = FALSE;
+  Ip4ConfigData.AcceptBroadcast  = FALSE;
+  Ip4ConfigData.AcceptPromiscuous= FALSE;
+  Ip4ConfigData.UseDefaultAddress= TRUE;
+  ZeroMem (Ip4ConfigData.StationAddress, sizeof (EFI_IPv4_ADDRESS));
+  ZeroMem (Ip4ConfigData.SubnetMask, sizeof (EFI_IPv4_ADDRESS));
+  Ip4ConfigData.TypeOfService= 0;
+  Ip4ConfigData.TimeToLive   = 1;
+  Ip4ConfigData.DoNotFragment= FALSE;
+  Ip4ConfigData.RawData  = FALSE;
+  Ip4ConfigData.ReceiveTimeout   = 0;
+  Ip4ConfigData.TransmitTimeout  = 0;
+
+  Ip4-Configure (Ip4, Ip4ConfigData);
+  
+ON_EXIT: 
+  NetLibDestroyServiceChild (
+Controller,
+Image,
+gEfiIp4ServiceBindingProtocolGuid,
+Ip4Handle
+);
+  
+  return Status;
+}
+
+
+/**
   Print MAC address.
 
   @param[in]NodeThe pointer of MAC address buffer.
   @param[in]SizeThe size of MAC address buffer.
 
@@ -872,25 +951,31 @@ IfConfigSetInterfaceInfo (
 
 //
 // Process valid variables.
 //
 if (StrCmp(VarArg-Arg, Ldhcp) == 0) {
-  //
-  // Set dhcp config policy
-  //
-  Policy = Ip4Config2PolicyDhcp;
-  Status = IfCb-IfCfg-SetData (
-  IfCb-IfCfg,
-  Ip4Config2DataTypePolicy,
-  sizeof (EFI_IP4_CONFIG2_POLICY),
-  Policy
-  );
-
-  if (EFI_ERROR(Status)) {
-goto ON_EXIT;
+  if (IfCb-Policy == Ip4Config2PolicyDhcp) {
+Status = IfConfigStartIp4 (IfCb-NicHandle, gImageHandle);
+if (EFI_ERROR(Status)) {
+  goto ON_EXIT;
+}
+  } else {
+//
+// Set dhcp config policy
+//
+Policy = Ip4Config2PolicyDhcp;
+Status = IfCb-IfCfg-SetData (
+IfCb-IfCfg,
+Ip4Config2DataTypePolicy,
+sizeof (EFI_IP4_CONFIG2_POLICY),
+Policy
+);
+if (EFI_ERROR(Status)) {
+  goto ON_EXIT;
+}
   }
-
+  
   VarArg= VarArg-Next;
 
 } else if (StrCmp (VarArg-Arg, Lstatic) == 0) {
   //
   // Set manual config policy.
@@ -1036,11 +1121,11 @@ IfConfigSetInterfaceInfo (
 ON_EXIT:
   if (Dns != NULL) {
 FreePool 

Re: [edk2] [patch] CryptoPkg: Update Package version to 0.96

2015-08-19 Thread Ye, Ting
Reviewed-by: Ye Ting ting...@intel.com 

-Original Message-
From: Long, Qin 
Sent: Thursday, August 20, 2015 11:37 AM
To: Ye, Ting; edk2-devel@lists.01.org
Subject: [patch] CryptoPkg: Update Package version to 0.96

Update Package version to 0.9.6

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long qin.l...@intel.com
---
 CryptoPkg/CryptoPkg.dec | 4 ++--
 CryptoPkg/CryptoPkg.dsc | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/CryptoPkg/CryptoPkg.dec b/CryptoPkg/CryptoPkg.dec
index 6f8bf21..4561f3f 100644
--- a/CryptoPkg/CryptoPkg.dec
+++ b/CryptoPkg/CryptoPkg.dec
@@ -4,7 +4,7 @@
 #  This Package provides cryptographic-related libraries for UEFI security 
modules.
 #  It also provides a test application to test libraries.
 #
-#  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.BR
+#  Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.BR
 #  This program and the accompanying materials
 #  are licensed and made available under the terms and conditions of the BSD 
License
 #  which accompanies this distribution.  The full text of the license may be 
found at
@@ -20,7 +20,7 @@
   PACKAGE_NAME   = CryptoPkg
   PACKAGE_UNI_FILE   = CryptoPkg.uni
   PACKAGE_GUID   = 36470E80-36F2-4ba0-8CC8-937C7D9FF888
-  PACKAGE_VERSION= 0.94
+  PACKAGE_VERSION= 0.96
 
 [Includes]
   Include
diff --git a/CryptoPkg/CryptoPkg.dsc b/CryptoPkg/CryptoPkg.dsc
index 11465a3..19a0fbc 100644
--- a/CryptoPkg/CryptoPkg.dsc
+++ b/CryptoPkg/CryptoPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  Cryptographic Library Package for UEFI Security Implementation.
 #
-#  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.BR
+#  Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.BR
 #  This program and the accompanying materials
 #  are licensed and made available under the terms and conditions of the BSD 
License
 #  which accompanies this distribution.  The full text of the license may be 
found at
@@ -20,7 +20,7 @@
 [Defines]
   PLATFORM_NAME  = CryptoPkg
   PLATFORM_GUID  = E1063286-6C8C-4c25-AEF0-67A9A5B6E6B6
-  PLATFORM_VERSION   = 0.94
+  PLATFORM_VERSION   = 0.96
   DSC_SPECIFICATION  = 0x00010005
   OUTPUT_DIRECTORY   = Build/CryptoPkg
   SUPPORTED_ARCHITECTURES= IA32|X64|IPF|ARM|AARCH64
-- 
1.9.5.msysgit.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v3 0/2] Add HttpBoot support to OvmfPkg

2015-08-19 Thread Gary Ching-Pang Lin
V3: Amended the HTTP driver patch per Siyuan Fu's suggestion.
Also reworded that patch to explain the problem more clearly.

V2: Updated my git config to generate the reviewer-friendly diff.

This patch series fixes a http request bug in HttpDxe and adds the
HttpBoot support to OvmfPkg.

I've tested the HttpBoot implementation with a simple environment:

[QEMU] ---(tap0)--- [HOST]
 Ovmf   DHCP server
HTTP server

With a proper config for the dhcp and http server in the host, the firmware
successfully fetched the remote EFI file and executed it. It's recommended
to update gnu-efi to the latest version to detect the IPv4 device path
correctly.

Known issues:
* DHCPv6 support is not implemented in HttpBootDxe at this moment.
* The unexpected TCP disconnection isn't handled in HttpDxe so the GET request
  may fail while fetching the EFI image from some featureless http daemon such
  as thttpd.

Gary Ching-Pang Lin (2):
  NetworkPkg: Remove the hostname from the http request URL
  OvmfPkg: Add HttpBoot support

 NetworkPkg/HttpDxe/HttpImpl.c | 19 ++-
 OvmfPkg/OvmfPkgIa32.dsc   | 10 ++
 OvmfPkg/OvmfPkgIa32.fdf   |  5 +
 OvmfPkg/OvmfPkgIa32X64.dsc| 10 ++
 OvmfPkg/OvmfPkgIa32X64.fdf|  5 +
 OvmfPkg/OvmfPkgX64.dsc| 10 ++
 OvmfPkg/OvmfPkgX64.fdf|  5 +
 7 files changed, 63 insertions(+), 1 deletion(-)

-- 
2.1.4

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH v3 1/2] NetworkPkg: Remove the hostname from the http request URL

2015-08-19 Thread Gary Ching-Pang Lin
Per RFC7230, the URL must be a absolute-path when making a request
directly to the server. Since proxy is not supported now, all requests
to the HTTP driver are actually direct requests. This commit removes
the scheme and the hostname from the URL in the http request if the URL
is an absolute-URI so that the HTTP server can interpret the request
properly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Ching-Pang Lin g...@suse.com
Reviewed-by: Ye Ting ting...@intel.com
---
 NetworkPkg/HttpDxe/HttpImpl.c | 19 ++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c
index 545fe42..6684f77 100644
--- a/NetworkPkg/HttpDxe/HttpImpl.c
+++ b/NetworkPkg/HttpDxe/HttpImpl.c
@@ -227,6 +227,7 @@ EfiHttpRequest (
   CHAR16*HostNameStr;
   HTTP_TOKEN_WRAP   *Wrap;
   HTTP_TCP_TOKEN_WRAP   *TcpWrap;
+  CHAR8 *FileUrl;
 
   if ((This == NULL) || (Token == NULL)) {
 return EFI_INVALID_PARAMETER;
@@ -450,7 +451,23 @@ EfiHttpRequest (
   //
   // Create request message.
   //
-  RequestStr = HttpGenRequestString (HttpInstance, HttpMsg, Url);
+  FileUrl = Url;
+  if (*FileUrl != '/') {
+//
+// Convert the absolute-URI to the absolute-path
+//
+while (*FileUrl != ':')
+  FileUrl++;
+if ((*(FileUrl+1) == '/')  (*(FileUrl+2) == '/')) {
+  FileUrl += 3;
+  while (*FileUrl != '/')
+FileUrl++;
+} else {
+  Status = EFI_INVALID_PARAMETER;
+  goto Error3;
+}
+  }
+  RequestStr = HttpGenRequestString (HttpInstance, HttpMsg, FileUrl);
   if (RequestStr == NULL) {
 Status = EFI_OUT_OF_RESOURCES;
 goto Error3;
-- 
2.1.4

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [patch] CryptoPkg: Update Package version to 0.96

2015-08-19 Thread Qin Long
Update Package version to 0.9.6

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long qin.l...@intel.com
---
 CryptoPkg/CryptoPkg.dec | 4 ++--
 CryptoPkg/CryptoPkg.dsc | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/CryptoPkg/CryptoPkg.dec b/CryptoPkg/CryptoPkg.dec
index 6f8bf21..4561f3f 100644
--- a/CryptoPkg/CryptoPkg.dec
+++ b/CryptoPkg/CryptoPkg.dec
@@ -4,7 +4,7 @@
 #  This Package provides cryptographic-related libraries for UEFI security 
modules.
 #  It also provides a test application to test libraries.
 #
-#  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.BR
+#  Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.BR
 #  This program and the accompanying materials
 #  are licensed and made available under the terms and conditions of the BSD 
License
 #  which accompanies this distribution.  The full text of the license may be 
found at
@@ -20,7 +20,7 @@
   PACKAGE_NAME   = CryptoPkg
   PACKAGE_UNI_FILE   = CryptoPkg.uni
   PACKAGE_GUID   = 36470E80-36F2-4ba0-8CC8-937C7D9FF888
-  PACKAGE_VERSION= 0.94
+  PACKAGE_VERSION= 0.96
 
 [Includes]
   Include
diff --git a/CryptoPkg/CryptoPkg.dsc b/CryptoPkg/CryptoPkg.dsc
index 11465a3..19a0fbc 100644
--- a/CryptoPkg/CryptoPkg.dsc
+++ b/CryptoPkg/CryptoPkg.dsc
@@ -1,7 +1,7 @@
 ## @file
 #  Cryptographic Library Package for UEFI Security Implementation.
 #
-#  Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.BR
+#  Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.BR
 #  This program and the accompanying materials
 #  are licensed and made available under the terms and conditions of the BSD 
License
 #  which accompanies this distribution.  The full text of the license may be 
found at
@@ -20,7 +20,7 @@
 [Defines]
   PLATFORM_NAME  = CryptoPkg
   PLATFORM_GUID  = E1063286-6C8C-4c25-AEF0-67A9A5B6E6B6
-  PLATFORM_VERSION   = 0.94
+  PLATFORM_VERSION   = 0.96
   DSC_SPECIFICATION  = 0x00010005
   OUTPUT_DIRECTORY   = Build/CryptoPkg
   SUPPORTED_ARCHITECTURES= IA32|X64|IPF|ARM|AARCH64
-- 
1.9.5.msysgit.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel