Skip to content
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

Merged
merged 1 commit into from
Jun 7, 2017

Conversation

andrewboie
Copy link
Contributor

Issue: ZEP-634
Signed-off-by: Andrew Boie [email protected]

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

architectures


Vector Table
------------
Whether to generate this depends on whether CONFIG_GEN_IRQ_VECTOR_TABLE is
Copy link
Member

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 ...

x86 Details
-----------

x86 has a special type of vector table called the Interrupt Descriptor Table
Copy link
Member

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 ....


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.
Copy link
Contributor

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.

struct _isr_list isrs[]; <- of size num_isrs
};

This is then used by the gen_isr_tables.py script to
Copy link
Contributor

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?

};

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
Copy link
Contributor

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.


Vector Table
------------
Whether to generate this depends on whether CONFIG_GEN_IRQ_VECTOR_TABLE is
Copy link
Contributor

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.

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
Copy link
Contributor

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:

#. 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/like/such as/


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.
Copy link
Contributor

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.

Copy link
Contributor

@dbkinder dbkinder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some clarification changes

nashif
nashif previously approved these changes Jun 6, 2017
======================

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete the extra "which"

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.
Copy link
Contributor

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."

Copy link
Contributor

@dbkinder dbkinder left a 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]>
@andrewboie
Copy link
Contributor Author

updated

@nashif nashif merged commit eaa4288 into zephyrproject-rtos:master Jun 7, 2017
@andrewboie andrewboie deleted the irq-docs branch July 26, 2017 07:47
nagineni pushed a commit to nagineni/zephyr that referenced this pull request Nov 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants