genode/base-foc/patches/sigma0_ioport.patch
Stefan Kalkowski 361a67d749 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.
2012-09-18 16:47:59 +02:00

17 lines
557 B
Diff

Index: l4/pkg/sigma0/server/src/ioports_x86.cc
===================================================================
--- l4/pkg/sigma0/server/src/ioports_x86.cc (revision 40)
+++ l4/pkg/sigma0/server/src/ioports_x86.cc (working copy)
@@ -39,8 +39,9 @@
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);
}