From def2fe05b1e91084a30f280d778f73d4dc127da7 Mon Sep 17 00:00:00 2001 From: Konstantin Aladyshev Date: Fri, 15 Jul 2022 20:36:04 +0300 Subject: Add FV parsing picture Signed-off-by: Konstantin Aladyshev --- Lessons_uncategorized/Lesson_FDF_FV/FV.png | Bin 0 -> 15919 bytes Lessons_uncategorized/Lesson_FDF_FV/README.md | 4 ++++ 2 files changed, 4 insertions(+) create mode 100644 Lessons_uncategorized/Lesson_FDF_FV/FV.png diff --git a/Lessons_uncategorized/Lesson_FDF_FV/FV.png b/Lessons_uncategorized/Lesson_FDF_FV/FV.png new file mode 100644 index 0000000..5bd2466 Binary files /dev/null and b/Lessons_uncategorized/Lesson_FDF_FV/FV.png differ diff --git a/Lessons_uncategorized/Lesson_FDF_FV/README.md b/Lessons_uncategorized/Lesson_FDF_FV/README.md index 48ad44f..d2469c7 100644 --- a/Lessons_uncategorized/Lesson_FDF_FV/README.md +++ b/Lessons_uncategorized/Lesson_FDF_FV/README.md @@ -340,6 +340,10 @@ $ hexdump /home/aladyshev/tiano/2021/edk2/Build/UefiLessonsPkg/RELEASE_GCC5/FV/S * 00000500 ``` + +In this picture I've tried to provide visual parsing of data: +![FV](FV.png?raw=true) + Here you can see how our files follow each other in the FFS. Each of the files has its own `EFI_FFS_FILE_HEADER` with its unique Name (=GUID). The important thing to note that the filesystem is flat, files just follow one another. Therefore to find some file by GUID, we need to traverse FFS from the start. Also here you can see that the padding byte 0xff was inserted between the files. It was inserted because according to the specification each file must start at 8 byte boundary. -- cgit v1.2.3-18-g5258