mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
fded332bf4
With the kernel loaded to FastRAM (TT-RAM), none of the ST-RAM address range is mapped by init_mem, and ST-RAM is not accessible through the normal allocation pathways as a result. Implement ST-RAM pool allocation to be based on physical addresses always (it already was when the kernel was loaded in ST-RAM). Return kernel virtual addresses as per normal. The current test for the kernel residing in ST-RAM always returns true. Use the bootinfo memory chunk order instead - with the kernel in FastRAM, ST-RAM (phys. 0x0) is not the first chunk. In case the kernel is running from FastRAM, delay mapping of ST-RAM pool until after mem_init. Provide helper functions for those users of ST-RAM that need to be aware of the backing physical addresses. Kudos to Geert for his hints on getting this started. Signed-off-by: Michael Schmitz <schmitz@debian.org> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
19 lines
489 B
C
19 lines
489 B
C
#ifndef _M68K_ATARI_STRAM_H
|
|
#define _M68K_ATARI_STRAM_H
|
|
|
|
/*
|
|
* Functions for Atari ST-RAM management
|
|
*/
|
|
|
|
/* public interface */
|
|
void *atari_stram_alloc(unsigned long size, const char *owner);
|
|
void atari_stram_free(void *);
|
|
void *atari_stram_to_virt(unsigned long phys);
|
|
unsigned long atari_stram_to_phys(void *);
|
|
|
|
/* functions called internally by other parts of the kernel */
|
|
void atari_stram_init(void);
|
|
void atari_stram_reserve_pages(void *start_mem);
|
|
|
|
#endif /*_M68K_ATARI_STRAM_H */
|