Subversion Repositories Kolibri OS

Rev

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