Commit Graph

10 Commits

Author SHA1 Message Date
andrewfish 8e4b3d32a8 InOsEmuPkg: Make the Guard MemoryAllocationLib handle EFI allocated pages correctly.
signed-off-by: andrewfish



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11887 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-25 01:39:09 +00:00
andrewfish 1d7ac5a617 InOsEmuPkg: Add an OS malloc/valloc/free based implementation of the MemoryAllocationLib. Requires extra Thunk APIs.
I've got this working. The tricky part was a driver/application can mix malloc forms. If the driver links against this library all the allocations come from the OS service, but if a protocol or EFI boot service return an allocated buffer it will still use the EFI allocation. The gasket code can detect this and do the right thing, as the emulator is passing up the memory map to EFI. 

You can now use the OS based malloc debugging tools in an EFI driver or appliaction. On OS X this is libgmalloc, also called guard malloc. 

Signed-off-by: andrewfish.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11886 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-24 23:59:51 +00:00
andrewfish 1ef41207dc InOsEmuPkg: Add TimerLib for PEI, DXE_CORE, and DXE/EFI drivers/applications.
Start using MdeModulePkg MetronomeDxe driver. Add PEI and DXE_CORE TimerLibs that just call back to the emulator. Add a DXE/UEFI TimerLib that also does a gBS->WaitForEvent() if the stall is for a long period of time. Change the Thunk API for Sleep to nanoseconds. 

Signed-off-by: andrewfish


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11872 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-21 23:41:31 +00:00
jljusten b8800fc547 InOsEmuPkg/Unix/Sec: Add BaseMemoryLib implementation to thunk layer
This implementation only covers a few BaseMemoryLib functions.
The implementation leverates malloc/free in stdlib.

Signed-off-by: jljusten

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11866 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-20 21:58:05 +00:00
andrewfish a0aab286ec InOsEmuPkg: Update DevicePathTextLib to the latest MdeModulePkg patch on the mailing list.
This library is not currently used as it requires pending updates to the MdeModulePkg.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11827 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-15 18:46:15 +00:00
andrewfish 946bfba2c3 InOsEmuPkg: Make XIP work properly
Update the InOsEmuPkg to properly function with XIP. Make the Recovery FV read only. Remove the use of global variable writes from XIP code. Add a new global page that can be used in place of writting to the FD by XIP code. Think of this global page as a system SRAM. 

igned-off-by: andrewfish



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11771 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-08 21:52:21 +00:00
andrewfish 7e284acb40 Add support for SerialPortLib that maps into POSIX StdIn and StdOut. Add a device path text to lib as a holding point waiting on getting it reviewed for other packages. Some minor fixes. Also map the FV as writable, so the Variable store becomes writable.
I plan to try and make only the Variable store and logs writable, and make the executable/compressed FV read only in a future checkin. 



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11760 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-08 02:34:12 +00:00
andrewfish 65e3f333b3 Added generic EFIABI SEC to InOsEmuPkg. Add library to abstract FV cracking and remove code from original Sec/OS App. Add a PeiServicesLib wrapper for SEC that uses passed in PEI list and can abstract FV reading. Don't load images for XIP code and just run from FV directly on Mac OS X, or from dlopen on Linux. Moved temp ram switch code into generic SEC. Fixed design issue with PeiServiceTablePointerLib.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11646 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-14 16:00:22 +00:00
andrewfish c4671a67d8 Add MP support. Based on PcdEmuApCount APs (Application Processors) are created in the CpuRuntimeDxe driver. If PcdEmuApCount > 0 then the MpServices protocol is created on top of pthreads and the APs are availible to use vis the MpService protocol.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11644 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-13 00:03:26 +00:00
andrewfish 949f388f5f Add InOsEmuPkg. Like UnixPkg and Nt32Pkg, but EFI code can be common and does not require including system include files. Currently only Unix 64-bit is supported and it has only been tested on Mac OS X. Not all features are ported over, but GOP, via X11, and access to local file systems are supported and you can boot to the shell.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11641 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-11 18:31:20 +00:00