162306a36Sopenharmony_ci===========================
262306a36Sopenharmony_ciBoot time memory management
362306a36Sopenharmony_ci===========================
462306a36Sopenharmony_ci
562306a36Sopenharmony_ciEarly system initialization cannot use "normal" memory management
662306a36Sopenharmony_cisimply because it is not set up yet. But there is still need to
762306a36Sopenharmony_ciallocate memory for various data structures, for instance for the
862306a36Sopenharmony_ciphysical page allocator.
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ciA specialized allocator called ``memblock`` performs the
1162306a36Sopenharmony_ciboot time memory management. The architecture specific initialization
1262306a36Sopenharmony_cimust set it up in :c:func:`setup_arch` and tear it down in
1362306a36Sopenharmony_ci:c:func:`mem_init` functions.
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ciOnce the early memory management is available it offers a variety of
1662306a36Sopenharmony_cifunctions and macros for memory allocations. The allocation request
1762306a36Sopenharmony_cimay be directed to the first (and probably the only) node or to a
1862306a36Sopenharmony_ciparticular node in a NUMA system. There are API variants that panic
1962306a36Sopenharmony_ciwhen an allocation fails and those that don't.
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ciMemblock also offers a variety of APIs that control its own behaviour.
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ciMemblock Overview
2462306a36Sopenharmony_ci=================
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci.. kernel-doc:: mm/memblock.c
2762306a36Sopenharmony_ci   :doc: memblock overview
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ciFunctions and structures
3162306a36Sopenharmony_ci========================
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ciHere is the description of memblock data structures, functions and
3462306a36Sopenharmony_cimacros. Some of them are actually internal, but since they are
3562306a36Sopenharmony_cidocumented it would be silly to omit them. Besides, reading the
3662306a36Sopenharmony_cidescriptions for the internal functions can help to understand what
3762306a36Sopenharmony_cireally happens under the hood.
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci.. kernel-doc:: include/linux/memblock.h
4062306a36Sopenharmony_ci.. kernel-doc:: mm/memblock.c
4162306a36Sopenharmony_ci   :functions:
42