1*83d04d3aSchristos /* $NetBSD: frame.h,v 1.2 2016/01/29 21:45:00 christos Exp $ */ 227620987Smatt 327620987Smatt /*- 427620987Smatt * Copyright (c) 2014 The NetBSD Foundation, Inc. 527620987Smatt * All rights reserved. 627620987Smatt * 727620987Smatt * This code is derived from software contributed to The NetBSD Foundation 827620987Smatt * by Matt Thomas of 3am Software Foundry. 927620987Smatt * 1027620987Smatt * Redistribution and use in source and binary forms, with or without 1127620987Smatt * modification, are permitted provided that the following conditions 1227620987Smatt * are met: 1327620987Smatt * 1. Redistributions of source code must retain the above copyright 1427620987Smatt * notice, this list of conditions and the following disclaimer. 1527620987Smatt * 2. Redistributions in binary form must reproduce the above copyright 1627620987Smatt * notice, this list of conditions and the following disclaimer in the 1727620987Smatt * documentation and/or other materials provided with the distribution. 1827620987Smatt * 1927620987Smatt * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 2027620987Smatt * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 2127620987Smatt * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 2227620987Smatt * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 2327620987Smatt * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 2427620987Smatt * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 2527620987Smatt * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 2627620987Smatt * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 2727620987Smatt * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 2827620987Smatt * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 2927620987Smatt * POSSIBILITY OF SUCH DAMAGE. 3027620987Smatt */ 3127620987Smatt 3227620987Smatt #ifndef _OR1K_FRAME_H_ 3327620987Smatt #define _OR1K_FRAME_H_ 3427620987Smatt 3527620987Smatt #include <or1k/reg.h> 3627620987Smatt 3727620987Smatt struct trapframe { 3827620987Smatt struct reg tf_regs __aligned(8); 39*83d04d3aSchristos __register_t tf_ear; // 64-bit register 40*83d04d3aSchristos __register_t tf_sr; 4127620987Smatt struct trapframe *tf_chain; 42*83d04d3aSchristos __register_t tf_pc; 4327620987Smatt #define tf_reg tf_regs.r_reg 4427620987Smatt #define tf_rvh tf_regs.r_reg[12] 4527620987Smatt #define tf_rv tf_regs.r_reg[11] 4627620987Smatt #define tf_lr tf_regs.r_reg[9] 4727620987Smatt #define tf_sp tf_regs.r_sp 4827620987Smatt }; 4927620987Smatt 5027620987Smatt #endif /* _OR1K_FRAME_H_ */ 51