2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
* DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
include/grub/efi/api.h, include/grub/efi/console_control.h,
include/grub/efi/efi.h, include/grub/efi/pe32.h,
include/grub/i386/efi/time.h, kern/efi/efi.c,
kern/i386/efi/init.c, kern/i386/efi/startup.S,
and util/i386/efi/grub-mkimage.c.
* Makefile.in (RMKFILES): Added i386-efi.rmk.
* genmk.rb (PModule#rule): Do not export symbols if
#{prefix}_EXPORTS is set to "no".
* conf/i386-efi.mk: New file.
* conf/i386-efi.rmk: Likewise.
* include/grub/efi/api.h: Likewise.
* include/grub/efi/console_control.h: Likewise.
* include/grub/efi/efi.h: Likewise.
* include/grub/efi/pe32.h: Likewise.
* include/grub/i386/efi/time.h: Likewise.
* kern/efi/efi.c: Likewise.
* kern/i386/efi/init.c: Likewise.
* kern/i386/efi/startup.S: Likewise.
* util/i386/efi/grub-mkimage.c: Likewise.
2006-04-18 06:18:15 +00:00
|
|
|
/* init.c - initialize an x86-based EFI system */
|
|
|
|
/*
|
|
|
|
* GRUB -- GRand Unified Bootloader
|
2007-07-21 23:32:33 +00:00
|
|
|
* Copyright (C) 2006,2007 Free Software Foundation, Inc.
|
2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
* DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
include/grub/efi/api.h, include/grub/efi/console_control.h,
include/grub/efi/efi.h, include/grub/efi/pe32.h,
include/grub/i386/efi/time.h, kern/efi/efi.c,
kern/i386/efi/init.c, kern/i386/efi/startup.S,
and util/i386/efi/grub-mkimage.c.
* Makefile.in (RMKFILES): Added i386-efi.rmk.
* genmk.rb (PModule#rule): Do not export symbols if
#{prefix}_EXPORTS is set to "no".
* conf/i386-efi.mk: New file.
* conf/i386-efi.rmk: Likewise.
* include/grub/efi/api.h: Likewise.
* include/grub/efi/console_control.h: Likewise.
* include/grub/efi/efi.h: Likewise.
* include/grub/efi/pe32.h: Likewise.
* include/grub/i386/efi/time.h: Likewise.
* kern/efi/efi.c: Likewise.
* kern/i386/efi/init.c: Likewise.
* kern/i386/efi/startup.S: Likewise.
* util/i386/efi/grub-mkimage.c: Likewise.
2006-04-18 06:18:15 +00:00
|
|
|
*
|
2007-07-21 23:32:33 +00:00
|
|
|
* GRUB is free software: you can redistribute it and/or modify
|
2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
* DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
include/grub/efi/api.h, include/grub/efi/console_control.h,
include/grub/efi/efi.h, include/grub/efi/pe32.h,
include/grub/i386/efi/time.h, kern/efi/efi.c,
kern/i386/efi/init.c, kern/i386/efi/startup.S,
and util/i386/efi/grub-mkimage.c.
* Makefile.in (RMKFILES): Added i386-efi.rmk.
* genmk.rb (PModule#rule): Do not export symbols if
#{prefix}_EXPORTS is set to "no".
* conf/i386-efi.mk: New file.
* conf/i386-efi.rmk: Likewise.
* include/grub/efi/api.h: Likewise.
* include/grub/efi/console_control.h: Likewise.
* include/grub/efi/efi.h: Likewise.
* include/grub/efi/pe32.h: Likewise.
* include/grub/i386/efi/time.h: Likewise.
* kern/efi/efi.c: Likewise.
* kern/i386/efi/init.c: Likewise.
* kern/i386/efi/startup.S: Likewise.
* util/i386/efi/grub-mkimage.c: Likewise.
2006-04-18 06:18:15 +00:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2007-07-21 23:32:33 +00:00
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
* DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
include/grub/efi/api.h, include/grub/efi/console_control.h,
include/grub/efi/efi.h, include/grub/efi/pe32.h,
include/grub/i386/efi/time.h, kern/efi/efi.c,
kern/i386/efi/init.c, kern/i386/efi/startup.S,
and util/i386/efi/grub-mkimage.c.
* Makefile.in (RMKFILES): Added i386-efi.rmk.
* genmk.rb (PModule#rule): Do not export symbols if
#{prefix}_EXPORTS is set to "no".
* conf/i386-efi.mk: New file.
* conf/i386-efi.rmk: Likewise.
* include/grub/efi/api.h: Likewise.
* include/grub/efi/console_control.h: Likewise.
* include/grub/efi/efi.h: Likewise.
* include/grub/efi/pe32.h: Likewise.
* include/grub/i386/efi/time.h: Likewise.
* kern/efi/efi.c: Likewise.
* kern/i386/efi/init.c: Likewise.
* kern/i386/efi/startup.S: Likewise.
* util/i386/efi/grub-mkimage.c: Likewise.
2006-04-18 06:18:15 +00:00
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
2007-07-21 23:32:33 +00:00
|
|
|
* GRUB is distributed in the hope that it will be useful,
|
2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
* DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
include/grub/efi/api.h, include/grub/efi/console_control.h,
include/grub/efi/efi.h, include/grub/efi/pe32.h,
include/grub/i386/efi/time.h, kern/efi/efi.c,
kern/i386/efi/init.c, kern/i386/efi/startup.S,
and util/i386/efi/grub-mkimage.c.
* Makefile.in (RMKFILES): Added i386-efi.rmk.
* genmk.rb (PModule#rule): Do not export symbols if
#{prefix}_EXPORTS is set to "no".
* conf/i386-efi.mk: New file.
* conf/i386-efi.rmk: Likewise.
* include/grub/efi/api.h: Likewise.
* include/grub/efi/console_control.h: Likewise.
* include/grub/efi/efi.h: Likewise.
* include/grub/efi/pe32.h: Likewise.
* include/grub/i386/efi/time.h: Likewise.
* kern/efi/efi.c: Likewise.
* kern/i386/efi/init.c: Likewise.
* kern/i386/efi/startup.S: Likewise.
* util/i386/efi/grub-mkimage.c: Likewise.
2006-04-18 06:18:15 +00:00
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2007-07-21 23:32:33 +00:00
|
|
|
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
* DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
include/grub/efi/api.h, include/grub/efi/console_control.h,
include/grub/efi/efi.h, include/grub/efi/pe32.h,
include/grub/i386/efi/time.h, kern/efi/efi.c,
kern/i386/efi/init.c, kern/i386/efi/startup.S,
and util/i386/efi/grub-mkimage.c.
* Makefile.in (RMKFILES): Added i386-efi.rmk.
* genmk.rb (PModule#rule): Do not export symbols if
#{prefix}_EXPORTS is set to "no".
* conf/i386-efi.mk: New file.
* conf/i386-efi.rmk: Likewise.
* include/grub/efi/api.h: Likewise.
* include/grub/efi/console_control.h: Likewise.
* include/grub/efi/efi.h: Likewise.
* include/grub/efi/pe32.h: Likewise.
* include/grub/i386/efi/time.h: Likewise.
* kern/efi/efi.c: Likewise.
* kern/i386/efi/init.c: Likewise.
* kern/i386/efi/startup.S: Likewise.
* util/i386/efi/grub-mkimage.c: Likewise.
2006-04-18 06:18:15 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <grub/types.h>
|
|
|
|
#include <grub/misc.h>
|
|
|
|
#include <grub/mm.h>
|
|
|
|
#include <grub/err.h>
|
|
|
|
#include <grub/dl.h>
|
|
|
|
#include <grub/cache.h>
|
|
|
|
#include <grub/kernel.h>
|
|
|
|
#include <grub/efi/efi.h>
|
2008-08-07 19:21:25 +00:00
|
|
|
#include <grub/i386/tsc.h>
|
2013-11-11 01:30:09 +00:00
|
|
|
#include <grub/loader.h>
|
2018-11-29 19:28:09 +00:00
|
|
|
#include <grub/tpm.h>
|
2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
* DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
include/grub/efi/api.h, include/grub/efi/console_control.h,
include/grub/efi/efi.h, include/grub/efi/pe32.h,
include/grub/i386/efi/time.h, kern/efi/efi.c,
kern/i386/efi/init.c, kern/i386/efi/startup.S,
and util/i386/efi/grub-mkimage.c.
* Makefile.in (RMKFILES): Added i386-efi.rmk.
* genmk.rb (PModule#rule): Do not export symbols if
#{prefix}_EXPORTS is set to "no".
* conf/i386-efi.mk: New file.
* conf/i386-efi.rmk: Likewise.
* include/grub/efi/api.h: Likewise.
* include/grub/efi/console_control.h: Likewise.
* include/grub/efi/efi.h: Likewise.
* include/grub/efi/pe32.h: Likewise.
* include/grub/i386/efi/time.h: Likewise.
* kern/efi/efi.c: Likewise.
* kern/i386/efi/init.c: Likewise.
* kern/i386/efi/startup.S: Likewise.
* util/i386/efi/grub-mkimage.c: Likewise.
2006-04-18 06:18:15 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
grub_machine_init (void)
|
|
|
|
{
|
2006-04-19 08:59:44 +00:00
|
|
|
grub_efi_init ();
|
2008-08-05 11:54:37 +00:00
|
|
|
grub_tsc_init ();
|
2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
* DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
include/grub/efi/api.h, include/grub/efi/console_control.h,
include/grub/efi/efi.h, include/grub/efi/pe32.h,
include/grub/i386/efi/time.h, kern/efi/efi.c,
kern/i386/efi/init.c, kern/i386/efi/startup.S,
and util/i386/efi/grub-mkimage.c.
* Makefile.in (RMKFILES): Added i386-efi.rmk.
* genmk.rb (PModule#rule): Do not export symbols if
#{prefix}_EXPORTS is set to "no".
* conf/i386-efi.mk: New file.
* conf/i386-efi.rmk: Likewise.
* include/grub/efi/api.h: Likewise.
* include/grub/efi/console_control.h: Likewise.
* include/grub/efi/efi.h: Likewise.
* include/grub/efi/pe32.h: Likewise.
* include/grub/i386/efi/time.h: Likewise.
* kern/efi/efi.c: Likewise.
* kern/i386/efi/init.c: Likewise.
* kern/i386/efi/startup.S: Likewise.
* util/i386/efi/grub-mkimage.c: Likewise.
2006-04-18 06:18:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2013-11-09 20:29:11 +00:00
|
|
|
grub_machine_fini (int flags)
|
2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
* DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
include/grub/efi/api.h, include/grub/efi/console_control.h,
include/grub/efi/efi.h, include/grub/efi/pe32.h,
include/grub/i386/efi/time.h, kern/efi/efi.c,
kern/i386/efi/init.c, kern/i386/efi/startup.S,
and util/i386/efi/grub-mkimage.c.
* Makefile.in (RMKFILES): Added i386-efi.rmk.
* genmk.rb (PModule#rule): Do not export symbols if
#{prefix}_EXPORTS is set to "no".
* conf/i386-efi.mk: New file.
* conf/i386-efi.rmk: Likewise.
* include/grub/efi/api.h: Likewise.
* include/grub/efi/console_control.h: Likewise.
* include/grub/efi/efi.h: Likewise.
* include/grub/efi/pe32.h: Likewise.
* include/grub/i386/efi/time.h: Likewise.
* kern/efi/efi.c: Likewise.
* kern/i386/efi/init.c: Likewise.
* kern/i386/efi/startup.S: Likewise.
* util/i386/efi/grub-mkimage.c: Likewise.
2006-04-18 06:18:15 +00:00
|
|
|
{
|
2013-11-09 20:29:11 +00:00
|
|
|
if (flags & GRUB_LOADER_FLAG_NORETURN)
|
|
|
|
grub_efi_fini ();
|
2006-04-18 Yoshinori K. Okuji <okuji@enbug.org>
* DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
include/grub/efi/api.h, include/grub/efi/console_control.h,
include/grub/efi/efi.h, include/grub/efi/pe32.h,
include/grub/i386/efi/time.h, kern/efi/efi.c,
kern/i386/efi/init.c, kern/i386/efi/startup.S,
and util/i386/efi/grub-mkimage.c.
* Makefile.in (RMKFILES): Added i386-efi.rmk.
* genmk.rb (PModule#rule): Do not export symbols if
#{prefix}_EXPORTS is set to "no".
* conf/i386-efi.mk: New file.
* conf/i386-efi.rmk: Likewise.
* include/grub/efi/api.h: Likewise.
* include/grub/efi/console_control.h: Likewise.
* include/grub/efi/efi.h: Likewise.
* include/grub/efi/pe32.h: Likewise.
* include/grub/i386/efi/time.h: Likewise.
* kern/efi/efi.c: Likewise.
* kern/i386/efi/init.c: Likewise.
* kern/i386/efi/startup.S: Likewise.
* util/i386/efi/grub-mkimage.c: Likewise.
2006-04-18 06:18:15 +00:00
|
|
|
}
|