Fix bug in file system library
When InitFileSystem() API is given EnumFileSystemTypeFat in argument, the FAT file system is not initialized. This bug is discovered when firmware update payload fails to load capsule from FAT partition via shell interface. Fixed #62 TEST=Created FwuImage.bin and perform firmware update from SBL shell on UP2 board. Verified successful update and booting to Ubuntu 16.04 from eMMC Signed-off-by: Huang Jin <huang.jin@intel.com>
This commit is contained in:
parent
d97fe977df
commit
3009428255
|
@ -91,10 +91,6 @@ InitFileSystem (
|
|||
return Status;
|
||||
}
|
||||
|
||||
if (FsType == EnumFileSystemTypeAuto) {
|
||||
FsType = 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
if (mCurrentFsType == EnumFileSystemMax) {
|
||||
Type = EnumFileSystemTypeFat;
|
||||
if (FixedPcdGet32 (PcdSupportedFileSystemMask) & (1 << Type)) {
|
||||
|
@ -111,7 +107,10 @@ InitFileSystem (
|
|||
}
|
||||
|
||||
for (Type = EnumFileSystemTypeFat; Type < EnumFileSystemTypeAuto; Type++) {
|
||||
if (((FsType & (1 << Type)) != 0) && (mFileSystemFuncs[Type].InitFileSystem != NULL)) {
|
||||
if (mFileSystemFuncs[Type].InitFileSystem == NULL) {
|
||||
continue;
|
||||
}
|
||||
if ((FsType == EnumFileSystemTypeAuto) || (FsType == Type)) {
|
||||
Status = mFileSystemFuncs[Type].InitFileSystem (SwPart, PartHandle, FsHandle);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
mCurrentFsType = Type;
|
||||
|
|
Loading…
Reference in New Issue