summaryrefslogtreecommitdiffstats
path: root/private/ntos/fw/mips/ioaccess.s
blob: 4dae043be67f20101750e5dbc32504863ecf647d (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
/*++

Copyright (c) 1991  Microsoft Corporation

Module Name:

    ioaccess.s

Abstract:

    This module contains routines to read and write to mapped addresses.
    These are workarrounds for the R4000 bugs.

Author:

    Lluis Abello (lluis) 15-May-91

Environment:

    ROM Selftest.

Notes:

--*/
#include "ksmips.h"
    .text
    .set noreorder
    .set noat
#ifdef R4000
LEAF_ENTRY(NtFlushByteBuffer)
	nop
	nop
	sb	a1,0(a0)
	nop
	nop
	j	ra
	nop
    .end
LEAF_ENTRY(NtFlushShortBuffer)
	nop
	nop
	sh	a1,0(a0)
	nop
	nop
	j	ra
	nop
    .end
LEAF_ENTRY(NtFlushLongBuffer)
	nop
	nop
	sw	a1,0(a0)
	nop
	nop
	j	ra
	nop
    .end

LEAF_ENTRY(NtReadByte)
	lbu	v0,0(a0)
	nop
	nop
	j	ra
	nop
    .end
LEAF_ENTRY(NtReadShort)
	lhu	v0,0(a0)
	nop
	nop
	j	ra
	nop
    .end
LEAF_ENTRY(NtReadLong)
	lw	v0,0(a0)
	nop
	nop
	j	ra
	nop
    .end
#endif
#ifdef R3000

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

	LEAF_ENTRY(FlushWriteBuffer)

        .set    noreorder
        .set    noat
        nop                             // four nop's are required
        nop                             //
        nop                             //
        nop                             //
10:                                     //
	bc0f	10b			// if false, write buffer not empty
	nop
        j       ra                      // return

	.end	FlushWritebuffer
#endif