amd64: explain in more details why the slop is needed
Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
@@ -261,7 +261,10 @@ Invalid syntax and the like are silently ignored.
|
|||||||
.Ss Staging Slop
|
.Ss Staging Slop
|
||||||
The kernel must parse the firmware memory map tables to know what memory
|
The kernel must parse the firmware memory map tables to know what memory
|
||||||
it can use.
|
it can use.
|
||||||
|
It also needs to allocate memory for the kernel page tables.
|
||||||
Since it must allocate memory to do this,
|
Since it must allocate memory to do this,
|
||||||
|
without overwriting important structures,
|
||||||
|
for instance the trampoline page table,
|
||||||
.Nm
|
.Nm
|
||||||
ensures there's extra memory available, called
|
ensures there's extra memory available, called
|
||||||
.Dq slop ,
|
.Dq slop ,
|
||||||
|
|||||||
@@ -1273,6 +1273,13 @@ amd64_bsp_ist_init(struct pcpu *pc)
|
|||||||
* - there is a usable memory block right after the end of the
|
* - there is a usable memory block right after the end of the
|
||||||
* mapped kernel and all modules/metadata, pointed to by
|
* mapped kernel and all modules/metadata, pointed to by
|
||||||
* physfree, for early allocations
|
* physfree, for early allocations
|
||||||
|
*
|
||||||
|
* The memory block after the end of the kernel is important, loader
|
||||||
|
* must ensure that no critical data structures are put there. Among
|
||||||
|
* them is the trampoline page table, which must not be overwritten by
|
||||||
|
* the allocations until pmap_bootstrap() switches %cr3 to the initial
|
||||||
|
* version of the kernel page table. Size of the block is controlled
|
||||||
|
* by the 'staging_slop' command for loader.efi.
|
||||||
*/
|
*/
|
||||||
vm_paddr_t __nosanitizeaddress __nosanitizememory
|
vm_paddr_t __nosanitizeaddress __nosanitizememory
|
||||||
amd64_loadaddr(void)
|
amd64_loadaddr(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user