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