* init_tss problem
@ 2004-09-18 22:55 Cyril Wattebled
2004-09-19 8:41 ` Remi Colinet
0 siblings, 1 reply; 2+ messages in thread
From: Cyril Wattebled @ 2004-09-18 22:55 UTC (permalink / raw)
To: linux-kernel
Hi,
I'm trying to understand some piece of kernel code and I've come to this :
In arch/i386/kernel/process.c:
struct tss_struct *tss = &per_cpu(init_tss, cpu);
I don't know what init_tss is.
It's defined in asm/processor.h with the macro DEFINE_PER_CPU
(tss_struct, init_tss)
which basically does extern tss_struct init_tss.
But this init_tss has to be declared somewhere to be used as extern ...
I've searched the entire code for any reference to it but I only found it in
arch/x86_64/kernel/init_task.c which is normaly not compiled on my system.
I'm in a dead end ... anyone .. help ?
Thanks
--
Cyril Wattebled
neurowork@free.fr
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: init_tss problem
2004-09-18 22:55 init_tss problem Cyril Wattebled
@ 2004-09-19 8:41 ` Remi Colinet
0 siblings, 0 replies; 2+ messages in thread
From: Remi Colinet @ 2004-09-19 8:41 UTC (permalink / raw)
To: Cyril Wattebled; +Cc: linux-kernel
Cyril Wattebled wrote:
> Hi,
> I'm trying to understand some piece of kernel code and I've come to
> this :
> In arch/i386/kernel/process.c:
> struct tss_struct *tss = &per_cpu(init_tss, cpu);
> I don't know what init_tss is.
> It's defined in asm/processor.h with the macro DEFINE_PER_CPU
> (tss_struct, init_tss)
> which basically does extern tss_struct init_tss.
> But this init_tss has to be declared somewhere to be used as extern ...
> I've searched the entire code for any reference to it but I only found
> it in
> arch/x86_64/kernel/init_task.c which is normaly not compiled on my
> system.
> I'm in a dead end ... anyone .. help ?
> Thanks
TSS is a Task State Segment. It is defined in include/asm-i386/processor.h.
init_tss is the Task State Segment used by the statically forked init
process. (process 0)
Each CPU has its own tss.
This segment is used by i386 and x86_64 CPUs to store the CPU/process
context. Could be used to have hardware context switch (not used by Linux).
In order to have a clean understanding about TSS (and more generally
i386), you should have a look at the i386 Intel specifiction, manual vol
3 (system programming manual)
Then, you could also read the AMD64 specification if you wish to
understand x86_64...
Regards
Remi
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-09-19 9:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-18 22:55 init_tss problem Cyril Wattebled
2004-09-19 8:41 ` Remi Colinet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox