fpswa.h 1.9 KB

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