|
3 | 3 | Overview |
4 | 4 | ######## |
5 | 5 |
|
6 | | -* Early Boot |
| 6 | +This section presents the configuration process of a CXL Type-3 memory device, |
| 7 | +and how it is ultimately exposed to users as either a :code:`DAX` device or |
| 8 | +normal memory pages via the kernel's page allocator. |
7 | 9 |
|
8 | | - * Linux Boot Parameters |
| 10 | +Portions marked with a bullet are points at which certain kernel objects |
| 11 | +are generated. |
9 | 12 |
|
10 | | - * nosoftreserve |
| 13 | +1) Early Boot |
11 | 14 |
|
12 | | - * Memory Map Creation |
| 15 | + a) BIOS, Build, and Boot Parameters |
13 | 16 |
|
14 | | - * EFI Memory Map / E820 Consulted for Soft-Reserved |
| 17 | + i) EFI_MEMORY_SP |
| 18 | + ii) CONFIG_EFI_SOFT_RESERVE |
| 19 | + iii) CONFIG_MHP_DEFAULT_ONLINE_TYPE |
| 20 | + iv) nosoftreserve |
| 21 | + |
| 22 | + b) Memory Map Creation |
| 23 | + |
| 24 | + i) EFI Memory Map / E820 Consulted for Soft-Reserved |
15 | 25 |
|
16 | 26 | * CXL Memory is set aside to be handled by the CXL driver |
17 | 27 |
|
18 | 28 | * IO Resources are created for CFMWS entry |
19 | 29 |
|
20 | | - * NUMA Node Creation |
| 30 | + c) NUMA Node Creation |
21 | 31 |
|
22 | 32 | * ACPI CEDT and SRAT table are used to create Nodes from Proximity domains (PXM) |
23 | 33 |
|
24 | | - * Memory Tier Creation |
| 34 | + d) Memory Tier Creation |
25 | 35 |
|
26 | | - * A default tier is created with all nodes. |
| 36 | + * A default memory_tier is created with all nodes. |
27 | 37 |
|
28 | | - * Contiguous Memory Allocation |
| 38 | + e) Contiguous Memory Allocation |
29 | 39 |
|
30 | 40 | * Any requested CMA is allocated from Online nodes |
31 | 41 |
|
32 | | - * Init Finishes, Drivers start probing |
| 42 | + f) Init Finishes, Drivers start probing |
33 | 43 |
|
34 | | -* ACPI and PCI Drivers |
| 44 | +2) ACPI and PCI Drivers |
35 | 45 |
|
36 | | - * Detect CXL device, marking it for probe by CXL driver |
| 46 | + a) Detect CXL device, marking it for probe by CXL driver |
37 | 47 |
|
38 | | -* CXL Driver Operation |
| 48 | + b) This portion will not be covered specifically. |
39 | 49 |
|
40 | | - * Base object creation (root, port, memdev) |
| 50 | +3) CXL Driver Operation |
41 | 51 |
|
42 | | - * CEDT CFMWS IO Resource creation |
| 52 | + a) Base device creation |
43 | 53 |
|
44 | | - * Decoder creation (root, switch, endpoint) |
45 | | - |
46 | | - * Logical device creation (region, endpoint) |
| 54 | + * root, port, and memdev devices created |
| 55 | + * CEDT CFMWS IO Resource creation |
47 | 56 |
|
48 | | - * Devices are associated with each other |
| 57 | + b) Decoder creation |
49 | 58 |
|
50 | | - * If auto-decoder (BIOS-programmed decoders), driver validates configurations and locks everything. |
| 59 | + * root, switch, and endpoint decoders created |
51 | 60 |
|
52 | | - * Regions surfaced as DAX region |
| 61 | + c) Logical device creation |
| 62 | + |
| 63 | + * memory_region and endpoint devices created |
53 | 64 |
|
54 | | - * DAX Region surfaced as DAX device |
| 65 | + d) Devices are associated with each other |
55 | 66 |
|
56 | | -* DAX Driver Operation |
| 67 | + * If auto-decoder (BIOS-programmed decoders), driver validates |
| 68 | + configurations, builds associations, and locks configs at probe time. |
57 | 69 |
|
58 | | - * DAX driver surfaces DAX region as one of two dax device modes |
| 70 | + * If user-configured, validation and associations are built at |
| 71 | + decoder-commit time. |
59 | 72 |
|
60 | | - * kmem - dax device is converted to hotplug memory |
| 73 | + e) Regions surfaced as DAX region |
61 | 74 |
|
62 | | - * hmem - dax device is left to be accessed as a file. |
| 75 | + * dax_region created |
63 | 76 |
|
64 | | - * DAX driver surfaces dax device to /dev/daxX.Y |
| 77 | + * DAX device created via DAX driver |
65 | 78 |
|
66 | | - * DAX kmem IO resource creation |
| 79 | +4) DAX Driver Operation |
67 | 80 |
|
68 | | - * If hmem, journey ends here. |
| 81 | + a) DAX driver surfaces DAX region as one of two dax device modes |
69 | 82 |
|
70 | | - * DAX kmem surfaces memory region to Memory Hotplug to add to page allocator as "driver managed memory" |
| 83 | + * kmem - dax device is converted to hotplug memory blocks |
| 84 | + |
| 85 | + * DAX kmem IO resource creation |
71 | 86 |
|
72 | | -* Memory Hotplug |
| 87 | + * hmem - dax device is left as daxdev to be accessed as a file. |
| 88 | + |
| 89 | + * If hmem, journey ends here. |
73 | 90 |
|
74 | | - * mhp component surfaces a memory region as multiple memory blocks to the page allocator |
| 91 | + b) DAX kmem surfaces memory region to Memory Hotplug to add to page |
| 92 | + allocator as "driver managed memory" |
75 | 93 |
|
76 | | - * blocks appear in /sys/bus/memory/devices and /sys/bus/memory/node/devices/nodeN/ |
| 94 | +5) Memory Hotplug |
77 | 95 |
|
78 | | - * blocks are onlined into the requested zone (NORMAL or MOVABLE) |
| 96 | + a) mhp component surfaces a dax device memory region as multiple memory |
| 97 | + blocks to the page allocator |
79 | 98 |
|
80 | | - * Build option: CONFIG_MHP_DEFAULT_ONLINE_TYPE_* |
| 99 | + * blocks appear in :code:`/sys/bus/memory/devices` and linked to a NUMA node |
81 | 100 |
|
82 | | - * Boot option: memhp_default_state |
| 101 | + b) blocks are onlined into the requested zone (NORMAL or MOVABLE) |
83 | 102 |
|
84 | | - * Memory is marked "Driver Managed" to avoid kexec from using it as region for kernel updates |
| 103 | + * Memory is marked "Driver Managed" to avoid kexec from using it as region |
| 104 | + for kernel updates |
0 commit comments