mirror of https://github.com/Qortal/Brooklyn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
533 B
42 lines
533 B
3 years ago
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||
|
/*
|
||
|
* This file contains miscellaneous low-level functions for PPC 44x.
|
||
|
* Copyright 2007 David Gibson <dwg@au1.ibm.com>, IBM Corporation.
|
||
|
*/
|
||
|
|
||
|
#include <asm/reg.h>
|
||
|
#include <asm/ppc_asm.h>
|
||
|
|
||
|
.text
|
||
|
|
||
|
/*
|
||
|
* Do an IO access in AS1
|
||
|
*/
|
||
|
_GLOBAL(as1_readb)
|
||
|
mfmsr r7
|
||
|
ori r0,r7,MSR_DS
|
||
|
sync
|
||
|
mtmsr r0
|
||
|
sync
|
||
|
isync
|
||
|
lbz r3,0(r3)
|
||
|
sync
|
||
|
mtmsr r7
|
||
|
sync
|
||
|
isync
|
||
|
blr
|
||
|
|
||
|
_GLOBAL(as1_writeb)
|
||
|
mfmsr r7
|
||
|
ori r0,r7,MSR_DS
|
||
|
sync
|
||
|
mtmsr r0
|
||
|
sync
|
||
|
isync
|
||
|
stb r3,0(r4)
|
||
|
sync
|
||
|
mtmsr r7
|
||
|
sync
|
||
|
isync
|
||
|
blr
|