flat assembler
Message board for the users of flat assembler.

Index > Main > when CPU fires an exception,

Author
Thread Post new topic Reply to topic
Teehee



Joined: 05 Aug 2009
Posts: 568
Location: Brazil
Teehee
its like it crashes or CPU never crash?

_________________
Sorry if bad english.
Post 24 Feb 2011, 11:13
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 693
Location: Adelaide
sinsi
It crashes unless there is a handler for it. Even the handler might decide that it is unrecoverable (e.g. BSOD).
All an exception is is an interrupt.

Look up "triple fault" to see what happens to exceptions that aren't handled.
Post 24 Feb 2011, 11:29
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4238
Location: 2018
edfed
exceptions are the internal CPU IRQs. exactlly as a peripheral IRQ calls an interrupt vector, the exceptions does the same.

and of course, the handler should exist (at least a IRET), otherwise the CPU crashes.

exception handling depend on the feature you want to do... expand a segment?
load a page?
adjust bound?
do nothing?
Post 24 Feb 2011, 11:47
View user's profile Send private message Visit poster's website Reply with quote
b1528932



Joined: 21 May 2010
Posts: 287
b1528932
ok, lets say there is int 3 instruction.
cpu fires vector 3. Vector 3 has offset > cs limit in idt. Double fault is fired.
Double fault also has offset > limit. CPU enters triple fault. What happens now? How its restarted? Its just an internal reset function that flush registers and cache or there is an acpi function involved?
Post 24 Feb 2011, 14:24
View user's profile Send private message Reply with quote
bogdanontanu



Joined: 07 Jan 2004
Posts: 403
Location: Sol. Earth. Europe. Romania. Bucuresti
bogdanontanu
The CPU will restart from zero by hardware,

Reset hardware lines will be activated to inform the chipset and other buses of this event.

Unfortunately some devices will not recognize this situation correctly and will loose states and configurations.

Anyway you will have to restart from zero with CPU in real mode, BIOS tests, detection of all devices, reinitialization, reloading the OS.. from scratch... very slow.
Post 24 Feb 2011, 19:58
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.