-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: add interrupt implementation details #304
Conversation
doc/kernel/other/interrupts.rst
Outdated
The priority level of any interrupt is not encoded in these tables, instead | ||
:c:macro:`IRQ_CONNECT` also has a runtime component which programs the | ||
desired priority level of the interrupt to the interrupt controller. Some | ||
arches do not support the notion of interrupt priority, in which case the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
architectures
doc/kernel/other/interrupts.rst
Outdated
|
||
Vector Table | ||
------------ | ||
Whether to generate this depends on whether CONFIG_GEN_IRQ_VECTOR_TABLE is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whether to generate the vector table ...
doc/kernel/other/interrupts.rst
Outdated
x86 Details | ||
----------- | ||
|
||
x86 has a special type of vector table called the Interrupt Descriptor Table |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The X86 architecture has a special ....
doc/kernel/other/interrupts.rst
Outdated
|
||
Interrupt tables are set up at build time using some special build tools. | ||
The details laid out here apply to all architectures except x86, which will | ||
be covered in its own section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about:
which are covered in the `x86 Details`_ section below.
doc/kernel/other/interrupts.rst
Outdated
struct _isr_list isrs[]; <- of size num_isrs | ||
}; | ||
|
||
This is then used by the gen_isr_tables.py script to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Say what "this" is. Are you referring to zephyr_prebuild.elf?
doc/kernel/other/interrupts.rst
Outdated
}; | ||
|
||
This is then used by the gen_isr_tables.py script to | ||
generate a vector table and/or a software ISR table. This is produced as a C |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generate a C file defining a vector table and software ISR table that are then compiled and linked into the final application.
doc/kernel/other/interrupts.rst
Outdated
|
||
Vector Table | ||
------------ | ||
Whether to generate this depends on whether CONFIG_GEN_IRQ_VECTOR_TABLE is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about:
A vector table is generated when CONFIG_GEN_IRQ_VECTOR_TABLE is enabled.
doc/kernel/other/interrupts.rst
Outdated
Vector Table | ||
------------ | ||
Whether to generate this depends on whether CONFIG_GEN_IRQ_VECTOR_TABLE is | ||
enabled. This is simply an array of function pointers, where each element |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A vector table is simply an array of function pointers, where each element n corresponds to the IRQ handler for IRQ line n, and the function pointers are:
doc/kernel/other/interrupts.rst
Outdated
#. For interrupt lines that are not configured at all, the address of the | ||
spurious IRQ handler, which causes a system fatal error if encountered. | ||
|
||
Some architectures (like Nios II internal interrupt controller) have a common |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/like/such as/
doc/kernel/other/interrupts.rst
Outdated
|
||
Some architectures (like Nios II internal interrupt controller) have a common | ||
entry point for all interrupts and do not support a vector table, in which case | ||
this option should be disabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the CONFIG_GEN_IRQ_VECTOR_TABLE option should be disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some clarification changes
doc/kernel/other/interrupts.rst
Outdated
====================== | ||
|
||
Interrupt tables are set up at build time using some special build tools. The | ||
details laid out here apply to all architectures except x86, which which are |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete the extra "which"
doc/kernel/other/interrupts.rst
Outdated
kernel interrupt bookkeeping and looks up the ISR and parameter from the | ||
software ISR table. | ||
#. For interrupt lines that are not configured at all, the address of the | ||
spurious IRQ handler, which causes a system fatal error if encountered. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after "which causes a system fatal error if encoungered" add ", will be placed here."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few (final) suggestions
Issue: ZEP-634 Signed-off-by: Andrew Boie <[email protected]>
updated |
…rproject-rtos#304) Signed-off-by: James Prestwood <[email protected]>
Issue: ZEP-634
Signed-off-by: Andrew Boie [email protected]