Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2455 | mario79 | 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; ;; |
||
7964 | hidnplayr | 3 | ;; Copyright (C) KolibriOS team 2004-2020. All rights reserved. ;; |
2455 | mario79 | 4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
||
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
||
2288 | clevermous | 7 | ; |
8 | ; MEMORY MAP |
||
9 | ; |
||
10 | ; Boot: |
||
11 | ; |
||
7132 | dunkaist | 12 | ; BOOT_LO / boot_data structure |
2288 | clevermous | 13 | ; 0:9000 byte bits per pixel |
14 | ; 0:9001 word scanline length |
||
15 | ; 0:9008 word vesa video mode |
||
16 | ; 0:900A word X res |
||
17 | ; 0:900C word Y res |
||
18 | ; 0:9014 dword Vesa 1.2 pm bank switch |
||
19 | ; 0:9018 dword Vesa 2.0 LFB address |
||
20 | ; 0:901C byte 0 or 1 : enable MTRR graphics acceleration |
||
7122 | dunkaist | 21 | ; 0:901D byte (0 or 1) start the first app (right now it's LAUNCHER) after kernel is loaded? |
22 | ; 0:901E byte If nonzero, duplicates debug output to the screen. |
||
2288 | clevermous | 23 | ; 0:901F byte DMA write : 1=yes, 2=no |
24 | ; 0:9020 8bytes pci data |
||
7121 | dunkaist | 25 | ; 0:9030 byte shutdown type (see sysfn 18.9) |
7122 | dunkaist | 26 | ; 0:9040 dword entry point of APM BIOS |
27 | ; 0:9044 word version (BCD) |
||
28 | ; 0:9046 word flags |
||
29 | ; 0:9050 word APM_CODE_32 |
||
30 | ; 0:9052 word APM_CODE_16 |
||
31 | ; 0:9054 word APM_DATA_16 |
||
2288 | clevermous | 32 | ; 0:907F byte number of BIOS hard disks |
33 | ; 0:9080 Nbytes BIOS hard disks |
||
34 | ; 0:9100 word available physical memory map: number of blocks |
||
35 | ; 0:9104 available physical memory map: blocks |
||
36 | ; |
||
37 | ; Runtime: |
||
38 | ; |
||
39 | ; 0x00000000 -> 0x7FFFFFFF application 2Gb |
||
40 | |||
41 | ; 0x80000000 -> 0FFF physical page zero - do not write |
||
42 | ; (used by int 13h in some configurations) |
||
43 | ; |
||
44 | ; 0x80001000 -> 2FFF window_data - 256 entries |
||
45 | ; |
||
46 | ; 0000 dword x start |
||
47 | ; 0004 dword y start |
||
48 | ; 0008 dword x size |
||
49 | ; 000C dword y size |
||
50 | ; 0010 dword color of work area |
||
51 | ; 0014 dword color of grab bar |
||
52 | ; 0018 dword color of frames |
||
53 | ; 001C dword window flags, +30 = window drawn, +31 redraw flag |
||
54 | ; |
||
55 | ; 3000 -> 4FFF task list - 256 entries |
||
56 | ; |
||
57 | ; 00 dword process count |
||
58 | ; 04 dword no of processes |
||
59 | ; 10 dword base of running process at 0x3000+ |
||
60 | ; |
||
61 | ; 20 dword application event mask |
||
62 | ; 24 dword PID - process identification number |
||
63 | ; 2a byte slot state: 0=running, 1,2=suspended |
||
64 | ; 3=zombie, 4=terminate, |
||
65 | ; 5=waiting for event, 9 = not used |
||
66 | ; 2e byte window number on screen |
||
67 | ; 30 dword exact position in memory |
||
68 | ; 34 dword counter sum |
||
69 | ; 38 dword time stamp counter add |
||
70 | ; 3c dword cpu usage in cpu timer tics |
||
71 | ; |
||
72 | ; |
||
2485 | mario79 | 73 | ; 5000 -> 68FF free (6k6) |
2288 | clevermous | 74 | ; 6900 -> 6EFF saved picture under mouse pointer (1k5) |
75 | ; |
||
76 | ; 6F00 -> 6FFF free (256) |
||
77 | ; |
||
78 | ; 7000 -> 7FFF used CD driver |
||
79 | ; |
||
80 | ; 8000 -> A3FF used FLOPPY driver |
||
81 | ; |
||
82 | ; A400 -> B0FF free (3k3), unused ACTIVE_PROC_STACK |
||
83 | |||
84 | ; B100 -> B307 IDT for int_0x00..int_0x40 |
||
85 | |||
86 | ; B308 -> BFFF free (3k3) |
||
87 | |||
88 | ; C000 -> C3FF window stack C000 no of windows - all in words |
||
89 | ; C402 -> C7FF window position in stack |
||
90 | ; D000 -> D1FF FDC controller |
||
91 | ; D200 -> D3FF FDC controller for Fat12 |
||
92 | ; D400 -> DFFF free (3k) |
||
93 | ; E000 byte multitasking started |
||
94 | ; E020 dword putpixel address |
||
95 | ; E024 dword getpixel address |
||
96 | ; E030 dword Vesa 1.2 pm bank switch address |
||
97 | ; E034 -> F1FF free (4k5) |
||
98 | ; F200 dword mousepicture -pointer |
||
99 | ; F204 dword mouse appearance counter |
||
100 | ; F208 -> F2FF free (248) |
||
101 | ; F300 dword x & y temp for windowmove |
||
102 | ; F304 -> F3FF free (252) |
||
103 | ; F400 byte no of keys in buffer |
||
104 | ; F401 byte 'buffer' |
||
105 | ; F402 -> F4FF reserved for keys |
||
106 | ; F500 byte no of buttons in buffer |
||
107 | ; F501 dword 'buffer' |
||
108 | ; F502 -> F5FF reserved for buttons |
||
109 | ; F600 dword tsc / second |
||
110 | ; F604 byte (unused?) mouse port: 1 ps2, 2 com1, 3 com2 |
||
111 | ; F605 -> FAFF free (1k2) |
||
112 | ; FB00 -> FB0F mouse memory 00 chunk count, that includes: |
||
113 | ; FB08 word -- mouse H-scroll |
||
114 | ; FB0A word -- mouse x |
||
115 | ; FB0C word -- mouse y |
||
116 | ; FB0E word -- mouse V-scroll |
||
117 | ; FB10 -> FB17 mouse color mem |
||
118 | ; FB21 x move |
||
119 | ; FB22 y move |
||
120 | ; FB28 high bits temp |
||
121 | ; FB30 color temp |
||
122 | ; FB40 byte buttons down |
||
123 | ; FB44 byte 0 mouse down -> do not draw |
||
124 | ; FB4A -> FB4D FB4A-B x-under - FB4C-D y-under |
||
125 | ; FBF1 byte bits per pixel |
||
126 | ; FC00 -> FCFE com1/ps2 buffer |
||
127 | ; FCFF com1/ps2 buffer count starting from FC00 |
||
128 | ; FD00 -> FDFF free (256) |
||
129 | ; FE00 dword screen x size |
||
130 | ; FE04 dword screen y size |
||
131 | ; FE08 dword screen y multiplier |
||
132 | ; FE0C dword screen mode |
||
133 | ; FE10 -> FE7F free (112) |
||
134 | ; FE80 dword address of LFB in physical |
||
135 | ; FE84 dword address of applications memory start in physical ? |
||
136 | ; FE88 dword address of button list |
||
137 | ; FE8C dword memory to use |
||
138 | ; FE90 -> FEFF free (112) |
||
139 | ; FF00 byte 1 = system shutdown request |
||
140 | ; FF01 byte task activation request? |
||
141 | ; FFF0 byte >0 if redraw background request from app |
||
2513 | mario79 | 142 | ; FFF1 byte free |
2288 | clevermous | 143 | ; FFF2 write and read bank in screen |
144 | ; FFF4 byte 0 if first mouse draw & do not return picture under |
||
145 | ; FFF5 byte 1 do not draw pointer |
||
146 | ; FFFF byte do not change task for 1/100 sec. |
||
147 | ; |
||
8085 | dunkaist | 148 | ; 0x80010000 -> 7BC00 kernel, 32-bit run-time code (up to 431k) |
2288 | clevermous | 149 | ; |
8085 | dunkaist | 150 | ; 0x8007CC00 -> 7DBFF stack at boot time (4k) |
151 | ; 0x8007E000 -> 7FFFF main page directory |
||
2288 | clevermous | 152 | ; 0x80080000 -> 8FFFF additional app info, in 256 byte steps - 256 entries |
153 | ; |
||
154 | ; 00 11db name of app running |
||
155 | ; 0x10 dword pointer to fpu save area |
||
156 | ; 0x14 dword event count |
||
157 | ; 0x18 dword user fpu exceptoins handler |
||
158 | ; 0x1c dword user sse exceptions handler |
||
159 | ; 20 dword PL0 stack base |
||
160 | ; 24 dword user heap base |
||
161 | ; 28 dword user heap top |
||
162 | ; 2c dword window cursor handle |
||
163 | ; 30 dword first event in list |
||
164 | ; 34 dword last event in list |
||
165 | ; 38 dword first kernel object in list |
||
166 | ; 3c dword last kernel object in list |
||
167 | ; 40 dword thread esp |
||
168 | ; 44 dword io permission map page 0 |
||
169 | ; 48 dword io permission map page 1 |
||
170 | ; 4c dword debug state: 1= load debug registers |
||
171 | ; 50 dword current directory ptr |
||
172 | ; 54 dword wait timeout |
||
173 | ; 58 dword thread TSS._esp0 (= pl0 stack base + size except for V86) |
||
174 | ; 5C-7F unused |
||
175 | ; |
||
176 | ; 80 dword address of random shaped window area |
||
177 | ; 84 byte shape area scale |
||
178 | ; 88 dword free |
||
179 | ; 8C dword application memory size |
||
180 | ; 90 dword window X position save |
||
181 | ; 94 dword window Y position save |
||
182 | ; 98 dword window X size save |
||
183 | ; 9C dword window Y size save |
||
184 | ; A0 dword IPC memory start |
||
185 | ; A4 dword IPC memory size |
||
186 | ; A8 dword event bits: mouse, stack,.. |
||
187 | ; AC dword 0 or debugger slot |
||
188 | ; B0 dword free |
||
189 | ; B4 byte keyboard mode: 0 = keymap, 1 = scancodes |
||
190 | ; B8 dword physical address of directory table |
||
191 | ; BC dword address of debug event memory |
||
192 | ; C0 5 dd thread debug registers: DR0,DR1,DR2,DR3,DR7 |
||
193 | ; |
||
8085 | dunkaist | 194 | ; 0x80090000 -> 9FFFF free (64k) |
2288 | clevermous | 195 | ; 0x800A0000 -> AFFFF screen access area |
196 | ; 0x800B0000 -> FFFFF bios rest in peace -area (320k) ? |
||
197 | ; 0x80100000 -> 27FFFF diskette image (1m5) |
||
4273 | clevermous | 198 | ; 0x80280000 -> 283FFF free (16k) |
2288 | clevermous | 199 | ; |
200 | ; 0x80284000 -> 28BFFF HDD DMA AREA (32k) |
||
201 | ; 0x8028C000 -> 297FFF free (48k) |
||
202 | ; |
||
2504 | mario79 | 203 | ; 0x80298000 -> 29FFFF auxiliary table for background smoothing code (32k) |
2288 | clevermous | 204 | ; |
2504 | mario79 | 205 | ; 0x802A0000 -> 2B00FF wav device buffer (64k) |
206 | ; 0x802A0000 -> 2B00FF wav device status (256) |
||
2288 | clevermous | 207 | ; |
2504 | mario79 | 208 | ; 0x802B0100 -> 2B3FFD free (15k7) |
209 | ; |
||
2525 | mario79 | 210 | ; 0x802B3FEE -> 2B3FEF button info (64K+ 16 + 2 byte) |
211 | ; 2B3FEE 0000 word number of buttons |
||
212 | ; 2B3FF0 first button entry |
||
2504 | mario79 | 213 | ; |
214 | ; button entry at 0x10 |
||
2288 | clevermous | 215 | ; +0000 word process number |
216 | ; +0002 word button id number : bits 00-15 |
||
217 | ; +0004 word x start |
||
218 | ; +0006 word x size |
||
219 | ; +0008 word y start |
||
220 | ; +000A word y size |
||
221 | ; +000C word button id number : bits 16-31 |
||
222 | ; |
||
2485 | mario79 | 223 | ; 0x802C4000 -> 2C9FFF area for fast getting offset to LFB (24k) |
224 | ; BPSLine_calc_area |
||
225 | ; 0x802CA000 -> 2CFFFF area for fast getting offset to _WinMapAddress (24k) |
||
226 | ; d_width_calc_area |
||
2288 | clevermous | 227 | ; |
228 | ; 0x802D0000 -> 2DFFFF reserved port area (64k) |
||
229 | ; |
||
230 | ; 0000 dword no of port areas reserved |
||
231 | ; 0010 dword process id |
||
232 | ; dword start port |
||
233 | ; dword end port |
||
234 | ; dword 0 |
||
235 | ; |
||
2485 | mario79 | 236 | ; 0x802E0000 -> 2EFFFF irq data area (64k) ;BOOT_VAR |
2288 | clevermous | 237 | ; |
7964 | hidnplayr | 238 | ; 0x802F0000 -> 317fff free (160k) |
2288 | clevermous | 239 | ; |
2485 | mario79 | 240 | ; 0x80318000 -> 31ffff skin_data (32k) |
241 | ; |
||
242 | ; 0x80320000 -> 323FF3 draw data - 256 entries (4k) |
||
2288 | clevermous | 243 | ; 00 dword draw limit - x start |
244 | ; 04 dword draw limit - y start |
||
245 | ; 08 dword draw limit - x end |
||
246 | ; 0C dword draw limit - y end |
||
2485 | mario79 | 247 | ; |
248 | ; 0x8032BFF4 -> 32BFFF background info |
||
249 | ; 0x80323FF4 BgrDrawMode |
||
250 | ; 0x80323FF8 BgrDataWidth |
||
251 | ; 0x80323FFC BgrDataHeight |
||
252 | ; |
||
253 | ; 0x80324000 page map (length b = memsize shr 15) |
||
254 | ; 0x80324000 + b start of static pagetables |
||
2288 | clevermous | 255 | |
256 | ; 0x803FFFFF <- no direct address translation beyond this point |
||
257 | ; ============================================================= |
||
258 | |||
259 | ; 0x805FF000 -> 5FFF80 TSS |
||
260 | ; 0x80600000 -> 601FFF i/o maps |
||
261 | |||
262 | ; 0x80800000 -> kernel heap |
||
263 | ; 0x80FFFFFF heap min limit |
||
264 | ; 0xFDBFFFFF heap max limit |
||
265 | |||
266 | ; 0xF0000000 -> 0xF1FFFFFF PCI-express extended config space |
||
267 | ; 0xFDC00000 -> 0xFDFFFFFF page tables 4Mb |
||
268 | ; 0xFE000000 -> 0xFFFFFFFF LFB 32Mb |
||
269 | ; 0xFE000000 -> 0xFE7FFFFF application available LFB 8Mb |
||
270 | ; 0xFE800000 -> 0xFFFFFFFF kernel LFB part 24 Mb-> |
||
271 |