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:
Sebastian Sumpf
2013-01-11 17:36:55 +01:00
parent 6d3331e788
commit a7566c95df

View File

@@ -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;
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));
else
a->tag = l4_msgtag(0, 0, 1, 0);
} else
a->error(L4_ENOMEM);
}