From: "Vesa Jääskeläinen" <chaac@nic.fi>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Move assembly code out of the kernel
Date: Sun, 24 Aug 2008 12:37:36 +0300 [thread overview]
Message-ID: <48B12BE0.9080303@nic.fi> (raw)
In-Reply-To: <ca0f59980808170955n19b11c79m61cd3ff54829f4de@mail.gmail.com>
Bean wrote:
> On Sun, Aug 17, 2008 at 7:31 PM, Vesa Jääskeläinen <chaac@nic.fi> wrote:
>> chaac@nic.fi wrote:
>>> I have made generic function that does basically the same thing for bios
>>> service 0x10 (video). In that modification you prepare registers
>>> structure that will be configured during real mode switching. I am yet
>>> to commit it for review, but I think it would be more generic way to do
>>> this. When I come back from my holiday I will commit the code for review.
>>>
>>> So please wait a bit before committing this :)
>
> Hi,
>
> I'm thinking perhaps we can make it more generic and support multiple
> INT in one function. One way to do this is not use INT, but retrieve
> the address from IVT and do a far call. On return, pop the flag on
> stack. This would also make it easily to support far call, In that
> case, we just don't pop the flag.
Hmm. I have faint memory that this has been done previously somewhere
:)... need to think this a bit more.
> I also notice that you do the protected/real mode switch in
> grub_bioscall_int10h, why not use the prot_to_real and real_to_prot ?
> If you need to keep the value of %eax, you can store it in a structure
> and pass it using other register like %ecx.
I wanted it to be easily manageable so I can alter everything in order
to get it working at the first :)
But basically the points were:
- I needed to put registers to the stack and thus need to differentiate
esp and ebp.
- When returning I need to store those registers to structure provided
by caller.
- There was no need to "corrupt" stack area with return address, and I
needed stack for different purpose
Thanks,
Vesa Jääskeläinen
next prev parent reply other threads:[~2008-08-24 9:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-31 13:55 [PATCH] Move assembly code out of the kernel chaac
2008-08-17 11:31 ` Vesa Jääskeläinen
2008-08-17 16:55 ` Bean
2008-08-24 9:37 ` Vesa Jääskeläinen [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-07-30 21:20 Bean
2008-07-31 7:46 ` Bean
2008-07-31 11:22 ` Robert Millan
2008-07-31 13:56 ` Bean
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=48B12BE0.9080303@nic.fi \
--to=chaac@nic.fi \
--cc=grub-devel@gnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.