metalsvm/arch/x86/kernel/multiboot.c

54 lines
1.6 KiB
C
Raw Permalink Normal View History

/*
* Copyright 2010 Stefan Lankes, Chair for Operating Systems,
* RWTH Aachen University
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* This file is part of MetalSVM.
*/
/**
* @author Stefan Lankes
* @file arch/x86/kernel/multiboot.c
* @brief Multiboot structure initialization
*
* This file just contains a global multiboot
* information pointer and a tiny initialization procedure.
*/
#include <metalsvm/stddef.h>
#ifdef CONFIG_MULTIBOOT
#include <asm/multiboot.h>
/*
* MetalSVM is able to use Multiboot (http://www.gnu.org/software/grub/manual/multiboot/),
* which specifies an interface between a boot loader and a operating system
*/
/** Global multiboot information structure pointer */
multiboot_info_t* mb_info __attribute__ ((section (".data"))) = NULL;
#endif
/** @brief initialization procedure for Multiboot information structure
*
* @param mb Pointer to the multiboot information structure.
* Will be set as global multiboot information.
*/
void multiboot_init(void* mb)
{
#ifdef CONFIG_MULTIBOOT
mb_info = (multiboot_info_t*) mb;
#endif
}