misc_44x.S 743 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * This file contains miscellaneous low-level functions for PPC 44x.
  3. * Copyright 2007 David Gibson <dwg@au1.ibm.com>, IBM Corporation.
  4. *
  5. * This program is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU General Public License
  7. * as published by the Free Software Foundation; either version
  8. * 2 of the License, or (at your option) any later version.
  9. *
  10. */
  11. #include <asm/reg.h>
  12. #include <asm/ppc_asm.h>
  13. .text
  14. /*
  15. * Do an IO access in AS1
  16. */
  17. _GLOBAL(as1_readb)
  18. mfmsr r7
  19. ori r0,r7,MSR_DS
  20. sync
  21. mtmsr r0
  22. sync
  23. isync
  24. lbz r3,0(r3)
  25. sync
  26. mtmsr r7
  27. sync
  28. isync
  29. blr
  30. _GLOBAL(as1_writeb)
  31. mfmsr r7
  32. ori r0,r7,MSR_DS
  33. sync
  34. mtmsr r0
  35. sync
  36. isync
  37. stb r3,0(r4)
  38. sync
  39. mtmsr r7
  40. sync
  41. isync
  42. blr