Re: Reading the GDT in kernel space?

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

 



On Wed, Aug 23, 2006 at 07:39:22PM +0530, Rajat Jain wrote:
> Hi,
> 
> I'm trying to read & display the GDT contents in kernel space. Is this
> permissible? I used the "sgdt" assembly instruction to load the GDT
> register, and found out the address & length of GDT from that (It is
> "0000c248") . Is this the physical or the virtual address?

I quickly looked at the Intel Instruction Set Reference for SGDT, and it
says that the stored value is 6 bytes long.

"The 16-bit limit field of the register is stored in the low 2 bytes of the
memory location and the 32-bit base address is stored in the high 4 bytes."

0xc248xxxx looks like a valid address, so my guess is that you are off by 2
bytes :)

Hope this helps,

Josef "Jeff" Sipek.

-- 
Once you have their hardware. Never give it back.
(The First Rule of Hardware Acquisition)

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux