summaryrefslogtreecommitdiffstats
path: root/EmulatorPkg/EmuSimpleFileSystemDxe
Commit message (Collapse)AuthorAgeFilesLines
* EmulatorPkg: Replace BSD License with BSD+Patent LicenseMichael D Kinney2019-04-094-27/+4
| | | | | | | | | | | | | | | | | | | | https://bugzilla.tianocore.org/show_bug.cgi?id=1373 Replace BSD 2-Clause License with BSD+Patent License. This change is based on the following emails: https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html RFCs with detailed process for the license change: V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
* EmulatorPkg: IoThunk->Close() is called too early, may causing hangRuiyu Ni2018-08-311-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1121 To produce a EFI_BLOCK_IO_PROTOCOL instance in Emulator platform, EmulatorPkg defines the EMU_IO_THUNK_PROTOCOL. OS dependent layer needs to produce this protocol implementation and a generic OS independent layer consumes this protocol to produce EFI_BLOCK_IO_PROTOCOL. EMU_IO_THUNK_PROTOCOL can also be used to abstract the OS dependent IO operation for other UEFI protocols, e.g.: GOP, SimpleFileSystem and etc. It contains two interfaces Open() and Close(). Open() creates the specific IO instances, e.g. for Block IO access, File System access, Screen access, etc. Close() destroys the specific IO instances. Later on the Emulator generic module (e.g.: EmuBlockIoDxe) calls Open() to create the IO instance in DriverBindingStart() and calls Close() in DriverBindingStop(). But today's implementation of DriverBindingStop() contains a bug that it calls Close() before uninstalling the EFI_BLOCK_IO_PROTOCOL. It's a mistake in code. Take EFI_BLOCK_IO for example, the uninstallation may cause the upper layer driver that consumes EFI_BLOCK_IO call BlockIo.Reset(), which consequently calls EmuBlockIo.Reset(). But the EmuBlockIo instance is already destroyed by Close() that happens before uninstallation. So a proper implementation is to call Close() after uninstallation succeeds. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1121 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Andrew Fish <afish@apple.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com>
* EmulatorPkg/EmuFileSystem: Fix a bug that causes Close() assertionRuiyu Ni2018-08-271-4/+29
| | | | | | | | | | | | | | | | | | | | REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1117 The root cause is when a file is opened through File.Open(), the private data for the File is not allocated, so when later when File.Close() is called, the signature check in CR() causes the assertion. The private data for the File is allocated properly when the file is opened from FS.OpenVolume(). The patch also fixes a minor issue that wrongly assigns revision number to File. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Hao Wu <hao.a.wu@intel.com> Cc: Andrew Fish <afish@apple.com>
* EmulatorPkg/EmuSimpleFileSystemDxe: Fix incorrect return values upon ↵Paulo Alcantara2014-07-031-0/+2
| | | | | | | | | | | | | | | | | | | | allocation failure In EmuSimpleFileSystemOpenVolume() function - in case an allocation failed with AllocatePool() - EFI_UNSUPPORTED was being returned instead of EFI_OUT_OF_RESOURCES, which is incorrect. Even worse, in EmuSimpleFileSystemDriverBindingStart(), an unitiliasied variable (Status) will be returned in case of an allocation failure with AllocateZeroPool(). This patch fixes both issues by correctly returning EFI_OUT_OF_RESOURCES. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Paulo Alcantara <pcacjr@zytor.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15615 6f19259b-4bc3-4df7-8a09-765794883524
* EmulatorPkg/EmuSimpleFileSystemDxe: Fix minor typosPaulo Alcantara2014-07-031-2/+2
| | | | | | | | Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Paulo Alcantara <pcacjr@zytor.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15614 6f19259b-4bc3-4df7-8a09-765794883524
* EmulatorPkg: Remove all trailing whitespacejljusten2011-06-284-83/+83
| | | | | | Signed-off-by: jljusten git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11919 6f19259b-4bc3-4df7-8a09-765794883524
* InOsEmuPkg: Rename package to EmulatorPkg & Sec to Hostjljusten2011-06-284-0/+1294
* Rename InOsEmuPkg to EmulatorPkg * Rename Unix/Sec to Unix/Host Signed-off-by: jljusten Reviewed-by: andrewfish Reviewed-by: geekboy15a git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11918 6f19259b-4bc3-4df7-8a09-765794883524