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

Re: How does kernel know the type of processor?



ece lca wrote:
> 
>   Hi, I have a newbie question.
>   My kernel is compiled for i386, but when I use
> "uname -a", it correctly tells the type of processor
> in my machine, which is an i686.
>   Could someone give an idea how the kernel does this?
>   Thank you.

Have a look at arch/i386/kernel/head.S. The "cpuid"
instruction seems to tell you everything you need
to know.

-- Joe
 
-- Joe Knapka
"You know how many remote castles there are along the gorges? You
 can't MOVE for remote castles!" -- Lu Tze re. Uberwald
// Linux MM Documentation in progress:
// http://home.earthlink.net/~jknapka/linux-mm/vmoutline.html
* Evolution is an "unproven theory" in the same sense that gravity is. *
-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/