Skip to content

Modified second point in Disk and Console Interrupts Explanation. #20

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions Tutorials/xsm_interrupts_tutorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,16 @@ <h2 >XSM Interrupts and Exception Handling</h2>

<p>
After the execution of each instruction in unprivileged mode, the machine checks whether a pending
disk/console/timer interrupt. If so, the machine does the following actions:
disk/console interrupt. If so, the machine does the following actions:
<ol style="list-style-type: decimal; margin-left: 50px; font-size: 16px">
<li><b><sup>*</sup></b>Push the IP value into the top of the stack.</li>

<li>Set IP to value stored in the interrupt vector table entry for the timer interrupt
handler. The vector table entry for timer interrupt is located at physical address 493 in page 0
(ROM) of XSM and the value 2048 is preset in this location. Hence, the IP register gets value
2048. The machine then switches to to privileged mode and address translation is disabled.
Hence, next instruction will be fetched from physical address 2048. (See Boot ROM and Boot block section in <a href="../arch_spec-files/machine_organisation.html" target="_blank"> XSM Machine Organisation </a> documentation)</li>
<li>Set IP to value stored in the interrupt vector table entry for the corresponding interrupt
handler. The vector table entry for disk interrupt is located at physical address 494 in page 0
(ROM) of XSM and the value 3072 is preset in this location and for console interrupt is located at physical address 495 in page 0
(ROM) of XSM and the value 4096 is preset in this location. Hence, the IP register gets value
3072 for disk interrupt and 4096 for console interrupt. The machine then switches to privileged mode and address translation is disabled.
Hence, next instruction will be fetched from physical address 3072 for disk interrupt and 4096 for console interupt. (See Boot ROM and Boot block section in <a href="../arch_spec-files/machine_organisation.html" target="_blank"> XSM Machine Organisation </a> documentation)</li>
</ol>
<p><b><sup>*</sup></b>Note: If the value in the SP register after incrementing SP is an invalid address (i.e., not in the
range 0 to PTLR*512-1) then the machine generates an <b>illegal memory access exception</b> (see section below on exception handling). The machine will re-execute steps (1) and (2) immedietly after retrun to unprivileged mode, before executing any other instruction in unprivileged mode.
Expand Down