2010-01-07 Robert Millan <rmh.grub@aybabtu.com>

Kick out Multiboot 2 draft as a branch.  Initially it is
	identical to Multiboot 1, except for the magic numbers.
	
	* doc/multiboot.h: Rename to ...
	* doc/multiboot2.h: ... this.  Update all users.
	(MULTIBOOT_HEADER_MAGIC): Replace with ...
	(MULTIBOOT2_HEADER_MAGIC): ... this.  Update all users.
	(MULTIBOOT_BOOTLOADER_MAGIC): Replace with ...
	(MULTIBOOT2_BOOTLOADER_MAGIC): ... this.  Update all users.
This commit is contained in:
Robert Millan committed 2010-01-07 20:13:26 +00:00
1 parent df6eb305d1
commit 9eaa21f055
6 files changed
+32 -20

No files matched your search

+12
View File
@@ -1,3 +1,15 @@
2010-01-07 Robert Millan <rmh.grub@aybabtu.com>
Kick out Multiboot 2 draft as a branch. Initially it is
identical to Multiboot 1, except for the magic numbers.
* doc/multiboot.h: Rename to ...
* doc/multiboot2.h: ... this. Update all users.
(MULTIBOOT_HEADER_MAGIC): Replace with ...
(MULTIBOOT2_HEADER_MAGIC): ... this. Update all users.
(MULTIBOOT_BOOTLOADER_MAGIC): Replace with ...
(MULTIBOOT2_BOOTLOADER_MAGIC): ... this. Update all users.
2010-01-07 Robert Millan <rmh.grub@aybabtu.com> 2010-01-07 Robert Millan <rmh.grub@aybabtu.com>
* doc/multiboot.h (MULTIBOOT_UNSUPPORTED): Remove macro (moved to * doc/multiboot.h (MULTIBOOT_UNSUPPORTED): Remove macro (moved to
+4 -4
View File
@@ -1,10 +1,10 @@
info_TEXINFOS = multiboot.texi info_TEXINFOS = multiboot.texi
EXAMPLES = boot.S kernel.c multiboot.h EXAMPLES = boot.S kernel.c multiboot2.h
multiboot_TEXINFOS = boot.S.texi kernel.c.texi multiboot.h.texi multiboot_TEXINFOS = boot.S.texi kernel.c.texi multiboot2.h.texi
SRC2TEXI = src2texi SRC2TEXI = src2texi
noinst_SCRIPTS = $(SRC2TEXI) noinst_SCRIPTS = $(SRC2TEXI)
EXTRA_PROGRAMS = kernel EXTRA_PROGRAMS = kernel
pkginclude_HEADERS = multiboot.h pkginclude_HEADERS = multiboot2.h
# The example kernel is built if you specify --enable-example-kernel. # The example kernel is built if you specify --enable-example-kernel.
if BUILD_EXAMPLE_KERNEL if BUILD_EXAMPLE_KERNEL
@@ -14,7 +14,7 @@ kernel_CFLAGS = -fno-builtin -nostdinc -O -g -Wall \
-imacros $(top_builddir)/config.h -imacros $(top_builddir)/config.h
kernel_LDFLAGS = -nostdlib -Wl,-N -Wl,-Ttext -Wl,100000 -Wl,--build-id=none kernel_LDFLAGS = -nostdlib -Wl,-N -Wl,-Ttext -Wl,100000 -Wl,--build-id=none
boot.o: multiboot.h boot.o: multiboot2.h
endif endif
EXTRA_DIST = $(man_MANS) $(noinst_SCRIPTS) \ EXTRA_DIST = $(man_MANS) $(noinst_SCRIPTS) \
+3 -3
View File
@@ -16,7 +16,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#define ASM_FILE 1 #define ASM_FILE 1
#include <multiboot.h> #include <multiboot2.h>
/* C symbol format. HAVE_ASM_USCORE is defined by configure. */ /* C symbol format. HAVE_ASM_USCORE is defined by configure. */
#ifdef HAVE_ASM_USCORE #ifdef HAVE_ASM_USCORE
@@ -49,11 +49,11 @@ _start:
/* Multiboot header. */ /* Multiboot header. */
multiboot_header: multiboot_header:
/* magic */ /* magic */
.long MULTIBOOT_HEADER_MAGIC .long MULTIBOOT2_HEADER_MAGIC
/* flags */ /* flags */
.long MULTIBOOT_HEADER_FLAGS .long MULTIBOOT_HEADER_FLAGS
/* checksum */ /* checksum */
.long -(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS) .long -(MULTIBOOT2_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
#ifndef __ELF__ #ifndef __ELF__
/* header_addr */ /* header_addr */
.long multiboot_header .long multiboot_header
+2 -2
View File
@@ -15,7 +15,7 @@
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <multiboot.h> #include <multiboot2.h>
/* Macros. */ /* Macros. */
@@ -58,7 +58,7 @@ cmain (unsigned long magic, unsigned long addr)
cls (); cls ();
/* Am I booted by a Multiboot-compliant boot loader? */ /* Am I booted by a Multiboot-compliant boot loader? */
if (magic != MULTIBOOT_BOOTLOADER_MAGIC) if (magic != MULTIBOOT2_BOOTLOADER_MAGIC)
{ {
printf ("Invalid magic number: 0x%x\n", (unsigned) magic); printf ("Invalid magic number: 0x%x\n", (unsigned) magic);
return; return;
+7 -7
View File
@@ -1078,7 +1078,7 @@ Multiboot kernel. The source files can be found under the directory
@file{doc} in the Multiboot source distribution. @file{doc} in the Multiboot source distribution.
The kernel @file{kernel} consists of only three files: @file{boot.S}, The kernel @file{kernel} consists of only three files: @file{boot.S},
@file{kernel.c} and @file{multiboot.h}. The assembly source @file{kernel.c} and @file{multiboot2.h}. The assembly source
@file{boot.S} is written in GAS (@pxref{Top, , GNU assembler, as.info, @file{boot.S} is written in GAS (@pxref{Top, , GNU assembler, as.info,
The GNU assembler}), and contains the Multiboot information structure to The GNU assembler}), and contains the Multiboot information structure to
comply with the specification. When a Multiboot-compliant boot loader comply with the specification. When a Multiboot-compliant boot loader
@@ -1089,25 +1089,25 @@ the user of the halt state and stops forever until you push the reset
key. The file @file{kernel.c} contains the function @code{cmain}, key. The file @file{kernel.c} contains the function @code{cmain},
which checks if the magic number passed by the boot loader is valid and which checks if the magic number passed by the boot loader is valid and
so on, and some functions to print messages on the screen. The file so on, and some functions to print messages on the screen. The file
@file{multiboot.h} defines some macros, such as the magic number for the @file{multiboot2.h} defines some macros, such as the magic number for the
Multiboot header, the Multiboot header structure and the Multiboot Multiboot header, the Multiboot header structure and the Multiboot
information structure. information structure.
@menu @menu
* multiboot.h:: * multiboot2.h::
* boot.S:: * boot.S::
* kernel.c:: * kernel.c::
* Other Multiboot kernels:: * Other Multiboot kernels::
@end menu @end menu
@node multiboot.h @node multiboot2.h
@subsection multiboot.h @subsection multiboot2.h
This is the source code in the file @file{multiboot.h}: This is the source code in the file @file{multiboot2.h}:
@example @example
@include multiboot.h.texi @include multiboot2.h.texi
@end example @end example
+4 -4
View File
@@ -1,5 +1,5 @@
/* multiboot.h - Multiboot header file. */ /* multiboot2.h - Multiboot 2 header file. */
/* Copyright (C) 1999,2003,2007,2008,2009 Free Software Foundation, Inc. /* Copyright (C) 1999,2003,2007,2008,2009,2010 Free Software Foundation, Inc.
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to * of this software and associated documentation files (the "Software"), to
@@ -26,10 +26,10 @@
#define MULTIBOOT_SEARCH 8192 #define MULTIBOOT_SEARCH 8192
/* The magic field should contain this. */ /* The magic field should contain this. */
#define MULTIBOOT_HEADER_MAGIC 0x1BADB002 #define MULTIBOOT2_HEADER_MAGIC 0xe85250d6
/* This should be in %eax. */ /* This should be in %eax. */
#define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002 #define MULTIBOOT2_BOOTLOADER_MAGIC 0x36d76289
/* Alignment of multiboot modules. */ /* Alignment of multiboot modules. */
#define MULTIBOOT_MOD_ALIGN 0x00001000 #define MULTIBOOT_MOD_ALIGN 0x00001000