From owner-p4-projects@FreeBSD.ORG Mon May 20 23:16:45 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4493C72A; Mon, 20 May 2013 23:16:45 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0368E728 for ; Mon, 20 May 2013 23:16:45 +0000 (UTC) (envelope-from prw35@FreeBSD.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:1900:2254:2068::682:0]) by mx1.freebsd.org (Postfix) with ESMTP id E89DDA8 for ; Mon, 20 May 2013 23:16:44 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.6/8.14.6) with ESMTP id r4KNGio9012271 for ; Mon, 20 May 2013 23:16:44 GMT (envelope-from prw35@FreeBSD.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.6/8.14.6/Submit) id r4KNGi9l012268 for perforce@freebsd.org; Mon, 20 May 2013 23:16:44 GMT (envelope-from prw35@FreeBSD.org) Date: Mon, 20 May 2013 23:16:44 GMT Message-Id: <201305202316.r4KNGi9l012268@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to prw35@FreeBSD.org using -f From: Philip Withnall Subject: PERFORCE change 228885 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 May 2013 23:16:45 -0000 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 +#include /* * 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. */