Hi,
while reading one article I came across the following lines:
The segment base addresses in segment descriptors (which correspond to segment selector __KERNEL_CS and __KERNEL_DS) are equal to 0; therefore, the logical address offset (in segment:offset format) will be equal to its linear address if either of these segment selectors is used. For zImage, CS:EIP is at logical address 10:1000 (linear address 0x1000) now; for bzImage, 10:100000 (linear address 0x100000).
I have one basic question please help on this:
1.Here CS value 0x10 really means ?
2.why the starting address for zimage different from bzimage .
Thanks,
karunakara.
2008/6/23 Steven Zhou <lullaby2005@xxxxxxxxx>:
Thanks for your help.
I think I've got it.
From the programmer's view, we can just see the logical address only.
The picture
"logical address--->(segmentation) --->linear address--->(paging) --->physical address"
was processed by kernel and hardware, so user mode programmer does not care it. He or she just care the logical address, it's enough.
Please do corret me if I'm wrong. Thanks.--
On Mon, Jun 23, 2008 at 8:03 PM, Thomas Petazzoni <thomas.petazzoni@xxxxxxxxxxxxxxxxxx> wrote:
Hi,
Le Mon, 23 Jun 2008 06:45:47 -0500,
"Mayank Kaushik" <mayank.utexas@xxxxxxxxx> a écrit :
In Linux, all segments have a size of 4 GB (on x86), which
> Under x86, we have both segmentation and paging. Here's a rough flow:
>
> Logical Address (<Segment>:<Offset>) ---> (segmentation)---> Linear
> address ---> (paging)---> Physical Address.
means that mostly the convertion between "logical" and "linear" address
doesn't do anything.
The problem with all these terms "logical", "linear" and "virtual" is
that everybody uses them with a slightly different meaning.
To make it simple, in Linux you have two different type of addresses:
* physical, from 0 to the size of your physical RAM (I left out the
peripherals mapped in the physical address space) ;
* virtual, from 0 to 2^32 bits on 32 bits architectures.
The stack address that you see is a virtual address, as are all the
addresses that you can see in /proc/[pid]/maps.
Sincerly,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com
Best Regards.