It is sometimes useful to display the memory type in logs, etc. Add a
function to convert it to a string, which is more user-friendly than a
number.
Signed-off-by: Simon Glass <sjg@chromium.org>
The 'efi mem' command dumps out the memory map. This is useful within
the app, even if commands are not enabled, so move it to a common file.
Rename it from 'print' to 'dump' since most things that dump information
use that word.
Signed-off-by: Simon Glass <sjg@chromium.org>