Re: [edk2] [PATCH 2/2] LegacyBbs: add boot entries for virtio-blk devices

2013-02-12 Thread Gerd Hoffmann
Hi, > ... BTW why can't SeaBIOS grab the bootorder fw_cfg file just the same > in the CSM build? (Commit 60258aa4 in David's repo.) Because you want only one boot menu. When you pick 'legacy boot from this cdrom' in the ovmf boot menu you want seabios boot straight from the specified cdrom. c

Re: [edk2] Git as an svn alternative - was [PATCH] Fix broken IA32 ...

2013-02-12 Thread Grant Likely
On Feb 1, 2013 Jordan Justen wrote: > On Fri, Feb 1, 2013 at 11:33 AM, Olivier Martin > wrote: > > Linaro maintains their own git-svn service: > > http://git.linaro.org/gitweb?p=mirror/edk2/edk2.git;a=summary > > Andrew, > > While I agree with you that git-svn is a great thing for working with >

Re: [edk2] Git as an svn alternative - was [PATCH] Fix broken IA32 ...

2013-02-12 Thread David Woodhouse
On Tue, 2013-02-12 at 11:11 +, Grant Likely wrote: > > > This mismatch generally makes sharing changes/trees more difficult, > > and thus is a point in favor of git vs. git-svn. > > s/more difficult/impossible/ The git mirrors become basically > read-only w.r.t. the mainline tree. You cannot

[edk2] TargetTool

2013-02-12 Thread Garry Pavento
I was trying to use TargetTool with the "set" argument to change the BUILD_RULE_FILE configuration (--buildrule option). This does not work. I checked it with the latest code from SVN yesterday (Feb. 11, 2013) and the code is the same as in the UDK2010.SR1.UP1 release. I modified GetConfigure

[edk2] SOL_SOCKET / SO_ERROR unsupported

2013-02-12 Thread Космынин Олег Олегович
Hello devs In function Socket.c::EslSocketOptionGet on request level == SOL_SOCKET there is no SO_ERROR option needed for some applications. According to manuals SO_ERROR's purpose is: Reports information about error status and clears it. This option shall store an int value. As i understand to

Re: [edk2] [PATCH 2/2] LegacyBbs: add boot entries for virtio-blk devices

2013-02-12 Thread David Woodhouse
On Fri, 2013-02-08 at 04:44 +, Li, Elvin wrote: > I guess this virtual disk comes from a virtual disk > controller. Now you only fill an entry in BBS table to show legacy > boot options, I am unclear that how you enable real legacy boot for > this virtual disk finally? The bbs entry you

Re: [edk2] [PATCH] panda: build.sh: change RELEASE/DEBUG param handling

2013-02-12 Thread Deprez, Olivier
Acked-by: Deprez, Olivier Texas Instruments France SA, 821 Avenue Jack Kilby, 06270 Villeneuve Loubet. 036 420 040 R.C.S Antibes. Capital de EUR 12.654.784 -Original Message- From: Ryan Harkin [mailto:ryan.har...@linaro.org] Sent: Monday, February 11, 2013 7:16 PM To: Jordan Justen Cc:

Re: [edk2] Git as an svn alternative - was [PATCH] Fix broken IA32 ...

2013-02-12 Thread Jordan Justen
On Tue, Feb 12, 2013 at 3:11 AM, Grant Likely wrote: > On Feb 1, 2013 Jordan Justen wrote: >> On Fri, Feb 1, 2013 at 11:33 AM, Olivier Martin >> wrote: >> > Linaro maintains their own git-svn service: >> > http://git.linaro.org/gitweb?p=mirror/edk2/edk2.git;a=summary >> It looks as though they a

Re: [edk2] Okay to Keep Protocol Open?

2013-02-12 Thread Andrew Fish
What do you mean by device being removed? Media being removed from a device is a different case than unplugging an USB disk. Andrew Fish On Feb 11, 2013, at 7:38 PM, "David F." wrote: > Hi, > > I'd like to open the DISK_IO protocol and leave it open for quite a > while (hours). In the mean

Re: [edk2] Git as an svn alternative - was [PATCH] Fix broken IA32 ...

2013-02-12 Thread Grant Likely
On Tue, Feb 12, 2013 at 4:29 PM, Jordan Justen wrote: > On Tue, Feb 12, 2013 at 3:11 AM, Grant Likely > wrote: >> On Feb 1, 2013 Jordan Justen wrote: >>> On Fri, Feb 1, 2013 at 11:33 AM, Olivier Martin >>> wrote: >>> > Linaro maintains their own git-svn service: >>> > http://git.linaro.org/git

Re: [edk2] Git as an svn alternative - was [PATCH] Fix broken IA32 ...

2013-02-12 Thread Grant Likely
On Tue, Feb 12, 2013 at 4:44 PM, Grant Likely wrote: > On Tue, Feb 12, 2013 at 4:29 PM, Jordan Justen wrote: >> On Tue, Feb 12, 2013 at 3:11 AM, Grant Likely >> wrote: >>> On Feb 1, 2013 Jordan Justen wrote: On Fri, Feb 1, 2013 at 11:33 AM, Olivier Martin wrote: > Linaro mainta

[edk2] [PATCH] OvmfPkg: increase MEMFD size to 8MB

2013-02-12 Thread Laszlo Ersek
With reference to : "MEMFD is built so MAINFV's contents will be relocated during the build to address 0x80", and it "is a firmware volume with most OVMF code/data uncompressed. [...] Increasing its size has a little impact on the

[edk2] [PATCH] StdLib/EfiSocketLib: add EFIAPI calling conv to PFN_NET_* funcptr types

2013-02-12 Thread Laszlo Ersek
Otherwise gcc can default to the "sysv_abi" (as opposed to the "ms_abi") calling convention on X64, causing problems like . Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- StdLib/EfiSocketLib

Re: [edk2] Git as an svn alternative - was [PATCH] Fix broken IA32 ...

2013-02-12 Thread Patrick Georgi
Am 2013-02-12 17:29, schrieb Jordan Justen: > If EDK II were to change to git, I would vote for github hosting to > be > the primary location. Then again, moving the main tree location would > be much less traumatic with git so, this choice would not be as big > of > a deal as today. And if it we

Re: [edk2] Issues while building the driver through udk

2013-02-12 Thread Prakash, Sathya
Tim, I have commented that out and with that I am able to proceed a step ahead. But I am seeing another problem, I couldn't see the VFR.c is not getting generated after vfrcompile. The vfrcompile didn't return any error, at the end while linking I get unresolved symbol for formsbin. I keep t

Re: [edk2] block I/O protocol filter driver

2013-02-12 Thread Andrew Fish
On Feb 11, 2013, at 7:34 PM, David Wu wrote: > Hello, > Since UEFI systems use block I/O protocol to read data instead of INT 13h > under legacy BIOS, we need to migrate our hibernation resuming filter driver > under legacy BIOS to UEFI enviroment. With almost zero previous knowledge on > EFI

Re: [edk2] Issues while building the driver through udk

2013-02-12 Thread Tim Lewis
Sathya - In a true UEFI build, there is no vfr.c. Please see the description of how HII resources are handled in the LoadImage() description from the UEFI specification. In the case you are seeing, the individual packages are generated as .hpk files (HII Packages), combined together into HII pa

Re: [edk2] Git as an svn alternative - was [PATCH] Fix broken IA32 ...

2013-02-12 Thread Ryan Harkin
Great discussion :-) On 12 February 2013 11:11, Grant Likely wrote: > On Feb 1, 2013 Jordan Justen wrote: >> On Fri, Feb 1, 2013 at 11:33 AM, Olivier Martin >> wrote: >> > Linaro maintains their own git-svn service: >> > http://git.linaro.org/gitweb?p=mirror/edk2/edk2.git;a=summary >> >> Andrew

[edk2] @echo -off doesn't work in a script

2013-02-12 Thread Stephen Polkowski
Hi all, Shouldn't @echo -off work in a .nsh script. It doesn't on the latest UDK2010.SR1.UP1 shell. It only hides the echo -off command. The commands that follow it are echoed to the screen. Am I missing something. Thanks in advance, Stephen ---

Re: [edk2] Issues while building the driver through udk

2013-02-12 Thread Prakash, Sathya
Tim, Thanks for the pointers. I am referring the DriverSampleDxe from MdeModulePkg\Universal\DriverSampleDxe and calling HiiAddPackages to install the vfr binaries. And I have seen the vfr.c files are getting generated in it. Am I going in a wrong direction? Thanks Sathya From: Tim Lewis [m

Re: [edk2] Issues while building the driver through udk

2013-02-12 Thread Tim Lewis
Do you have UEFI_HII_RESOURCE_SECTION = TRUE in your INF? If so, you will get the .hpk files (as I saw in your error message). If you remove it, you will get the .C files From: Prakash, Sathya [mailto:sathya.prak...@lsi.com] Sent: Tuesday, February 12, 2013 9:28 AM To: edk2-devel@lists.so

Re: [edk2] @echo -off doesn't work in a script

2013-02-12 Thread Jarlstrom, Laurie
I just tried the attached scripts on the UDK2010.SR1.UP1 Nt32 emulation and the shell "echo" worked as per the screen capture attached Try the scripts attached. thanks, Laurie laurie.jarlst...@intel.com EFI / Framework Technical Marketing Engineering Team (503) 712-9395 -Original Message-

Re: [edk2] @echo -off doesn't work in a script

2013-02-12 Thread Jarlstrom, Laurie
The results are different with UEFI Shell 2.0. The initial "@" needs to be removed for UEFI Shell 2.0. thanks, Laurie laurie.jarlst...@intel.com EFI / Framework Technical Marketing Engineering Team (503) 712-9395 -Original Message- From: Jarlstrom, Laurie [mailto:laurie.jarlst...@i

Re: [edk2] @echo -off doesn't work in a script

2013-02-12 Thread Tim Lewis
Laurie -- Is this a bug, then? Chapter 4 of the UEFI Shell spec says: "Also, additional '@' before a command in a script file can prevent the current command from being echoed" -Original Message- From: Jarlstrom, Laurie [mailto:laurie.jarlst...@intel.com] Sent: Tuesday, February 12, 2

Re: [edk2] Issues while building the driver through udk

2013-02-12 Thread Prakash, Sathya
Thanks Tim, I had it set to TRUE. After the change I am able to get the .C files. Could you please let me know whether using the DriverSampleDxe as an example is right thing and calling HiiAddPackages is right thing to do or should I need to use LoadImage and use HandleProtocol and NewPackageL

Re: [edk2] Okay to Keep Protocol Open?

2013-02-12 Thread David F.
I mean the device itself may be removed, USB hard drive, 1394, etc.. I presume it would still be safe and attempts to access it would simply fail? On Tue, Feb 12, 2013 at 8:44 AM, Andrew Fish wrote: > What do you mean by device being removed? Media being removed from a device > is a different ca

Re: [edk2] @echo -off doesn't work in a script

2013-02-12 Thread Stephen Polkowski
Yes, that is my point. There is no way to hide the echo -off command in the 2.0 shell. If you use the @ with "echo -off" it will fail to disable echo for sub-sequent commands. file: hello.nsh @echo -off echo "Hello World" output: 2.0 FS0:\> hello.nsh 2.0 FS0:\> echo "Hello World" Hello Wor

Re: [edk2] block I/O protocol filter driver

2013-02-12 Thread David Wu
Hi Andrew, Thank you very much for your input. You ask me why I need to filter the data and what problem I'm trying to solve. I need to decrypt the hibernation file during hibernation resuming. We encrypt the hibernation file hiberfil.sys during hibernation preparing. So we need to decrypt it d

Re: [edk2] @echo -off doesn't work in a script

2013-02-12 Thread Rothman, Michael A
This smells like a bug to me. First line @ statements should work.. Thanks, Mike Rothman (迈克 罗斯曼 / माइकल रोथ्मेन् / Михаил Ротман / משה רוטמן) רק טיפשים חושבים שהם יכולים לעבוד עלי -Original Message- From: Tim Lewis [mailto:tim.le...@insyde.com] Sent: Tuesday, February 12, 2013 10:

Re: [edk2] Issues while building the driver through udk

2013-02-12 Thread Jarlstrom, Laurie
I would also suggest checking out the MdeModulePkg\Universal\HiiResourcesSampleDxe example for Publishing HII package list to HII Database thanks, Laurie laurie.jarlst...@intel.com EFI / Framework Technical Marketing Engineering Team (503) 712-9395 From: Prak

Re: [edk2] @echo -off doesn't work in a script

2013-02-12 Thread Carsey, Jaben
That does look wrong. I would expect that it would not show the echo command line. It shouldn't show: 2.0 FS0:\> echo "Hello World" Have you looked at the code? I don't remember how this works inside... -Jaben -Original Message- From: Stephen Polkowski [mailto:step...@centtech.com] S

Re: [edk2] @echo -off doesn't work in a script

2013-02-12 Thread Tim Lewis
The problem is in Shell.c: if (CommandLine3[0] == L'@') { PreCommandEchoState = ShellCommandGetEchoState(); ShellCommandSetEchoState(FALSE); Status = RunCommand(CommandLine3+1); // // Now restore the pre-'@' echo state.

[edk2] WaitForEvent Idle Race Condition

2013-02-12 Thread Cohen, Eugene
It appears that there is a race condition in WaitForEvent... after all events are checked the idle event is signaled. But if a timer tick interrupt comes in and schedules work (SignalEvent) after the loop is done but before the event is signaled, we will delay unnecessarily for an additional ti

Re: [edk2] @echo -off doesn't work in a script

2013-02-12 Thread Carsey, Jaben
I think the restore there is designed to handle the case where the script calls another script with @ script1.nsh @script2.nsh I don't think that any other case requires the restoration of the echo state. -Jaben -Original Message- From: Tim Lewis [mailto:tim.le...@insyde.com] Sent: Tu

Re: [edk2] @echo -off doesn't work in a script

2013-02-12 Thread Tim Lewis
Jaben -- I thought the other case was 1. echo is on 2. @other-command turns off echo temporarily 3. echo is restored back on Tim -Original Message- From: Carsey, Jaben [mailto:jaben.car...@intel.com] Sent: Tuesday, February 12, 2013 11:09 AM To: edk2-devel@lists.sourceforge.net Subject

Re: [edk2] @echo -off doesn't work in a script

2013-02-12 Thread Rothman, Michael A
Tim, agreed. Thanks, Mike Rothman (迈克 罗斯曼 / माइकल रोथ्मेन् / Михаил Ротман / משה רוטמן) רק טיפשים חושבים שהם יכולים לעבוד עלי -Original Message- From: Tim Lewis [mailto:tim.le...@insyde.com] Sent: Tuesday, February 12, 2013 11:12 AM To: edk2-devel@lists.sourceforge.net Subject: Re: [ed

Re: [edk2] @echo -off doesn't work in a script

2013-02-12 Thread Carsey, Jaben
But since the only checking of the echo state happens in the else statement of the if that we are already inside of. We could just ignore it entirely since we inherently skipped the printout. When I say ignore "it", I mean ignore both the set to FALSE, and the restore. But since this entire

Re: [edk2] @echo -off doesn't work in a script

2013-02-12 Thread Carsey, Jaben
I disagree. The @ only turns echo off. It is not a temporary reversal of the current state. Per your quote" Also, additional '@' before a command in a script file can prevent the current command from being echoed" -Original Message- From: Rothman, Michael A [mailto:michael.a.roth...@

Re: [edk2] @echo -off doesn't work in a script

2013-02-12 Thread Tim Lewis
Jaben -- I think we're actually agreeing. I understand that @ temporarily turns echo off. The only case where this fails is where the other-command changes the echo state itself. Tim -Original Message- From: Carsey, Jaben [mailto:jaben.car...@intel.com] Sent: Tuesday, February 12, 201

Re: [edk2] shell command MM does not run inside a shell script and PrintToken

2013-02-12 Thread Toto Lebolo
Andrew, I found the root cause of this ticket: http://sourceforge.net/apps/trac/efidevkit/ticket/1316 How do I contribute? MiKL~ From: Andrew Fish To: Toto Lebolo ; edk2-devel@lists.sourceforge.net Sent: Saturday, February 2, 2013 5:59 PM Subject: Re: [edk2]

Re: [edk2] Okay to Keep Protocol Open?

2013-02-12 Thread Andrew Fish
On Feb 12, 2013, at 10:48 AM, David F. wrote: > I mean the device itself may be removed, USB hard drive, 1394, etc.. > I presume it would still be safe and attempts to access it would > simply fail? > The bus driver (USB Bus Driver for example) does a gBS->DisconnectController() and causes th

Re: [edk2] WaitForEvent Idle Race Condition

2013-02-12 Thread Andrew Fish
Eugene, I think this is the way it works. CoreCheckEvent() and CoreSignalEven() both have locks that raise to TPL_HIGH_LEVEL. But we never signal (call an events Notify Function) an event at TPL_HIGH_LEVEL. What if NumberOfEvents > 1 and the 1st event is checked, and then a timer tick happen

Re: [edk2] WaitForEvent Idle Race Condition

2013-02-12 Thread Cohen, Eugene
Ø It seems like a tradeoff of masking interrupts for a very very long time or realizing that you may delay an entire timer tick. The window can probably be narrowed substantially by maintaining a global like BOOLEAN gEventFired that you clear at the beginning of the loop and check afterwards w

Re: [edk2] Okay to Keep Protocol Open?

2013-02-12 Thread David F.
Are you saying in an application: OpenProtocol(Handle, &gEfiDiskIoProtocolGuid, (void**) &DiskIO, ImageHandle, NULL, EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL) is not safe - it will still invalidate the pointers in DiskIO when removed and won't wait until CloseProtocol is used? On Tue, Feb 12, 2013 a

Re: [edk2] WaitForEvent Idle Race Condition

2013-02-12 Thread Andrew Fish
On Feb 12, 2013, at 12:45 PM, "Cohen, Eugene" wrote: > Ø It seems like a tradeoff of masking interrupts for a very very long time > or realizing that you may delay an entire timer tick. > > The window can probably be narrowed substantially by maintaining a global > like BOOLEAN gEventFired

Re: [edk2] Git as an svn alternative - was [PATCH] Fix broken IA32 ...

2013-02-12 Thread H. Peter Anvin
On 02/12/2013 04:20 AM, David Woodhouse wrote: > On Tue, 2013-02-12 at 11:11 +, Grant Likely wrote: >> >>> This mismatch generally makes sharing changes/trees more difficult, >>> and thus is a point in favor of git vs. git-svn. >> >> s/more difficult/impossible/ The git mirrors become basicall

Re: [edk2] WaitForEvent Idle Race Condition

2013-02-12 Thread Tim Lewis
Especially since WaitForEvent can only be called at TPL_APPLICATION. Pretty hard to use in an I/O driver. Tim From: Andrew Fish [mailto:af...@apple.com] Sent: Tuesday, February 12, 2013 1:54 PM To: edk2-devel@lists.sourceforge.net Subject: Re: [edk2] WaitForEvent Idle Race Condition On Feb 12,

Re: [edk2] Okay to Keep Protocol Open?

2013-02-12 Thread Andrew Fish
On Feb 12, 2013, at 1:08 PM, "David F." wrote: > Are you saying in an application: > > OpenProtocol(Handle, &gEfiDiskIoProtocolGuid, (void**) &DiskIO, > ImageHandle, NULL, EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL) > > is not safe - it will still invalidate the pointers in DiskIO when > removed and

Re: [edk2] WaitForEvent Idle Race Condition

2013-02-12 Thread Cohen, Eugene
Andrew, I like the system time tracking idea, it solves the problem and requires no new global variables. Also consider that the Idle event group or CpuSleep may be signaled in other circumstances beyond WaitForEvent. Who knows maybe someone has implemented interrupt-driven I/O and wants to wa

Re: [edk2] block I/O protocol filter driver

2013-02-12 Thread Kinney, Michael D
David, It Is possible to use the UEFI Driver Model to create a filter driver for any protocol. The method is to open the protocol the needs to be filtered BY_DRIVER and produces a child handle with the same protocol interface with filter logic in the filter driver implementation along with a ne

Re: [edk2] block I/O protocol filter driver

2013-02-12 Thread Andrew Fish
On Feb 12, 2013, at 2:50 PM, "Kinney, Michael D" wrote: > David, > > It Is possible to use the UEFI Driver Model to create a filter driver for any > protocol. The method is to open the protocol the needs to be filtered > BY_DRIVER and produces a child handle with the same protocol interface

Re: [edk2] block I/O protocol filter driver

2013-02-12 Thread David Wu
Hi Andrew and Mike, First of all, please allow me to say THANK YOU for giving me so much detail advise. With the direction that both of you point out, I gain more confidence. At least right now, I know where I can go. I'll dig into UEFI Driver Writer's Guide and UEFI spec to get solid knowledgeb

[edk2] ShellExecute

2013-02-12 Thread Thomas Rognon
UEFI Ninjas, I can execute an uefi application from the shell as follows: Shell>map -r Shell>fs0: fs0:>launch.efi But when I try this, it hangs and I have to restart the machine: Shell>map -r Shell>fs0: fs0:>test.efi where test.efi executes only the following code in UefiMain: ShellInitialize ()

Re: [edk2] ShellExecute

2013-02-12 Thread Thomas Rognon
Additional info: It crashes on ShellExecute with a memory violation and I'm using 64 bit UEFI 2.1+, UDK2010, and VS2008. On Tue, Feb 12, 2013 at 10:30 PM, Thomas Rognon wrote: > UEFI Ninjas, > > I can execute an uefi application from the shell as follows: > Shell>map -r > Shell>fs0: > fs0:>laun

[edk2] CPP Build Issue VC NULL

2013-02-12 Thread David F.
For visual studio the define for NULL in base.h should be #if defined(__cplusplus) #define NULL 0 #else #define NULL ((VOID *) 0) #endif -- Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before t