Resending ... I thought I was subscribed, but apparently I am not.
Okay, including you directly in this reply then.
Thanks.
Sure. Implement a driver for that redirection which behaves as an int14h handler and place the address of its entry point at address 0000:0080. (14h*4)
The method works with any BIOS.
I would like it to work with any OS that uses INT 14H (regardless of how many of those exist), rather than any BIOS.
It works both with any BIOS (int 14h provider) and any OS (that uses int 14h), so is a very general approach.
Ok, the main thing is I don't want my OS to have to load this, I want it loaded before the OS is loaded.
For now I am happy if it only works with SeaBIOS, and I will simply buy a PC that allows me to flash SeaBIOS onto it.
PC Engines apu hardware comes with coreboot and SeaBIOS, but may or may not fit your application.
This seems to be a kit. Does this imply most computers don’t allow their firmware to be flashed with SeaBIOS?
If that is the case, is there someone else I should be negotiating with?
If suitable for your hardware you could do all of it in an option ROM.
I'm not familiar with this terminology. Is this something that goes into SeaBIOS? I'm expecting it to be something that is set up (and even configured by the end user in the BIOS) before my OS is even loaded.
Think of an option ROM as a modular expansion to any BIOS.
This sounds promising. So perhaps manufacturers allow option ROMs to be flashed, but just not the entire BIOS to be replaced?
Any BIOS discovers all option ROMs in a system and then runs them one at a time - indeed late-ish before loading the OS.
There's really no limit to what an option ROM can do to the system. Some are interactive, others aren't, others still are completely invisible.
Some option ROMs you may have come across could be a PXE ROM on a network card, a RAID configuration ROM on a SCSI adapter and the VGA BIOS option ROM on a graphics card.
Here's an open source option ROM: https://github.com/alson/sgabios
It's x86 real mode assembly; the typical BIOS environment.
I took a look thanks. But actually I am hoping all of this will be in C. I was expecting INT 14H to be minimal x86 real mode that switched to UEFI C code, the same as CSM does (right?). I read that SeaBIOS supports CSM.
That code does also interact with int 14h, but pretty much does the opposite of what you want; SGABIOS provides a virtual graphics adapter on a serial port, while you want to provide a virtual serial port doing something specific.
A virtual graphics adapter is fairly complicated so I guess that your end result will be much simpler than SGABIOS is.
Ok, for the specific case of converting INT 14H into Bluetooth - I assume that much Bluetooth hardware is proprietary. But I know that libbluetooth exists. Basically is it possible to flash libbluetooth onto an option ROM, add 100 lines of x86 assembler to switch to long mode from INT 14H, call libbluetooth, and call it a day?
Or approximately how many lines of x86 assembler and C code are required in addition to what SeaBIOS + libbluetooth already provide? Or is there some technical problem prohibiting this solution?
Thanks. Paul.