OSDev.org
https://forum.osdev.org/

Chromebook 3 with seabios VGA question
https://forum.osdev.org/viewtopic.php?f=1&t=33798
Page 1 of 1

Author:  ryan64128256 [ Mon Jul 29, 2019 6:37 pm ]
Post subject:  Chromebook 3 with seabios VGA question

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)

Author:  MichaelPetch [ Tue Jul 30, 2019 3:42 am ]
Post subject:  Re: Chromebook 3 with seabios VGA question

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?

Author:  ryan64128256 [ Tue Jul 30, 2019 7:13 am ]
Post subject:  Re: Chromebook 3 with seabios VGA question

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

Author:  MichaelPetch [ Tue Jul 30, 2019 7:09 pm ]
Post subject:  Re: Chromebook 3 with seabios VGA question

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.

Author:  Octocontrabass [ Wed Jul 31, 2019 2:38 am ]
Post subject:  Re: Chromebook 3 with seabios VGA question

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.

Author:  ryan64128256 [ Wed Jul 31, 2019 3:28 pm ]
Post subject:  Re: Chromebook 3 with seabios VGA question

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!

Author:  ryan64128256 [ Sat Aug 03, 2019 3:57 pm ]
Post subject:  Re: Chromebook 3 with seabios VGA question

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...

Author:  MichaelPetch [ Sat Aug 03, 2019 8:04 pm ]
Post subject:  Re: Chromebook 3 with seabios VGA question

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?

Author:  ryan64128256 [ Sun Aug 04, 2019 11:03 am ]
Post subject:  Re: Chromebook 3 with seabios VGA question

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

Author:  MichaelPetch [ Sun Aug 04, 2019 3:16 pm ]
Post subject:  Re: Chromebook 3 with seabios VGA question

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.

Author:  ryan64128256 [ Mon Aug 05, 2019 7:13 am ]
Post subject:  Re: Chromebook 3 with seabios VGA question

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

Author:  eekee [ Sun Aug 25, 2019 1:52 pm ]
Post subject:  Re: Chromebook 3 with seabios VGA question

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.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/