Subversion Repositories Kolibri OS

Rev

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

  1. ;
  2. ;   MEMORY MAP
  3. ;
  4. ;   Boot:
  5. ;
  6. ;  0:7C00->7CFF   boot_code
  7. ;
  8. ;   0:9000     byte   bits per pixel
  9. ;   0:9001     word   scanline length
  10. ;   0:9008     word   vesa video mode
  11. ;   0:900A     word   X res
  12. ;   0:900C     word   Y res
  13. ;   0:9010     byte   mouse port  - not used
  14. ;   0:9014     dword  Vesa 1.2 pm bank switch
  15. ;   0:9018     dword  Vesa 2.0 LFB address
  16. ;   0:901C     byte   0 or 1 : enable MTRR graphics acceleration
  17. ;   0:901D     byte   not used anymore (0 or 1 : enable system log display)
  18. ;   0:901E     byte   0 or 1 : enable direct lfb write, paging disabled
  19. ;   0:901F     byte   DMA write : 1=yes, 2=no
  20. ;   0:9020     8bytes pci data
  21. ;   0:9030     byte   VRR start enabled 1, 2-no
  22. ;   0:9031     word   IDEContrRegsBaseAddr
  23. ;    0x9040 - dword - entry point of APM BIOS
  24. ;    0x9044 -  word - version (BCD)
  25. ;    0x9046 -  word - flags
  26. ;   0:907F     byte   number of BIOS hard disks
  27. ;   0:9080     Nbytes BIOS hard disks
  28. ;   0:9100     word   available physical memory map: number of blocks
  29. ;   0:9104            available physical memory map: blocks
  30. ;
  31. ;   Runtime:
  32. ;
  33. ; 0x00000000 -> 0x7FFFFFFF  application 2Gb
  34.  
  35. ; 0x80000000 -> 0FFF  physical page zero - do not write
  36. ;                     (used by int 13h in some configurations)
  37. ;
  38. ; 0x80001000 -> 2FFF   window_data   - 256 entries
  39. ;
  40. ;         0000 dword  x start
  41. ;         0004 dword  y start
  42. ;         0008 dword  x size
  43. ;         000C dword  y size
  44. ;         0010 dword  color of work area
  45. ;         0014 dword  color of grab bar
  46. ;         0018 dword  color of frames
  47. ;         001C dword  window flags, +30 = window drawn, +31 redraw flag
  48. ;
  49. ;   3000  ->   4FFF   task list      - 256 entries
  50. ;
  51. ;         00   dword  process count
  52. ;         04   dword  no of processes
  53. ;         10   dword  base of running process at 0x3000+
  54. ;
  55. ;         20   dword  application event mask
  56. ;         24   dword  PID - process identification number
  57. ;         2a   byte   slot state: 0=running, 1,2=suspended
  58. ;                        3=zombie, 4=terminate,
  59. ;                        5=waiting for event, 9 = not used
  60. ;         2e   byte   window number on screen
  61. ;         30   dword  exact position in memory
  62. ;         34   dword  counter sum
  63. ;         38   dword  time stamp counter add
  64. ;         3c   dword  cpu usage in cpu timer tics
  65. ;
  66. ;
  67. ;   5000  ->   53FF   window stack C000 no of windows - all in words
  68. ;   5402  ->   57FF   window position in stack
  69. ;   5800  ->   5fff   << IDT for int_0x00..int_0x40 + reserv
  70.  
  71. ;   6000  ->   68FF   << free (2k5)                            
  72.  
  73. ;   6900  ->   7EFF   << saved picture under mouse pointer (1k5)
  74. ;
  75. ;   7F00  ->   7FFF   << SB16_Status (256) \\
  76. ;
  77. ;   8000  ->   87FF   free (2k)  
  78. ; 0x80008000 -> 9FFF   ramdisk fat    (8k)
  79.  
  80. ;   A000  ->   F9FF   free (23k)
  81.  
  82. ;   FA00  byte        no of keys in buffer
  83. ;   FA01  byte        'buffer'
  84. ;   FA02  ->   FAFF   reserved for keys
  85.  
  86. ;   FB00  byte        no of buttons in buffer
  87. ;   FB01  dword       'buffer'
  88. ;   FB02  ->   FBFF   reserved for buttons
  89.  
  90.  
  91. ;   FC00  ->   FCFE   com1/ps2 buffer
  92. ;   FCFF              com1/ps2 buffer count starting from FC00
  93.  
  94. ;   FD00  ->   FDFF   free (256)
  95.  
  96. ;   FE00  ->   FE0F   mouse memory 00 chunk count, that includes:
  97. ;   FE08 word       -- mouse H-scroll
  98. ;   FE0A word       -- mouse x
  99. ;   FE0C word       -- mouse y
  100. ;   FE0E word       -- mouse V-scroll
  101.  
  102. ;   FE10  ->   FB17   mouse color mem
  103. ;   FE21              x move
  104. ;   FE22              y move
  105. ;   FE28              high bits temp
  106. ;   FE30              color temp
  107. ;   FE40  byte        buttons down
  108. ;   FE44  byte        0 mouse down -> do not draw
  109. ;   FE4A  ->   FE4D   FE4A-B x-under - FE4C-D y-under
  110.  
  111. ;   FEB8  dword       putpixel address
  112. ;   FEBC  dword       getpixel address
  113. ;   FEC1  byte        bits per pixel
  114. ;   FEC4  dword       mouse appearance counter
  115. ;   FEC8  dword       x & y temp for windowmove
  116. ;   FECC  dword       tsc / second
  117.  
  118. ;   FED0  dword       screen x size
  119. ;   FED4  dword       screen y size
  120. ;   FED8  dword       screen y multiplier
  121. ;   FEDC  dword       screen mode
  122.  
  123. ;   FEE4  dword       PCIe extended (memory-mappable) config space - physical address
  124. ;   FEE8  dword       PCIe extended config space limit
  125. ;   FEEC  word        number of 4M-pages needed to map PCIe config space
  126. ;   FEEE  word        PCIe bus range (power-ow-two Mbytes)
  127.  
  128. ;   FEF0  dword       physical address of user-accessible static system buffer
  129. ;   FEF4  dword       physical address of LFB
  130. ;   FEF8  dword       address of button list
  131. ;   FEFC  dword       memory to use
  132. ;   FF00  byte        1 = system shutdown request
  133. ;   FF01  byte        task activation request?
  134.  
  135. ;   FFE4  ->   FFEF   background info
  136. ;   FFF0  byte        >0 if redraw background request from app
  137. ;   FFF1  byte        >0 if background changed
  138. ;   FFF2              write and read bank in screen
  139. ;   FFF4  byte        0 if first mouse draw & do not return picture under
  140. ;   FFF5  byte        1 do not draw pointer
  141. ;   FFFF  byte        do not change task for 1/100 sec.
  142. ;
  143. ; 0x80010000 ->  6CBFF   the kernel (up to 371 Kb)
  144. ;       in the current version:
  145. ;            ->  00B3C   16-bit code end
  146. ;            ->  00C40   16-bit data end
  147. ;            ->  105F0   32-bit code start
  148. ;            ->  2C889   32-bit code end
  149. ;            ->  2FC28..end_of_kernel    zero-filled zone after preinit_mem
  150. ;            ->  33563   uninitialized globals start
  151. ;            ->  3B752   end_of_kernel
  152. ;            ->  3C000   not used (>200k)
  153. ; 0x80050000 -> 090000   zero-filled zone after preinit_mem
  154. ; 0x8006CC00 ->  6DBFF   stack at boot time (4Kb)
  155. ;
  156. ; 0x8006DC00 ->  6E5FF   basic text font II
  157. ; 0x8006E600 ->  6Efff   basic text font I
  158. ; 0x8006F000 ->  6FFFF   main page directory
  159.  
  160. ; 0x80070000 ->  7FFFF   data of retrieved disks and partitions (Mario79)
  161. ; 0x80080000 ->  8FFFF   additional app info, in 256 byte steps - 256 entries
  162. ;
  163. ;         00  11db  name of app running
  164. ;       0x10 dword  pointer to  fpu save area
  165. ;       0x14 dword  event count
  166. ;       0x18 dword  user fpu exceptoins handler
  167. ;       0x1c dword  user sse exceptions handler
  168. ;         20 dword  PL0 stack base
  169. ;         24 dword  user heap base
  170. ;         28 dword  user heap top
  171. ;         2c dword  window cursor handle
  172. ;         30 dword  first event in list
  173. ;         34 dword  last event in list
  174. ;         38 dword  first kernel object in list
  175. ;         3c dword  last kernel object in list
  176. ;         40 dword  thread esp
  177. ;         44 dword  io permission map page 0
  178. ;         48 dword  io permission map page 1
  179. ;         4c dword  debug state: 1= load debug registers
  180. ;         50 dword  current directory ptr
  181. ;         54 dword  wait timeout
  182. ;         58 dword  thread TSS._esp0 (= pl0 stack base + size except for V86)
  183. ;         5C-7F     unused
  184. ;
  185. ;         80 dword  address of random shaped window area
  186. ;         84 byte   shape area scale
  187. ;         88 dword  free
  188. ;         8C dword  application memory size
  189. ;         90 dword  window X position save
  190. ;         94 dword  window Y position save
  191. ;         98 dword  window X size save
  192. ;         9C dword  window Y size save
  193. ;         A0 dword  IPC memory start
  194. ;         A4 dword  IPC memory size
  195. ;         A8 dword  event bits: mouse, stack,..
  196. ;         AC dword  0 or debugger slot
  197. ;         B0 dword  free
  198. ;         B4  byte  keyboard mode: 0 = keymap, 1 = scancodes
  199. ;         B8 dword  physical address of directory table
  200. ;         BC dword  address of debug event memory
  201. ;         C0  5 dd  thread debug registers: DR0,DR1,DR2,DR3,DR7
  202. ;
  203. ; 0x80090000 ->  9FFFF   wav device buffer (64k)        ; << SB16Buffer
  204. ; 0x800A0000 ->  AFFFF   screen access area               << VGA legacy buffer
  205. ; 0x800B0000 ->  FFFFF   bios rest in peace -area (320k), << purpose unknown
  206. ; 0x80100000 -> 283FFF   diskette image (1m5)
  207.  
  208. ; 0x80284000 -> HEAP_BASE zero-filled zone after preinit_mem
  209. ;
  210. ; 0x80284000 -> 28BFFF   HDD DMA AREA   (32k)
  211. ; 0x8028C000 -> 297FFF   free (48k)
  212. ;
  213. ; 0x80298000 -> 29ffff   auxiliary table for background smoothing code (32k)
  214. ;
  215. ; 0x802A0000 -> 2Bffff   free (128k)
  216. ; 0x80328000 -> 32FFFF   !vrr driver      (32k)
  217.  
  218.  
  219. ; 0x80338000 -> 338FFF draw data     - 256 entries (4k)
  220. ;         00   dword  draw limit - x start
  221. ;         04   dword  draw limit - y start
  222. ;         08   dword  draw limit - x end
  223. ;         0C   dword  draw limit - y end
  224. ; 0x80339000 -> 3BFFF3   free (12k)
  225.  
  226. ; 0x802C0000 -> 2C3fff   button info (8k)
  227. ;
  228. ;       0000 word    number of buttons
  229. ;        first button entry at 0x10
  230. ;       +0000 word   process number
  231. ;       +0002 word   button id number : bits 00-15
  232. ;       +0004 word   x start
  233. ;       +0006 word   x size
  234. ;       +0008 word   y start
  235. ;       +000A word   y size
  236. ;       +000C word   button id number : bits 16-31
  237. ;
  238. ; 0x802C4000 -> 2CFFFF   free (48k)
  239. ;
  240. ; 0x802D0000 -> 2DFFFF   reserved port area (64k)
  241. ;
  242. ;       0000 dword   no of port areas reserved
  243. ;       0010 dword   process id
  244. ;            dword   start port
  245. ;            dword   end port
  246. ;            dword   0
  247. ;
  248. ; 0x80370000 -> 37FFFF   irq data area   (64k)
  249. ; 0x80380000 -> 38FFFF   low memory save (64k)
  250. ;
  251. ; 0x80390000 -> 3AFFFF   tcp memory       (128k)
  252. ; 0x803B0000 -> 3B7FFF   tcp memory       (32k)
  253.  
  254. ; 0x803B8000 -> 3BFFFF   skin data              (32k)
  255.  
  256. ; 0x803C0000             page map     (length b = memsize shr 15)
  257. ; 0x803C0000 + b         start of static pagetables
  258.  
  259. ; 0x803FFFFF <- no direct address translation beyond this point
  260. ; =============================================================
  261.  
  262. ; 0x805FF000 -> 5FFF80   TSS
  263. ; 0x80600000 -> 601FFF   i/o maps
  264.  
  265. ; 0x80800000 ->827FFFFF  kernel heap
  266.  
  267. ; 0xF0000000 -> 0xF1FFFFFF  PCI-express extended config space
  268. ; 0xFD000000 -> 0xFD3FFFFF  static system buffer 4Mb
  269. ; 0xFDC00000 -> 0xFDFFFFFF  page tables 4Mb
  270. ; 0xFE000000 -> 0xFFFFFFFF  LFB 32Mb
  271. ; 0xFE000000 -> 0xFE7FFFFF  application available LFB 8Mb
  272. ; 0xFE800000 -> 0xFFFFFFFF  kernel LFB part 24 Mb
  273.  
  274.  
  275.