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.
42 lines
1.3 KiB
C
42 lines
1.3 KiB
C
/* See the end of this file for copyright and license terms. */
|
|
|
|
#pragma once
|
|
|
|
#ifndef _ARCH_INTERRUPT_H_
|
|
#error "This file is not meant to be included directly, use <arch/interrupt.h>"
|
|
#endif
|
|
|
|
/**
|
|
* @brief A hardware stack frame on i386.
|
|
* I have no idea whether x86 people are actually calling it hardware stack
|
|
* frame tbh, this is just the (ARM) terminology i'm used to. Either way,
|
|
* this is what gets pushed to the stack automatically when entering an ISR.
|
|
*/
|
|
struct i386_hw_frame {
|
|
u32 eip;
|
|
u16 cs; u16 _pad0;
|
|
u32 eflags;
|
|
|
|
/*
|
|
* On i386, these two are only pushed when entering from another
|
|
* (i.e. lower) privilege level (???). This effectively means they don't
|
|
* exist unless the CS above is equal to X86_32_USER_CS (arch/segment.h).
|
|
*/
|
|
u32 user_esp;
|
|
u16 user_ss; u16 _pad1;
|
|
} __packed;
|
|
|
|
/*
|
|
* 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.
|
|
*/
|