arch: add homebrew API
This PR supersedes #1761 and adds a new hardware sub-platform - CONFIG_HW_HOMEBREW, which is a subset of IBM PC. When enabled, certain config parameters will be queried using INT 0x88, thus allowing custom BIOSes and bootloaders to modify ELKS kernel setup process during runtime by implementing their own INT 0x88 handler.
Currently there are only two functions that are used by BIOS console:
- INT 0x88, AH=0: Get display columns
- INT 0x88, AH=1: Get display rows
This allows us to keep the machine-specific parameters out of kernel code.
Why INT 0x88?
- i8088
- 88 miles per hour!
- Not a 0x80, since that one is reserved
- Eights are nice!
Let me know what you think about this approach. It's similar to what's been suggested by @ghaerr in the original PR.
Hello @and3rson,
Yes, this approach should work well, at least for experimentation. It will be interesting to see how much INT 0x88 needs to be expanded for getting/setting parameters outside ELKS. (It is possible, for instance, that many parameters might be accessible through a standardized PK-88 BIOS emulation of the BDA, rather than introducing a new method). If it turns out that only a very few items need to be configured/supported through INT 0x88, it might be better to keep them hard-coded in config.h, but we'll see :)
I'd like to discuss making a few changes before commit; I'll comment directly by each file changed for your consideration.
Thank you!
Hi @and3rson, are you still interested in moving forward on this? Thank you!