Add a more verbose comment to explain why set_virtual_address_map is
replaced why a dummy function

Signed-Off-By: Simon Horman <[EMAIL PROTECTED]>

Index: kexec-tools-patch-boot-params/purgatory/arch/ia64/purgatory-ia64.c
===================================================================
--- kexec-tools-patch-boot-params.orig/purgatory/arch/ia64/purgatory-ia64.c     
2006-09-20 16:17:34.000000000 +0900
+++ kexec-tools-patch-boot-params/purgatory/arch/ia64/purgatory-ia64.c  
2006-09-20 16:27:24.000000000 +0900
@@ -241,7 +241,22 @@
        struct ia64_boot_param *new_boot_param =
        (struct ia64_boot_param *) params->boot_param_base;
        memcpy(new_boot_param, boot_param, 4096);
-       /* patch efi_runtime->set_virtual_address_map to a dummy function */
+
+       /*   
+        * patch efi_runtime->set_virtual_address_map to a dummy function
+        *      
+        * The EFI specification mandates that set_virtual_address_map only
+        * takes effect the first time that it is called, and that
+        * subsequent calls will return error.  By replacing it with a
+        * dummy function the new OS can think it is calling it again
+        * without either the OS or any buggy EFI implementations getting
+        * upset.
+        *              
+        * Note: as the EFI specification says that set_virtual_address_map
+        * will only take affect the first time it is called, the mapping
+        * can't be updated, and thus mapping of the old and new OS really
+        * needs to be the same.
+        */     
        len = __dummy_efi_function_end - __dummy_efi_function;
        memcpy(command_line + command_line_len,
                __dummy_efi_function, len);

--

-- 
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/

_______________________________________________
fastboot mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/fastboot

Reply via email to