- // All blocks must be within the device\r
- NumBlocks = ((UINT32)BufferSizeInBytes) / Instance->Media.BlockSize ;\r
-\r
- if ((Lba + NumBlocks) > (Instance->Media.LastBlock + 1)) {\r
- DEBUG ((EFI_D_ERROR, "NorFlashRead: ERROR - Read will exceed last block\n"));\r
- return EFI_INVALID_PARAMETER;\r
- }\r
-\r
- if (Offset + BufferSizeInBytes >= Instance->Size) {\r