source: mainline/kernel/arch/sparc64/src/trap/sun4v/mmu.S@ 8624d1f

Last change on this file since 8624d1f was cb7be8f, checked in by Jiří Zárevúcky <zarevucky.jiri@…>, 4 years ago

Update headers in .S files that incorrectly use #-style comments

  • Property mode set to 100644
File size: 1.2 KB
Line 
1/*
2 * SPDX-FileCopyrightText: 2006 Jakub Jermar
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7/**
8 * @file
9 * @brief MMU trap handlers that do not fit into the trap table.
10 */
11
12.register %g2, #scratch
13.register %g3, #scratch
14
15.text
16
17#include <abi/asmtool.h>
18#include <arch/trap/sun4v/mmu.h>
19#include <arch/trap/trap_table.h>
20#include <arch/sun4v/regdef.h>
21
22/*
23 * Install mapping for the kernel. The mapping obeys this formula:
24 * virtual address = real address + start of physical memory
25 *
26 * The routine expects the following values of registers:
27 * %g1 virtual address that has caused the miss
28 */
29SYMBOL(install_identity_mapping)
30 /* output registers mustn't be clobbered during the hypercall, SAVE is too risky */
31 mov %o0, %g3
32 mov %o1, %g4
33 mov %o2, %g5
34 mov %o3, %g6
35
36 /* install mapping for kernel */
37 mov %g1, %o0
38 set 0, %o1 ! set context
39 setx kernel_8k_tlb_data_template, %g1, %g2 ! g2 <= template of TTE Data
40 ldx [%g2], %g2 ! read the TTE Data template
41 add %g2, %o0, %o2 ! template + VA = TTE Data entry
42 set MMU_FLAG_DTLB, %o3 ! map in DTLB only
43 ta MMU_MAP_ADDR
44
45 /* restore output registers */
46 mov %g6, %o3
47 mov %g5, %o2
48 mov %g4, %o1
49 mov %g3, %o0
50
51 retry
Note: See TracBrowser for help on using the repository browser.