⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 multiboot.h

📁 一个操作系统的源代码
💻 H
字号:
/** multiboot.h ** ** Original Author: Kasper Verdich Lund ** Date: 10/11/99 ** ** Description: ** Multiboot standard definitions ** ** This program is free software, you can redistribute it and/or ** modify it under the terms of the GNU General Public License ** as published by the Free Software Foundation; either version ** 2 of the License, or (at your option) any later version. ** ** This program is distributed in the hope that it will be ** useful, but WITHOUT ANY WARRANTY; without even the implied ** warranty or 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 along with this program; if not, write to the ** Free Software Foundation, Inc., 59 Temple Place, Suite 330, ** Boston, MA 02111-1307 USA ** *********************************************************Apostle OS**/#ifndef __MULTIBOOT_H_#define __MULTIBOOT_H_#include <types.h>#define MULTIBOOT_MEMORY	(1L<<0)#define MULTIBOOT_BOOT_DEVICE	(1L<<1)#define MULTIBOOT_CMDLINE	(1L<<2)#define MULTIBOOT_MODS		(1L<<3)#define MULTIBOOT_AOUT_SYMS	(1L<<4)#define MULTIBOOT_ELF_SHDR	(1L<<5)#define MULTIBOOT_MEM_MAP	(1L<<6)typedef struct multibootModule{  /* physical start and end addresses of the module data itself.  */  dword start;  dword end;    /* arbitrary ASCII-Z string associated with the module.  */  char *string;  /* boot loader must set to 0; OS must ignore.  */  dword reserved;} __attribute__ ((packed)) multibootModule;typedef struct multibootInfo{  /* these flags indicate which parts of the multiboot_info are valid;   * see below for the actual flag bit definitions.  */  dword flags;  /* lower/upper memory installed in the machine.   * valid only if MULTIBOOT_MEMORY is set in flags word above.  */  dword memoryLower;  dword memoryUpper;    /* BIOS disk device the kernel was loaded from.   * Valid only if MULTIBOOT_BOOT_DEVICE is set in flags word above.  */  byte bootDevice[4];  /* command-line for the OS kernel: a null-terminated ASCII string.   * valid only if MULTIBOOT_CMDLINE is set in flags word above.  */  char *commandLine;  /* list of boot modules loaded with the kernel.   * valid only if MULTIBOOT_MODS is set in flags word above.  */  dword modulesCount;  multibootModule *modules;} __attribute__ ((packed)) multibootInfo;dword AvailableMemory(multibootInfo *bootInfo);dword UsedMemory(multibootInfo *bootInfo);multibootInfo *CopyMultibootInfo(multibootInfo *bootInfo);#endif /* __MULTIBOOT_H_ */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -