diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2024-01-16 18:11:01 +0100 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2024-01-18 19:25:14 +0000 |
commit | 35d8ea8097794b522149688b5cfaf8364bc44d54 (patch) | |
tree | b261f67dbdebbcfb36f078a376221067b7e901c4 /BaseTools/Source/Python | |
parent | 0395045ae307c43a41f72ca9a8bf4eb8f16b2fe0 (diff) | |
download | edk2-35d8ea8097794b522149688b5cfaf8364bc44d54.zip edk2-35d8ea8097794b522149688b5cfaf8364bc44d54.tar.gz edk2-35d8ea8097794b522149688b5cfaf8364bc44d54.tar.bz2 |
OvmfPkg/VirtNorFlashDxe: clarify block write logic & fix shadowbuffer reads
Introduce 'Start' and 'End' variables to make it easier to follow the
logic and code flow. Also add a ascii art diagram (based on a
suggestion by Laszlo).
This also fixes the 'Size' calculation for the NorFlashRead() call.
Without this patch the code will read only one instead of two
P30_MAX_BUFFER_SIZE_IN_BYTES blocks in case '*NumBytes' is smaller than
P30_MAX_BUFFER_SIZE_IN_BYTES but 'Offset + *NumBytes' is not, i.e. the
update range crosses a P30_MAX_BUFFER_SIZE_IN_BYTES boundary.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20240116171105.37831-3-kraxel@redhat.com>
Diffstat (limited to 'BaseTools/Source/Python')
0 files changed, 0 insertions, 0 deletions