Re: [edk2] UEFI build fails when using .cpp

2013-02-03 Thread Tim Lewis
There is no C++ support in EDK2. There are a number of obstacles to making C++ support work. You have found one of them. Tim From: Volodymyr Sharovar [mailto:volodymyrsharo...@gmail.com] Sent: Sunday, February 03, 2013 7:50 PM To: edk2-devel@lists.sourceforge.net Subject: [edk2] UEFI build fails

[edk2] UEFI build fails when using .cpp

2013-02-03 Thread Volodymyr Sharovar
Hello, I am a new person in UEFI development. I've gotten a task to develop a UEFI application, which should be written by using C++ language. I see that all examples in UDK developed using C not C++. I wonder if it is possible to use C++ for UEFI development. I tried to build a simple C++ applicat

Re: [edk2] Should LocateHandle return EFI_BUFFER_TOO_SMALL or EFI_WARN_BUFFER_TOO_SMALL

2013-02-03 Thread jagannath rath
Thank you Tim for your answer. Here is a simple application which I have run in EDK2 NT32Pkg. EFI_STATUS EFIAPI SimpleAppEntry( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUSStatus; EFI_HANDLEHandle; EFI_GUID **ProtocolBuffer; UI

Re: [edk2] Should LocateHandle return EFI_BUFFER_TOO_SMALL or EFI_WARN_BUFFER_TOO_SMALL

2013-02-03 Thread Tim Lewis
The contents of Buffer are undefined with EFI_BUFFER_TOO_SMALL. Some implementations may return data in this case, although this is a bit sloppy. Only BufferSize is guaranteed to be updated. The guaranteed behavior is as described in the UEFI specification. Tim -Original Message- From:

[edk2] Should LocateHandle return EFI_BUFFER_TOO_SMALL or EFI_WARN_BUFFER_TOO_SMALL

2013-02-03 Thread jagannath rath
Hello, The gBS->LocateHandle returns EFI_BUFFER_TOO_SMALL if the size of the buffer is small for the result. It actually does return the truncated data in the buffer. Hence should the return type not be EFI_WARN_BUFFER_TOO_SMALL as the buffer data is being truncated. Please point out if I am miss

Re: [edk2] Adding printf via StdLib

2013-02-03 Thread Joe Vernaci
__fltused I think is a special symbol VS injects to load floating point libraries. There are a few places where even when telling VS you are not using the default crts it will still try to load symbols like this (another being memcpy/memset off the top of my head). Both ieee754 and gdtoa deal wit

[edk2] VirtualBox UEFI and problems with EFI PCI IO PROTOCOL

2013-02-03 Thread Andrew Peters
Hello List, I have been trying to test my EFI application on various systems and so far it works everywhere except the EFI implementation embedded in the VirtualBox (uefi 2.31 x64). The problem is related to the Mem.Read() function from EFI PCI IO PROTOCOL. In VirtualBox this function retu

Re: [edk2] Adding printf via StdLib

2013-02-03 Thread David F.
i was also getting some weird results (vs2008x64) on link with missing external _fltused - if I defined it in the app it would complain that it's already defined (errno.c), if I /force:multiple it still couldn't find _fltused, so I went to dump the .obj file (isnand_ieee754.obj) it kept referring t