Merge tag 'efi-next-for-v5.11-3' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / Documentation / misc-devices / mic / mic_overview.rst
1 ======================================================
2 Intel Many Integrated Core (MIC) architecture overview
3 ======================================================
4
5 An Intel MIC X100 device is a PCIe form factor add-in coprocessor
6 card based on the Intel Many Integrated Core (MIC) architecture
7 that runs a Linux OS. It is a PCIe endpoint in a platform and therefore
8 implements the three required standard address spaces i.e. configuration,
9 memory and I/O. The host OS loads a device driver as is typical for
10 PCIe devices. The card itself runs a bootstrap after reset that
11 transfers control to the card OS downloaded from the host driver. The
12 host driver supports OSPM suspend and resume operations. It shuts down
13 the card during suspend and reboots the card OS during resume.
14 The card OS as shipped by Intel is a Linux kernel with modifications
15 for the X100 devices.
16
17 Since it is a PCIe card, it does not have the ability to host hardware
18 devices for networking, storage and console. We provide these devices
19 on X100 coprocessors thus enabling a self-bootable equivalent
20 environment for applications. A key benefit of our solution is that it
21 leverages the standard virtio framework for network, disk and console
22 devices, though in our case the virtio framework is used across a PCIe
23 bus. A Virtio Over PCIe (VOP) driver allows creating user space
24 backends or devices on the host which are used to probe virtio drivers
25 for these devices on the MIC card. The existing VRINGH infrastructure
26 in the kernel is used to access virtio rings from the host. The card
27 VOP driver allows card virtio drivers to communicate with their user
28 space backends on the host via a device page. Ring 3 apps on the host
29 can add, remove and configure virtio devices. A thin MIC specific
30 virtio_config_ops is implemented which is borrowed heavily from
31 previous similar implementations in lguest and s390.
32
33 MIC PCIe card has a dma controller with 8 channels. These channels are
34 shared between the host s/w and the card s/w. 0 to 3 are used by host
35 and 4 to 7 by card. As the dma device doesn't show up as PCIe device,
36 a virtual bus called mic bus is created and virtual dma devices are
37 created on it by the host/card drivers. On host the channels are private
38 and used only by the host driver to transfer data for the virtio devices.
39
40 The Symmetric Communication Interface (SCIF (pronounced as skiff)) is a
41 low level communications API across PCIe currently implemented for MIC.
42 More details are available at scif_overview.txt.
43
44 The Coprocessor State Management (COSM) driver on the host allows for
45 boot, shutdown and reset of Intel MIC devices. It communicates with a COSM
46 "client" driver on the MIC cards over SCIF to perform these functions.
47
48 Here is a block diagram of the various components described above. The
49 virtio backends are situated on the host rather than the card given better
50 single threaded performance for the host compared to MIC, the ability of
51 the host to initiate DMA's to/from the card using the MIC DMA engine and
52 the fact that the virtio block storage backend can only be on the host::
53
54                +----------+           |             +----------+
55                | Card OS  |           |             | Host OS  |
56                +----------+           |             +----------+
57                                       |
58         +-------+ +--------+ +------+ | +---------+  +--------+ +--------+
59         | Virtio| |Virtio  | |Virtio| | |Virtio   |  |Virtio  | |Virtio  |
60         | Net   | |Console | |Block | | |Net      |  |Console | |Block   |
61         | Driver| |Driver  | |Driver| | |backend  |  |backend | |backend |
62         +---+---+ +---+----+ +--+---+ | +---------+  +----+---+ +--------+
63             |         |         |     |      |            |         |
64             |         |         |     |User  |            |         |
65             |         |         |     |------|------------|--+------|-------
66             +---------+---------+     |Kernel                |
67                       |               |                      |
68   +---------+     +---+----+ +------+ | +------+ +------+ +--+---+  +-------+
69   |MIC DMA  |     |  VOP   | | SCIF | | | SCIF | | COSM | | VOP  |  |MIC DMA|
70   +---+-----+     +---+----+ +--+---+ | +--+---+ +--+---+ +------+  +----+--+
71       |               |         |     |    |        |                    |
72   +---+-----+     +---+----+ +--+---+ | +--+---+ +--+---+ +------+  +----+--+
73   |MIC      |     |  VOP   | |SCIF  | | |SCIF  | | COSM | | VOP  |  | MIC   |
74   |HW Bus   |     |  HW Bus| |HW Bus| | |HW Bus| | Bus  | |HW Bus|  |HW Bus |
75   +---------+     +--------+ +--+---+ | +--+---+ +------+ +------+  +-------+
76       |               |         |     |       |     |                    |
77       |   +-----------+--+      |     |       |    +---------------+     |
78       |   |Intel MIC     |      |     |       |    |Intel MIC      |     |
79       |   |Card Driver   |      |     |       |    |Host Driver    |     |
80       +---+--------------+------+     |       +----+---------------+-----+
81                  |                    |                   |
82              +-------------------------------------------------------------+
83              |                                                             |
84              |                    PCIe Bus                                 |
85              +-------------------------------------------------------------+