aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Moolenaar <marcel@FreeBSD.org>2011-06-07 00:59:31 +0000
committerMarcel Moolenaar <marcel@FreeBSD.org>2011-06-07 00:59:31 +0000
commit9f11397eb5cacc2e240f7ca9a1e24967fb4b7034 (patch)
tree5e6c3d0a409dcf76cf582a9d2941f463c298da2b
parent6d48fab9c51e736ccf3c8cbe38eaa2ca36f39f84 (diff)
downloadsrc-9f11397eb5cacc2e240f7ca9a1e24967fb4b7034.tar.gz
src-9f11397eb5cacc2e240f7ca9a1e24967fb4b7034.zip
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).
Notes
Notes: svn path=/head/; revision=222799
-rw-r--r--sys/boot/ia64/efi/efimd.c32
-rw-r--r--sys/boot/ia64/efi/main.c37
-rw-r--r--sys/boot/ia64/efi/version2
3 files changed, 68 insertions, 3 deletions
diff --git a/sys/boot/ia64/efi/efimd.c b/sys/boot/ia64/efi/efimd.c
index 0f7f02a08374..0b29e1280ce0 100644
--- a/sys/boot/ia64/efi/efimd.c
+++ b/sys/boot/ia64/efi/efimd.c
@@ -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);
+}
diff --git a/sys/boot/ia64/efi/main.c b/sys/boot/ia64/efi/main.c
index 485a26d54842..ec12b4266a07 100644
--- a/sys/boot/ia64/efi/main.c
+++ b/sys/boot/ia64/efi/main.c
@@ -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]);
+}
diff --git a/sys/boot/ia64/efi/version b/sys/boot/ia64/efi/version
index 3a947c8c5639..17d14ea1c70b 100644
--- a/sys/boot/ia64/efi/version
+++ b/sys/boot/ia64/efi/version
@@ -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.