mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Clean up Sparc32 memory management
Concentrate memory and MMU management (lib.c malloc, romvec opb_, iommu, OF /memory) to lib.c. git-svn-id: svn://coreboot.org/openbios/openbios-devel@344 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -37,6 +37,20 @@ void dsi_exception( void );
|
||||
void isi_exception( void );
|
||||
void setup_mmu( ulong ramsize );
|
||||
void ofmem_register( phandle_t ph );
|
||||
#elif defined(CONFIG_SPARC32)
|
||||
#define PAGE_SHIFT 12
|
||||
#define PAGE_SIZE (1 << PAGE_SHIFT)
|
||||
#define PAGE_MASK (~(PAGE_SIZE - 1))
|
||||
#define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK)
|
||||
|
||||
/* arch/sparc32/lib.c */
|
||||
struct mem;
|
||||
extern struct mem cdvmem;
|
||||
|
||||
void mem_init(struct mem *t, char *begin, char *limit);
|
||||
void *mem_alloc(struct mem *t, int size, int align);
|
||||
int map_page(unsigned long va, uint64_t epa, int type);
|
||||
void *map_io(uint64_t pa, int size);
|
||||
#endif
|
||||
|
||||
#endif /* _H_OFMEM */
|
||||
|
||||
Reference in New Issue
Block a user