summaryrefslogtreecommitdiff
path: root/InOsEmuPkg/Unix
AgeCommit message (Collapse)Author
2011-06-24[InOSEmPkg] Add OS malloc and free to the Thunk.andrewfish
Added OS malloc and free so we can make MemoryAllocationLib instance that uses OS guard malloc. This will allow all the debug support built into the OS for finding malloc bugs to be used with a driver in the emulator. Signed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11883 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-23InOsEmuPkg/Unix: Fix build issues for GCC44 IA32jljusten
Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11880 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-23InOsEmuPkg/Unix: Detect lib directory suffix on Linuxjljusten
For IA32 builds, if /lib32 and /usr/lib32 exist, they will be used instead of /lib and /usr/lib. For X64 builds, if /lib64 and /usr/lib64 exist, they will be used instead of /lib and /usr/lib. Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11879 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-23InOsEmuPkg/Unix/build.sh: Merge changes from build64.sh r11867jljusten
Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11878 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-23InOsEmuPkg/Unix: Auto-run emulator in gdbjljusten
Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11877 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-21InOsEmuPkg: Add TimerLib for PEI, DXE_CORE, and DXE/EFI drivers/applications. andrewfish
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-20InOsEmuPkg: Make sure to skip DXE IPL on emulator build, and don't double ↵andrewfish
build every thing IA-32 Xcode. Signed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11868 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-20InOsEmuPkg/Unix: Enable single-pass build with Linuxjljusten
For Linux builds the thunk layer ('SEC') and main platform firmware image will be built in a single build pass. Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11867 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-20InOsEmuPkg/Unix/Sec: Add BaseMemoryLib implementation to thunk layerjljusten
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-20InOsEmuPkg/Unix/Sec: Fix EFIAPI usage inconsistenciesjljusten
Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11865 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-19InOsEmuPkg: Fix debug prints from DXE/UEFI drivers.andrewfish
Turning on serial prints for early drivers, turned off debug prints for DXE/UEFI drivers. Add them back in via report status code. signed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11857 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-19InOsEmuPkg: Remove unneeded Framework for XCODE linker flag overrides.andrewfish
signed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11856 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-19InOsEmuPkg: Fix issue with EFI_LBA not being implemented as a UINT64 in the ↵andrewfish
IA-32 Gasket. Also clean up some missing EFIAPI. signed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11855 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-19InOsEmuPkg: Fix UINT64 bugs in IA-32 gasket.andrewfish
At this point IA-32 emulator boots the shell with an X11 GOP window. Block IO seems to have an issue that needs to be debugged. Signed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11854 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-19InOsEmuPkg: Fix issues with stack alignment in the gasket. andrewfish
There are still issues with the IA-32 gasket code. Mostly having to do with yank put bugs not accounting for UINT64 returns and arguments. Currently the IA-32 build crashes in the timer callback since it is UINT64, function ptr but the gasket is UINTN UINTN. Signed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11853 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-18InOsEmuPkg: Make build dir different for IA-32. Fix PCD XIP issues. andrewfish
Signed-off-by andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11851 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-18InOsEmuPkg: Add an Xcode project file for building and debugging IA-32 Unix ↵andrewfish
emulator. Signed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11850 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-18InOsEmuPkg: Unix emulator now compiles for IA-32.andrewfish
Wrote IA-32 (align stack to 16-bytes) gaskets for emulator and got it to compile for IA-32. TempRam switch code is not ported to IA-32 in Sec. Code crashes in Sec. Signed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11849 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-17InOsEmuPkg: Fix Linux compile issues in BlockIo code.andrewfish
singed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11847 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-17InOsEmuPkg: Implement gIdleLoopEventGuid. andrewfish
Added a CpuSleep () API to the Emulator Thunk. We needed to do this as the Stall() works hard to not get broken by the timer tic (POSIX signal). nanosleep() gets interrupted by the timer signal so it is a good emulator of a CpuSleep(); I was also able to remove some stalls in the X11 keyboard and mouse checking events, now that the gIdleLoopEventGuid was added. Signed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11846 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-17InOsEmuPkg: Add support for mounting CD-ROM images.andrewfish
Devices get the block size via ioctl, but for a file the block size needs to be set. Default to 512, but optionally allow other values, like 2048/0x800 for ISO CD-ROM images. Also updated the comments in .DSC and .DEC files. Signed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11843 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-16InOsEmuPkg: Clean up coding standards.andrewfish
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11839 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-15InOsEmuPkg: Update code to support BerkeleyPacketFilter, and add a template ↵andrewfish
for LinuxPacketFilter. BerkelyPacketFilter seems to work. Some one else will need to use the BerkeleyPacketFilter as a template and implement the LinuxPacketFilter. I don't think it will be that hard, as they are simular. Signed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11828 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-09InOsEmuPkg: Add the EFI parts of the Simple Network Protocolandrewfish
This only adds the EFI parts and not the OS specific implementation. Since the EFI parts no longer use system include files this is safe to do. Also fix two minor typos. Signed-off-by:andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11781 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-08InOsEmuPkg: Fix reconnect -r from the shellandrewfish
Signed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11772 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-08InOsEmuPkg: Make XIP work properlyandrewfish
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-08Update the FD mapping so the volatile areas write back to the FD file. ↵andrewfish
Currently they are only mapped as a memory copy of the file. This also make FV read only. The current scheme maps a file into a memory buffer. You can write to the memory buffer, but if you restart the emulator the data is not written back to the FD. Since the build, rebuilds the FD it will blow away any changes. You can now set variables and restart the emulator and they are still set. There is a bug if the FV is set to write protect that still needs to be tracked down. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11761 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-08Add support for SerialPortLib that maps into POSIX StdIn and StdOut. Add a ↵andrewfish
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-07Fix minor build break.andrewfish
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11756 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-07InOsEmuPkg: Fixed mounting device nodes and .dmg files in the emulator.andrewfish
There is some Linux specific code for mounting device nodes that needs to be tested. It may not compile! Singed-off-by: andrewfish git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11754 6f19259b-4bc3-4df7-8a09-765794883524
2011-06-03Get BlockIo mapping interfaces working. Still need to work on detecting ↵andrewfish
block size of devices, but you can map a .dmg file no problem at this point. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11724 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-31Add BlockIO support to the emulator, still needs testing. Also update ↵andrewfish
Emulator start code to only pass 2 args in place of 3. The 3rd argument is not needed. Still need a function as the BaseLib functoin does not have the correct calling conventions. Cleanup build script for binary shell case. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11718 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-17Cleanup MpService interface. Still needs more testing, but now it is much ↵andrewfish
closer to PI spec. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11669 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-16InOsEmuPkg/Unix: Return scan code for Pause keyjljusten
Port of UnixPkg r11659 change. Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11663 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-16InOsEmuPkg: Rename EmuPthreadThunk to EmuThreadThunkjljusten
This reflects that the threading system may vary in the OS/thunk layer. Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11662 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-16InOsEmuPkg PcdEmuFileSystem: Set to architecture independent pathjljusten
Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11661 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-16InOsEmuPkg PosixFileSystem: Fix memory corruption issuejljusten
Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11660 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-15Fix minor clang build issue.andrewfish
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11654 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-15InOsEmuPkg PcdEmuFileSystem: Match current setting in UnixPkgjljusten
The emulated filesystem support will crash if a non-existent path is specified. Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11653 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-15InOsEmuPkg: Use EdkShellBinPkg by defaultjljusten
The following can be defined on the build command line: * BUILD_NEW_SHELL: Build & run the UefiShell * USE_NEW_SHELL: Use the pre-build UefiShell binary * BUILD_OLD_SHELL: Use the GCC shell binary previously built For the FAT driver: * BUILD_FAT: Build the fat driver from source Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11652 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-15InOsEmuPkg/Unix: Rebase firmware SEC imagejljusten
Apply PE/COFF relocation to SEC image within the firmware volume so it will be able to run at the address that it was loaded. Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11650 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-15InOsEmuPkg: Match filename case of the generate FD filejljusten
On systems with a case sensetive filesystem, this change will allow the FD to be loaded. Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11649 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-15InOsEmuPkg/Unix: Link to pthread libraryjljusten
Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11647 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-14Added generic EFIABI SEC to InOsEmuPkg. Add library to abstract FV cracking ↵andrewfish
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-11Fix bug where the config change to point to the executable ended up in one ↵andrewfish
of my local files that does not get checked in. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11642 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-11Add InOsEmuPkg. Like UnixPkg and Nt32Pkg, but EFI code can be common and ↵andrewfish
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