diff options
author | royger <royger@FreeBSD.org> | 2016-01-20 13:23:02 +0000 |
---|---|---|
committer | royger <royger@FreeBSD.org> | 2016-01-20 13:23:02 +0000 |
commit | 0ad0bd3893133b318d166ac9e4a4a468247c2107 (patch) | |
tree | 0f6c21d198dbf57fc7d64f7e183bc129440fc75a /sys/boot/forth | |
parent | 2f8109724febc7f9ea2083413f50d5eceb064058 (diff) | |
download | FreeBSD-src-0ad0bd3893133b318d166ac9e4a4a468247c2107.zip FreeBSD-src-0ad0bd3893133b318d166ac9e4a4a468247c2107.tar.gz |
MFC r277215, r277291, r277418, r280953 and r280954:
loader: implement multiboot support for Xen Dom0
Note that only the subset of the multiboot specification needed in order to
boot a Xen Dom0 is implemented.
Sponsored by: Citrix Systems R&D
Diffstat (limited to 'sys/boot/forth')
-rw-r--r-- | sys/boot/forth/beastie.4th | 1 | ||||
-rw-r--r-- | sys/boot/forth/loader.4th | 3 | ||||
-rw-r--r-- | sys/boot/forth/support.4th | 27 |
3 files changed, 25 insertions, 6 deletions
diff --git a/sys/boot/forth/beastie.4th b/sys/boot/forth/beastie.4th index 9ede592..52c403f 100644 --- a/sys/boot/forth/beastie.4th +++ b/sys/boot/forth/beastie.4th @@ -93,6 +93,7 @@ also support-functions s" beastie_disable" getenv dup -1 <> if s" YES" compare-insensitive 0= if any_conf_read? if + load_xen_throw load_kernel load_modules then diff --git a/sys/boot/forth/loader.4th b/sys/boot/forth/loader.4th index 43d2a8e..ad4042e 100644 --- a/sys/boot/forth/loader.4th +++ b/sys/boot/forth/loader.4th @@ -147,13 +147,14 @@ only forth definitions also support-functions \ was succesfully loaded! any_conf_read? if s" loader_delay" getenv -1 = if + load_xen_throw load_kernel load_modules else drop ." Loading Kernel and Modules (Ctrl-C to Abort)" cr s" also support-functions" evaluate - s" set delay_command='load_kernel load_modules'" evaluate + s" set delay_command='load_xen_throw load_kernel load_modules'" evaluate s" set delay_showdots" evaluate delay_execute then diff --git a/sys/boot/forth/support.4th b/sys/boot/forth/support.4th index 1acef70..3d9990d 100644 --- a/sys/boot/forth/support.4th +++ b/sys/boot/forth/support.4th @@ -1460,6 +1460,20 @@ also builtins abort" Unable to load a kernel!" ; +: load_xen ( -- ) + s" xen_kernel" getenv dup -1 <> if + 1 1 load + else + drop + 0 + then +; + +: load_xen_throw ( -- ) ( throws: abort ) + load_xen + abort" Unable to load Xen!" +; + : set_defaultoptions ( -- ) s" kernel_options" getenv dup -1 = if drop @@ -1578,12 +1592,15 @@ also builtins else drop then - r> if ( a path was passed ) - load_directory_or_file - else - standard_kernel_search + load_xen + ?dup 0= if ( success ) + r> if ( a path was passed ) + load_directory_or_file + else + standard_kernel_search + then + ?dup 0= if ['] load_modules catch then then - ?dup 0= if ['] load_modules catch then ; only forth definitions |