mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Luca Falavigna <dktrkranz@gmail.com>
Cc: rddunlap@osdl.org, fastboot@osdl.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: kexec and frame buffer
Date: Fri, 12 Aug 2005 11:10:55 -0600	[thread overview]
Message-ID: <m1d5ojw068.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <42FCF00F.2040709@gmail.com> (Luca Falavigna's message of "Fri, 12 Aug 2005 18:53:03 +0000")

Luca Falavigna <dktrkranz@gmail.com> writes:

> 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.
Hmm. very odd.  Sounds very much like an implementation problem.

> 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.
That is the default address, it can actually move quite a bit.

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

That is why we have sys_kexec_load().
With a working ioctl (or other way to query the information) we
just need to populate screen_info from x86-linux-setup.c in /sbin/kexec.

Eric

      reply	other threads:[~2005-08-12 17:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-04 13:35 Luca Falavigna
2005-08-04 18:43 ` Eric W. Biederman
2005-08-06 14:19   ` Luca Falavigna
2005-08-06 16:50     ` Eric W. Biederman
2005-08-07 15:19       ` Luca Falavigna
2005-08-12 18:53         ` Luca Falavigna
2005-08-12 17:10           ` Eric W. Biederman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1d5ojw068.fsf@ebiederm.dsl.xmission.com \
    --to=ebiederm@xmission.com \
    --cc=dktrkranz@gmail.com \
    --cc=fastboot@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rddunlap@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome