Page 1 of 1

A question about FADT BootArchitectureFlags

Posted: Thu Dec 17, 2015 12:52 am
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

Re: A question about FADT BootArchitectureFlags

Posted: Thu Dec 17, 2015 12:57 am
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

Re: A question about FADT BootArchitectureFlags

Posted: Thu Dec 17, 2015 1:24 am
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.

Re: A question about FADT BootArchitectureFlags

Posted: Thu Dec 17, 2015 1:26 am
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.

Re: A question about FADT BootArchitectureFlags

Posted: Thu Dec 17, 2015 1:35 am
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.

Re: A question about FADT BootArchitectureFlags

Posted: Thu Dec 17, 2015 1:42 am
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.

Re: A question about FADT BootArchitectureFlags

Posted: Thu Dec 17, 2015 1:54 am
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?

Re: A question about FADT BootArchitectureFlags

Posted: Thu Dec 17, 2015 2:01 am
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.

Re: A question about FADT BootArchitectureFlags

Posted: Thu Dec 17, 2015 2:21 am
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