fpswa.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. #ifndef _ASM_IA64_FPSWA_H
  2. #define _ASM_IA64_FPSWA_H
  3. /*
  4. * Floating-point Software Assist
  5. *
  6. * Copyright (C) 1999 Intel Corporation.
  7. * Copyright (C) 1999 Asit Mallick <asit.k.mallick@intel.com>
  8. * Copyright (C) 1999 Goutham Rao <goutham.rao@intel.com>
  9. */
  10. typedef struct {
  11. /* 4 * 128 bits */
  12. unsigned long fp_lp[4*2];
  13. } fp_state_low_preserved_t;
  14. typedef struct {
  15. /* 10 * 128 bits */
  16. unsigned long fp_lv[10 * 2];
  17. } fp_state_low_volatile_t;
  18. typedef struct {
  19. /* 16 * 128 bits */
  20. unsigned long fp_hp[16 * 2];
  21. } fp_state_high_preserved_t;
  22. typedef struct {
  23. /* 96 * 128 bits */
  24. unsigned long fp_hv[96 * 2];
  25. } fp_state_high_volatile_t;
  26. /**
  27. * floating point state to be passed to the FP emulation library by
  28. * the trap/fault handler
  29. */
  30. typedef struct {
  31. unsigned long bitmask_low64;
  32. unsigned long bitmask_high64;
  33. fp_state_low_preserved_t *fp_state_low_preserved;
  34. fp_state_low_volatile_t *fp_state_low_volatile;
  35. fp_state_high_preserved_t *fp_state_high_preserved;
  36. fp_state_high_volatile_t *fp_state_high_volatile;
  37. } fp_state_t;
  38. typedef struct {
  39. unsigned long status;
  40. unsigned long err0;
  41. unsigned long err1;
  42. unsigned long err2;
  43. } fpswa_ret_t;
  44. /**
  45. * function header for the Floating Point software assist
  46. * library. This function is invoked by the Floating point software
  47. * assist trap/fault handler.
  48. */
  49. typedef fpswa_ret_t (*efi_fpswa_t) (unsigned long trap_type, void *bundle, unsigned long *ipsr,
  50. unsigned long *fsr, unsigned long *isr, unsigned long *preds,
  51. unsigned long *ifs, fp_state_t *fp_state);
  52. /**
  53. * This is the FPSWA library interface as defined by EFI. We need to pass a
  54. * pointer to the interface itself on a call to the assist library
  55. */
  56. typedef struct {
  57. unsigned int revision;
  58. unsigned int reserved;
  59. efi_fpswa_t fpswa;
  60. } fpswa_interface_t;
  61. extern fpswa_interface_t *fpswa_interface;
  62. #endif /* _ASM_IA64_FPSWA_H */