/* Copyright (C) 2021,2022 fef . All rights reserved. */ #pragma once #ifndef _ARCH_INTERRUPT_H_ #error "This file is not meant to be included directly, use " #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;