xp_nofault.S 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (c) 2004-2005 Silicon Graphics, Inc. All Rights Reserved.
  7. */
  8. /*
  9. * The xp_nofault_PIOR function takes a pointer to a remote PIO register
  10. * and attempts to load and consume a value from it. This function
  11. * will be registered as a nofault code block. In the event that the
  12. * PIO read fails, the MCA handler will force the error to look
  13. * corrected and vector to the xp_error_PIOR which will return an error.
  14. *
  15. * extern int xp_nofault_PIOR(void *remote_register);
  16. */
  17. .global xp_nofault_PIOR
  18. xp_nofault_PIOR:
  19. mov r8=r0 // Stage a success return value
  20. ld8.acq r9=[r32];; // PIO Read the specified register
  21. adds r9=1,r9;; // Add to force consumption
  22. or r9=r9,r9;; // Or to force consumption
  23. br.ret.sptk.many b0;; // Return success
  24. .global xp_error_PIOR
  25. xp_error_PIOR:
  26. mov r8=1 // Return value of 1
  27. br.ret.sptk.many b0;; // Return failure