History log of /haiku/headers/private/kernel/arch/x86/arch_int.h
Revision Date Author Comments
# 02463fb4 05-Mar-2024 X512 <danger_mail@list.ru>

kernel/int: consolidate interrupt vector number to `int32`

This is no-op for 32 bit platforms because `int32` is defined as `long` there.

Change interrupt vector number from 64 bits to 32 bits for 64 bit platforms.

Change-Id: I52d1ad616cab16488804e9733c7afaf772a670ba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7507
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>


# 1c1efa6f 07-Jan-2019 Augustin Cavalier <waddlesplash@gmail.com>

kernel/x86: Use volatile in restore_interrupts.

We already use it in enable_interrupts, so we might as well
use it here too.


# 66395144 19-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

x86[_64]: Support assigning MSI IRQs to arbitrary CPU


# d897a478 17-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Allow reassigning IRQs to logical processors


# 4e8fbfb2 03-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

x86_{read,write}_cr{0,4} can just be implemented as macros, put an x86_ prefix on the other read/write macros for consistency.


# 0897e314 02-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Merged x86_64 headers into x86 headers.

Not many changes seeing as there's not much x86_64 stuff done yet. Small
differences are handled with ifdefs, large differences (descriptors.h,
struct iframe) have separate headers under arch/x86/32 and arch/x86/64.


# 20537052 10-May-2011 Michael Lotz <mmlr@mlotz.ch>

Quick build fix for the FreeBSD compatibility layer. Maybe the definition should
be moved to a (even) more private header?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41427 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dc14d97b 10-May-2011 Michael Lotz <mmlr@mlotz.ch>

* Move the legacy PIC and the IO-APIC code into their own source file. No
functional change intended.
* Use an appropriately sized sLevelTriggeredInterrupts for each controller type.
This also fixes an out of bound access for IO-APICs with more than 32 entries
and also returns the right mode in such cases.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41426 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c2629ccc 01-Feb-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by "Grey": Small optimization of arch_int_disable_interrupts_inline()
and arch_int_restore_interrupts_inline().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35377 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 01ce3f26 08-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleanup, no functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33951 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7515c32c 28-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Not sure, if this was only a gcc 4.3.3 bug or if I misunderstand something, but
gcc could apparently assume that the register assigned to the one in the
clobber list would keep its value (as can be observed when disassembling
add_debugger_command_etc()).
Using a dummy output register works around the problem and also avoids the
unnecessary initialization of the register.

Comments explaining the mystery welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30909 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 567f7889 01-Oct-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Fully inline {disable,restore}_interrupts() and friends when including
<int.h>. Performance-wise not really significant, but gives nicer
profiling results.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27827 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b20667b3 26-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

{install|remove}_io_interrupt_handler() now correctly handle the B_NO_ENABLE_COUNTER flag.
Lots of cleanup:
- moved B_NO_ENABLE_COUNTER flag definition out of int.h to KernelExport.h, as it's
described in the BeBook (although it's probably not really used that often :))
- int.c no longer has any platform dependent code (+ 0x20 on interrupt numbers is gone);
it's now entirely handled in the arch/x86/ section.
- the io_vectors[] is now statically initialized, instead of allocated from the heap
- removed {install|remove}_interrupt_handler(); they weren't that useful, arch_smp_init()
is now calling install_io_interrupt_handler() correctly instead
- introduced a new arch_int.h header file that currently contains NUM_IO_VECTORS only
(though on x86, it also has ARCH_INTERRUPT_BASE == 0x20).
- changed the return type from {install|remove}_io_interrupt_handler() from "long" to
"status_t"
- rearranged and cleaned the PIC initialization code, made the PIC code more prominent
- changed comments that talk about a non existing 8239 (the PIC chip is actually 8259)
- moved arch/x86/interrupts.h to the source directory, as it's not used outside
- added BeOS compatible interrupts_enabled() function, that should replace our
equivalent (and private) are_interrupts_enabled()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12477 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 663951443784bb63d60abe742f1d1379fb153e18 19-Dec-2013 Pawel Dziepak <pdziepak@quarnos.org>

x86[_64]: Support assigning MSI IRQs to arbitrary CPU


# d897a478d7c01054aad29b23f7f545073c797530 17-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: Allow reassigning IRQs to logical processors


# 4e8fbfb2d158de7b1cadd1c060acee51a7d67309 03-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

x86_{read,write}_cr{0,4} can just be implemented as macros, put an x86_ prefix on the other read/write macros for consistency.


# 0897e314b79d09b04349d3cfe6093a3fd6220da1 02-Jul-2012 Alex Smith <alex@alex-smith.me.uk>

Merged x86_64 headers into x86 headers.

Not many changes seeing as there's not much x86_64 stuff done yet. Small
differences are handled with ifdefs, large differences (descriptors.h,
struct iframe) have separate headers under arch/x86/32 and arch/x86/64.


# 20537052a2126f2310e4a3eca7bf6ff828f52640 10-May-2011 Michael Lotz <mmlr@mlotz.ch>

Quick build fix for the FreeBSD compatibility layer. Maybe the definition should
be moved to a (even) more private header?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41427 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dc14d97b7f70aa318483d53e007913b26a12f5d0 10-May-2011 Michael Lotz <mmlr@mlotz.ch>

* Move the legacy PIC and the IO-APIC code into their own source file. No
functional change intended.
* Use an appropriately sized sLevelTriggeredInterrupts for each controller type.
This also fixes an out of bound access for IO-APICs with more than 32 entries
and also returns the right mode in such cases.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41426 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c2629ccc6a4bbbaed9d11500a08e2a10676e5521 01-Feb-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Patch by "Grey": Small optimization of arch_int_disable_interrupts_inline()
and arch_int_restore_interrupts_inline().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35377 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 01ce3f26d2c9eecd02ee03f8e8abc1b297f820cd 08-Nov-2009 Axel Dörfler <axeld@pinc-software.de>

* Cleanup, no functional change.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33951 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7515c32c1f005b65b55eb5b6e8d46968829eb563 28-May-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

Not sure, if this was only a gcc 4.3.3 bug or if I misunderstand something, but
gcc could apparently assume that the register assigned to the one in the
clobber list would keep its value (as can be observed when disassembling
add_debugger_command_etc()).
Using a dummy output register works around the problem and also avoids the
unnecessary initialization of the register.

Comments explaining the mystery welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30909 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 567f78895b7878437f43d68fa3091b7bae47fa36 01-Oct-2008 Ingo Weinhold <ingo_weinhold@gmx.de>

Fully inline {disable,restore}_interrupts() and friends when including
<int.h>. Performance-wise not really significant, but gives nicer
profiling results.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27827 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b20667b35b3effbc937914eba73761f43cc7520d 26-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

{install|remove}_io_interrupt_handler() now correctly handle the B_NO_ENABLE_COUNTER flag.
Lots of cleanup:
- moved B_NO_ENABLE_COUNTER flag definition out of int.h to KernelExport.h, as it's
described in the BeBook (although it's probably not really used that often :))
- int.c no longer has any platform dependent code (+ 0x20 on interrupt numbers is gone);
it's now entirely handled in the arch/x86/ section.
- the io_vectors[] is now statically initialized, instead of allocated from the heap
- removed {install|remove}_interrupt_handler(); they weren't that useful, arch_smp_init()
is now calling install_io_interrupt_handler() correctly instead
- introduced a new arch_int.h header file that currently contains NUM_IO_VECTORS only
(though on x86, it also has ARCH_INTERRUPT_BASE == 0x20).
- changed the return type from {install|remove}_io_interrupt_handler() from "long" to
"status_t"
- rearranged and cleaned the PIC initialization code, made the PIC code more prominent
- changed comments that talk about a non existing 8239 (the PIC chip is actually 8259)
- moved arch/x86/interrupts.h to the source directory, as it's not used outside
- added BeOS compatible interrupts_enabled() function, that should replace our
equivalent (and private) are_interrupts_enabled()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12477 a95241bf-73f2-0310-859d-f6bbb57e9c96