Skip to contentSkip to conversation

Grub Memory Map - Processor

DISCUSSION Juan_2007 3 participants 4 messages Oct 29, 2007 – Nov 5, 2007

lore
Share & tools
lore

Juan_2007

author
#0 lore raw

I need to make a Project for the University and i wanted to know if any of you guys, knew if the Grub left any information regarding the type of microprocessor that the computer is using. i know the grub leaves information about the amount of memory and i suppose it does the same with the microprocessor, if any of you have any clues about it, or where can i get that info, i´ll be glad to know. The GRUB webpage has an incomplete manual, and the part of the memory map y incomplete so i can´t read it from there.

Thanks, Juan.

Signature · 2 lines
View this message in context: http://www.nabble.com/Grub-Memory-Map---Processor-tf4709406.html#a13461040
Sent from the Grub - Dev mailing list archive at Nabble.com.
#1 lore raw

Juan,

You may use the CPUID instruction to correctly identify the processor your code is executing on. GRUB does not provide such information as part of the Multiboot info.

Andrei Evgenievich Warkentin
[email protected]
Cell: (+1) (847) 321-15-55

29.10.2007, в 12:00, Juan_2007 писал(а):

Quoted 21 lines

I need to make a Project for the University and i wanted to know if any of you guys, knew if the Grub left any information regarding the type of microprocessor that the computer is using. i know the grub leaves information about the amount of memory and i suppose it does the same with the microprocessor, if any of you have any clues about it, or where can i get that info, i´ll be glad to know. The GRUB webpage has an incomplete manual, and the part of the memory map y incomplete so i can´t read it from there.

Thanks, Juan.

Signature · 9 lines
View this message in context: http://www.nabble.com/Grub-Memory-Map---Processor-tf4709406.html#a13461040
Sent from the Grub - Dev mailing list archive at Nabble.com.



_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
#3 lore raw
In reply to Juan_2007
Quoted 9 lines · On Mon, Oct 29, 2007 at 10:00:43AM -0700, Juan_2007 wrote:

I need to make a Project for the University and i wanted to know if any of you guys, knew if the Grub left any information regarding the type of microprocessor that the computer is using. i know the grub leaves information about the amount of memory and i suppose it does the same with the microprocessor, if any of you have any clues about it, or where can i get that info, i´ll be glad to know. The GRUB webpage has an incomplete manual, and the part of the memory map y incomplete so i can´t read it from there.

Check the `cpuid' command. It's quite incomplete (currently only detects long mode flag), but the interface was designed with extensibility in mind (patches to add detection for new cpuid stuff welcome).

Signature · 5 lines
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
#2 lore raw
In reply to Andrei E. Warkentin
Quoted 5 lines · Andrei E. Warkentin

Juan,

You may use the CPUID instruction to correctly identify the processor your code is executing on. GRUB does not provide such information as part of the Multiboot info.

Ah, uhm right. I was thinking in terms of GRUB internals rather than multiboot on my last reply. Sorry for the confusion :-/

If you're working on an OS kernel, just use CPUID instruction like Andrei said. You can see our cpuid command for an example on how to do it (license terms apply if you copy actual code).

Signature · 5 lines
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)