2 * Copyright (C) 2001-2003 Hewlett-Packard Co.
3 * Contributed by Stephane Eranian <eranian@hpl.hp.com>
4 * Contributed by Chris Ahna <christopher.j.ahna@intel.com>
6 * This file is part of the ELILO, the EFI Linux boot loader.
8 * ELILO is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2, or (at your option)
13 * ELILO is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with ELILO; see the file COPYING. If not, write to the Free
20 * Software Foundation, 59 Temple Place - Suite 330, Boston, MA
23 * Please check out the elilo.txt for complete documentation on how
24 * to use this program.
35 UINTN legacy_free_boot;
37 } x86_64_global_config_t;
40 #define x86_64_opt_offsetof(option) (&((sys_img_options_t *)(0x0))->option)
42 static x86_64_global_config_t x86_64_gconf;
44 static config_option_t sysdeps_global_options[]={
45 {OPT_BOOL, OPT_GLOBAL, L"legacy-free", NULL, NULL, &x86_64_gconf.legacy_free_boot}
48 static config_option_t sysdeps_image_options[]={
49 {OPT_BOOL, OPT_IMAGE_SYS, L"text-mode", NULL, NULL, x86_64_opt_offsetof(text_mode)}
54 * X86_64 operations that need to be done only once and just before
55 * entering the main loop of the loader
58 * -1 otherwise (will abort execution)
61 sysdeps_preloop_actions(EFI_HANDLE dev, CHAR16 **argv, INTN argc, INTN index, EFI_HANDLE image)
66 #define X86_64_CMDLINE_OPTIONS L""
69 sysdeps_get_cmdline_opts(VOID)
71 return X86_64_CMDLINE_OPTIONS;
75 sysdeps_getopt(INTN c, INTN optind, CHAR16 *optarg)
81 sysdeps_print_cmdline_opts(VOID)
87 x86_64_use_legacy_free_boot(VOID)
89 return x86_64_gconf.legacy_free_boot ? 1 : 0;
94 x86_64_text_mode(VOID)
96 return (elilo_opt.sys_img_opts &&
97 elilo_opt.sys_img_opts->text_mode == TRUE) ? 1 : 0;
101 sysdeps_register_options(VOID)
105 ret = register_config_options(sysdeps_global_options,
106 sizeof(sysdeps_global_options)/sizeof(config_option_t),
107 OPTIONS_GROUP_GLOBAL);
108 if (ret == -1 ) return ret;
110 ret = register_config_options(sysdeps_image_options,
111 sizeof(sysdeps_image_options)/sizeof(config_option_t),
112 OPTIONS_GROUP_IMAGE);