Initial work on 64-bit systems.

This commit is contained in:
Vladimir 'phcoder' Serbinenko committed 2010-03-10 22:47:37 +01:00
1 parent 1d280f3b29
commit 9a7d18426c
1 file changed
+118 -110
+118 -110
View File
@@ -296,6 +296,13 @@ little-endian, u32 is coded in little-endian.
@item u64 @item u64
The type of unsigned 64-bit data. Because the target architecture is The type of unsigned 64-bit data. Because the target architecture is
little-endian, u64 is coded in little-endian. little-endian, u64 is coded in little-endian.
@item u_phys
The type of unsigned data of the same size as target architecture physical address size.
@item u_virt
The type of unsigned data of the same size as target architecture virtual address size.
@end table @end table
@@ -406,9 +413,9 @@ Every structure has following format:
@example @example
@group @group
+-------------------+ +-------------------+
0 | type | u32 | type |
4 | size | u32 | size |
8-11 | flags | u32 | flags |
+-------------------+ +-------------------+
@end group @end group
@end example @end example
@@ -425,10 +432,10 @@ Tags are terminated by a tag of type @samp{0} and size @samp{12}.
@example @example
@group @group
+-------------------+ +-------------------+
0 | type = 1 | u32 | type = 1 |
4 | size | u32 | size |
8 | flags | u32 | flags |
12-xx | mbi_tag_types | u32[n] | mbi_tag_types |
+-------------------+ +-------------------+
@end group @end group
@end example @end example
@@ -450,13 +457,13 @@ actually be present. E.g. on a videoless system even if you requested tag
@example @example
@group @group
+-------------------+ +-------------------+
0 | type = 2 | u32 | type = 2 |
4 | size = 28 | u32 | size = 28 |
8 | flags | u32 | flags |
12 | header_addr | u_virt | header_addr |
16 | load_addr | u_virt | load_addr |
20 | load_end_addr | u_virt | load_end_addr |
24-27 | bss_end_addr | u_virt | bss_end_addr |
+-------------------+ +-------------------+
@end group @end group
@end example @end example
@@ -499,10 +506,10 @@ assumes that no bss segment is present.
@example @example
@group @group
+-------------------+ +-------------------+
0 | type = 3 | u32 | type = 3 |
4 | size = 16 | u32 | size = 16 |
8 | flags | u32 | flags |
12-15 | entry_addr | u_virt | entry_addr |
+-------------------+ +-------------------+
@end group @end group
@end example @end example
@@ -523,10 +530,10 @@ start running the operating system.
@example @example
@group @group
+-------------------+ +-------------------+
0 | type = 4 | u32 | type = 4 |
4 | size = 16 | u32 | size = 16 |
8 | flags | u32 | flags |
12-15 | console_flags | u32 | console_flags |
+-------------------+ +-------------------+
@end group @end group
@end example @end example
@@ -541,12 +548,12 @@ indicates that the OS image has EGA text support.
@example @example
@group @group
+-------------------+ +-------------------+
0 | type = 5 | u32 | type = 5 |
4 | size = 24 | u32 | size = 24 |
8 | flags | u32 | flags |
12 | width | u32 | width |
16 | height | u32 | height |
20-23 | depth | u32 | depth |
+-------------------+ +-------------------+
@end group @end group
@end example @end example
@@ -583,9 +590,9 @@ preference.
@example @example
@group @group
+-------------------+ +-------------------+
0 | type = 6 | u32 | type = 6 |
4 | size = 12 | u32 | size = 12 |
8-11 | flags | u32 | flags |
+-------------------+ +-------------------+
@end group @end group
@end example @end example
@@ -685,8 +692,8 @@ Boot information consists of fixed part and a series of tags. Its start is 8-byt
@example @example
@group @group
+-------------------+ +-------------------+
0-3 | total_size | u32 | total_size |
4-7 | reserved | u32 | reserved |
+-------------------+ +-------------------+
@end group @end group
@end example @end example
@@ -701,8 +708,8 @@ Every tag begins with following fields:
@example @example
@group @group
+-------------------+ +-------------------+
0 | type | u32 | type |
4-7 | size | u32 | size |
+-------------------+ +-------------------+
@end group @end group
@end example @end example
@@ -715,10 +722,10 @@ Tags follow one another padded when necessary in order for each tag to start at
@example @example
@group @group
+-------------------+ +-------------------+
0 | type = 4 | u32 | type = 4 |
4 | size = 16 | u32 | size = 16 |
8 | mem_lower | u32 | mem_lower |
12-15 | mem_upper | u32 | mem_upper |
+-------------------+ +-------------------+
@end group @end group
@end example @end example
@@ -734,11 +741,11 @@ minus 1 megabyte. It is not guaranteed to be this value.
@example @example
@group @group
+-------------------+ +-------------------+
0 | type = 5 | u32 | type = 5 |
4 | size = 20 | u32 | size = 20 |
8 | biosdev | u32 | biosdev |
12 | partition | u32 | partition |
16-19 | sub_parition | u32 | sub_parition |
+-------------------+ +-------------------+
@end group @end group
@end example @end example
@@ -778,9 +785,9 @@ partition on a disk partitioned in conventional DOS style, then
@example @example
@group @group
+-------------------+ +-------------------+
0 | type = 1 | u32 | type = 1 |
4 | size | u32 | size |
8-xx | string | u8[n] | string |
+-------------------+ +-------------------+
@end group @end group
@end example @end example
@@ -792,11 +799,11 @@ zero-terminated UTF-8 string.
@example @example
@group @group
+-------------------+ +-------------------+
0 | type = 3 | u32 | type = 3 |
4 | size | u32 | size |
8 | mod_start | u_phys | mod_start |
12 | mod_end | u_phys | mod_end |
16-xx | string | u8[n] | string |
+-------------------+ +-------------------+
@end group @end group
@end example @end example
@@ -822,12 +829,13 @@ the Multiboot information structure starting at byte 28 are valid:
@example @example
@group @group
+-------------------+ +-------------------+
0 | type = 9 | u32 | type = 9 |
4 | size | u32 | size |
8 | num | u16 | num |
12 | entsize | u16 | entsize |
16 | shndx | u16 | shndx |
20-xx | section headers | u16 | reserved |
varies | section headers |
+-------------------+ +-------------------+
@end group @end group
@end example @end example
@@ -848,11 +856,11 @@ This tag provides memory map.
@example @example
@group @group
+-------------------+ +-------------------+
0 | type = 6 | u32 | type = 6 |
4 | size | u32 | size |
8 | entry_size | u32 | entry_size |
12 | entry_version | u32 | entry_version |
16-xx | entries | varies | entries |
+-------------------+ +-------------------+
@end group @end group
@end example @end example
@@ -863,10 +871,10 @@ This tag provides memory map.
@example @example
@group @group
+-------------------+ +-------------------+
0 | base_addr | u64 | base_addr |
8 | length | u64 | length |
16 | type | u32 | type |
20 | reserved | u32 | reserved |
+-------------------+ +-------------------+
@end group @end group
@end example @end example
@@ -885,9 +893,9 @@ be available for normal use.
@example @example
@group @group
+-------------------+ +-------------------+
0 | type = 2 | u32 | type = 2 |
4 | size | u32 | size |
8-xx | string | u8[n] | string |
+-------------------+ +-------------------+
@end group @end group
@end example @end example
@@ -901,17 +909,17 @@ The tag type 10 contains @sc{apm} table
@example @example
@group @group
+----------------------+ +----------------------+
0 | type = 10 | u32 | type = 10 |
4 | size = 28 | u32 | size = 28 |
8 | version | u16 | version |
10 | cseg | u16 | cseg |
12 | offset | u32 | offset |
16 | cseg_16 | u16 | cseg_16 |
18 | dseg | u16 | dseg |
20 | flags | u16 | flags |
22 | cseg_len | u16 | cseg_len |
24 | cseg_16_len | u16 | cseg_16_len |
26-27 | dseg_len | u16 | dseg_len |
+----------------------+ +----------------------+
@end group @end group
@end example @end example
@@ -932,14 +940,14 @@ Management (APM) BIOS Interface Specification}, for more information.
@example @example
@group @group
+-------------------+ +-------------------+
0 | type = 7 | u32 | type = 7 |
4 | size = 784 | u32 | size = 784 |
8 | vbe_mode | u16 | vbe_mode |
10 | vbe_interface_seg | u16 | vbe_interface_seg |
12 | vbe_interface_off | u16 | vbe_interface_off |
14 | vbe_interface_len | u16 | vbe_interface_len |
16 | vbe_control_info | u8[512] | vbe_control_info |
528-783 | vbe_mode_info | u8[256] | vbe_mode_info |
+-------------------+ +-------------------+
@end group @end group
@end example @end example
@@ -964,16 +972,16 @@ yourself.
@example @example
@group @group
+--------------------+ +--------------------+
0 | type = 8 | u32 | type = 8 |
4 | size | u32 | size |
8 | framebuffer_addr | u64 | framebuffer_addr |
16 | framebuffer_pitch | u32 | framebuffer_pitch |
20 | framebuffer_width | u32 | framebuffer_width |
24 | framebuffer_height | u32 | framebuffer_height |
28 | framebuffer_bpp | u8 | framebuffer_bpp |
29 | framebuffer_type | u8 | framebuffer_type |
30 | reserved | u8 | reserved |
32 | color_info | varies | color_info |
+--------------------+ +--------------------+
@end group @end group
@end example @end example
@@ -982,8 +990,8 @@ The field @samp{framebuffer_addr} contains framebuffer physical address. This fi
@example @example
@group @group
+----------------------------------+ +----------------------------------+
32 | framebuffer_palette_num_colors | u32 | framebuffer_palette_num_colors |
36-xx | framebuffer_palette | varies | framebuffer_palette |
+----------------------------------+ +----------------------------------+
@end group @end group
@end example @end example
@@ -992,9 +1000,9 @@ Each colour descriptor has following structure:
@example @example
@group @group
+-------------+ +-------------+
0 | red_value | u8 | red_value |
1 | green_value | u8 | green_value |
2-2 | blue_value | u8 | blue_value |
+-------------+ +-------------+
@end group @end group
@end example @end example
@@ -1004,12 +1012,12 @@ Then color_type is defined as follows:
@example @example
@group @group
+----------------------------------+ +----------------------------------+
32 | framebuffer_red_field_position | u8 | framebuffer_red_field_position |
33 | framebuffer_red_mask_size | u8 | framebuffer_red_mask_size |
34 | framebuffer_green_field_position | u8 | framebuffer_green_field_position |
35 | framebuffer_green_mask_size | u8 | framebuffer_green_mask_size |
36 | framebuffer_blue_field_position | u8 | framebuffer_blue_field_position |
37-37 | framebuffer_blue_mask_size | u8 | framebuffer_blue_mask_size |
+----------------------------------+ +----------------------------------+
@end group @end group
@end example @end example