Re: kexec and frame buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Luca Falavigna ha scritto:
> Eric W. Biederman ha scritto:
> 
>>>Anyway I believe you also want to look at include/linux/tty.h
>>>at the screen_info structure.  I believe that is where
>>>all of that information is passed.
> 
> I noticed. Maybe if we fill struct x86_linux_param_header with some values
> obtained from struct screen_info, we should be able to "score that mid-court
> prayer" ;)
> 
I tried to implement a new ioctl command in fb_ioctl() in order to retrieve and
store screen_info variables into struct x86_linux_param_header, but I got the
same result: no messages shown in console, as I supposed.
After that I looked at video.S, especially an interesting label called "video":

# This is the main entry point called by setup.S
# %ds *must* be pointing to the bootsector
video:	pushw	%ds		# We use different segments
	pushw	%ds		# FS contains original DS
	popw	%fs
[...]
#ifdef CONFIG_VIDEO_SELECT
	movw	%fs:(0x01fa), %ax		# User selected video mode
	cmpw	$ASK_VGA, %ax			# Bring up the menu
	jz	vid2
[...]

Video mode is stored (by bootloader, actually) at offset 0x01fa from a given
boot sector, which should be located at physical address DEF_SETUPSEG (0x9020).
Feel free to correct me if I'm wrong.
If we could store current video mode before executing reboot_code_buffer,
probably setup() function would take care of anything else. So we could
implement a function (or an assembly stub) in machine_kexec which does this job.
I think this is the best (and safest) solution.

Regards,
- --
					Luca

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQEVAwUBQvzwDczkDT3RfMB6AQJlQAf+INkCMjhmm18RPCMHXij7WmOL/4TCKTc8
fZCf+IzhsSUxwkfYmUbTfXtJ/xCxIyRh5gBGirB9n/s9NzOiYwmcQWMrn7DbWpWu
YBVkTdz3W3Y0dA08baIYQ8u51gJvnVMuGJEFqsLxPx+gzHJOETEGkzhuyUuPk+J+
N4OkSyTGYt5zXZmyVzV7KZ8XLrfX3XvRLV3m2aey0Hz4jcf8sIozANokDRdG3MpN
7F0Z4yL1EnMI4oijHSDLeqbycAg8iYa49P45EO6+jzuRH2i2bnq8hOvBHa0+B01Q
Gr0Ljd+DJ2jNVO4ecqbWC9oFxBFXsRN+ThAxsYEbWDGIrJdAa32mfA==
=BztK
-----END PGP SIGNATURE-----

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux