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