public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: kernel list <linux-kernel@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: factor out common s2ram wakeup code
Date: Tue, 22 Jan 2008 23:03:01 +0100	[thread overview]
Message-ID: <20080122220301.GA8019@elf.ucw.cz> (raw)
In-Reply-To: <47966546.6040002@zytor.com>

On Tue 2008-01-22 13:51:02, H. Peter Anvin wrote:
> Pavel Machek wrote:
>>>
>>> The biggest question is if your 16-bit code needs to touch symbols in the 
>>> 32/64-bit code, or vice versa.  That complicates things a little bit, 
>>> obviously.
>>
>> The code is in arch/x86/kernel/acpi/wakeup_32.S
>> . acpi_copy_wakeup_routine needs to know offsets within 16-bit code. I'd 
>> like to somehow call code from arch/x86/boot/video*.c
>> ... current version just took (old) .S code, and cut&paste-s it.
>>
>
> Right, I know.
>
>>> If not, the easiest way is to link the 16-bit code into a separate binary 
>>> (including both assembly and C code) which can then be included in the 
>>> kernel proper as a binary blob.  If it *does* need to reference outside 
>>> symbols, then it needs to be part of the overall link, which means 
>>> mucking with the top-level link script.
>>> That's obviously more complex.
>>>
>>> Either way, the Makefile bit of this will be a lot easier if we move the 
>>> 16-bit code into a separate directory.
>>
>> I only need arch/x86/boot/video*.c ...
>>
>>> Let me know which way you think makes more sense, and I can send you a 
>>> framework patch.
>>
>> I need to access data in that 16-bit code...
>
> Would a shared structure be OK for that?  That's easier than dealing with 
> symbols.

Shared structure would be okay, plus I need pointer to beggining and
end of code so that I can copy it to lowmem.
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  reply	other threads:[~2008-01-22 22:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-22 19:37 factor out common s2ram wakeup code Pavel Machek
2008-01-22 20:27 ` H. Peter Anvin
     [not found]   ` <20080122205625.GC4317@elf.ucw.cz>
     [not found]     ` <47965B13.9080705@zytor.com>
2008-01-22 21:24       ` Pavel Machek
2008-01-22 21:51         ` H. Peter Anvin
2008-01-22 22:03           ` Pavel Machek [this message]
2008-01-22 22:09             ` H. Peter Anvin
     [not found]             ` <47969BB2.2020409@zytor.com>
2008-01-25 23:12               ` Pavel Machek
2008-01-25 23:36                 ` H. Peter Anvin
2008-01-24  0:20 ` Rafael J. Wysocki

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=20080122220301.GA8019@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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