Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1352 → Rev 1353

/kernel/trunk/docs/sysfuncr.txt
3290,6 → 3290,63
ᯨ᮪ ¢â®àëå ¤®«¦¥­ ¡ëâì 㪠§ ­ ¢ ¤®ªã¬¥­â æ¨¨ ¯® ãáâனáâ¢ã.
 
======================================================================
====================== ”ã­ªæ¨ï 62, ¯®¤äã­ªæ¨ï 11 =====================
== ˆ­¨æ¨ «¨§¨à®¢ âì ¯®«ì§®¢ â¥«ì᪨© ‚/‚ á ®â®¡à ¦¥­¨¥¬ ­  ¯ ¬ïâì ==
======================================================================
 à ¬¥âàë:
* eax = 62 - ­®¬¥à ä㭪樨
* bl = 11 - ­®¬¥à ¯®¤ä㭪樨
* cx =  ¤à¥á PCI-ãáâனá⢠
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* eax = -1 - ¤®áâ㯠ª PCI § ¯à¥éñ­;
* eax = -2 - ¤®áâ㯠ª MMIO-¡«®ª ¬ ãáâனá⢠ ­¥ à §à¥èñ­;
* eax = -3 - ®è¨¡ª   ««®ª æ¨¨ ¯®«ì§®¢ â¥«ì᪮© ¤¨­. ¯ ¬ïâ¨; ¨­ ç¥
* eax = à §¬¥à ¤®áâ㯭®© ¤¨­ ¬¨ç¥áª®© ¯ ¬ïâ¨.
‡ ¬¥ç ­¨ï:
* à¥¤¢ à¨â¥«ì­® ¤®«¦¥­ ¡ëâì à §à¥èñ­ ­¨§ª®ã஢­¥¢ë© ¤®áâ㯠ª PCI
¤«ï ¯à¨«®¦¥­¨© ¯®¤ä㭪樥© 12 ä㭪樨 21.
*  ¤à¥á PCI-ãáâனá⢠ ¤®«¦¥­ ᮢ¯ ¤ âì á á¨á⥬­®© ¯¥à¥¬¥­­®©
mmio_pci_addr
 
======================================================================
====================== ”ã­ªæ¨ï 62, ¯®¤äã­ªæ¨ï 12 =====================
== ‚뤥«¨âì ¤¨ ¯ §®­ «¨­¥©­ëå  ¤à¥á®¢ ¤«ï ¯®«ì§®¢ â¥«ì᪮£® MMIO ==
======================================================================
 à ¬¥âàë:
* eax = 62 - ­®¬¥à ä㭪樨
* bl = 12 - ­®¬¥à ¯®¤ä㭪樨
* bh = ­®¬¥à BAR-ॣ¨áâà  ¢ ª®­ä¨£ãà æ¨®­­®© §®­¥ PCI
* ecx = à §¬¥à MMIO-¡«®ª  (¢ ¡ ©â å)
* edx = ᬥ饭¨¥ ®â­®á¨â¥«ì­® ­ ç «  MMIO-¡«®ª  (¢ 4K-áâà ­¨æ å!)
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* eax = -1 - ¤®áâ㯠ª PCI § ¯à¥éñ­;
* eax = -2 - ­¥¢¥à­ë© ­®¬¥à BAR-ॣ¨áâà ;
* eax = -3 - BAR ­¥ ᮤ¥à¦¨â  ¤à¥á  IO;
* eax = -4 - BAR  ¤à¥áã¥â ¯®àâë IO;
* eax = -5 - ®è¨¡ª   ««®ª æ¨¨; ¨­ ç¥
* eax = ­ ç «ì­ë©  ¤à¥á MMIO ¢  ¤à¥á­®¬ ¯à®áâà ­á⢥ ¯à¨«®¦¥­¨ï.
‡ ¬¥ç ­¨ï:
* à¥¤¢ à¨â¥«ì­® ¤®«¦¥­ ¡ëâì à §à¥èñ­ ­¨§ª®ã஢­¥¢ë© ¤®áâ㯠ª PCI
¤«ï ¯à¨«®¦¥­¨© ¯®¤ä㭪樥© 12 ä㭪樨 21.
* €¤à¥á PCI-ãáâனá⢠ § ¤ ¥âáï á¨á⥬­®© ¯¥à¥¬¥­­®© mmio_pci_addr.
* à¥¤®áâ ¢«¥­­ë© ¤¨ ¯ §®­ «¨­¥©­ëå  ¤à¥á®¢ ¤®«¦¥­ ®á¢®¡®¦¤ âìáï
¯®á।á⢮¬ ¢ë§®¢  ä㭪樨 62:13
 
======================================================================
====================== ”ã­ªæ¨ï 62, ¯®¤äã­ªæ¨ï 13 =====================
== Žá¢®¡®¤¨âì ¤¨ ¯ §®­ «¨­¥©­ëå  ¤à¥á®¢ ¯®«ì§®¢ â¥«ì᪮£® MMIO ==
======================================================================
 à ¬¥âàë:
* eax = 62 - ­®¬¥à ä㭪樨
* bl = 12 - ­®¬¥à ¯®¤ä㭪樨
* ecx = ­ ç «ì­ë©  ¤à¥á ®á¢®¡®¦¤ ¥¬®£® MMIO-¡«®ª  ¢  ¤à¥á­®¬
¯à®áâà ­á⢥ ¯à¨«®¦¥­¨ï
‚®§¢à é ¥¬®¥ §­ ç¥­¨¥:
* eax = 1 - ¡«®ª ãᯥ譮 ®á¢®¡®¦¤¥­;
‡ ¬¥ç ­¨ï:
* à¥¤¢ à¨â¥«ì­® ¯à¨«®¦¥­¨î ¤®«¦¥­ ¡ëâì ¢ë¤¥«¥­ uMMIO-¡«®ª (fn62:12)
 
======================================================================
================ ”ã­ªæ¨ï 63 - à ¡®â  á ¤®áª®© ®â« ¤ª¨. ===============
======================================================================
„®áª  ®â« ¤ª¨ ¯à¥¤áâ ¢«ï¥â ᮡ®© á¨á⥬­ë© ¡ãä¥à (­  4096 ¡ ©â),
/kernel/trunk/docs/sysfuncs.txt
3261,6 → 3261,59
in the device documentation.
 
======================================================================
===================== Function 62, subfunction 11 ====================
== Initialize user-accessible MMIO channel ==
======================================================================
Parameters:
* eax = 62 - function
* bl = 11 - subfunction
* cx = PCI-address (bbbbbbbb dddddfff)
Returns:
* eax = -1 - PCI access not granted;
* eax = -2 - no user MMIO access to this PCI address;
* eax = -3 - memory allocation error; otherwise
* eax = available user heap size.
Remarks:
* Low-level PCI access must be allowed (fn21:12)
* PCI-address should correspond the system var [mmio_pci_addr]
 
======================================================================
===================== Function 62, subfunction 12 ====================
== Request user-accessible MMIO address space ==
======================================================================
Parameters:
* eax = 62 - function
* bl = 12 - subfunction
* bh = BAR number in PCI configuration space
* ecx = MMIO-block size needed (bytes)
* edx = MMIO-offset (number of whole 4Kb-pages!)
Returns:
* eax = -1 - user PCI access denied;
* eax = -2 - invalid BAR number;
* eax = -3 - BAR contains no valid IO addres;
* eax = -4 - BAR addresses IO ports;
* eax = -5 - dynamic allocation error; otherwise
* eax = MMIO start address (in application's linear space).
Remarks:
* Low-level PCI access must be allowed (fn21:12)
* The system var [mmio_pci_addr] sets the actual PCI-address
* The granted MMIO addresses should be released after use (fn62:13)
 
======================================================================
===================== Function 62, subfunction 13 ====================
== Release a block of user MMIO addresses ==
======================================================================
 à ¬¥âàë:
* eax = 62 - function
* bl = 12 - subfunction
* ecx = MMIO start address (in application's linear space).
Returns:
* eax = 1 if the block is successfully released;
* eax = 0 in case of reallocation error;
Remarks:
* A valid uMMIO block should exist at this address (fn62:12)
 
======================================================================
============== Function 63 - work with the debug board. ==============
======================================================================
The debug board is the global system buffer (with the size