Project

General

Profile

Actions

Bug #15039

closed

kernel initializes early GDT

Added by Dan Cross 2 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Outside of Xen, when the kernel goes to initialize its GDT on the boot processor, it retrieves the boot GDT and copies some boot-specific entries from that into the new GDT.

This unnecessarily couples the bootstrap and the kernel. To the extent that the kernel needs to set up segments relevant to boot, it should simply do so itself and avoid copying them from the bootstrap GDT.

Actions #1

Updated by Dan Cross 2 months ago

  • Assignee set to Dan Cross
  • Priority changed from Normal to Low
Actions #2

Updated by Electric Monk 2 months ago

  • Gerrit CR set to 2414
Actions #3

Updated by Dan Cross 2 months ago

CR 2414 addresses this, changing GDT initialization so that the kernel creates the segment descriptors that it expects, rather than relying on the bootstrap to set these up and copying them.

Actions #4

Updated by Dan Cross 2 months ago

Tested on i86pc on AMD; my Intel testing machine is inoperable at the moment, but that is a separate issue.

Actions #5

Updated by Dan Cross 2 months ago

Tested on i86pc on Intel, and works.

Actions #6

Updated by Dan Cross about 2 months ago

Tested with fast reboot and that works, too!

Actions #7

Updated by Electric Monk about 2 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 075343cbd89929c34843ffe183e5e2e633367bd6

commit  075343cbd89929c34843ffe183e5e2e633367bd6
Author: Dan Cross <cross@oxidecomputer.com>
Date:   2022-10-12T20:03:14.000Z

    15039 kernel initializes early GDT
    Reviewed by: Rich Lowe <richlowe@richlowe.net>
    Reviewed by: Thirteen Oxide <wesolows@oxide.computer>
    Reviewed by: Patrick Mooney <pmooney@pfmooney.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Andy Fiddaman <illumos@fiddaman.net>
    Approved by: Dan McDonald <danmcd@mnx.io>

Actions

Also available in: Atom PDF