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.

33 lines
623 B
C

/* Copyright (C) 2021,2022 fef <owo@fef.moe>. All rights reserved. */
#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 {
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;
u64 rdi;
u64 rsi;
/* 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;
} __packed;
typedef struct amd64_trap_frame trap_frame_t;