Find the answer to your Linux question:
Results 1 to 8 of 8
I need to enter some printk statements display the address of GDT and all the entries In what file I can do this...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2009
    Posts
    4

    Displaying GDT addresess


    I need to enter some printk statements display the address of GDT and all the entries

    In what file I can do this

  2. #2
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    Welcome to the Forums Jivanm...The GDT tables you want to print are they Intel/AMD 32 bit or 64 bit?

  3. #3
    Just Joined!
    Join Date
    Mar 2009
    Posts
    4
    Gerard,

    this is on Intel 32 Bit

    Thanks

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    Quote Originally Posted by jivanm View Post
    I need to enter some printk statements display the address of GDT and all the entries
    I'm not sure what your question is but if it has to do with intel's GDT you should check intel's online manuals...just google intel manuals or AMD manuals since they're both the same...

    A note the GDT structures mention in these manuals are packed and should be defined like

    Code:
    struct 
    {
    unsigned short limit;
    void *base;
    }__attribute__((packed)) gdtr
    if you have any question please post them with the code you have so far...Hope this helps Gerard4143

  6. #5
    Just Joined!
    Join Date
    Mar 2009
    Posts
    4
    I would like printk statements to display the address of GDT and all the entries
    the GDT Structure gets defined as a Macro in segment.h
    like You defined there.
    My question is, which is the source file that I need to edit to add the printk statements,
    is it Head.S?
    I see that the gdt gets initialized there.
    hope this clarifies what I am looking for

  7. #6
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    Are you trying to printk the GDT tables while Linux boots?

  8. #7
    Just Joined!
    Join Date
    Mar 2009
    Posts
    4
    That would be the case, I will recompile the kernel
    and boot with the new Image with the printk staments in place

  9. #8
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    I know how to do everything except printk the GDT entries on boot up..sorry Gerard4143

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •