Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(Questions 6-7) Imagine a little-endian 32-bit machine which supports total 32 interrupt/exception vectors. Vectors are numbered from 0 to 31. The base address of vector
(Questions 6-7) Imagine a little-endian 32-bit machine which supports total 32 interrupt/exception vectors. Vectors are numbered from 0 to 31. The base address of vector table is pointed by the content of processor's special register called IDTR (Interrupt Descriptor Table Register). Each 4-byte entry of the vector table contains 32-bit pointer which points to the entry of corresponding handler function. Upon interrupt/exception, the associated vector number is used as the index to the vector table. To simplify, we assume the hardware does not support virtual address and all references are physical addresses. The figure below sketches vector table and indexing operation described above: 32-bit .text handler_3: Interrupt #3 handler_3 IDTR Vector Table Shown below is memory hex-dump at various memory locations. Note that memory is dumped per-byte basis in a left-to-right, top-down fashion as address increases. Beware that the machine is little-endian. Address : 0 1 2 3 8 9 A B C D E F -- - - - - - - - - -- - - - - - - - -- 4 5 6 7 - - - - - - - 00 aa 00 00 fb 04 10 10 fb 10 04 00 ab 25 al 00 Ox0001c000: 00 00 00 00 Ox0001c010: 6f 4d 46 00 Ox00010020: 20 74 68 00 Ox0001c030: Ox0001 6040: 00 00 00 00 Ox00010050: a0 8f 00 00 Ox00010060: 20 74 68 00 Ox00010070: 00 c0 01 00 C3 00 3d 00 20 da 00 00 00 04 10 10 20 do 03 00 70 ao 3d 00 7b f3 73 00 73 10 04 00 20 63 03 00 00 00 00 00 70 f3 01 00 00 do 03 00 20 do 03 00 60 do 03 00 20 63 01 00 fO 4b 03 00 00 CO 01 00 10 c0 01 00 P. Addr: 0 1 2 3 4 5 6 7 8 9 A B C D E F -- - - - - - - Ox003da000: 00 10 20 02 20 db 7b 00 Ox003da010: 2f 4d 46 02 AO Of 98 ff Ox003da020: 7f 04 3d 02 70 04 61 00 Ox003da030: a0 03 3d 00 70 03 61 00 Ox003da040: 00 00 00 fo 60 00 7b 00 Ox003da050: 20 d4 46 01 a0 of 98 00 Ox003 da060: b0 ao 30 000 20 61 00 Ox003da070: CO al 3d 02 fO 20 61 00 FOCO 01 02 a0 00 80 01 79 04 6e 01 79 03 6e 01 fO CO 01 00 00 04 10 01 70 00 60 00 e0 6F 6c 02 70 f3 73 01 00 44 3d 01 20 04 61 01 20 03 61 02 70 f3 73 00 00 Oa 3d 02 20 63 60 00 do 00 6c 02 6. (5 pts) Say IDTR contains Ox0001c040. The processor just received a hardware interrupt with vector number 6. What is the address of the interrupt hander? Answer: 0x (Questions 6-7) Imagine a little-endian 32-bit machine which supports total 32 interrupt/exception vectors. Vectors are numbered from 0 to 31. The base address of vector table is pointed by the content of processor's special register called IDTR (Interrupt Descriptor Table Register). Each 4-byte entry of the vector table contains 32-bit pointer which points to the entry of corresponding handler function. Upon interrupt/exception, the associated vector number is used as the index to the vector table. To simplify, we assume the hardware does not support virtual address and all references are physical addresses. The figure below sketches vector table and indexing operation described above: 32-bit .text handler_3: Interrupt #3 handler_3 IDTR Vector Table Shown below is memory hex-dump at various memory locations. Note that memory is dumped per-byte basis in a left-to-right, top-down fashion as address increases. Beware that the machine is little-endian. Address : 0 1 2 3 8 9 A B C D E F -- - - - - - - - - -- - - - - - - - -- 4 5 6 7 - - - - - - - 00 aa 00 00 fb 04 10 10 fb 10 04 00 ab 25 al 00 Ox0001c000: 00 00 00 00 Ox0001c010: 6f 4d 46 00 Ox00010020: 20 74 68 00 Ox0001c030: Ox0001 6040: 00 00 00 00 Ox00010050: a0 8f 00 00 Ox00010060: 20 74 68 00 Ox00010070: 00 c0 01 00 C3 00 3d 00 20 da 00 00 00 04 10 10 20 do 03 00 70 ao 3d 00 7b f3 73 00 73 10 04 00 20 63 03 00 00 00 00 00 70 f3 01 00 00 do 03 00 20 do 03 00 60 do 03 00 20 63 01 00 fO 4b 03 00 00 CO 01 00 10 c0 01 00 P. Addr: 0 1 2 3 4 5 6 7 8 9 A B C D E F -- - - - - - - Ox003da000: 00 10 20 02 20 db 7b 00 Ox003da010: 2f 4d 46 02 AO Of 98 ff Ox003da020: 7f 04 3d 02 70 04 61 00 Ox003da030: a0 03 3d 00 70 03 61 00 Ox003da040: 00 00 00 fo 60 00 7b 00 Ox003da050: 20 d4 46 01 a0 of 98 00 Ox003 da060: b0 ao 30 000 20 61 00 Ox003da070: CO al 3d 02 fO 20 61 00 FOCO 01 02 a0 00 80 01 79 04 6e 01 79 03 6e 01 fO CO 01 00 00 04 10 01 70 00 60 00 e0 6F 6c 02 70 f3 73 01 00 44 3d 01 20 04 61 01 20 03 61 02 70 f3 73 00 00 Oa 3d 02 20 63 60 00 do 00 6c 02 6. (5 pts) Say IDTR contains Ox0001c040. The processor just received a hardware interrupt with vector number 6. What is the address of the interrupt hander? Answer: 0x
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started