Hello,
I am trying to set up my kernel to work with bochs VBE extension.
I have all the correct configuration in the script such as:
vgaromimage: .../VGABIOS-lgpl-latest
vga: extension=vbe
From what I understand, a device on PCI should appear with the following:
vendor_id: 0x1111, device id: 0x1234
I could then grab BAR0 and get the correct linear framebuffer address.
This works well when I run my kernel in qemu but in bochs, it does not appear.
Interestingly, when I start playing about with setting vbe resolutions and modes they all seem to be working
and the display changes its size.
It must be a bochs specific setting that Im missing or something along those lines.
Could someone point me in the right direction here?
Thanks!
Bochs VBE device not present in PCI
- BrightLight
- Member
- Posts: 901
- Joined: Sat Dec 27, 2014 9:11 am
- Location: Maadi, Cairo, Egypt
- Contact:
Re: Bochs VBE device not present in PCI
There are two types of BGA: PCI and ISA. For PCI, you read the framebuffer base address from BAR0, like you said. For ISA, it is hard-coded at physical address 0xE0000000.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
-
- Posts: 16
- Joined: Sun Jul 16, 2017 4:22 am
Re: Bochs VBE device not present in PCI
Oh ok.
Can you just confirm that this is the case with bochs?
Is bochs' BGA an ISA one?
Is this why qemu lists it on PCI?
Can you just confirm that this is the case with bochs?
Is bochs' BGA an ISA one?
Is this why qemu lists it on PCI?
- BrightLight
- Member
- Posts: 901
- Joined: Sat Dec 27, 2014 9:11 am
- Location: Maadi, Cairo, Egypt
- Contact:
Re: Bochs VBE device not present in PCI
Bochs uses ISA BGA by default, but you can configure it to use a PCI BGA if you want. Of course, I don't recall the configuration options, but a quick Google search will get you decent results. QEMU uses PCI BGA when you pass option "-vga std", and by default in some builds, including the one from Ubuntu's repository.
To check the existence of BGA at all, you should use the I/O ports. Specifically, you should read the BGA version register (index 0) and make sure it contains a value in the range of 0xB0C0 to 0xB0C5, inclusive. If the BGA exists, then you can determine it is a PCI or ISA BGA by scanning the PCI devices.
To check the existence of BGA at all, you should use the I/O ports. Specifically, you should read the BGA version register (index 0) and make sure it contains a value in the range of 0xB0C0 to 0xB0C5, inclusive. If the BGA exists, then you can determine it is a PCI or ISA BGA by scanning the PCI devices.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
-
- Posts: 16
- Joined: Sun Jul 16, 2017 4:22 am
Re: Bochs VBE device not present in PCI
That explains a lot
Thanks so much!
Thanks so much!
-
- Posts: 16
- Joined: Sun Jul 16, 2017 4:22 am
Re: Bochs VBE device not present in PCI
Btw
My searching abilities are clearly lacking
After a bit more thourough googling I found this: http://forum.osdev.org/viewtopic.php?f=1&p=227076
Clearly explains what you just told me.
My searching abilities are clearly lacking
After a bit more thourough googling I found this: http://forum.osdev.org/viewtopic.php?f=1&p=227076
Clearly explains what you just told me.
- BrightLight
- Member
- Posts: 901
- Joined: Sat Dec 27, 2014 9:11 am
- Location: Maadi, Cairo, Egypt
- Contact:
Re: Bochs VBE device not present in PCI
Take that into consideration next time, instead of asking answered questions.dborowiec10 wrote:My searching abilities are clearly lacking
You know your OS is advanced when you stop using the Intel programming guide as a reference.