[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hurd-bug
Subject:    Re: [PATCH] SMP initialization: detection and enumeration
From:       Almudena Garcia <liberamenso10000 () gmail ! com>
Date:       2020-07-30 21:46:11
Message-ID: CA+vQsMgAbXus-EKUfqU-MiBs8=41UjYasdcokSpuoUMnUX81ag () mail ! gmail ! com
[Download RAW message or body]

> You don't. Read about GDT and segments register, and segmentation in
> general. In the GDT you'd only store a pointer to the per-cpu data, and
> processors will load it.

> > Is there any way to avoid using an array for that?

> Yes, you'd just store the ID in the per-cpu data.

Thanks, I'll take notes about this

El jue., 30 jul. 2020 a las 23:35, Samuel Thibault (<samuel.thibault@gnu.or=
g>)
escribi=C3=B3:

> Almudena Garcia, le jeu. 30 juil. 2020 23:30:55 +0200, a ecrit:
> > > As Richard said, we just want to have different GDTs on the different
> > > processors, so that we wan use the fs segment register to implement T=
LS
> > > in the kernel and have per-cpu data cost essentially the same as glob=
al
> > > data.
> >
> > Yes, but how can I store the relation APIC ID - Kernel ID in the GDT?
>
> You don't. Read about GDT and segments register, and segmentation in
> general. In the GDT you'd only store a pointer to the per-cpu data, and
> processors will load it.
>
> > Is there any way to avoid using an array for that?
>
> Yes, you'd just store the ID in the per-cpu data.
>
> Samuel
>

[Attachment #3 (text/html)]

<div dir="ltr">&gt; You don&#39;t. Read about GDT and segments register, and \
segmentation in<br> &gt; general. In the GDT you&#39;d only store a pointer to the \
per-cpu data, and<br> &gt; processors will load it.<span class="gmail-im"><br>
<br>
&gt; &gt; Is there any way to avoid using an array for that?<br>
<br></span><div>
&gt; Yes, you&#39;d just store the ID in the per-cpu data.<font \
color="#888888"><br></font></div><div><br></div><div><font color="#888888">Thanks, \
I&#39;ll take notes about this</font><br></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">El jue., 30 jul. 2020 a las \
23:35, Samuel Thibault (&lt;<a \
href="mailto:samuel.thibault@gnu.org">samuel.thibault@gnu.org</a>&gt;) \
escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Almudena Garcia, le \
jeu. 30 juil. 2020 23:30:55 +0200, a ecrit:<br> &gt; &gt; As Richard said, we just \
want to have different GDTs on the different<br> &gt; &gt; processors, so that we wan \
use the fs segment register to implement TLS<br> &gt; &gt; in the kernel and have \
per-cpu data cost essentially the same as global<br> &gt; &gt; data.<br>
&gt; <br>
&gt; Yes, but how can I store the relation APIC ID - Kernel ID in the GDT?<br>
<br>
You don&#39;t. Read about GDT and segments register, and segmentation in<br>
general. In the GDT you&#39;d only store a pointer to the per-cpu data, and<br>
processors will load it.<br>
<br>
&gt; Is there any way to avoid using an array for that?<br>
<br>
Yes, you&#39;d just store the ID in the per-cpu data.<br>
<br>
Samuel<br>
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic