mirror of
https://github.com/Dasharo/slimbootloader.git
synced 2026-06-14 04:16:15 -07:00
Required by multiboot spec (*1), a mod string is a zero-terminated ASCII string. The patch introduces LoadMultibootModString to load mod string from a IMAGE_DATA (allocating a new buffer when requiring to append zero-terminated char). The patch does not reuse GetFromConfigFile because GetFromConfigFile was designed to be compatible with legacy format (e.g., EOF signature) and truncates newline chars (which is not required by multiboot mod). For performance, the patch does not run "isascii" check. Minor changes: - Fix typo error (InitMultibootMmap) - Declare FreeImageData in Library/IasImageLib.h - Dump mod string for debug build Reference: 1. https://www.gnu.org/software/grub/manual/multiboot/multiboot.html Verify: EHL CRB Acked-by: Jiaqing Zhao <jiaqing.zhao@intel.com> Signed-off-by: Stanley Chang <stanley.chang@intel.com>