ArmPlatformPkg/BootMonFs: Added support for new revision of the NOR Flash file system
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15324 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
0698723204
commit
cb77b48ad9
@ -19,9 +19,13 @@
|
|||||||
|
|
||||||
#define HW_IMAGE_FOOTER_SIGNATURE_1 0x464C5348
|
#define HW_IMAGE_FOOTER_SIGNATURE_1 0x464C5348
|
||||||
#define HW_IMAGE_FOOTER_SIGNATURE_2 0x464F4F54
|
#define HW_IMAGE_FOOTER_SIGNATURE_2 0x464F4F54
|
||||||
|
|
||||||
#define HW_IMAGE_FOOTER_VERSION 1
|
#define HW_IMAGE_FOOTER_VERSION 1
|
||||||
#define HW_IMAGE_FOOTER_OFFSET 92
|
#define HW_IMAGE_FOOTER_OFFSET 92
|
||||||
|
|
||||||
|
#define HW_IMAGE_FOOTER_VERSION2 2
|
||||||
|
#define HW_IMAGE_FOOTER_OFFSET2 96
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
CHAR8 Filename[MAX_NAME_LENGTH];
|
CHAR8 Filename[MAX_NAME_LENGTH];
|
||||||
UINT32 Offset;
|
UINT32 Offset;
|
||||||
|
@ -109,11 +109,15 @@ BootMonFsImageInThisBlock (
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Ptr->Version != HW_IMAGE_FOOTER_VERSION) {
|
if (Ptr->Version == HW_IMAGE_FOOTER_VERSION) {
|
||||||
return FALSE;
|
if (Ptr->Offset != HW_IMAGE_FOOTER_OFFSET) {
|
||||||
}
|
return FALSE;
|
||||||
|
}
|
||||||
if (Ptr->Offset != HW_IMAGE_FOOTER_OFFSET) {
|
} else if (Ptr->Version == HW_IMAGE_FOOTER_VERSION2) {
|
||||||
|
if (Ptr->Offset != HW_IMAGE_FOOTER_OFFSET2) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -100,8 +100,13 @@ FlushAppendRegion (
|
|||||||
Description->BlockEnd = Description->BlockStart + (NewFileSize / BlockSize);
|
Description->BlockEnd = Description->BlockStart + (NewFileSize / BlockSize);
|
||||||
Description->Footer.FooterSignature1 = HW_IMAGE_FOOTER_SIGNATURE_1;
|
Description->Footer.FooterSignature1 = HW_IMAGE_FOOTER_SIGNATURE_1;
|
||||||
Description->Footer.FooterSignature2 = HW_IMAGE_FOOTER_SIGNATURE_2;
|
Description->Footer.FooterSignature2 = HW_IMAGE_FOOTER_SIGNATURE_2;
|
||||||
|
#ifdef MDE_CPU_ARM
|
||||||
Description->Footer.Version = HW_IMAGE_FOOTER_VERSION;
|
Description->Footer.Version = HW_IMAGE_FOOTER_VERSION;
|
||||||
Description->Footer.Offset = HW_IMAGE_FOOTER_OFFSET;
|
Description->Footer.Offset = HW_IMAGE_FOOTER_OFFSET;
|
||||||
|
#else
|
||||||
|
Description->Footer.Version = HW_IMAGE_FOOTER_VERSION2;
|
||||||
|
Description->Footer.Offset = HW_IMAGE_FOOTER_OFFSET2;
|
||||||
|
#endif
|
||||||
Description->RegionCount = 1;
|
Description->RegionCount = 1;
|
||||||
Description->Region[0].Checksum = 0;
|
Description->Region[0].Checksum = 0;
|
||||||
Description->Region[0].Offset = Description->BlockStart * BlockSize;
|
Description->Region[0].Offset = Description->BlockStart * BlockSize;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user