Page MenuHomeFreeBSD

x86 FRED: add hardware definitions for the trap frames fields
AcceptedPublic

Authored by kib on Thu, Mar 12, 4:15 PM.
Tags
None
Referenced Files
F148632783: D55831.diff
Thu, Mar 19, 6:34 AM
F148625487: D55831.id173621.diff
Thu, Mar 19, 5:33 AM
F148625484: D55831.id173621.diff
Thu, Mar 19, 5:33 AM
F148625471: D55831.id173621.diff
Thu, Mar 19, 5:33 AM
F148600370: D55831.id173681.diff
Thu, Mar 19, 1:50 AM
F148573235: D55831.diff
Wed, Mar 18, 9:05 PM
Unknown Object (File)
Sun, Mar 15, 6:22 PM
Subscribers

Details

Reviewers
jhb
markj
Summary

as provided by the Intel document 346446-009 AKA FRED 8.0.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib requested review of this revision.Thu, Mar 12, 4:15 PM
sys/amd64/amd64/trap.c
944

No need anymore for the mask of tf_cs.

sys/x86/include/frame.h
148

The field prefix should be tf_.

152–157

Should we apply some explicit masking in places where tf_ss is assigned by software? e.g. in set_mcontext(), we have tp->tf_ss = mcp->mc_ss, so there is implicit truncation.

154

The numbering of the evinfo fields is a bit weird. I see why you did it this way, it follows the order that the fields are described in the FRED documentation. Probably not worth changing.

kib marked 4 inline comments as done.Sat, Mar 14, 10:55 AM
kib added inline comments.
sys/x86/include/frame.h
152–157

I do not object, but I do not see a purpose for explicit cast or masking.
OTOH we indeed might consider adding checks that ss cs from the mcontext fits into 16 bits, i.e. the reserved bits are not passed by userspace.

kib marked an inline comment as done.

Fix typo in the name of the reserved field.
Remove cs masking.

markj added inline comments.
sys/x86/include/frame.h
152–157

Some checks would be good. I'm not sure if there is any chance that they would break compatibility somehow.

This revision is now accepted and ready to land.Sun, Mar 15, 1:47 AM