mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
When we're loading metadata, we need to align it in a certain way. Right now that way is hard-coded to be PAGE_SIZE. Rather than do the actual physical thing in all these places, move this into a wrapper routine. We may want to load a 16k kernel and align all these on 16k or a 4k kernel and align on 4k on aarch64 (today you have to compile the loader with the right page size). This will also reduce the number of places we might have to touch to do that. Sponsored by: Netflix Reviewed by: tsoome, jhibbits Differential Revision: https://reviews.freebsd.org/D50585
22 lines
583 B
C
22 lines
583 B
C
/*-
|
|
* Copyright (c) 2022, Netflix, Inc.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
#ifndef COMMON_MODINFO_H
|
|
#define COMMON_MODINFO_H
|
|
|
|
extern const char md_modtype[];
|
|
extern const char md_kerntype[];
|
|
extern const char md_modtype_obj[];
|
|
extern const char md_kerntype_mb[];
|
|
|
|
int md_load(char *args, vm_offset_t *modulep, vm_offset_t *dtb);
|
|
int md_load64(char *args, vm_offset_t *modulep, vm_offset_t *dtb);
|
|
|
|
vm_offset_t md_copymodules(vm_offset_t addr, bool kern64);
|
|
vm_offset_t md_copyenv(vm_offset_t addr);
|
|
vm_offset_t md_align(vm_offset_t addr);
|
|
|
|
#endif /* COMMON_MODINFO_H */
|