mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
arm: Clean up socdev_va
Support socdev_va on arm and ensure the variable is available on arm64. Reviewed by: imp Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D43359
This commit is contained in:
parent
90405e1d63
commit
639a626b40
|
@ -134,6 +134,14 @@ static delay_func *delay_impl;
|
|||
static void *delay_arg;
|
||||
#endif
|
||||
|
||||
#if defined(SOCDEV_PA)
|
||||
#if !defined(SOCDEV_VA)
|
||||
#error SOCDEV_PA defined, but not SOCDEV_VA
|
||||
#endif
|
||||
uintptr_t socdev_va = SOCDEV_VA;
|
||||
#endif
|
||||
|
||||
|
||||
struct kva_md_info kmi;
|
||||
/*
|
||||
* arm32_vector_init:
|
||||
|
|
|
@ -51,6 +51,13 @@ void arm_add_efi_map_entries(struct efi_map_header *efihdr,
|
|||
struct mem_region *mr, int *mrcnt);
|
||||
#endif
|
||||
|
||||
#ifdef SOCDEV_PA
|
||||
/*
|
||||
* The virtual address SOCDEV_PA is mapped at.
|
||||
*/
|
||||
extern uintptr_t socdev_va;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Symbols created by ldscript.arm which are accessible in the kernel as global
|
||||
* symbols. They have uint8 type because they mark the byte location where the
|
||||
|
|
|
@ -138,6 +138,15 @@ struct kva_md_info kmi;
|
|||
int64_t dczva_line_size; /* The size of cache line the dc zva zeroes */
|
||||
int has_pan;
|
||||
|
||||
#if defined(SOCDEV_PA)
|
||||
/*
|
||||
* This is the virtual address used to access SOCDEV_PA. As it's set before
|
||||
* .bss is cleared we need to ensure it's preserved. To do this use
|
||||
* __read_mostly as it's only ever set once but read in the putc functions.
|
||||
*/
|
||||
uintptr_t socdev_va __read_mostly;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Physical address of the EFI System Table. Stashed from the metadata hints
|
||||
* passed into the kernel and used by the EFI code to call runtime services.
|
||||
|
|
Loading…
Reference in a new issue