aboutsummaryrefslogtreecommitdiffstats
path: root/roms/openbios/include/arch/sparc64/ofmem_sparc64.h
diff options
context:
space:
mode:
authorAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-10 14:33:42 +0000
commitaf1a266670d040d2f4083ff309d732d648afba2a (patch)
tree2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/openbios/include/arch/sparc64/ofmem_sparc64.h
parente02cda008591317b1625707ff8e115a4841aa889 (diff)
Add submodule dependency filesHEADmaster
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/openbios/include/arch/sparc64/ofmem_sparc64.h')
-rw-r--r--roms/openbios/include/arch/sparc64/ofmem_sparc64.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/roms/openbios/include/arch/sparc64/ofmem_sparc64.h b/roms/openbios/include/arch/sparc64/ofmem_sparc64.h
new file mode 100644
index 000000000..19f274717
--- /dev/null
+++ b/roms/openbios/include/arch/sparc64/ofmem_sparc64.h
@@ -0,0 +1,52 @@
+/*
+ * <ofmem_sparc64.h>
+ *
+ * OF Memory manager
+ *
+ * Copyright (C) 1999, 2002 Samuel Rydh (samuel@ibrium.se)
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation
+ *
+ */
+
+#ifndef _H_OFMEM_SPARC64
+#define _H_OFMEM_SPARC64
+
+#include "libopenbios/ofmem.h"
+
+#define OFMEM_VIRT_TOP 0xff000000
+
+#define PAGE_SIZE_4M (4 * 1024 * 1024)
+#define PAGE_SIZE_512K (512 * 1024)
+#define PAGE_SIZE_64K (64 * 1024)
+#define PAGE_SIZE_8K (8 * 1024)
+#define PAGE_MASK_4M (4 * 1024 * 1024 - 1)
+#define PAGE_MASK_512K (512 * 1024 - 1)
+#define PAGE_MASK_64K (64 * 1024 - 1)
+#define PAGE_MASK_8K (8 * 1024 - 1)
+
+extern ucell *va2ttedata;
+extern unsigned long find_tte(unsigned long va);
+
+void itlb_load2(unsigned long vaddr, unsigned long tte_data);
+void itlb_load3(unsigned long vaddr, unsigned long tte_data, unsigned long tte_index);
+unsigned long itlb_faultva(void);
+void itlb_demap(unsigned long vaddr);
+void dtlb_load2(unsigned long vaddr, unsigned long tte_data);
+void dtlb_load3(unsigned long vaddr, unsigned long tte_data, unsigned long tte_index);
+unsigned long dtlb_faultva(void);
+void dtlb_demap(unsigned long vaddr);
+
+typedef int (*translation_entry_cb)(ucell phys, ucell virt, ucell size, ucell mode);
+
+extern void ofmem_walk_boot_map(translation_entry_cb cb);
+
+extern translation_t **g_ofmem_translations;
+
+extern void dtlb_miss_handler(void);
+extern void itlb_miss_handler(void);
+extern void bug(void);
+
+#endif /* _H_OFMEM_SPARC64 */