* segmentation question
@ 2010-10-01 21:38 Sri Ram Vemulpali
2010-10-02 9:42 ` Bond
2010-10-02 10:06 ` Daniel Baluta
0 siblings, 2 replies; 5+ messages in thread
From: Sri Ram Vemulpali @ 2010-10-01 21:38 UTC (permalink / raw)
To: Kernel-newbies, Linux-rt-users
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.
Any insight in to this will help me. please clarify my doubt. Waiting
for you reply.
Regards,
Sri.
--
Regards,
Sri.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: segmentation question
2010-10-01 21:38 segmentation question Sri Ram Vemulpali
@ 2010-10-02 9:42 ` Bond
2010-10-02 10:06 ` Daniel Baluta
1 sibling, 0 replies; 5+ messages in thread
From: Bond @ 2010-10-02 9:42 UTC (permalink / raw)
To: Sri Ram Vemulpali; +Cc: Kernel-newbies, Linux-rt-users
[-- Attachment #1: Type: text/plain, Size: 457 bytes --]
Sorry for interrupting in between.
On Sat, Oct 2, 2010 at 3:08 AM, Sri Ram Vemulpali
<sri.ram.gmu06@gmail.com>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
What is GTD
Where are you reading all this can you give some link I also want to try.
>
>
[-- Attachment #2: Type: text/html, Size: 897 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: segmentation question
2010-10-01 21:38 segmentation question Sri Ram Vemulpali
2010-10-02 9:42 ` Bond
@ 2010-10-02 10:06 ` Daniel Baluta
2010-10-02 10:15 ` Raz
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Baluta @ 2010-10-02 10:06 UTC (permalink / raw)
To: Sri Ram Vemulpali; +Cc: Kernel-newbies, Linux-rt-users, Bond
Hi,
On Sat, Oct 2, 2010 at 12:38 AM, Sri Ram Vemulpali
<sri.ram.gmu06@gmail.com> 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@nl.linux.org
> 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 the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: segmentation question
2010-10-02 10:06 ` Daniel Baluta
@ 2010-10-02 10:15 ` Raz
2010-10-02 16:53 ` Sri Ram Vemulpali
0 siblings, 1 reply; 5+ messages in thread
From: Raz @ 2010-10-02 10:15 UTC (permalink / raw)
To: Daniel Baluta; +Cc: Linux-rt-users, Sri Ram Vemulpali, Kernel-newbies, Bond
[-- Attachment #1: Type: text/plain, Size: 829 bytes --]
Can you share the code?
On 02/10/2010 12:10, "Daniel Baluta" <daniel.baluta@gmail.com> wrote:
Hi,
On Sat, Oct 2, 2010 at 12:38 AM, Sri Ram Vemulpali
<sri.ram.gmu06@gmail.com> wrote:
> Hi All,
>
> I am developing segmentation for my kernel. In that process I
> choose to divide ...
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@nl.linu...
@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@nl.linu...
[-- Attachment #2: Type: text/html, Size: 1346 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: segmentation question
2010-10-02 10:15 ` Raz
@ 2010-10-02 16:53 ` Sri Ram Vemulpali
0 siblings, 0 replies; 5+ messages in thread
From: Sri Ram Vemulpali @ 2010-10-02 16:53 UTC (permalink / raw)
To: Raz; +Cc: Daniel Baluta, Linux-rt-users, Kernel-newbies, Bond
Also, can I modify GDT when I am managing memory allocation to tasks.
I mean a task need 120kb, but my segments are divided in to 64kb each.
So, I have to merge two segments to allocate requested memory for
task. In that case I think I need to modify GDT for a descriptor
setting limit.
Usually GDT's are initialized at boot time. But how about at the time
of memory allocation.
NOTE: I am not using any paging at all.
Here GDT means global descriptor table.
Please let me know. Thanks.
Sri.
Here are the links to how to develop kernel.
Also, read intel system programming guide, which gives very good
guidance to architecture
and OS development.
http://www.osdever.net/tutorials/view/brans-kernel-development-tutorial
On Sat, Oct 2, 2010 at 6:15 AM, Raz <raziebe@gmail.com> wrote:
> Can you share the code?
>
> On 02/10/2010 12:10, "Daniel Baluta" <daniel.baluta@gmail.com> wrote:
>
> Hi,
>
> On Sat, Oct 2, 2010 at 12:38 AM, Sri Ram Vemulpali
>
> <sri.ram.gmu06@gmail.com> wrote:
>
>> Hi All,
>>
>> I am developing segmentation for my kernel. In that process I
>> choose to divide ...
>
> 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@nl.linu...
>
> @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@nl.linu...
--
Regards,
Sri.
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-10-02 16:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-01 21:38 segmentation question Sri Ram Vemulpali
2010-10-02 9:42 ` Bond
2010-10-02 10:06 ` Daniel Baluta
2010-10-02 10:15 ` Raz
2010-10-02 16:53 ` Sri Ram Vemulpali
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).