From: Frederic Marmond <fmarmond@eprocess.fr>
To: linux-assembly@vger.kernel.org
Subject: booting a new kernel from an already running kernel
Date: Tue, 03 Sep 2002 16:37:42 +0200 [thread overview]
Message-ID: <3D74C936.5070907@eprocess.fr> (raw)
hi dear all...
I try to boot a kernel from an already running kernel.
I use 'monte'
(http://www.scyld.com/products/beowulf/software/monte.html), which was
designed for 2.2 kernels.
After adapting it to 2.4 (...), it do something...
of course, it is not what i wanted.
Some questions for ATT syntax guru:
a bit of C source code
__asm__ __volatile__
(/* Grab the args for our memcpy off the stack now while we still
* have page tables. */
" movl %0, %%ebx \n" /* Arg storage: memlist -> EBX */
" movl %1, %%edx \n" /* Arg storage: entry -> EDX */
" movl %2, %%ebp \n" /* Arg storage: flags -> EBP */
/* Turn off paging, leave protected mode turned on. */
" movl %%cr0, %%eax \n" /* Turn off paging (bit 31 in
CR0) */
" andl $0x7FFFFFFF, %%eax \n"
" movl %%eax, %%cr0 \n"
" xorl %%eax, %%eax \n" /* Flush the TLB (write 0 to
CR3) */
" movl %%eax, %%cr3 \n"
what I have in dessasemble (ldasm) for this function:
:00000763 8b5d08 mov ebx, ptr [ebp+8]
:00000766 8b550c mov edx, ptr [ebp]
:00000769 8b6d10 mov ebp, ptr [ebp+10]
:0000076c 0f20c0 mov eax, cr0
:0000076f 25ffffff7f and eax, 7fffffff
:00000774 0f22c0 mov cr0, eax
:00000777 31c0 xor eax, eax
:00000779 0f22d8 mov cr3, eax
My main question is:
what "movl %0,%%ebx" is supposed to do?
reading at ebp+8 ('local variables' + 8)?
Why %0, %1 and %2 are not compiled in the good order (like ebp+0x8,
ebp+0xc, and ebp+0x10 ?)
if any idea/known about the general problem (booting a kernel from a
running system, like $re-run bzImage-foo.bar).
thanks for futur answers.
Fred
next reply other threads:[~2002-09-03 14:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-03 14:37 Frederic Marmond [this message]
2002-09-03 18:00 ` booting a new kernel from an already running kernel Jani Monoses
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=3D74C936.5070907@eprocess.fr \
--to=fmarmond@eprocess.fr \
--cc=linux-assembly@vger.kernel.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