Changes between Version 2 and Version 3 of wti_box_attribution


Ignore:
Timestamp:
Aug 1, 2016, 3:54:37 PM (8 years ago)
Author:
laniel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • wti_box_attribution

    v2 v3  
    1010[[Image(WTI.svg, 50%)]]
    1111
    12 We call those interruptions the **Write Triggered Interruptions (WTI)** because they are triggered by a write operation in the Xicu's mailboxes register.
     12We call those interruptions the **Write Triggered Interruptions (WTI)** because they are triggered by a write operation in the Xicu's mailboxes registers.
    1313
    1414== Mailboxes' attribution ==
    15 Each cluster possess an XICU which has 16 mailboxes, 4 of them are reserved for the inter process interruptions (IPI). The fifth mailbox of the cluster 0's Xicu is also reserved, it is the `DEV_NULL` mailbox, its use will be explained later.
     15Each cluster possess an XICU which has 16 mailboxes, 4 of them are reserved for the inter process interrupts (IPI). The fifth mailbox of the cluster 0's Xicu is also reserved, it is the `DEV_NULL` mailbox, its use will be explained later.
    1616
    1717External peripherals can use 12 of this mailboxes to signal their I/O operation's end and that the ISR associated to the peripheral has to be executed.
     
    4949When the disk will end its I/O operation, it will ordoer the IOPIC to write in the fifth mailbox so the core P1 will execute the disk's ISR.
    5050
    51 == mailbox attribution API ==
    52 Pour mettre en place ce mécanisme nous avons dû écrire une API, celle-ci est composée d'une structure et de trois fonctions.
     51== Mailboxes' attribution API ==
     52To set up this mecanism we wrote an PI, it is composed of a structure and 3 functions.
    5353
    54 Les deux fonctions de base de l'API sont donc `get_configure_mailbox` et `put_mailbox`. En effet, celles-ci pourront être utilisées dans l'écriture de futur driver.
     54The two main functions of this API are `get_configure_mailbox` and `put_mailbox`. Indeed, they can be used for future drivers' writing.
    5555
    56 === La structure `mbox_manager`===
    57 Cette structure est présente dans chaque cluster, elle contient deux champs :
    58 * un spinlock pour prévenir les accès concurents
    59 * un tableau d'état des boîtes aux lettres
     56=== The `mbox_manager` structure ===
     57This structure can be found in each cluster, it has two fields :
     58* a spinlock for mutual exclusion
     59* an array of mailboxes' state
    6060
    61 Chaque case du tableau représente l'état d'une boîte aux lettres, ces différents états sont :
    62 * IPI : La boîte aux lettres est utilisée pour une IPI, elle ne sera donc pas utilisée pour une WTI. Les ''n'' premières boîtes aux lettres sont réservées à cet usage (où ''n'' est le nombre de cœur du cluster).
    63 * FREE : La boîte est libre et peut-être utilisée pour une WTI.
    64 * L'identifiant local du cœur propriétaire.
     61Each entry
     62Chaque case du tableau represents the mailbox's state, those different states are :
     63* IPI : The box is used for IPI, it can not be used for WTI. The ''n'' first mailboxes are reserved for IPI (''n'' is the cluster's number of core).
     64* FREE : The box is free an can be used for WTI.
     65* The id of proprietary core.
    6566
    6667=== `void mbox_m_init(struct mbox_manager *mbox_m)` ===
    67 Cette fonction est appelée lors de l'initialisation du cluster, elle marque les premières boîtes aux lettres comme étant réservées aux IPI tandis que les autres seront marquées comme étant libres.
     68This function is called during the cluster's initialization, it marks the first mailboxes as reserved for IPI whereas the others are marked as free.
    6869
    6970=== `void get_configure_mailbox(struct mbox_manager *mbox_m, struct device_s *dev)` ===
    70 Cette fonction alloue une boîte aux lettres du mbox_manager `mbox_m` au device `dev` reconfigure le masque de l'Xicu et associe l'ISR de `dev` à la boîte au lettre allouée.
    71 Cette fonction est bloquante tant qu'aucune boîte aux lettres n'a été trouvée.
     71This function allocate a mailbox of the mbox_manager `mbox_m` to the device `dev`, then it configures the Xicu's mask and link the `dev`'s ISR to the allocated mailbox.
     72This functions blocks while no boxe was found.
    7273
    7374=== `int put_mailbox(uint_t wti_index, struct mbox_manager *mbox_m)` ===
    74 Cette fonction rend la boîte aux lettres d'index `wti_index` appartenant au mbox_manager `mbox_m`, elle masque aussi l'interruption et dés-associe l'ISR et la boîte aux lettres.
    75 Cette fonction renvoie 0 en cas de succès ou un code d'erreur dans le cas contraire.
     75This function releases the mailbox which index is `wti_index` in the mbox_manager `mbox_m`, it also masks the interrupt and unlink the ISR to the mailbox.
     76This function returns 0 when success or an error number otherwise.
    7677
    77 == Avantages et inconvénients de cette API ==
    78 L'utilisation de cette API permet une certaine souplesse. En effet, grâce à cette API il serait possible d'utiliser tous les périphériques si on disposait d'une XICU possédant une unique boîte aux lettres (bien entendu les processeurs devraient se la partager et il y aurait alors de la séquentialité).
     78== API's advantages and disadvantages ==
     79The use of this API permits a certain flexibility. Indeed, thanks to this API it will be possible to use all the peripheral even if we have an Xicu with only one mailbox (of course the different cores will have to shared the mailbox so il will have sequentiality).
    7980
    80 Grâce à la politique pollueur/payeur les caches des cœurs ne sont pas gâchés par l'ISR d'un cœur voisin.
     81Thanks to "polluter-payer" politic the cores' caches are not spoiled by the ISR of a neighbour core.
    8182
    82 Toutefois l'utilisation de cette API rallonge les opérations d'entrée/sortie. **En effet, il semblerait que l'exécution d'un simple programme "`open; read; close;`" prenne 40 000 cycles supplémentaires par rapport à une opération d'entrée/sortie sans utilisation de l'API.**
     83However, the use of this API makes the I/O operation longer. **Indeed, it seems that the execution of a simple program "`open; read; close;`" takes 40 000 cycles more compared to an I/O operation without the use of the API.**
    8384
    8485