storage_capsule: initial implementation

Add CMD_GET_NAME for constructing the list of builtins,
CMD_STORAGE_FIND_FILE for finding a file by name, and CMD_STORAGE_READ
for reading a page of data from a previously found file.

CMD_GET_NAME takes a storage offset at which to look for a file
and returns the offset of the next file. If a buffer is allow'd
CMD_GET_NAME copies the file name into the buffer and returns the
length (in bytes).

CMD_STORAGE_FIND_FILE takes a file name and returns a unique "file
identifier" and the file size in bytes. The file identifier is suitable
for issuing CMD_STORAGE_READ requests.

CMD_STORAGE_READ takes a file identifier, an offset into the file, and the
phsical address of an SMC page to write 4KiB (or the remainder at EOF).

More:
- tar searches depend on the per-file magic field being set (true in
  any POSIX-compliant tarball); otherwise falling back to searching
  the entire SPI flash (set at 16MiB)
- the file offset specified for read's must be SPI flash page-aligned
- SMC memory bounds are baked into smc_is_page
- only one app at a time is supported

Bug: 294433731

Change-Id: I0b731707890f0506800938f828a0782b0dbc7264
5 files changed