Fiasco.OC: fix io-port fault answer in sigma0
In sigma0 normally no answer tag to a request/fault is created. It simply uses the message tag received with the request. This doesn't work out when I/O ports are requested. This patch constructs an appropriate answer tag. Moreover, we have to enable I/O port protection in the kernel configuration. Was: 'sigma0_ioport.patch'
This commit is contained in:
@@ -39,8 +39,9 @@ void handle_io_page_fault(l4_umword_t t, l4_utcb_t *utcb, Answer *a)
|
|||||||
size = l4_fpage_size(fp) + PORT_SHIFT;
|
size = l4_fpage_size(fp) + PORT_SHIFT;
|
||||||
|
|
||||||
unsigned long i = io_ports.alloc(Region::bs(port, 1UL << size, t));
|
unsigned long i = io_ports.alloc(Region::bs(port, 1UL << size, t));
|
||||||
if (i == port)
|
if (i == port) {
|
||||||
a->snd_fpage(l4_iofpage(port >> PORT_SHIFT, size - PORT_SHIFT));
|
a->snd_fpage(l4_iofpage(port >> PORT_SHIFT, size - PORT_SHIFT));
|
||||||
else
|
a->tag = l4_msgtag(0, 0, 1, 0);
|
||||||
|
} else
|
||||||
a->error(L4_ENOMEM);
|
a->error(L4_ENOMEM);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user