summaryrefslogtreecommitdiffstats
path: root/private/ntos/nthals/halfire/ppc/pxflshbf.s
blob: c4cdad4fd0036bf4503d6380de7ab584a9773fdc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#if defined(_PPC_)

//      TITLE("Miscellaneous Kernel Functions")
//++
//
// Copyright (c) 1991  Microsoft Corporation
//
// Copyright (c) 1994 MOTOROLA, INC.  All Rights Reserved.  This file
// contains copyrighted material.  Use of this file is restricted
// by the provisions of a Motorola Software License Agreement.
//
// Module Name:
//
//    pxflshbf.s
//
// Abstract:
//
//    This module implements the system dependent kernel function to flush
//    the write buffer or otherwise synchronize writes on a Power PC
//    system.
//
//
//
// Author:
//
//    David N. Cutler (davec) 24-Apr-1991
//
// Environment:
//
//    Kernel mode only.
//
// Revision History:
//
//    Jim Wooldridge (jimw@austin.vnet.ibm.com) Initial PowerPC port
//
//              Used PowerPC eieio instruction to flush writes
//
//--

/*
 * Copyright (c) 1995 FirePower Systems, Inc.
 * DO NOT DISTRIBUTE without permission
 *
 * $RCSfile: pxflshbf.s $
 * $Revision: 1.7 $
 * $Date: 1996/05/14 02:34:14 $
 * $Locker:  $
 */

#include "kxppc.h"

//        SBTTL("Flush Write Buffer")
//
//++
//
// NTSTATUS
// KeFlushWriteBuffer (
//    VOID
//    )
//
// Routine Description:
//
//    This function flushes the write buffer on the current processor.
//
// Arguments:
//
//    None.
//
// Return Value:
//
//    None.
//
//--

      LEAF_ENTRY(KeFlushWriteBuffer)

		eieio


      LEAF_EXIT(KeFlushWriteBuffer)



//
//++
//
// NTSTATUS
// HalpSynchronizeExecution()
//    VOID
//    )
//
// Routine Description:
//
//    This function flushes the write buffer on the current processor.
//
// Arguments:
//
//    None.
//
// Return Value:
//
//    None.
//
//--

      LEAF_ENTRY(HalpSynchronizeExecution)

      sync                                  // synchronize

      LEAF_EXIT(HalpSynchronizeExecution)


//
//++
//
// NTSTATUS
// HalpGetProcessorVersion()
//    VOID
//    )
//
// Routine Description:
//
//    This function gets the processor version of the current processor.
//
// Arguments:
//
//    None.
//
// Return Value:
//
//    None.
//
//--

      LEAF_ENTRY(HalpGetProcessorVersion)

      mfpvr   r.3                     // get processor version

      LEAF_EXIT(HalpGetProcessorVersion)

//
//++
//
// VOID
// SetSDR1(
//    ULONG HashedPageTableBase,
//    ULONG HashedPageTableSize
// )
//

	LEAF_ENTRY(SetSDR1)

	subi	r.4,r.4,1
	rlwimi	r.3,r.4,16,0x1ff
	mtsdr1 r.3

	LEAF_EXIT(SetSDR1)

#endif