Blame SOURCES/0384-docs-Document-the-cutmem-command.patch

468bd4
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
468bd4
From: Javier Martinez Canillas <javierm@redhat.com>
468bd4
Date: Sat, 7 Nov 2020 01:03:18 +0100
468bd4
Subject: [PATCH] docs: Document the cutmem command
468bd4
468bd4
The command is not present in the docs/grub.texi user documentation.
468bd4
468bd4
Reported-by: Daniel Kiper <daniel.kiper@oracle.com>
468bd4
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
468bd4
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
468bd4
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
468bd4
---
468bd4
 docs/grub.texi | 21 +++++++++++++++++++++
468bd4
 1 file changed, 21 insertions(+)
468bd4
468bd4
diff --git a/docs/grub.texi b/docs/grub.texi
030dc3
index c55452307dc..314bbeb8471 100644
468bd4
--- a/docs/grub.texi
468bd4
+++ b/docs/grub.texi
468bd4
@@ -3942,6 +3942,7 @@ you forget a command, you can run the command @command{help}
468bd4
 * cpuid::                       Check for CPU features
468bd4
 * crc::                         Compute or check CRC32 checksums
468bd4
 * cryptomount::                 Mount a crypto device
468bd4
+* cutmem::                      Remove memory regions
468bd4
 * date::                        Display or set current date and time
468bd4
 * devicetree::                  Load a device tree blob
468bd4
 * distrust::                    Remove a pubkey from trusted keys
468bd4
@@ -4103,6 +4104,8 @@ this page is to be filtered.  This syntax makes it easy to represent patterns
468bd4
 that are often result of memory damage, due to physical distribution of memory
468bd4
 cells.
468bd4
 
468bd4
+The command is similar to @command{cutmem} command.
468bd4
+
468bd4
 Note: The command is not allowed when lockdown is enforced (@pxref{Lockdown}).
468bd4
       This prevents removing EFI memory regions to potentially subvert the
468bd4
       security mechanisms provided by the UEFI secure boot.
468bd4
@@ -4266,6 +4269,24 @@ GRUB suports devices encrypted using LUKS and geli. Note that necessary modules
468bd4
 be used.
468bd4
 @end deffn
468bd4
 
468bd4
+@node cutmem
468bd4
+@subsection cutmem
468bd4
+
468bd4
+@deffn Command cutmem from[K|M|G] to[K|M|G]
468bd4
+Remove any memory regions in specified range.
468bd4
+@end deffn
468bd4
+
468bd4
+This command notifies the memory manager that specified regions of RAM ought to
468bd4
+be filtered out. This remains in effect after a payload kernel has been loaded
468bd4
+by GRUB, as long as the loaded kernel obtains its memory map from GRUB. Kernels
468bd4
+that support this include Linux, GNU Mach, the kernel of FreeBSD and Multiboot
468bd4
+kernels in general.
468bd4
+
468bd4
+The command is similar to @command{badram} command.
468bd4
+
468bd4
+Note: The command is not allowed when lockdown is enforced (@pxref{Lockdown}).
468bd4
+      This prevents removing EFI memory regions to potentially subvert the
468bd4
+      security mechanisms provided by the UEFI secure boot.
468bd4
 
468bd4
 @node date
468bd4
 @subsection date