mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 07:12:39 +00:00
merge multiboot2 into mbtaf-spec
This commit is contained in:
commit
68d4322ed7
5 files changed
+668
-297
No files matched your search
+16
-16
@@ -1,19 +1,19 @@
|
||||
/* boot.S - bootstrap the kernel */
|
||||
/* Copyright (C) 1999, 2001 Free Software Foundation, Inc.
|
||||
|
||||
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 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
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
/* Copyright (C) 1999, 2001, 2010 Free Software Foundation, Inc. */
|
||||
/*
|
||||
* 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 3 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 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
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#define ASM_FILE 1
|
||||
#include <multiboot2.h>
|
||||
@@ -34,7 +34,7 @@
|
||||
#else
|
||||
# define AOUT_KLUDGE MULTIBOOT_AOUT_KLUDGE
|
||||
#endif
|
||||
#define MULTIBOOT_HEADER_FLAGS MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO | AOUT_KLUDGE
|
||||
#define MULTIBOOT_HEADER_FLAGS MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO | MULTIBOOT_VIDEO_MODE | AOUT_KLUDGE
|
||||
|
||||
.text
|
||||
|
||||
|
||||
+20
-15
@@ -1,19 +1,19 @@
|
||||
/* kernel.c - the C part of the kernel */
|
||||
/* Copyright (C) 1999 Free Software Foundation, Inc.
|
||||
|
||||
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 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
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
/* Copyright (C) 1999, 2010 Free Software Foundation, Inc. */
|
||||
/*
|
||||
* 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 3 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 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
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <multiboot2.h>
|
||||
|
||||
@@ -158,6 +158,10 @@ cmain (unsigned long magic, unsigned long addr)
|
||||
<< tagfb->framebuffer_blue_field_position;
|
||||
break;
|
||||
|
||||
case MULTIBOOT_FRAMEBUFFER_TYPE_EGA_TEXT:
|
||||
color = '\\' | 0x0100;
|
||||
break;
|
||||
|
||||
default:
|
||||
color = 0xffffffff;
|
||||
break;
|
||||
@@ -202,6 +206,7 @@ cmain (unsigned long magic, unsigned long addr)
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
tag = (struct multiboot_tag *) ((multiboot_uint8_t *) tag + tag->size);
|
||||
|
||||
+8
-8
@@ -20,7 +20,7 @@ Copyright @copyright{} 1995,96 Bryan Ford <baford@@cs.utah.edu>
|
||||
|
||||
Copyright @copyright{} 1995,96 Erich Stefan Boleyn <erich@@uruk.org>
|
||||
|
||||
Copyright @copyright{} 1999,2000,2001,2002,2005,2006,2009 Free Software Foundation, Inc.
|
||||
Copyright @copyright{} 1999,2000,2001,2002,2005,2006,2009,2010 Free Software Foundation, Inc.
|
||||
|
||||
@quotation
|
||||
Permission is granted to make and distribute verbatim copies of
|
||||
@@ -477,7 +477,7 @@ start running the operating system.
|
||||
|
||||
All of the graphics fields are enabled by flag bit 2. They specify the
|
||||
preferred graphics mode. Note that that is only a @emph{recommended}
|
||||
mode by the OS image. Boot loader may also choose another mode if it sees fit.
|
||||
mode by the OS image. Boot loader may choose a different mode if it sees fit.
|
||||
|
||||
The meaning of each is as follows:
|
||||
|
||||
@@ -485,10 +485,9 @@ The meaning of each is as follows:
|
||||
@item mode_type
|
||||
Contains @samp{0} for linear graphics mode or @samp{1} for
|
||||
EGA-standard text mode. Everything else is reserved for future
|
||||
expansion. Note that the boot loader may set a text mode, even if this
|
||||
field contains @samp{0}. If video adapter doesn't support EGA text mode or
|
||||
bootloader doesn't know how to initialise this mode it may set video
|
||||
mode even if field contains @samp{1}
|
||||
expansion. Note that the boot loader may set a text mode even if this
|
||||
field contains @samp{0}, or set a video mode even if this field contains
|
||||
@samp{1}.
|
||||
|
||||
@item width
|
||||
Contains the number of the columns. This is specified in pixels in a
|
||||
@@ -915,7 +914,8 @@ Each colour descriptor has following structure:
|
||||
+-------------+
|
||||
@end group
|
||||
@end example
|
||||
If @samp{framebuffer_type} is set to 1 it means direct RGB color. Then color_type is defined as follows:
|
||||
If @samp{framebuffer_type} is set to @samp{1} it means direct RGB color.
|
||||
Then color_type is defined as follows:
|
||||
|
||||
@example
|
||||
@group
|
||||
@@ -930,7 +930,7 @@ If @samp{framebuffer_type} is set to 1 it means direct RGB color. Then color_typ
|
||||
@end group
|
||||
@end example
|
||||
|
||||
If @samp{framebuffer_type} is set to 2 it means EGA text. In this case @samp{framebuffer_width} and @samp{framebuffer_height} are expressed in characters and not in pixels. @samp{framebuffer_bpp} is equal 16 (16 bits per character) and @samp{framebuffer_pitch} is expressed in bytes per text line.
|
||||
If @samp{framebuffer_type} is set to @samp{2} it means EGA text. In this case @samp{framebuffer_width} and @samp{framebuffer_height} are expressed in characters and not in pixels. @samp{framebuffer_bpp} is equal 16 (16 bits per character) and @samp{framebuffer_pitch} is expressed in bytes per text line.
|
||||
All further values of @samp{framebuffer_type} are reserved for future expansion
|
||||
|
||||
@node Examples
|
||||
|
||||
Reference in new issue
Block a user