Embedded systems, interrupt schemes
Posted: Wed Sep 17, 2014 4:30 am
Alright folks,
Let me try and describe this the best way possible - I dunno if this qualifies as a strict operating system, but I decided to post it here knowing that it deals with many of the very same concepts I work with when writing my operating system exploits (or failures... ha).
Recently (and being a college student), I've found myself on the development side of a rocketry project with some friends, so I've decided to go to work writing the avionics/guidance controls and systems for the hypothetical (and hopefully, someday real) designs we've all put on the table. After considering a whole bunch of different options, something told me to go with some variety of x86 CPU and FPGAs for peripherals, I/O, system control, communication, and what-not. The hardware aspects I can figure out, but the thing that this system needs to 100% be classifiable as is an interrupt-driven system.
Therefore, I've been working on creating a whole slew of interrupt schemes for how the various components that will be utilized in FPGA/logic hardware will interact with the code that the CPU itself is running. While I can come up with the priorities and handling and what-not myself, I was wondering how I will actually create the IDT/GDT entries, store them and then load the address. I was thinking of jumping the system into Protected Mode for the 32-bit and increased memory capabilities as well as the LIDT/LGDT instructions, but those require that I have formed tables that are ready to address to.
In essence, this doesn't feel as much like an operating system as much as "interrupt soup" with some background code running. The primary goal is that the system be 100% error-safe (that is, Div0 and other faults are protected against/recoverable from - just read about the Ariane 5 for why that needs to be) and that it can coordinate on regular intervals, most likely via timer modules in the FPGA hardware.
One of the reasons I want this system to be as flexible as possible with its interrupt handling is so I can revise the interrupt generation in hardware as needed and add different ones that come on truly exceptional events. For example, if the rocket starts flying horizontally or upside down, that might throw an exception that causes a predefined action to correct it irrespective of the normal control loops.
Apologies for not putting more explanation or thought into here; more was floating around my head earlier and as soon as I sat down to type it, out it went. I suppose one of the allures of developing a system like this is that this is true "blank-slate" - there will be no code on board this system when constructed that will execute before the system goes, no BIOS, so everything has to be done from scratch. I understand this is an oddity of a project, so I'll make beer a symbolic bounty if any of you can help me toward embedded greatness (or the single-board computer circus, whatever you prefer).
Let me try and describe this the best way possible - I dunno if this qualifies as a strict operating system, but I decided to post it here knowing that it deals with many of the very same concepts I work with when writing my operating system exploits (or failures... ha).
Recently (and being a college student), I've found myself on the development side of a rocketry project with some friends, so I've decided to go to work writing the avionics/guidance controls and systems for the hypothetical (and hopefully, someday real) designs we've all put on the table. After considering a whole bunch of different options, something told me to go with some variety of x86 CPU and FPGAs for peripherals, I/O, system control, communication, and what-not. The hardware aspects I can figure out, but the thing that this system needs to 100% be classifiable as is an interrupt-driven system.
Therefore, I've been working on creating a whole slew of interrupt schemes for how the various components that will be utilized in FPGA/logic hardware will interact with the code that the CPU itself is running. While I can come up with the priorities and handling and what-not myself, I was wondering how I will actually create the IDT/GDT entries, store them and then load the address. I was thinking of jumping the system into Protected Mode for the 32-bit and increased memory capabilities as well as the LIDT/LGDT instructions, but those require that I have formed tables that are ready to address to.
In essence, this doesn't feel as much like an operating system as much as "interrupt soup" with some background code running. The primary goal is that the system be 100% error-safe (that is, Div0 and other faults are protected against/recoverable from - just read about the Ariane 5 for why that needs to be) and that it can coordinate on regular intervals, most likely via timer modules in the FPGA hardware.
One of the reasons I want this system to be as flexible as possible with its interrupt handling is so I can revise the interrupt generation in hardware as needed and add different ones that come on truly exceptional events. For example, if the rocket starts flying horizontally or upside down, that might throw an exception that causes a predefined action to correct it irrespective of the normal control loops.
Apologies for not putting more explanation or thought into here; more was floating around my head earlier and as soon as I sat down to type it, out it went. I suppose one of the allures of developing a system like this is that this is true "blank-slate" - there will be no code on board this system when constructed that will execute before the system goes, no BIOS, so everything has to be done from scratch. I understand this is an oddity of a project, so I'll make beer a symbolic bounty if any of you can help me toward embedded greatness (or the single-board computer circus, whatever you prefer).