You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.1 KiB
C

/* See the end of this file for copyright and license terms. */
#pragma once
#ifndef _ARCH_TRAP_H_
#error "This file is not meant to be included directly, use <arch/page.h>"
#endif
/**
* @brief Complete context save on the amd64.
*/
struct amd64_trap_frame {
/* this doesn't need to be a pointer because unlike on
* i386, the hardware frame always has the same size */
struct amd64_hw_frame hw_frame;
u64 rsi;
u64 rdi;
u64 rax;
u64 rbx;
u64 rcx;
u64 rdx;
u64 rbp;
u64 r8;
u64 r9;
u64 r10;
u64 r11;
u64 r12;
u64 r13;
u64 r14;
u64 r15;
} __packed;
typedef struct amd64_trap_frame trap_frame_t;
/*
* This file is part of GayBSD.
* Copyright (c) 2021 fef <owo@fef.moe>.
*
* GayBSD is nonviolent software: you may only use, redistribute, and/or
* modify it under the terms of the Cooperative Nonviolent Public License
* (CNPL) as found in the LICENSE file in the source code root directory
* or at <https://git.pixie.town/thufie/npl-builder>; either version 7
* of the license, or (at your option) any later version.
*
* GayBSD comes with ABSOLUTELY NO WARRANTY, to the extent
* permitted by applicable law. See the CNPL for details.
*/