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

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