where does the actual code of exception handler reside in Linux?
This is from my textbook that describes how processor trigger exception handler:
and it says that:
The processor then triggers the exception by making an indirect procedure
call, through entry k of the exception table, to the corresponding handler. Figure 8.3 shows how the processor uses the exception table to form the address of the appropriate exception handler. The exception number is an index into the exception table, whose starting address is contained in a special CPU register called the exception table base register.
so my question is, where does the actual code of exception handler reside ? in kernel? and what about the exception table base register, is its content an adreess in kernel?
linux exception-handling
add a comment |
This is from my textbook that describes how processor trigger exception handler:
and it says that:
The processor then triggers the exception by making an indirect procedure
call, through entry k of the exception table, to the corresponding handler. Figure 8.3 shows how the processor uses the exception table to form the address of the appropriate exception handler. The exception number is an index into the exception table, whose starting address is contained in a special CPU register called the exception table base register.
so my question is, where does the actual code of exception handler reside ? in kernel? and what about the exception table base register, is its content an adreess in kernel?
linux exception-handling
add a comment |
This is from my textbook that describes how processor trigger exception handler:
and it says that:
The processor then triggers the exception by making an indirect procedure
call, through entry k of the exception table, to the corresponding handler. Figure 8.3 shows how the processor uses the exception table to form the address of the appropriate exception handler. The exception number is an index into the exception table, whose starting address is contained in a special CPU register called the exception table base register.
so my question is, where does the actual code of exception handler reside ? in kernel? and what about the exception table base register, is its content an adreess in kernel?
linux exception-handling
This is from my textbook that describes how processor trigger exception handler:
and it says that:
The processor then triggers the exception by making an indirect procedure
call, through entry k of the exception table, to the corresponding handler. Figure 8.3 shows how the processor uses the exception table to form the address of the appropriate exception handler. The exception number is an index into the exception table, whose starting address is contained in a special CPU register called the exception table base register.
so my question is, where does the actual code of exception handler reside ? in kernel? and what about the exception table base register, is its content an adreess in kernel?
linux exception-handling
linux exception-handling
asked Nov 14 '18 at 2:58
amjadamjad
42710
42710
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
This is a little out of my depth, but I found this Wikipedia article: Interrupt descriptor table. Quoting from there:
[In real mode], in the 8086 processor, the interrupt table ... always resides at the same location in memory, ranging from
0x0000
to0x03ff
. On the 80286 and later, the size and locations of the IVT can be changed. ... The protected mode IDT may reside anywhere in physical memory.
Regardless of where the exception table resides, I'm certain that it is memory reserved by the kernel, and likewise the exception handling functions are defined in the kernel source code; e.g. traps.c
and related.
Other references for further information related to but also going beyond this exact question:
https://0xax.gitbooks.io/linux-insides/content/Interrupts/linux-interrupts-5.html
https://www.oreilly.com/library/view/understanding-the-linux/0596005652/ch04s05.html
http://en.tldp.org/LDP/khg/HyperNews/get/devices/exceptions.html
NOTE: I am assuming we are talking about the x86 architecture here. As the Wikipedia article mentions, other chip architectures are likely to be similar, especially conceptually, but are also likely to differ in the details.
Hi could you also look at this question, please? stackoverflow.com/questions/53331232/…
– amjad
Nov 16 '18 at 4:41
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53292553%2fwhere-does-the-actual-code-of-exception-handler-reside-in-linux%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This is a little out of my depth, but I found this Wikipedia article: Interrupt descriptor table. Quoting from there:
[In real mode], in the 8086 processor, the interrupt table ... always resides at the same location in memory, ranging from
0x0000
to0x03ff
. On the 80286 and later, the size and locations of the IVT can be changed. ... The protected mode IDT may reside anywhere in physical memory.
Regardless of where the exception table resides, I'm certain that it is memory reserved by the kernel, and likewise the exception handling functions are defined in the kernel source code; e.g. traps.c
and related.
Other references for further information related to but also going beyond this exact question:
https://0xax.gitbooks.io/linux-insides/content/Interrupts/linux-interrupts-5.html
https://www.oreilly.com/library/view/understanding-the-linux/0596005652/ch04s05.html
http://en.tldp.org/LDP/khg/HyperNews/get/devices/exceptions.html
NOTE: I am assuming we are talking about the x86 architecture here. As the Wikipedia article mentions, other chip architectures are likely to be similar, especially conceptually, but are also likely to differ in the details.
Hi could you also look at this question, please? stackoverflow.com/questions/53331232/…
– amjad
Nov 16 '18 at 4:41
add a comment |
This is a little out of my depth, but I found this Wikipedia article: Interrupt descriptor table. Quoting from there:
[In real mode], in the 8086 processor, the interrupt table ... always resides at the same location in memory, ranging from
0x0000
to0x03ff
. On the 80286 and later, the size and locations of the IVT can be changed. ... The protected mode IDT may reside anywhere in physical memory.
Regardless of where the exception table resides, I'm certain that it is memory reserved by the kernel, and likewise the exception handling functions are defined in the kernel source code; e.g. traps.c
and related.
Other references for further information related to but also going beyond this exact question:
https://0xax.gitbooks.io/linux-insides/content/Interrupts/linux-interrupts-5.html
https://www.oreilly.com/library/view/understanding-the-linux/0596005652/ch04s05.html
http://en.tldp.org/LDP/khg/HyperNews/get/devices/exceptions.html
NOTE: I am assuming we are talking about the x86 architecture here. As the Wikipedia article mentions, other chip architectures are likely to be similar, especially conceptually, but are also likely to differ in the details.
Hi could you also look at this question, please? stackoverflow.com/questions/53331232/…
– amjad
Nov 16 '18 at 4:41
add a comment |
This is a little out of my depth, but I found this Wikipedia article: Interrupt descriptor table. Quoting from there:
[In real mode], in the 8086 processor, the interrupt table ... always resides at the same location in memory, ranging from
0x0000
to0x03ff
. On the 80286 and later, the size and locations of the IVT can be changed. ... The protected mode IDT may reside anywhere in physical memory.
Regardless of where the exception table resides, I'm certain that it is memory reserved by the kernel, and likewise the exception handling functions are defined in the kernel source code; e.g. traps.c
and related.
Other references for further information related to but also going beyond this exact question:
https://0xax.gitbooks.io/linux-insides/content/Interrupts/linux-interrupts-5.html
https://www.oreilly.com/library/view/understanding-the-linux/0596005652/ch04s05.html
http://en.tldp.org/LDP/khg/HyperNews/get/devices/exceptions.html
NOTE: I am assuming we are talking about the x86 architecture here. As the Wikipedia article mentions, other chip architectures are likely to be similar, especially conceptually, but are also likely to differ in the details.
This is a little out of my depth, but I found this Wikipedia article: Interrupt descriptor table. Quoting from there:
[In real mode], in the 8086 processor, the interrupt table ... always resides at the same location in memory, ranging from
0x0000
to0x03ff
. On the 80286 and later, the size and locations of the IVT can be changed. ... The protected mode IDT may reside anywhere in physical memory.
Regardless of where the exception table resides, I'm certain that it is memory reserved by the kernel, and likewise the exception handling functions are defined in the kernel source code; e.g. traps.c
and related.
Other references for further information related to but also going beyond this exact question:
https://0xax.gitbooks.io/linux-insides/content/Interrupts/linux-interrupts-5.html
https://www.oreilly.com/library/view/understanding-the-linux/0596005652/ch04s05.html
http://en.tldp.org/LDP/khg/HyperNews/get/devices/exceptions.html
NOTE: I am assuming we are talking about the x86 architecture here. As the Wikipedia article mentions, other chip architectures are likely to be similar, especially conceptually, but are also likely to differ in the details.
answered Nov 14 '18 at 23:02
landru27landru27
787213
787213
Hi could you also look at this question, please? stackoverflow.com/questions/53331232/…
– amjad
Nov 16 '18 at 4:41
add a comment |
Hi could you also look at this question, please? stackoverflow.com/questions/53331232/…
– amjad
Nov 16 '18 at 4:41
Hi could you also look at this question, please? stackoverflow.com/questions/53331232/…
– amjad
Nov 16 '18 at 4:41
Hi could you also look at this question, please? stackoverflow.com/questions/53331232/…
– amjad
Nov 16 '18 at 4:41
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53292553%2fwhere-does-the-actual-code-of-exception-handler-reside-in-linux%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown