-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support complex backend/frontend hierarchies #11
base: tii/main
Are you sure you want to change the base?
Conversation
Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
Previously the seL4 cross-connector had the BARs swapped so that the dataport would be the first mapping (at offset 0), but turned out patching QEMU to have the offset option is not a big job. This saves us from pushing an API-breaking change to seL4 source trees. Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Markku Ahvenjärvi <[email protected]>
Signed-off-by: Markku Ahvenjärvi <[email protected]>
Signed-off-by: Markku Ahvenjärvi <[email protected]>
This change aligns the memory size with VM1 ram_size. Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Markku Ahvenjärvi <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
a851df1
to
a4f2d1b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check out the comments. I think read and write barriers are must-have
s->ioreq_buffer = mmap(NULL, sizeof(*s->ioreq_buffer), | ||
PROT_READ | PROT_WRITE, MAP_SHARED, s->ioreqfd, 0); | ||
if (!s->ioreq_buffer) { | ||
s->iobuf = mmap(NULL, 2 * 4096, PROT_READ | PROT_WRITE, MAP_SHARED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The size could be in the kernel header. Then these will be in sync.
{ | ||
PCIDevice *dev = pci_devs[ioreq->addr_space]; | ||
PCIDevice *dev = pci_devs[addr_space]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would the pci_dev be a more appropriate name? Just thinking
|
||
msg->mr0 = BIT_FIELD_SET(msg->mr0, RPC_MR0_STATE, RPC_MR0_STATE_COMPLETE); | ||
|
||
/* smp_wmb()? */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, a write barrier would be appropriate here because it ensures mr0 is flushed before andvance
uint32_t *event_bar = cookie; | ||
|
||
/* data does not matter, just the write fault */ | ||
event_bar[0] = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A write barrier (or write release) after this would be good to ensure ordering of writes
goto err; | ||
} | ||
s->event_bar_fd = rc; | ||
s->event_bar = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The size could be defined in the kernel header
munmap(s->event_bar, 4096); | ||
|
||
if (s->iobuf) | ||
munmap(s->iobuf, 2 * 4096); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sizes to kernel header
if (rc) | ||
continue; | ||
|
||
handle_ioreq(s); | ||
while ((msg = rpcmsg_queue_head(s->rpc.rx_queue)) != NULL) { | ||
seL4_Word state = BIT_FIELD_GET(msg->mr0, RPC_MR0_STATE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Load acquire here would (or read barrier before) would be appropriate here
@@ -23,6 +23,8 @@ | |||
#include <sys/ioctl.h> | |||
#include <sel4/sel4_virt.h> | |||
|
|||
#define EVENT_BAR_EMIT_REGISTER 0x0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this should be placed in the kernel header?
Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
Signed-off-by: Hannu Lyytinen <[email protected]>
No description provided.