Re: [edk2] UnixPkg or EmulatoPkg?

2013-09-17 Thread Laszlo Ersek
On 09/16/13 23:42, Andrew Fish wrote: > > On Sep 16, 2013, at 1:16 PM, Laszlo Ersek wrote: > >> On 09/16/13 21:50, Andrew Fish wrote: >> >>> OVMF: >>> Limitations: Requires QEMU, serial port debugging (not well >>> documented), more complex setup. >> >> I agree that the setup is complex. >> >> R

Re: [edk2] XHCI Issues

2013-09-17 Thread Sergey Isakov
Hi Feng, I am also thinking about different ASSERTs in the driver. If debug then ASSERT cause a hang/stop/break. If release then ASSERT do nothing causes next operator to crash (null pointer etc). For example -- UINT32 XhcReadOpReg ( IN USB_XHCI_INSTANCE *Xhc, IN UINT32

Re: [edk2] network IfType matching in BDS

2013-09-17 Thread Ni, Ruiyu
If you look at the BDS code which creates the boot option for network, it just gets the MAC device path and stores it into the boot option variable. So it looks strange that the LocateDevicePath() cannot find the same MAC device path in the system. -Original Message- From: Peter Jones [

Re: [edk2] UnixPkg or EmulatoPkg?

2013-09-17 Thread Blibbet
[...] > Several OVMF pages in the TianoCore wiki are somewhat outdated, but I > have no permission to edit them. [...] The EDK-II OVMF downloads were last built in early 2011. It would be nice if someone uploaded something newer. http://sourceforge.net/projects/edk2/files/OVMF/ OVMF-X64-r11337-

Re: [edk2] EmulatorPkg build problem

2013-09-17 Thread okosmy...@kraftway.ru
Still no go with EmulatorPkg package... but i can build AppPkg successfully. Here is version information from my build system: svn info: Path: . URL: https://svn.code.sf.net/p/edk2/code/trunk/edk2/EmulatorPkg Repository Root: https://svn.code.sf.net/p/edk2/code Repository UUID: 6f19259b-4bc3-4df7

Re: [edk2] Unexpected Annoyances Dealing with Opening Protocols.

2013-09-17 Thread David F.
I think I get what happens - the implementation must be holding on to the device path protocol, the by_driver fails so we try the by_driver|exclusive which then triggers the disconnectcontroller logic internally which isn't protocol specific and just stops whatever it is, in this case the file syst

Re: [edk2] UnixPkg or EmulatoPkg?

2013-09-17 Thread Laszlo Ersek
On 09/17/13 09:36, Blibbet wrote: > [...] >> Several OVMF pages in the TianoCore wiki are somewhat outdated, but I >> have no permission to edit them. [...] > > The EDK-II OVMF downloads were last built in early 2011. It would be > nice if someone uploaded something newer. > > http://sourceforg

Re: [edk2] network IfType matching in BDS

2013-09-17 Thread Laszlo Ersek
On 09/17/13 09:33, Ni, Ruiyu wrote: > If you look at the BDS code which creates the boot option for network, it > just gets the MAC device path and stores it into the boot option variable. > So it looks strange that the LocateDevicePath() cannot find the same MAC > device path in the system. The

Re: [edk2] EmulatorPkg build problem

2013-09-17 Thread Laszlo Ersek
On 09/17/13 09:43, okosmy...@kraftway.ru wrote: > src/Build/OvmfX64/DEBUG_GCC46/X64/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib/OUTPUT/UefiDevicePathLib.lib(UefiDevicePathLib.obj): > In function `ConvertDeviceNodeToText': > src/MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.c:291: *_mul

Re: [edk2] XHCI Issues

2013-09-17 Thread Sergey Isakov
One more issue here. Look into XhcReadRuntimeReg () -- if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "XhcReadRuntimeReg: Pci Io Read error - %r at %d\n", Status, Offset)); Data = 0x; } return Data; } -- But usage of the procedure do not propose wrong return. For exa

Re: [edk2] XHCI Issues

2013-09-17 Thread Tian, Feng
Hi, Sergey The Assert() in XhcReadOpReg() makes sense as it would never be false if the XHCI controller follows XHCI spec. For your 2nd concern, yes, we didn't care the return data for such cases. Thanks Feng From: Sergey Isakov [mailto:isakov...@bk.ru] Sent: Tuesday, September 17, 2013 16:13

Re: [edk2] FreePool crashes the system when called with a NULL pointer

2013-09-17 Thread Laszlo Ersek
On 09/17/13 08:36, Ryan Harkin wrote: > I think FreePool(NULL) should just return without reporting an error. I agree that it could simplify some error/exit paths. It may not match the general "UEFI interface style" though. In my experience only pointers to optional parameters may be NULL, and F

[edk2] Display SATA devices in EFI shell using UEFI driver

2013-09-17 Thread Murali Selvaraj
Hi Sathya, Please go through the below information and share valuable comments and suggestions. Setup Details : My Intel board connected to PCIe based SCSI controller (LSISAS1064E PCI Express to 4-Port Serial Attached SCSI Controller ) and it has three SATA devices connected with the pcie board.

[edk2] ShellPkg patch: Handle pool allocation failure

2013-09-17 Thread Sergei Antonov
Hi! See the patch. I get the reason of not checking AllocateZeroPool() return value (GetVariable() will return EFI_BUFFER_TOO_SMALL again). But check before calling FreePool(). SetVar.c.patch Description: Binary data -- L

Re: [edk2] Unexpected Annoyances Dealing with Opening Protocols.

2013-09-17 Thread Andrew Fish
On Sep 17, 2013, at 8:59 AM, Andrew Fish wrote: > EXCLUSIVE means kick every one else off. So for example if you were about to > format a driver Make that drive > you would open the BlockIo EXCLUSIVE. So it sounds like it is functioning as > intended. EXCLUSIVE is a massive hammer, and gene

Re: [edk2] FreePool crashes the system when called with a NULL pointer

2013-09-17 Thread Andrew Fish
On Sep 16, 2013, at 11:36 PM, Ryan Harkin wrote: > Hi, > > Tracking down a crash I am seeing shows that I am effectively calling > FreePool() with a NULL pointer. The system then ASSERTS and hangs. > > I've noticed various seemingly "random" asserts like this before and suspect > it may be

[edk2] [PATCH 3/8] OvmfPkg/VirtioPciDeviceDxe: Implement VIRTIO_DEVICE_PROTOCOL for VirtIo Devices over PCI

2013-09-17 Thread Olivier Martin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin --- OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c | 637 + OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.h | 246 OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf | 42 ++

[edk2] [PATCH 1/8] OvmfPkg/Virtio.h: Added VirtIo Subsystem IDs

2013-09-17 Thread Olivier Martin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin --- OvmfPkg/Include/IndustryStandard/Virtio.h | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/OvmfPkg/Include/IndustryStandard/Virtio.h b/OvmfPkg/Include/IndustryStandard/V

[edk2] [PATCH 8/8] ArmPlatformPkg/ArmFvpDxe: Added Virtio Block support

2013-09-17 Thread Olivier Martin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin --- .../ArmVExpressPkg/ArmFvpDxe/ArmFvpDxe.c | 49 +++- .../ArmVExpressPkg/ArmFvpDxe/ArmFvpDxe.inf |3 + .../ArmVExpress-RTSM-AEMv8Ax4-foundation.dsc | 10 ..

Re: [edk2] Unexpected Annoyances Dealing with Opening Protocols.

2013-09-17 Thread David F.
Yes, but you can't say be open BY_DRIVER when something like a file system won't let you have the block io protocol, so you either have to move to BY_HANDLE or EXCLUSIVE. You go Exclusive, you kick it off, you go BY_HANDLE now you're unsafe for hot-swap. On Tue, Sep 17, 2013 at 9:16 AM, Andrew

[edk2] [PATCH 6/8] OvmfPkg/Virtio.h: Removed definition of VIRTIO_HDR

2013-09-17 Thread Olivier Martin
This definition is specific to VirtIo over PCI. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin --- OvmfPkg/Include/IndustryStandard/Virtio.h | 18 -- 1 files changed, 0 insertions(+), 18 deletions(-) diff --git a/OvmfPkg/Include/IndustryS

Re: [edk2] FreePool crashes the system when called with a NULL pointer

2013-09-17 Thread Andrew Fish
On Sep 17, 2013, at 2:55 AM, Laszlo Ersek wrote: > On 09/17/13 08:36, Ryan Harkin wrote: > >> I think FreePool(NULL) should just return without reporting an error. > > I agree that it could simplify some error/exit paths. > > It may not match the general "UEFI interface style" though. In my

[edk2] [PATCH 0/8] OvmfPkg: Introduce and use the new VIRTIO_DEVICE_PROTOCOL protocol

2013-09-17 Thread Olivier Martin
This patchset introduces the new protocol VIRTIO_DEVICE_PROTOCOL that abstracts the VirtIo transport layer. It allows to enable VirtIo on devices that do not have PCI support. These devices might use a memory mapped view of the VirtIo controller (see Appendix X: virtio-mmio of the Virtio spec v0

[edk2] MdePkg BaseLib/String.c StrLen() question

2013-09-17 Thread Binh Tran
Hi all, StrLen() function MdePkg file BaseLib/String.c will ASSERT if the string is not DWORD aligned. I'm very curious, what is the rationale for this ASSERT? -- LIMITED TIME SALE - Full Year of Microsoft Training For

Re: [edk2] Inconsistent handling of backspace OVMF/VirtualBox/PhysicalMachine

2013-09-17 Thread David F.
Clear to me, but, clearly someone didn't read it that technically and were probably use to backspace deleting things so they implemented it that way. A little note that cursor movement should not affect displayed characters. I just see it as one person implements it wrong, the next may too, especia

Re: [edk2] Inconsistent handling of backspace OVMF/VirtualBox/PhysicalMachine

2013-09-17 Thread Andrew Fish
On Sep 17, 2013, at 2:49 PM, "David F." wrote: > Hi, > > Initial testing on physical machines the backspace sending to ConOut > correctly just back spaced with no clearing of characters. Under VirtualBox > (OVMF) it will clear characters which is not expected. The user would need > to sen

Re: [edk2] MdePkg BaseLib/String.c StrLen() question

2013-09-17 Thread Andrew Fish
On Sep 17, 2013, at 2:19 PM, Binh Tran wrote: > Hi all, > > StrLen() function MdePkg file BaseLib/String.c will ASSERT if the string is > not DWORD aligned. > > I’m very curious, what is the rationale for this ASSERT? The EFI ABI requires that types are naturally aligned. Since a CHAR16

[edk2] [PATCH 0/6] OvmfPkg: Fix KVM boot issue with QEMU 1.6 and no-EPT support

2013-09-17 Thread Jordan Justen
QEMU 1.6 enables using KVM READONLY memory regions. There appears to be a bug when page tables are stored in the READONLY memory region. To work-around this, we create page table entries in RAM. Since RAM is present in QEMU/KVM without any initialization, this is easily accomplished for OVMF. Sinc

[edk2] [PATCH 4/6] OvmfPkg X64: Convert 24KB from uncompressed to compressed storage

2013-09-17 Thread Jordan Justen
Since we no longer require flash tables to be stored uncompressed in the flash image, we can now give extra space to the main/compressed storage area. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen --- OvmfPkg/OvmfPkgX64.fdf |4 ++-- 1 file changed, 2 in

[edk2] [PATCH 1/6] UefiCpuPkg/ResetVector/Vtf0: Move Page Table/CR3 setting to a new file

2013-09-17 Thread Jordan Justen
Now, Transition32FlatTo64Flat calls SetCr3ForPageTables64 which is located in Ia32/PageTables64.asm. This change is required so OVMF can replace the code in Ia32/PageTables64.asm with code that generates page tables in RAM. Note: Since this change does not impact the functionality of the current

[edk2] [PATCH 6/6] OvmfPkg: Remove IndustryStandard/X64Paging.h

2013-09-17 Thread Jordan Justen
Since we no longer building page tables in SEC C code, we no longer need this file. This reverts commit r14493. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen --- OvmfPkg/Include/IndustryStandard/X64Paging.h | 99 -- 1 file changed

[edk2] [PATCH 3/6] OvmfPkg: For OvmfPkgX64, use OvmfPkg/ResetVector

2013-09-17 Thread Jordan Justen
This reset vector code will build page tables in RAM at address 0x8, rather than relying on page tables to be present within the flash image. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen --- OvmfPkg/OvmfPkgX64.fdf |2 +- 1 file changed, 1 insertion

[edk2] [PATCH 2/6] OvmfPkg: Add platform specific reset vector code for X64

2013-09-17 Thread Jordan Justen
KVM has a bug that prevents using page tables in the ROM if the ROM region utilizes the KVM READONLY memory feature. Therefore, we avoid using page tables stored in the ROM. Since OVMF doesn't require memory initialization, we just build page table entries in RAM at 0x8 very early in the OVMF

[edk2] [PATCH 5/6] OvmfPkg/Sec: Stop building identity mapped pages in SEC

2013-09-17 Thread Jordan Justen
Now for X64 we use a VTF0 ResetVector which puts the page tables in RAM. Therefore SEC no longer needs to do this. This reverts commit r14494. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen --- OvmfPkg/Sec/SecMain.c | 144 +-

[edk2] [PATCH 4/8] OvmfPkg/VirtioMmioDeviceLib: Implement VIRTIO_DEVICE_PROTOCOL for VirtIo Devices over MMIO

2013-09-17 Thread Olivier Martin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin --- OvmfPkg/Include/Library/VirtioMmioDeviceLib.h | 48 .../Library/VirtioMmioDeviceLib/VirtioMmioDevice.c | 199 ++ .../Library/VirtioMmioDeviceLib/VirtioMmioDevice.h | 147 ++

[edk2] [PATCH 2/8] OvmfPkg/VirtioDevice.h: Introduced VIRTIO_DEVICE_PROTOCOL protocol

2013-09-17 Thread Olivier Martin
This protocol is used to abstract the VirtIo transport layer. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin --- OvmfPkg/Include/Protocol/VirtioDevice.h | 284 +++ OvmfPkg/OvmfPkg.dec |1 + 2 files change

[edk2] MdePkg: Enhancement Sample Patch - %v for Device Paths

2013-09-17 Thread David F.
Hi, So I'm always seeming to have to print out device paths and got tried of copy/pasting code to print it (and without creating a whole new print wrapper). I though others probably have to do the same types of things, so here's a sample of adding %v to the core Print() and others functions using

Re: [edk2] FreePool crashes the system when called with a NULL pointer

2013-09-17 Thread Andrew Fish
On Sep 16, 2013, at 11:36 PM, Ryan Harkin wrote: > Hi, > > Tracking down a crash I am seeing shows that I am effectively calling > FreePool() with a NULL pointer. The system then ASSERTS and hangs. > > I've noticed various seemingly "random" asserts like this before and suspect > it may be

Re: [edk2] Unexpected Annoyances Dealing with Opening Protocols.

2013-09-17 Thread Andrew Fish
EXCLUSIVE means kick every one else off. So for example if you were about to format a driver you would open the BlockIo EXCLUSIVE. So it sounds like it is functioning as intended. EXCLUSIVE is a massive hammer, and general is not used, unless it is really required. Thanks, Andrew Fish On Sep

[edk2] [PATCH 7/8] ArmPlatformPkg/ArmVExpressPkg: Added the empty 'ArmFvpDxe' platform UEFI driver

2013-09-17 Thread Olivier Martin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin --- .../ArmVExpressPkg/ArmFvpDxe/ArmFvpDxe.c | 26 ++ .../ArmVExpressPkg/ArmFvpDxe/ArmFvpDxe.inf | 35 .../ArmVExpressPkg/ArmVExpress-RTSM-AEMv8Ax4.dsc |

[edk2] Display SATA devices in EFI shell using UEFI driver

2013-09-17 Thread Murali Selvaraj
Hi All, Please go through the below information and share valuable comments and suggestions. *Setup Details :* My Intel board connected to PCIe based SCSI controller (*LSISAS1064E PCI Express to 4-Port Serial Attached SCSI Controller* ) and it has three SATA devices connected with the pcie boar

Re: [edk2] MdePkg BaseLib/String.c StrLen() question

2013-09-17 Thread Binh Tran
Opps, WORD 16 bit aligned, not DWORD. From: Binh Tran [mailto:binh_t...@phoenix.com] Sent: Tuesday, September 17, 2013 2:19 PM To: edk2-devel@lists.sourceforge.net Subject: [edk2] MdePkg BaseLib/String.c StrLen() question Hi all, StrLen() function MdePkg file BaseLib/String.c will ASSERT if the

[edk2] Inconsistent handling of backspace OVMF/VirtualBox/PhysicalMachine

2013-09-17 Thread David F.
Hi, Initial testing on physical machines the backspace sending to ConOut correctly just back spaced with no clearing of characters. Under VirtualBox (OVMF) it will clear characters which is not expected. The user would need to send "\b \b" if they want to clear a character. Perhaps the spec sh

Re: [edk2] [PATCH 0/6] OvmfPkg: Fix KVM boot issue with QEMU 1.6 and no-EPT support

2013-09-17 Thread Jordan Justen
The patches are also available in this tag: https://github.com/jljusten/edk2.git ovmf-vm-vtf0-v1 On Tue, Sep 17, 2013 at 4:24 PM, Jordan Justen wrote: > QEMU 1.6 enables using KVM READONLY memory regions. There > appears to be a bug when page tables are stored in the > READONLY memory region. To

Re: [edk2] [PATCH 3/8] OvmfPkg/VirtioPciDeviceDxe: Implement VIRTIO_DEVICE_PROTOCOL for VirtIo Devices over PCI

2013-09-17 Thread Jordan Justen
On Tue, Sep 17, 2013 at 9:54 AM, Olivier Martin wrote: Seems like at least a small commit message body might be appropriate. > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Olivier Martin > --- > OvmfPkg/VirtioPciDeviceDxe/VirtioPciDevice.c | 637 > +++

Re: [edk2] XHCI Issues

2013-09-17 Thread Tian, Feng
I totally agree with you that putting function which would change h/w status into ASSERT is not good practice. For the case, it's only used to read a register once. It's just a double confirmation and real judgment is done by XhcResetHC(). Thanks Feng From: Sergey Isakov [mailto:isakov...@bk.ru

Re: [edk2] FreePool crashes the system when called with a NULL pointer

2013-09-17 Thread Ryan Harkin
On 17 September 2013 16:52, Andrew Fish wrote: > > On Sep 16, 2013, at 11:36 PM, Ryan Harkin wrote: > > Hi, > > Tracking down a crash I am seeing shows that I am effectively calling > FreePool() with a NULL pointer. The system then ASSERTS and hangs. > > I've noticed various seemingly "random"