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