56f9c76088
Get enough of the mmu working to be able to allocate memory. Unlike on PowerPC, we get both address and size as 64bit values. So adjust of_region to allow this. Also unlike the PPC port, we do not drive the hardware directly, instead we rely on the openboot primitives to manage the translation table. This allows staying independant of the hardware, which is a good idea at least for the bootloader (we can do actual hardware things in the kernel) Change-Id: Ifa57619d3a09b8f707e1f8640d8b4f71bb717e2a Reviewed-on: https://review.haiku-os.org/c/haiku/+/1482 Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
31 lines
596 B
C++
31 lines
596 B
C++
/*
|
|
** Copyright 2019, Adrien Destugues, pulkomandy@pulkomandy.tk
|
|
** Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _KERNEL_ARCH_SPARC_MMU_H
|
|
#define _KERNEL_ARCH_SPARC_MMU_H
|
|
|
|
|
|
#include <SupportDefs.h>
|
|
#include <string.h>
|
|
|
|
#include <arch_cpu.h>
|
|
|
|
|
|
struct TsbEntry {
|
|
public:
|
|
bool IsValid();
|
|
void SetTo(int64_t tag, void* physicalAddress, uint64 mode);
|
|
|
|
public:
|
|
uint64_t fTag;
|
|
uint64_t fData;
|
|
};
|
|
|
|
|
|
extern void sparc_get_instruction_tsb(TsbEntry **_pageTable, size_t *_size);
|
|
extern void sparc_get_data_tsb(TsbEntry **_pageTable, size_t *_size);
|
|
|
|
|
|
#endif /* _KERNEL_ARCH_SPARC_MMU_H */
|