forked from runtimejs/runtime
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathstartup_conf.inc
60 lines (50 loc) · 1.72 KB
/
startup_conf.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
; Copyright 2014 runtime.js project authors
;
; 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.
; MULTIBOOT
MULTIBOOT_HEADER_MAGIC = 0x1BADB002
MULTIBOOT_PAGE_ALIGN = 1 shl 0
MULTIBOOT_MEMORY_INFO = 1 shl 1
MULTIBOOT_VIDEO_INFO = 1 shl 2
MULTIBOOT_AOUT_KLUDGE = 1 shl 16
MULTIBOOT_HEADER_FLAGS = MULTIBOOT_PAGE_ALIGN or MULTIBOOT_MEMORY_INFO or MULTIBOOT_AOUT_KLUDGE
MULTIBOOT_LOADED_MAGIC = 0x2BADB002
MULTIBOOT_STRUCTURE_NEWLOC = 0x120000
MULTIBOOT_STRUCTURE_MEMORY_NEWLOC = 0x121000
MULTIBOOT_LOAD_DATACODE_LEN = 0
MULTIBOOT_LOAD_DATACODEBSS_LEN = 0
; SYSTEM VARS
SYSTEM_IDT_TABLE_ADDR_64 = 0x0000000000000000
SYSTEM_IDT_TABLE_ADDR_64_32len = 0x00000000 ; same but 32 bit
SYSTEM_IDT_COUNT = 256
SYSTEM_IDT_LEN_BYTES = 16
SYSTEM_GDT_TABLE_ADDR_64 = 0x0000000000001000
SYSTEM_GDT_TABLE_ADDR_64_32len = 0x00001000 ; same but 32 bit
; STACK AT 22 MiB
SYSTEM_STACK_32BIT = 0x1600000
SYSTEM_STACK_64BIT = 0x1600000
;PAGING
PAGING_PML4_ADDR = 0x00002000
PAGING_PML4_OPTIONS = 0x8
PAGING_PDP_COUNT = 1
PAGING_PDP_ADDR = 0x00003000
PAGING_PDP_OPTIONS = 0x7
PAGING_PD_COUNT = 512
PAGING_PD_ADDR = 0x00020000
PAGING_PD_OPTIONS = 0x7
PAGING_PHYS_PAGE_OPTIONS = 0x0000008F
; 0x00002000 PML4#1 ---|
; 0x00003000 PDP#1 <--|
; ...
; 0x00020000 PD#1
; ...