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.
28 lines
824 B
C
28 lines
824 B
C
/* Copyright (C) 2021,2022 fef <owo@fef.moe>. All rights reserved. */
|
|
|
|
#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;
|