Re: segmentation question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sat, Oct 2, 2010 at 12:38 AM, Sri Ram Vemulpali
<sri.ram.gmu06@xxxxxxxxx> wrote:
> Hi All,
>
>      I am developing segmentation for my kernel. In that process I
> choose to divide whole memory in to fixed size segments. So a 4GB
> memory can be divided in to 8192 segments. So I initialize segment
> descriptors in to the GTD withs segments base address and limit. Here
> base address are 0,0x10000,0x20000,..... and limit is 64kb always for
> every segment. For a task if I choose a segment to assign, I will
> place the index of that segment descriptor in to CS, DS. Now when
> process generates address to put on address bus, then it will do
> computation from logical address to linear address.
> After processor picks logical address, it chooses segment descriptor
> and adds this 32-bit logical address to segment base address to
> generate linear address. Now my question is, if my segment size is
> 64kb, how is that 32-bit offset is added to segment base address,
> which is not right. It should only consider 16-bit offset to add to
> base to generate linear address. How can I tell to my processor to
> choose only 16-bit offset. Does processor drives offset bit width
> automatically based on limit defined in segment descriptor.

You don't have to "tell" your processor to choose only 16-bit offset.
If the offset is greater than segment limit an exception will occur.


>
> Any insight in to this will help me. please clarify my doubt. Waiting
> for you reply.

> To unsubscribe from this list: send an email with
> "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
> Please read the FAQ at http://kernelnewbies.org/FAQ
>
>
@Bond: GTD should be GDT.Also please have a look inside x86 reference manual.

thanks,
Daniel.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux