Date: Mon, 20 May 2013 23:16:44 GMT From: Philip Withnall <prw35@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 228885 for review Message-ID: <201305202316.r4KNGi9l012268@skunkworks.freebsd.org>
index | next in thread | raw e-mail
http://p4web.freebsd.org/@@228885?ac=10 Change 228885 by prw35@pwithnall_zenith on 2013/05/20 23:15:58 Add CHERI_CSEALDATA and CHERI_CUNSEAL macros to cheri.h This is needed by the compositor driver. They wrap the CSealData and CUnseal instructions, respectively. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/sys/mips/include/cheri.h#18 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/include/cheri.h#18 (text+ko) ==== @@ -38,6 +38,7 @@ #endif #include <machine/cherireg.h> +#include <sys/types.h> /* * Canonical C-language representation of a capability. @@ -151,6 +152,19 @@ } while (0) /* + * Instructions to seal and unseal capabilities. + */ +#define CHERI_CSEALDATA(cd, cs, ct) do { \ + __asm__ __volatile__ ("csealdata $c%0, $c%1, $c%2" : : \ + "i" (cd), "i" (cs), "i" (ct)); \ +} while (0) + +#define CHERI_CUNSEAL(cd, cs, ct) do { \ + __asm__ __volatile__ ("cunseal $c%0, $c%1, $c%2" : : \ + "i" (cd), "i" (cs), "i" (ct)); \ +} while (0) + +/* * Capability store; while this doesn't muck with c0, it does require a memory * clobber. */home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305202316.r4KNGi9l012268>
