From 2228cde51fe4bf58fd3c65952df29c19b7135313 Mon Sep 17 00:00:00 2001 From: Sebastian Sumpf Date: Fri, 11 Jan 2013 17:36:55 +0100 Subject: [PATCH] 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' --- l4/pkg/sigma0/server/src/ioports_x86.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/l4/pkg/sigma0/server/src/ioports_x86.cc b/l4/pkg/sigma0/server/src/ioports_x86.cc index 636712d7..694d1d02 100644 --- a/l4/pkg/sigma0/server/src/ioports_x86.cc +++ b/l4/pkg/sigma0/server/src/ioports_x86.cc @@ -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); }