Author: marcel
Date: Tue Jun  7 00:59:31 2011
New Revision: 222799
URL: http://svn.freebsd.org/changeset/base/222799

Log:
  o   Bump the EFI loader version to 3.1.
  o   Add the about, pbvm and reboot commands.
  o   Trim the banner (suppress maker and date).

Modified:
  head/sys/boot/ia64/efi/efimd.c
  head/sys/boot/ia64/efi/main.c
  head/sys/boot/ia64/efi/version

Modified: head/sys/boot/ia64/efi/efimd.c
==============================================================================
--- head/sys/boot/ia64/efi/efimd.c      Tue Jun  7 00:39:15 2011        
(r222798)
+++ head/sys/boot/ia64/efi/efimd.c      Tue Jun  7 00:59:31 2011        
(r222799)
@@ -230,3 +230,35 @@ ia64_platform_enter(const char *kernel)
 
        return (0);
 }
+
+COMMAND_SET(pbvm, "pbvm", "show PBVM details", command_pbvm);
+
+static int
+command_pbvm(int argc, char *argv[])
+{
+       uint64_t limit, pg, start;
+       u_int idx;
+
+       printf("Page table @ %p, size %x\n", ia64_pgtbl, ia64_pgtblsz);
+
+       if (ia64_pgtbl == NULL)
+               return (0);
+
+       limit = ~0;
+       start = ~0;
+       idx = 0;
+       while (ia64_pgtbl[idx] != 0) {
+               pg = ia64_pgtbl[idx];
+               if (pg != limit) {      
+                       if (start != ~0)
+                               printf("%#lx-%#lx\n", start, limit);
+                       start = pg;
+               }
+               limit = pg + IA64_PBVM_PAGE_SIZE;
+               idx++;
+       }
+       if (start != ~0)
+               printf("%#lx-%#lx\n", start, limit);
+
+       return (0);
+}

Modified: head/sys/boot/ia64/efi/main.c
==============================================================================
--- head/sys/boot/ia64/efi/main.c       Tue Jun  7 00:39:15 2011        
(r222798)
+++ head/sys/boot/ia64/efi/main.c       Tue Jun  7 00:59:31 2011        
(r222799)
@@ -153,9 +153,7 @@ main(int argc, CHAR16 *argv[])
         */
        cons_probe();
 
-       printf("\n");
-       printf("%s, Revision %s\n", bootprog_name, bootprog_rev);
-       printf("(%s, %s)\n", bootprog_maker, bootprog_date);
+       printf("\n%s, Revision %s\n", bootprog_name, bootprog_rev);
 
        find_pal_proc();
 
@@ -214,6 +212,18 @@ static int
 command_quit(int argc, char *argv[])
 {
        exit(0);
+       /* NOTREACHED */
+       return (CMD_OK);
+}
+
+COMMAND_SET(reboot, "reboot", "reboot the system", command_reboot);
+ 
+static int
+command_reboot(int argc, char *argv[])
+{
+
+       RS->ResetSystem(EfiResetWarm, EFI_SUCCESS, 0, NULL);
+       /* NOTREACHED */
        return (CMD_OK);
 }
 
@@ -585,3 +595,24 @@ command_hcdp(int argc, char *argv[])
        printf("<EOT>\n");
        return (CMD_OK);
 }
+
+COMMAND_SET(about, "about", "about the loader", command_about);
+
+extern uint64_t _start_plabel[];
+
+static int
+command_about(int argc, char *argv[])
+{
+       EFI_LOADED_IMAGE *img;
+
+       printf("%s\n", bootprog_name);
+       printf("revision %s\n", bootprog_rev);
+       printf("built by %s\n", bootprog_maker);
+       printf("built on %s\n", bootprog_date);
+
+       printf("\n");
+
+       BS->HandleProtocol(IH, &imgid, (VOID**)&img);
+       printf("image loaded at %p\n", img->ImageBase);
+       printf("entry at %#lx (%#lx)\n", _start_plabel[0], _start_plabel[1]);
+}

Modified: head/sys/boot/ia64/efi/version
==============================================================================
--- head/sys/boot/ia64/efi/version      Tue Jun  7 00:39:15 2011        
(r222798)
+++ head/sys/boot/ia64/efi/version      Tue Jun  7 00:59:31 2011        
(r222799)
@@ -3,6 +3,8 @@ $FreeBSD$
 NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE.  The format of this
 file is important.  Make sure the current version number is on line 6.
 
+3.1:   Add the about, reboot and pbvm commands.
+       I-cache coherency is maintained.
 3.0:   Add support for PBVM.
 2.2:   Create direct mapping based on start address instead of mapping
        first 256M.
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to