180708Sjake/*- 280708Sjake * Copyright (c) 2001 Jake Burkholder. 380708Sjake * All rights reserved. 480708Sjake * 580708Sjake * Redistribution and use in source and binary forms, with or without 680708Sjake * modification, are permitted provided that the following conditions 780708Sjake * are met: 880708Sjake * 1. Redistributions of source code must retain the above copyright 980708Sjake * notice, this list of conditions and the following disclaimer. 1080708Sjake * 2. Redistributions in binary form must reproduce the above copyright 1180708Sjake * notice, this list of conditions and the following disclaimer in the 1280708Sjake * documentation and/or other materials provided with the distribution. 1380708Sjake * 1481334Sobrien * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1580708Sjake * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1680708Sjake * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1781334Sobrien * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1880708Sjake * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1980708Sjake * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2080708Sjake * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2180708Sjake * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2280708Sjake * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2380708Sjake * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2480708Sjake * SUCH DAMAGE. 2580708Sjake * 2680708Sjake * $FreeBSD: releng/11.0/sys/sparc64/include/pcb.h 234785 2012-04-29 11:04:31Z dim $ 2780708Sjake */ 2880708Sjake 2980708Sjake#ifndef _MACHINE_PCB_H_ 3080708Sjake#define _MACHINE_PCB_H_ 3180708Sjake 32166105Smarius#ifndef LOCORE 3382005Sjake#include <machine/frame.h> 34166105Smarius#endif 3581135Stmm 3686523Sjake#define MAXWIN 8 3782005Sjake 38112924Sjake#define PCB_FEF (1 << 0) 39112924Sjake 40166105Smarius#ifndef LOCORE 41166105Smarius 42112920Sjake/* NOTE: pcb_ufp must be aligned on a 64 byte boundary. */ 4383053Sobrienstruct pcb { 44113023Sjake struct rwindow pcb_rw[MAXWIN]; 45113023Sjake uint32_t pcb_kfp[64]; 46112920Sjake uint32_t pcb_ufp[64]; 47113023Sjake uint64_t pcb_rwsp[MAXWIN]; 48113023Sjake uint64_t pcb_flags; 49113023Sjake uint64_t pcb_nsaved; 50113023Sjake uint64_t pcb_pc; 51113023Sjake uint64_t pcb_sp; 52199135Skib uint64_t pcb_tpc; 53199135Skib uint64_t pcb_pad[3]; 54105454Stmm} __aligned(64); 5580708Sjake 5680708Sjake#ifdef _KERNEL 57166105Smariusvoid makectx(struct trapframe *tf, struct pcb *pcb); 58234785Sdimint savectx(struct pcb *pcb) __returns_twice; 5980708Sjake#endif 6080708Sjake 61166105Smarius#endif /* !LOCORE */ 62166105Smarius 6380708Sjake#endif /* !_MACHINE_PCB_H_ */ 64