Some thoughts about hardware persistency (e.g. video-card)
So, how to reinitialize a specific hardware?
- during booting and restoring the TV-app, before running the
process the hardware must be in the same state as before
- the initialisation must be in the same order than last init
This leads to a initialisation-tree of function calls with functions and
parameter sets as preconditions of other function calls.
This structure should be as short as possible to minimize the number of
possible combinations.
The reinit, preconditions, stack-functions, checking and state-keeping
should be done by a base class, from which special classes are derived.
If EROS is burned in the mainboards flash chip, it might be possible to use these principle for the boot process too. (But here some very informations must be calculated from the CMOS contents...)
But it must be taken care for disallowing instable states going into a checkpoint. For the very worst case, we might need a save-boot without automatic reinit of certain hardware - is there something like a "rescue-system" for EROS required?
reset-state (might be undefined)
|
Chip-1 (Register A,B,C,...)
|
Chip-2 (Register A,B,C,...) ---- Chip-2 (Register A,B,C,...) <-x | | | Chip-2 (Register D,E,F,...) Chip-2 (Register D,E,F,...) | | | | rewind Chip-3 (Register A,B,C,...) Chip-4 (Register A,B,C,...) | the | | | stack Radio-Mode --- (CHIP 2,3 R...) TV-Mode --- (CHIP 2,3,4 R...) | | | current-state --+