lkml.org 
[lkml]   [2012]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: why the decompressed procedure move kernel from address 0x100000(1M) to 0x1000000(16M) +x
hacklu <embedway.linux@gmail.com> writes:

> hi all,
> recently, I got some puzzle when I read source code of the system boot. I need
> some help.
>
> at the end of src/arch/x86/boot/header.S, kernel jump to 0x100000(where is the
> src/arch/x86/boot/compressed/head_32.S).
> in __this__ head_32.S, I found the kernel is move to 0x1000000(mostly is to
> here) +x. the x distance is used for decompressed buf. must leave some distance
> for decompressing without overlap.
>
> after the move, kernel is decompressed at 0x1000000(16m). and jump to it.
>
> so why not decompressed kernel at 0x100000(1M) to 0x1000000(16m) directly
> without moving?
>
> is the move necessary?

The move is nececcessary if we are doing the decompression in place.
Without a move it is hard to tell if there are going to be overlapping
address problems. The move is cheap so there is no apparent reason
to optimize it away.

Eric


\
 
 \ /
  Last update: 2012-06-03 02:01    [W:1.288 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site