Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7937907
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:39:09+00:00 2026-06-03T22:39:09+00:00

As part of some OS development for a 32-bit x86 processor, I am considering

  • 0

As part of some OS development for a 32-bit x86 processor, I am considering using an task gate in the interrupt descriptor table for the page fault vector. The aim is to force a task switch so that the handler’s stack will be guaranteed to be mapped (and avoid the case wherein part of stack of the interrupted task was not mapped).

I am running my kernel (such as it is) under QEMU, but am finding that when the page fault occurs, it crashes (I’m back to command prompt). I’ve been reading and digging searching for hints that may help me figure out the exact cause. I figure that I am missing something and/or have misunderstood something. Incidentally, when I set the page fault vecotr up to use an interrupt gate, I can get things to work as I expect them. It is when I try to use a task gate for this that I encounter problems (and yes, I do want to persist in trying to use the task gate).

The IDT portion is set up correctly to register a task gate for the page fault vector. Its selector refers to a descriptor for the TSS in the GDT. As far as the descriptor for the TSS in the GDT, I am certain that too is set up properly.

However, I am not 100% certain if I have the TSS properly populated and have been unable thus far to determine exactly how to set up all of its fields. Some of them such as esp, eip, cs, ds, es, fs, gs, ss and eflags have been relatively straight forward. However, others such as the LDT segment selector are less clear. Must the LDT segment selector be non-zero AND point to an LDT descriptor in the GDT? Which of these fields must be set for the scenario described above? I am having a heck of time figuring this one out.

Any help would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T22:39:10+00:00Added an answer on June 3, 2026 at 10:39 pm

    The LDT is not necessary in a correctly functioning x86 operating system (indeed, it is forbidden in a x86-64 operating system).

    To avoid using it, set it to zero.

    One thing in particular to be aware of – the structures on osdev.org about TSS is back-to-front (http://wiki.osdev.org/TSS). You’ll need to be careful, since getting the TSS wrong will trigger a TSS-fault exception.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to get started doing some game development using Microsoft's XNA. Part of
I'm learning SharePoint development. I read some general how to build a web part,
As part of some WSGI middleware I want to write a python class that
Just putting part of some code here where I am writing two values to
how can i get some part of string (in symbols). For example: $string =
How can I get some part of string that I need? accountid=xxxxxx type=prem servertime=1256876305
I tried to update some part of a matrix, I got the following error
I am trying to extract some part of string and store it to hbase
I need to make some part of text bold while displaying in jquery: $(':checked').each(function()
I would like to update (change the content) some part of the webpage without

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.