Subversion Repositories Kolibri OS

Rev

Rev 8085 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

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