Subversion Repositories Kolibri OS

Rev

Rev 7122 | Rev 7964 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2455 mario79 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2
;;                                                              ;;
5363 yogev_ezra 3
;; Copyright (C) KolibriOS team 2004-2015. 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
;
148
; 0x80010000 ->  6CBFF   kernel, 32-bit run-time code (up to 371 Kb)
149
 
150
; 0x8006CC00 ->  6DBFF   stack at boot time (4Kb)
151
;
2640 mario79 152
; 0x8006DC00 ->  6E5FF   free (2560)
153
; 0x8006E600 ->  6Efff   free (2560)
2288 clevermous 154
; 0x8006F000 ->  6FFFF   main page directory
155
 
156
; 0x80070000 ->  7FFFF   data of retrieved disks and partitions (Mario79)
157
; 0x80080000 ->  8FFFF   additional app info, in 256 byte steps - 256 entries
158
;
159
;         00  11db  name of app running
160
;       0x10 dword  pointer to  fpu save area
161
;       0x14 dword  event count
162
;       0x18 dword  user fpu exceptoins handler
163
;       0x1c dword  user sse exceptions handler
164
;         20 dword  PL0 stack base
165
;         24 dword  user heap base
166
;         28 dword  user heap top
167
;         2c dword  window cursor handle
168
;         30 dword  first event in list
169
;         34 dword  last event in list
170
;         38 dword  first kernel object in list
171
;         3c dword  last kernel object in list
172
;         40 dword  thread esp
173
;         44 dword  io permission map page 0
174
;         48 dword  io permission map page 1
175
;         4c dword  debug state: 1= load debug registers
176
;         50 dword  current directory ptr
177
;         54 dword  wait timeout
178
;         58 dword  thread TSS._esp0 (= pl0 stack base + size except for V86)
179
;         5C-7F     unused
180
;
181
;         80 dword  address of random shaped window area
182
;         84 byte   shape area scale
183
;         88 dword  free
184
;         8C dword  application memory size
185
;         90 dword  window X position save
186
;         94 dword  window Y position save
187
;         98 dword  window X size save
188
;         9C dword  window Y size save
189
;         A0 dword  IPC memory start
190
;         A4 dword  IPC memory size
191
;         A8 dword  event bits: mouse, stack,..
192
;         AC dword  0 or debugger slot
193
;         B0 dword  free
194
;         B4  byte  keyboard mode: 0 = keymap, 1 = scancodes
195
;         B8 dword  physical address of directory table
196
;         BC dword  address of debug event memory
197
;         C0  5 dd  thread debug registers: DR0,DR1,DR2,DR3,DR7
198
;
199
; 0x80090000 ->  9FFFF   tmp (64k) - unused?
200
; 0x800A0000 ->  AFFFF   screen access area
201
; 0x800B0000 ->  FFFFF   bios rest in peace -area (320k)        ?
202
; 0x80100000 -> 27FFFF   diskette image (1m5)
4273 clevermous 203
; 0x80280000 -> 283FFF   free (16k)
2288 clevermous 204
;
205
; 0x80284000 -> 28BFFF   HDD DMA AREA   (32k)
206
; 0x8028C000 -> 297FFF   free (48k)
207
;
2504 mario79 208
; 0x80298000 -> 29FFFF   auxiliary table for background smoothing code (32k)
2288 clevermous 209
;
2504 mario79 210
; 0x802A0000 -> 2B00FF   wav device buffer (64k)
211
; 0x802A0000 -> 2B00FF   wav device status (256)
2288 clevermous 212
;
2504 mario79 213
; 0x802B0100 -> 2B3FFD   free (15k7)
214
;
2525 mario79 215
; 0x802B3FEE -> 2B3FEF   button info (64K+ 16 + 2 byte)
216
;     2B3FEE   0000 word    number of buttons
217
;     2B3FF0    first button entry
2504 mario79 218
;
219
;        button entry at 0x10
2288 clevermous 220
;       +0000 word   process number
221
;       +0002 word   button id number : bits 00-15
222
;       +0004 word   x start
223
;       +0006 word   x size
224
;       +0008 word   y start
225
;       +000A word   y size
226
;       +000C word   button id number : bits 16-31
227
;
2485 mario79 228
; 0x802C4000 -> 2C9FFF   area for fast getting offset to LFB (24k)
229
;                        BPSLine_calc_area
230
; 0x802CA000 -> 2CFFFF   area for fast getting offset to _WinMapAddress (24k)
231
;                        d_width_calc_area
2288 clevermous 232
;
233
; 0x802D0000 -> 2DFFFF   reserved port area (64k)
234
;
235
;       0000 dword   no of port areas reserved
236
;       0010 dword   process id
237
;            dword   start port
238
;            dword   end port
239
;            dword   0
240
;
2485 mario79 241
; 0x802E0000 -> 2EFFFF   irq data area  (64k)  ;BOOT_VAR
2288 clevermous 242
;
2485 mario79 243
; 0x802F0000 -> 2F3FFF   tcp memory  stack_data_start eth_data_start (16k)
2288 clevermous 244
;
2485 mario79 245
; 0x802F4000 -> 30ffff   stack_data | stack_data_end (112k)
246
;
247
; 0x80310000 -> 317fff   resendQ (32k)
248
;
249
; 0x80318000 -> 31ffff   skin_data (32k)
250
;
251
; 0x80320000 -> 323FF3   draw data     - 256 entries (4k)
2288 clevermous 252
;         00   dword  draw limit - x start
253
;         04   dword  draw limit - y start
254
;         08   dword  draw limit - x end
255
;         0C   dword  draw limit - y end
2485 mario79 256
;
257
; 0x8032BFF4 -> 32BFFF   background info
258
;         0x80323FF4    BgrDrawMode
259
;         0x80323FF8    BgrDataWidth
260
;         0x80323FFC    BgrDataHeight
261
;
262
; 0x80324000             page map     (length b = memsize shr 15)
263
; 0x80324000 + b         start of static pagetables
2288 clevermous 264
 
265
; 0x803FFFFF <- no direct address translation beyond this point
266
; =============================================================
267
 
268
; 0x805FF000 -> 5FFF80   TSS
269
; 0x80600000 -> 601FFF   i/o maps
270
 
271
; 0x80800000 ->       kernel heap
272
; 0x80FFFFFF          heap min limit
273
; 0xFDBFFFFF          heap max limit
274
 
275
; 0xF0000000 -> 0xF1FFFFFF  PCI-express extended config space
276
; 0xFDC00000 -> 0xFDFFFFFF  page tables 4Mb
277
; 0xFE000000 -> 0xFFFFFFFF  LFB 32Mb
278
; 0xFE000000 -> 0xFE7FFFFF  application available LFB 8Mb
279
; 0xFE800000 -> 0xFFFFFFFF  kernel LFB part 24 Mb
280