If we want to access(read/write) SATA drive via AHCI in EFI shell, is there any read/write interface used for this purpose ?
That is, does EFI shell application need to implement the AHCI spec to access drive ? (build command, issue command and process the command completion...)
Or application just calls specific "read/write" interfaces(like SCSI_PATH_THROUGH in Windows) and the "EFI ahci driver" converts these to low-level access routines ?
If there is a driver available for the SATA drive in your UEFI, and the filesystem you wish to access is supported, then the act of reading/writing files is done by simple(ish) protocol calls.
The best example of this I can think of is the Linux kernel stub loader (which turns the Linux kernel into an EFI apllication able to load itself). Make sure to use a current 3.15 rc or later though, since there was a bug in earlier code. https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/firmware/efi/efi-stub-helper.c?id=refs/tags/v3.15-rc5 uses functions defined in https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/x86/boot/compressed/eboot.c?id=refs/tags/v3.15-rc5 to do its file system accesses.
Alternatively, an application could do like GRUB and use methods for raw block device accesses - enabling the application to access filesystems not supported by UEFI itself.
And also, some applications (like rEFInd) enable additional filesystem support in UEFI by loading protocols (provided with the installation of rEFInd) at runtime.