This commit fixes two AHCI operations:
1. AhciWriteBlocks: caused by wrong command
2. AhciGetMediaInfo: caused by wrong offset
The patches also updates the EFI_ATA_IDENTIFY_DATA to align with the ATA8-ACS.
In addition, this commit ports the following changes from EDK2, to enhance the
command completion and trace:
1. cc28ab7a1d7: MdeModulePkg/AtaAtapiPassThru: Check IS to check for command completion
2. b465a811006: MdeModulePkg/AtaAtapiPassThru: Add SATA error recovery flow
3. 64e25d4b062: MdeModulePkg/AtaAtapiPassThru: Restart failed packets
4. 91d95113d07: MdeModulePkg/AtaAtapiPassThru: Trace ATA packets
5. 4c7ce0d285b: MdeModulePkg AtaAtapiPassThru: Skip the potential NULL pointer access
Last, the commit adjusts OS_LOADER_FD_SIZE for several platforms for x64 build
Verified: Using BlockIoTest to test with SATA SSD disk on TGL-UP3
Signed-off-by: Stanley Chang <stanley.chang@intel.com>
Convert the line endings stored for all text files in the repository to
LF. The majority previously used DOS-style CRLF line endings. Add a
.gitattributes file to enforce this and treat certain extensions as
never being text files.
Update PatchCheck.py to insist on LF line endings rather than CRLF.
However, its other checks fail on this commit due to lots of
pre-existing complaints that it only notices because the line endings
have changed.
Silicon/QemuSocPkg/FspBin/Patches/0001-Build-QEMU-FSP-2.0-binaries.patch
needs to be treated as binary since it contains a mixture of line
endings.
This change has implications depending on the client platform you are
using the repository from:
* Windows
The usual configuration for Git on Windows means that text files will
be checked out to the work tree with DOS-style CRLF line endings. If
that's not the case then you can configure Git to do so for the entire
machine with:
git config --global core.autocrlf true
or for just the repository with:
git config core.autocrlf true
Line endings will be normalised to LF when they are committed to the
repository. If you commit a text file with only LF line endings then it
will be converted to CRLF line endings in your work tree.
* Linux, MacOS and other Unices
The usual configuration for Git on such platforms is to check files out
of the repository with LF line endings. This is probably the right thing
for you. In the unlikely even that you are using Git on Unix but editing
or compiling on Windows for some reason then you may need to tweak your
configuration to force the use of CRLF line endings as described above.
* General
For more information see
https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings .
Fixes: https://github.com/slimbootloader/slimbootloader/issues/1400
Signed-off-by: Mike Crowe <mac@mcrowe.com>
When a SATA controller has no Ports Implemented
behind it, AHCI mode init returns error even before
allocating buffers for RFis, CommandTable, CommandList.
So, AHCI de-init expects them to be NULL, else any
garbage value for these fields forces the code to do
a FreePool on non-allocated memory.
Signed-off-by: Sai Talamudupula <sai.kiran.talamudupula@intel.com>
This will fix an unexpected exception when AhciHcPciBase is invalid
or the PCI config space is not enabled.
Signed-off-by: Aiden Park <aiden.park@intel.com>
This patch fixed AHCI memory de-allocation issue by checking the
correct pointer before calling FreePool/FreePages.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Visual Studio reports more pointer type cast errors with 64-bit build.
This will cover the issue on the existing targets.
Signed-off-by: Aiden Park <aiden.park@intel.com>
This patch added support for IoMmu interfaces. It will allow the
library to use DMA buffer for I/O transactions.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch added IoMmuLib support so that device can allocate/free
DMA memory and map/unmap host memory to DMA memory. This lib was
added into AHCI inf file so that it can be tested for build. Later
on more patches will be submitted to enable DMA protection for each
media library such as AHCI, XHCI, eMMC, UFS, NVMe, etc.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
In order to sync up with EDK201911 stable release, it is required
to add missing header files in the INF file. Otherwise, the build
will throw warnings. This patch added the missing headers in INF
files.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This will fully support PatchCheck.py.
- Remove all trailing whitespace
- Convert LF to CRLF by default
- Update EFI_D_* to DEBUG_*
- Re-enable CRLF check in PatchCheck.py
Signed-off-by: Aiden Park <aiden.park@intel.com>
This patch added basic deinit support in the media DevInit() interface.
It uses a special DevDeinit phase to inform the media driver to do
device de-initialization. This de-initialization flow will be called
before OsLoader restarting and OS booting.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch fixed the pointer check before de-allocating memory
previously allocated for AHCI controller.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
For SATA boot option, the hardware partition is mapped into AHCI
port. Current implementation requires a specific AHCI port in order
to boot from that hard drive. This patch added support to boot
from the first detected AHCI port when the hardware partition is
set to 0xFF.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>