Move caps fields around for more logical arrangement
And allowing easier bitmatch-ing for Type.
This commit is contained in:
parent
b0bbff20bd
commit
d04739312c
|
@ -19,7 +19,7 @@ use {
|
|||
register_bitfields! {
|
||||
u128,
|
||||
AsidControlCap [
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 11
|
||||
]
|
||||
]
|
||||
|
|
|
@ -19,11 +19,11 @@ use {
|
|||
register_bitfields! {
|
||||
u128,
|
||||
AsidPoolCap [
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 13
|
||||
],
|
||||
ASIDBase OFFSET(69) NUMBITS(16) [],
|
||||
ASIDPool OFFSET(91) NUMBITS(37) []
|
||||
ASIDBase OFFSET(64) NUMBITS(16) [],
|
||||
ASIDPool OFFSET(80) NUMBITS(37) [],
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -19,15 +19,15 @@ use {
|
|||
register_bitfields! {
|
||||
u128,
|
||||
FrameCap [
|
||||
MappedASID OFFSET(0) NUMBITS(16) [],
|
||||
BasePtr OFFSET(16) NUMBITS(48) [], // PhysAddr
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 1
|
||||
],
|
||||
Size OFFSET(69) NUMBITS(2) [],
|
||||
VMRights OFFSET(71) NUMBITS(2) [],
|
||||
IsDevice OFFSET(73) NUMBITS(1) [],
|
||||
MappedAddress OFFSET(80) NUMBITS(48) [] // VirtAddr
|
||||
Size OFFSET(6) NUMBITS(2) [],
|
||||
VMRights OFFSET(8) NUMBITS(2) [],
|
||||
IsDevice OFFSET(10) NUMBITS(1) [],
|
||||
BasePtr OFFSET(16) NUMBITS(48) [], // PhysAddr
|
||||
MappedAddress OFFSET(64) NUMBITS(48) [], // VirtAddr
|
||||
MappedASID OFFSET(112) NUMBITS(16) [],
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -19,13 +19,13 @@ use {
|
|||
register_bitfields! {
|
||||
u128,
|
||||
PageDirectoryCap [
|
||||
MappedASID OFFSET(0) NUMBITS(16) [],
|
||||
BasePtr OFFSET(16) NUMBITS(48) [], // PhysAddr
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 5
|
||||
],
|
||||
IsMapped OFFSET(79) NUMBITS(1) [],
|
||||
MappedAddress OFFSET(80) NUMBITS(19) [] // VirtAddr
|
||||
IsMapped OFFSET(6) NUMBITS(1) [],
|
||||
BasePtr OFFSET(16) NUMBITS(48) [], // PhysAddr
|
||||
MappedAddress OFFSET(64) NUMBITS(48) [], // VirtAddr
|
||||
MappedASID OFFSET(112) NUMBITS(16) [],
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -19,12 +19,12 @@ use {
|
|||
register_bitfields! {
|
||||
u128,
|
||||
PageGlobalDirectoryCap [
|
||||
MappedASID OFFSET(0) NUMBITS(16) [],
|
||||
BasePtr OFFSET(16) NUMBITS(48) [], // PhysAddr
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 9
|
||||
],
|
||||
IsMapped OFFSET(79) NUMBITS(1) []
|
||||
IsMapped OFFSET(6) NUMBITS(1) [],
|
||||
BasePtr OFFSET(16) NUMBITS(48) [], // PhysAddr
|
||||
MappedASID OFFSET(112) NUMBITS(16) [],
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -19,13 +19,13 @@ use {
|
|||
register_bitfields! {
|
||||
u128,
|
||||
PageTableCap [
|
||||
MappedASID OFFSET(0) NUMBITS(16) [],
|
||||
BasePtr OFFSET(16) NUMBITS(48) [], // PhysAddr
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 3
|
||||
],
|
||||
IsMapped OFFSET(79) NUMBITS(1) [],
|
||||
MappedAddress OFFSET(80) NUMBITS(28) [] // VirtAddr
|
||||
IsMapped OFFSET(6) NUMBITS(1) [],
|
||||
BasePtr OFFSET(16) NUMBITS(48) [], // PhysAddr
|
||||
MappedAddress OFFSET(64) NUMBITS(48) [], // VirtAddr
|
||||
MappedASID OFFSET(112) NUMBITS(16) [],
|
||||
],
|
||||
}
|
||||
|
||||
|
|
|
@ -19,13 +19,13 @@ use {
|
|||
register_bitfields! {
|
||||
u128,
|
||||
PageUpperDirectoryCap [
|
||||
MappedASID OFFSET(0) NUMBITS(16) [],
|
||||
BasePtr OFFSET(16) NUMBITS(48) [], // PhysAddr
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 7
|
||||
],
|
||||
IsMapped OFFSET(79) NUMBITS(1) [],
|
||||
MappedAddress OFFSET(80) NUMBITS(10) [] // VirtAddr
|
||||
IsMapped OFFSET(6) NUMBITS(1) [],
|
||||
BasePtr OFFSET(16) NUMBITS(48) [], // PhysAddr
|
||||
MappedAddress OFFSET(64) NUMBITS(48) [], // VirtAddr
|
||||
MappedASID OFFSET(112) NUMBITS(16) [],
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -18,13 +18,13 @@ use {
|
|||
register_bitfields! {
|
||||
u128,
|
||||
CapNodeCap [
|
||||
Guard OFFSET(0) NUMBITS(64) [],
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 10
|
||||
],
|
||||
GuardSize OFFSET(69) NUMBITS(6) [],
|
||||
Radix OFFSET(75) NUMBITS(6) [],
|
||||
Ptr OFFSET(81) NUMBITS(47) [],
|
||||
GuardSize OFFSET(6) NUMBITS(6) [],
|
||||
Radix OFFSET(12) NUMBITS(6) [],
|
||||
Ptr OFFSET(16) NUMBITS(48) [],
|
||||
Guard OFFSET(64) NUMBITS(64) [],
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ use {
|
|||
register_bitfields! {
|
||||
u128,
|
||||
DomainCap [
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 20
|
||||
]
|
||||
],
|
||||
|
|
|
@ -16,10 +16,11 @@ use {
|
|||
register_bitfields! {
|
||||
u128,
|
||||
EndpointCap [
|
||||
Badge OFFSET(0) NUMBITS(64) [],
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 4
|
||||
],
|
||||
// @todo Badge has 4 lower bits all-zero - why?
|
||||
Badge OFFSET(0) NUMBITS(64) [],
|
||||
CanGrantReply OFFSET(69) NUMBITS(1) [],
|
||||
CanGrant OFFSET(70) NUMBITS(1) [],
|
||||
CanReceive OFFSET(71) NUMBITS(1) [],
|
||||
|
|
|
@ -16,7 +16,7 @@ use {
|
|||
register_bitfields! {
|
||||
u128,
|
||||
IrqControlCap [
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 14
|
||||
]
|
||||
]
|
||||
|
|
|
@ -16,10 +16,10 @@ use {
|
|||
register_bitfields! {
|
||||
u128,
|
||||
IrqHandlerCap [
|
||||
Irq OFFSET(52) NUMBITS(12) [],
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 16
|
||||
]
|
||||
],
|
||||
Irq OFFSET(52) NUMBITS(12) [],
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -18,10 +18,10 @@ use {
|
|||
register_bitfields! {
|
||||
u128,
|
||||
NotificationCap [
|
||||
Badge OFFSET(0) NUMBITS(64) [],
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 6
|
||||
],
|
||||
Badge OFFSET(0) NUMBITS(64) [],
|
||||
CanReceive OFFSET(69) NUMBITS(1) [],
|
||||
CanSend OFFSET(70) NUMBITS(1) [],
|
||||
Ptr OFFSET(80) NUMBITS(48) [],
|
||||
|
|
|
@ -16,7 +16,7 @@ use {
|
|||
register_bitfields! {
|
||||
u128,
|
||||
NullCap [
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 0
|
||||
]
|
||||
]
|
||||
|
|
|
@ -16,12 +16,12 @@ use {
|
|||
register_bitfields! {
|
||||
u128,
|
||||
ReplyCap [
|
||||
TCBPtr OFFSET(0) NUMBITS(64) [],
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 8
|
||||
],
|
||||
ReplyCanGrant OFFSET(126) NUMBITS(1) [],
|
||||
ReplyMaster OFFSET(127) NUMBITS(1) [],
|
||||
ReplyCanGrant OFFSET(62) NUMBITS(1) [],
|
||||
ReplyMaster OFFSET(63) NUMBITS(1) [],
|
||||
TCBPtr OFFSET(64) NUMBITS(64) [],
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ register_bitfields! {
|
|||
// the need for the extra system calls.
|
||||
|
||||
ResumeCap [
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 22
|
||||
]
|
||||
]
|
||||
|
|
|
@ -16,10 +16,10 @@ use {
|
|||
register_bitfields! {
|
||||
u128,
|
||||
ThreadCap [
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 12
|
||||
],
|
||||
TCBPtr OFFSET(80) NUMBITS(48) [],
|
||||
TCBPtr OFFSET(64) NUMBITS(48) [],
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -72,6 +72,9 @@ register_bitfields! {
|
|||
// -- https://github.com/seL4/seL4/blob/master/src/object/untyped.c#L196
|
||||
|
||||
UntypedCap [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 2
|
||||
],
|
||||
/// Index of the first unoccupied byte within this Untyped.
|
||||
/// This index is limited between MIN_UNTYPED_BITS and max bits number in BlockSizePower.
|
||||
/// To occupy less bits, the free index is shifted right by MIN_UNTYPED_BITS.
|
||||
|
@ -85,9 +88,6 @@ register_bitfields! {
|
|||
IsDevice OFFSET(57) NUMBITS(1) [],
|
||||
/// Untyped is 2**BlockSizePower bytes in size
|
||||
BlockSizePower OFFSET(58) NUMBITS(6) [],
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
value = 2
|
||||
],
|
||||
/// Physical address of untyped.
|
||||
Ptr OFFSET(80) NUMBITS(48) [],
|
||||
]
|
||||
|
|
|
@ -16,11 +16,11 @@ use {
|
|||
register_bitfields! {
|
||||
u128,
|
||||
ZombieCap [
|
||||
ZombieID OFFSET(0) NUMBITS(64) [],
|
||||
Type OFFSET(64) NUMBITS(5) [
|
||||
Type OFFSET(0) NUMBITS(6) [
|
||||
value = 18
|
||||
],
|
||||
ZombieType OFFSET(121) NUMBITS(7) []
|
||||
ZombieType OFFSET(58) NUMBITS(6) [],
|
||||
ZombieID OFFSET(64) NUMBITS(64) [],
|
||||
]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue