A question about FADT BootArchitectureFlags

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
makerimages
Member
Member
Posts: 27
Joined: Sun Dec 28, 2014 11:16 am
Libera.chat IRC: Makerimages
Location: Estonia

A question about FADT BootArchitectureFlags

Post by makerimages »

Hi,

So I just detected that my OS only initializes the ps/2 keyboard correctly on QEMU. On Virtualbox, the BootArchitectureFlags bit is not set, and on BOCHS, Device 2 reset fails. I figured on this topic for a bit, and had someone in the IRC suggest that the BootArchitectureFlags is negative, eg. bit set = device not present. Is this true? And why is the bit not set in VBox? My Ps/2 init code: https://github.com/makerimages/SwormOS/ ... s/ps2.c#L6
Working on SinusOS.
MollenOS
Member
Member
Posts: 202
Joined: Wed Oct 26, 2011 12:00 pm

Re: A question about FADT BootArchitectureFlags

Post by MollenOS »

makerimages wrote:Hi,

So I just detected that my OS only initializes the ps/2 keyboard correctly on QEMU. On Virtualbox, the BootArchitectureFlags bit is not set, and on BOCHS, Device 2 reset fails. I figured on this topic for a bit, and had someone in the IRC suggest that the BootArchitectureFlags is negative, eg. bit set = device not present. Is this true? And why is the bit not set in VBox? My Ps/2 init code: https://github.com/makerimages/SwormOS/ ... s/ps2.c#L6
Now I know that the PS/2 controller is present in VirtualBox unless you change the mouse input to Usb Tablet, then I'm pretty sure it's not present and you don't have a problem.
My code seems to run just fine on all emulators, you can see it here:

Code: Select all

https://github.com/Fadekraft/MollenOS/blob/master/modules/x86/Ps2/Ps2.c
Octocontrabass
Member
Member
Posts: 5588
Joined: Mon Mar 25, 2013 7:01 pm

Re: A question about FADT BootArchitectureFlags

Post by Octocontrabass »

The boot architecture flags are not present in all versions of the FADT. You must check the version of the FADT before attempting to parse its contents.
MollenOS
Member
Member
Posts: 202
Joined: Wed Oct 26, 2011 12:00 pm

Re: A question about FADT BootArchitectureFlags

Post by MollenOS »

Octocontrabass wrote:The boot architecture flags are not present in all versions of the FADT. You must check the version of the FADT before attempting to parse its contents.
I use ACPICA, it's 0 if not present.
User avatar
makerimages
Member
Member
Posts: 27
Joined: Sun Dec 28, 2014 11:16 am
Libera.chat IRC: Makerimages
Location: Estonia

Re: A question about FADT BootArchitectureFlags

Post by makerimages »

Octocontrabass wrote:The boot architecture flags are not present in all versions of the FADT. You must check the version of the FADT before attempting to parse its contents.
Line #9 in the file I linked in the OP. I do that, and that check passes. The error I get is the "Unable to find a PS/2 controller. Possible failure of features." On line #15.
Working on SinusOS.
MollenOS
Member
Member
Posts: 202
Joined: Wed Oct 26, 2011 12:00 pm

Re: A question about FADT BootArchitectureFlags

Post by MollenOS »

makerimages wrote:
Octocontrabass wrote:The boot architecture flags are not present in all versions of the FADT. You must check the version of the FADT before attempting to parse its contents.
Line #9 in the file I linked in the OP. I do that, and that check passes. The error I get is the "Unable to find a PS/2 controller. Possible failure of features." On line #15.
You can assume the 8042 is present if the FADT is too old to specify the BAF. The system has to specify it is NOT present in order for it not to be present, if it doesn't specify it's not specifically present you should assume it's present.
Remember to check for errors during the initializing in case it's not present.
User avatar
makerimages
Member
Member
Posts: 27
Joined: Sun Dec 28, 2014 11:16 am
Libera.chat IRC: Makerimages
Location: Estonia

Re: A question about FADT BootArchitectureFlags

Post by makerimages »

MollenOS wrote:
makerimages wrote:
Octocontrabass wrote:The boot architecture flags are not present in all versions of the FADT. You must check the version of the FADT before attempting to parse its contents.
Line #9 in the file I linked in the OP. I do that, and that check passes. The error I get is the "Unable to find a PS/2 controller. Possible failure of features." On line #15.
You can assume the 8042 is present if the FADT is too old to specify the BAF. The system has to specify it is NOT present in order for it not to be present, if it doesn't specify it's not specifically present you should assume it's present.
Remember to check for errors during the initializing in case it's not present.
What revision is too old? Is my check for > 1 the thing that's wrong?
Working on SinusOS.
MollenOS
Member
Member
Posts: 202
Joined: Wed Oct 26, 2011 12:00 pm

Re: A question about FADT BootArchitectureFlags

Post by MollenOS »

makerimages wrote: What revision is too old? Is my check for > 1 the thing that's wrong?
Yes, if I were you i'd assume the PS/2 is present if the revision is below the required revision for the BAF to be present.
User avatar
makerimages
Member
Member
Posts: 27
Joined: Sun Dec 28, 2014 11:16 am
Libera.chat IRC: Makerimages
Location: Estonia

Re: A question about FADT BootArchitectureFlags

Post by makerimages »

MollenOS wrote:
makerimages wrote: What revision is too old? Is my check for > 1 the thing that's wrong?
Yes, if I were you i'd assume the PS/2 is present if the revision is below the required revision for the BAF to be present.
But... I do if the revision is not >1
Working on SinusOS.
Post Reply