InterruptEntry.cpp 666 B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
  3. * Copyright (c) 2021, Gunnar Beutner <gbeutner@serenityos.org>
  4. *
  5. * SPDX-License-Identifier: BSD-2-Clause
  6. */
  7. #include <Kernel/Arch/x86/DescriptorTable.h>
  8. #include <Kernel/Arch/x86/TrapFrame.h>
  9. // clang-format off
  10. asm(
  11. ".globl interrupt_common_asm_entry\n"
  12. "interrupt_common_asm_entry: \n"
  13. " int3 \n" // FIXME
  14. ".globl common_trap_exit \n"
  15. "common_trap_exit: \n"
  16. // another thread may have handled this trap at this point, so don't
  17. // make assumptions about the stack other than there's a TrapFrame
  18. // and a pointer to it.
  19. " call exit_trap \n"
  20. " int3 \n" // FIXME
  21. );
  22. // clang-format on