/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1982, 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* the Systems Programming Group of the University of Utah Computer
* Science Department.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* from: Utah $Hdr: frame.h 1.8 92/12/20$
*
* @(#)frame.h 8.1 (Berkeley) 6/10/93
*/
#define FSLW_SIZE 0x00600000
/*
* We better define the FSLW_SIZE values here, as the table given in the
* MC68060UM/AD rev. 0/1 p. 8-23 is wrong, and was corrected in the errata
* document.
*/
#define FSLW_SIZE_LONG 0x00000000
#define FSLW_SIZE_BYTE 0x00200000
#define FSLW_SIZE_WORD 0x00400000
#define FSLW_SIZE_MV16 0x00600000
#if defined(COMPAT_16)
/*
* Stack frame layout when delivering a signal.
*/
struct sigframe_sigcontext {
int sf_ra; /* handler return address */
int sf_signum; /* signal number for handler */
int sf_code; /* additional info for handler */
struct sigcontext *sf_scp; /* context pointer for handler */
struct sigcontext sf_sc; /* actual context */
struct sigstate sf_state; /* state of the hardware */
};
#endif
struct sigframe_siginfo {
int sf_ra; /* return address for handler */
int sf_signum; /* "signum" argument for handler */
siginfo_t *sf_sip; /* "sip" argument for handler */
ucontext_t *sf_ucp; /* "ucp" argument for handler */
siginfo_t sf_si; /* actual saved siginfo */
ucontext_t sf_uc; /* actual saved ucontext */
};
/*
* Utility function to relocate the initial frame, make room to restore an
* exception frame and reenter the syscall.
*/
void reenter_syscall(struct frame *, int) __attribute__((__noreturn__));
/*
* Create an FPU "idle" frame for use by cpu_setmcontext()
*/
extern void m68k_make_fpu_idle_frame(void);
extern struct fpframe m68k_cached_fpu_idle_frame;
#ifdef M68040
int m68040_writeback(struct frame *, int);
#endif
#if defined(__mc68010__)
/*
* Restartable atomic sequence-cased compare-and-swap for atomic_cas ops
* and locking primitives. We defined this here because it manipulates a
* "clockframe" as prepared by interrupt handlers.
*/
extern char _atomic_cas_ras_start;
extern char _atomic_cas_ras_end;