OSDev.org

The Place to Start for Operating System Developers
It is currently Sat Sep 21, 2019 7:52 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Chromebook 3 with seabios VGA question
PostPosted: Mon Jul 29, 2019 6:37 pm 
Offline

Joined: Mon Jul 29, 2019 6:20 pm
Posts: 6
I’ve been trying to follow the baby steps tutorial for making a simple bootloader but i’ve Found that the VGA video RAM buffer is not located at 0xB8000 or 0xB0000, or even 0xA0000. I tried calling BIOS interrupt 0x10, AX 0x4F00 to see what video modes are supported and if I read it correctly it was only one, I think it said 0x0140. It also said the the video RAM buffer was at 0xC0000. There is data starting at this address until around 0xC0800 but nothing seems like the VGA format of two bytes (color palettes, char data). I am new at all of this but if anyone has any information on where chromebooks with seabios maintain the video RAM buffer I would greatly appreciate it. Thank you for your time

(Just to clarify I’m using a Samsung Chromebook 3 it has an intel centrino processor, I believe, with the intel hd graphics 400)


Top
 Profile  
 
 Post subject: Re: Chromebook 3 with seabios VGA question
PostPosted: Tue Jul 30, 2019 3:42 am 
Offline
Member
Member

Joined: Fri Aug 26, 2016 1:41 pm
Posts: 482
You sure about video mode 0x140? Is it possible that the address was 0xc0000000 (would make sense for an Linear Frame Buffer) and not 0xc0000?


Top
 Profile  
 
 Post subject: Re: Chromebook 3 with seabios VGA question
PostPosted: Tue Jul 30, 2019 7:13 am 
Offline

Joined: Mon Jul 29, 2019 6:20 pm
Posts: 6
The address of VRAM given was given as 00 00 00 C0 so I assumed that because the processor was in real mode that it was giving me segment:offset C000:0000, I never considered it might be the linear address. I’m not sure about the video mode of 0140 because when I try and change the video mode with BIOS it only allows video mode 03. I’m a little confused by that


Top
 Profile  
 
 Post subject: Re: Chromebook 3 with seabios VGA question
PostPosted: Tue Jul 30, 2019 7:09 pm 
Offline
Member
Member

Joined: Fri Aug 26, 2016 1:41 pm
Posts: 482
The linear frame buffer (LFB) that is returned is "linear" by Int 10/AX=4F01h. 00 00 00 c0 would be linear address 0xc0000000. That memory is graphics memory though. I don't know anything about that device. Not sure if the text mode is actually implemented in the BIOS on that system by using graphics mode. That could explain why writing to 0xb8000:0x0000 doesn't display anything. The other possibility is that device uses a text mode page other than 0 (but that would be unusual as a default). I wonder what E820 shows as a memory map.

If the system is emulating legacy BIOS you should be able to detect the current video mode by looking at the BYTE value at linear address 0x00449. I'd be curious what it is. As for video mode 0x140, if it were correct that has been known to be 320x200x32bpp I believe. That seems like an awfully unusual resolution.


Top
 Profile  
 
 Post subject: Re: Chromebook 3 with seabios VGA question
PostPosted: Wed Jul 31, 2019 2:38 am 
Online
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 1637
MichaelPetch wrote:
As for video mode 0x140, if it were correct that has been known to be 320x200x32bpp I believe. That seems like an awfully unusual resolution.

That assumes it's a standard mode number, but there are no standard mode numbers in VBE 2.0.

It looks like some versions of SeaBIOS will only report mode 0x140 as supported. I think it's usually the native resolution.


Top
 Profile  
 
 Post subject: Re: Chromebook 3 with seabios VGA question
PostPosted: Wed Jul 31, 2019 3:28 pm 
Offline

Joined: Mon Jul 29, 2019 6:20 pm
Posts: 6
Thank you for everyone's help with this. I will try int 15h, ax=e820h to get a clearer picture of the memory map. I will put up the results when I get them. Thanks again, I appreciate it!


Top
 Profile  
 
 Post subject: Re: Chromebook 3 with seabios VGA question
PostPosted: Sat Aug 03, 2019 3:57 pm 
Offline

Joined: Mon Jul 29, 2019 6:20 pm
Posts: 6
This is what I got from int 0x15, ax=0xE820.

Chromebook 3 Memory Map

No. Base Length Type Extended Attrb.
1 0x0000000000000000 0x000000000090FC00 Usable 1
2 0x000000000009FC00 0x0000000000000400 Reserved 1
3 0x00000000000F0000 0x0000000000010000 Reserved 1
4 0x0000000000100000 0x000000001FF00000 Usable 1
5 0x0000000020000000 0x0000000000100000 Reserved 1
6 0x0000000020100000 0x000000005CB0F000 Usable 1
7 0x000000007CC0F000 0x00000000033F1000 Reserved 1
8 0x00000000E0000000 0x0000000010000000 Reserved 1
9 0x00000000FEA00000 0x0000000000200000 Reserved 1
10 0x00000000FED01000 0x0000000000001000 Reserved 1
11 0x00000000FED03000 0x0000000000001000 Reserved 1
12 0x00000000FED06000 0x0000000000001000 Reserved 1
13 0x00000000FED08000 0x0000000000001000 Reserved 1
14 0x00000000FED1C000 0x0000000000001000 Reserved 1
15 0x00000000FED40000 0x0000000000005000 Reserved 1
16 0x00000000FED80000 0x0000000000004000 Reserved 1
17 0x0000001000000000 0x0000000080000000 Usable 1

Also, I checked address 0x0449 and it was video mode 0x03. I'm still not sure how I can directly access the VRAM though...


Top
 Profile  
 
 Post subject: Re: Chromebook 3 with seabios VGA question
PostPosted: Sat Aug 03, 2019 8:04 pm 
Offline
Member
Member

Joined: Fri Aug 26, 2016 1:41 pm
Posts: 482
The map looks reasonably normal except for one odd thing:

1 0x0000000000000000 0x000000000090FC00 Usable 1

That makes no sense. It should have been 0x000000000009FC00. Is it a bug in your E820 parsing? print routine problem? or is that what the BIOS really reported?

Video mode 3 is 80x25 text mode. You absolutely sure that you wrote to 0xb8000 properly? Maybe there was a bug in your code? Just making sure.

Since graphics video ram (LFB) is at 0xc0000000 have you tried writing there? You would have to enter protected mode (or unreal mode) to accsss that memory. I wonder what happens if you simply attempt to fill the first 1MB of video ram with the same value. Does that fill part of the screen with the same color?


Top
 Profile  
 
 Post subject: Re: Chromebook 3 with seabios VGA question
PostPosted: Sun Aug 04, 2019 11:03 am 
Offline

Joined: Mon Jul 29, 2019 6:20 pm
Posts: 6
Hey! It worked! I entered protected mode and tried filling some of the LFB starting at 0xC0000000 with the same data as you suggested and it produced a partially filled screen with the same color. Oh and sorry that was a typo on my part, I had manually copied down the results of the BIOS 0x15, ax=0xE820 function and just put the F0 in by mistake when I typed it. So now I have the ability to write pixels to the screen does that mean I will have to write my own functions to print characters to the screen since I can't find where the text mode graphics buffer is? And I'm pretty sure I wrote to 0xb8000 correctly I double checked multiple times and retried multiple times and nothing. Thank again, this was a big help


Top
 Profile  
 
 Post subject: Re: Chromebook 3 with seabios VGA question
PostPosted: Sun Aug 04, 2019 3:16 pm 
Offline
Member
Member

Joined: Fri Aug 26, 2016 1:41 pm
Posts: 482
It appears the BIOS you are using isn't typical and it is doing everything in graphics mode in the LFB. As you suggest you will have to write characters graphically on the display, but it is speculation on my part. Does the BIOS Int 10/AH=0Eh routines display text? If it does then it means the BIOS is going through the process of writing to the graphical display under the hood.

Sounds like you will have to acquire a set of fonts and write code that writes the fonts to the screen if you want to emulate text mode.


Top
 Profile  
 
 Post subject: Re: Chromebook 3 with seabios VGA question
PostPosted: Mon Aug 05, 2019 7:13 am 
Offline

Joined: Mon Jul 29, 2019 6:20 pm
Posts: 6
Yeah BIOS int 0x10 ah=0x0e does display text so I’m going to write a small library to display text. Thank you for your help again. I was stuck on this for about a month


Top
 Profile  
 
 Post subject: Re: Chromebook 3 with seabios VGA question
PostPosted: Sun Aug 25, 2019 1:52 pm 
Offline
Member
Member
User avatar

Joined: Mon May 22, 2017 5:56 am
Posts: 142
MichaelPetch wrote:
It appears the BIOS you are using isn't typical and it is doing everything in graphics mode in the LFB.

Just a note: Chromebooks aren't typical; not entirely compatible with standard PCs. SeaBIOS usually gets the blame. :) It's possible the only incompatibility is this lack of standard VGA modes.

_________________
Wir mussen wissen, wir werden wissen.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group