From owner-svn-src-stable-11@freebsd.org Wed Sep 28 09:48:41 2016 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 144D9BE8303; Wed, 28 Sep 2016 09:48:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7E311697; Wed, 28 Sep 2016 09:48:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u8S9mdc3081173; Wed, 28 Sep 2016 09:48:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u8S9mdkJ081169; Wed, 28 Sep 2016 09:48:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201609280948.u8S9mdkJ081169@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 28 Sep 2016 09:48:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r306404 - in stable/11/sys: amd64/include arm/include arm64/include sys X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 09:48:41 -0000 Author: kib Date: Wed Sep 28 09:48:39 2016 New Revision: 306404 URL: https://svnweb.freebsd.org/changeset/base/306404 Log: MFC r306091: Add a way for the architecture to specify the calling ABI for methods in the EFI Runtime Services Table. On amd64, the calling conventions are MS. Added: stable/11/sys/amd64/include/efi.h - copied unchanged from r306091, head/sys/amd64/include/efi.h stable/11/sys/arm/include/efi.h - copied unchanged from r306091, head/sys/arm/include/efi.h stable/11/sys/arm64/include/efi.h - copied unchanged from r306091, head/sys/arm64/include/efi.h Modified: stable/11/sys/sys/efi.h Directory Properties: stable/11/ (props changed) Copied: stable/11/sys/amd64/include/efi.h (from r306091, head/sys/amd64/include/efi.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/amd64/include/efi.h Wed Sep 28 09:48:39 2016 (r306404, copy of r306091, head/sys/amd64/include/efi.h) @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __AMD64_INCLUDE_EFI_H_ +#define __AMD64_INCLUDE_EFI_H_ + +/* + * XXX: from gcc 6.2 manual: + * Note, the ms_abi attribute for Microsoft Windows 64-bit targets + * currently requires the -maccumulate-outgoing-args option. + */ +#define EFIABI_ATTR __attribute__((ms_abi)) + +#endif /* __AMD64_INCLUDE_EFI_H_ */ Copied: stable/11/sys/arm/include/efi.h (from r306091, head/sys/arm/include/efi.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/arm/include/efi.h Wed Sep 28 09:48:39 2016 (r306404, copy of r306091, head/sys/arm/include/efi.h) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __ARM_INCLUDE_EFI_H_ +#define __ARM_INCLUDE_EFI_H_ + +#define EFIABI_ATTR + +#endif /* __ARM_INCLUDE_EFI_H_ */ Copied: stable/11/sys/arm64/include/efi.h (from r306091, head/sys/arm64/include/efi.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/11/sys/arm64/include/efi.h Wed Sep 28 09:48:39 2016 (r306404, copy of r306091, head/sys/arm64/include/efi.h) @@ -0,0 +1,37 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef __ARM64_INCLUDE_EFI_H_ +#define __ARM64_INCLUDE_EFI_H_ + +#define EFIABI_ATTR + +#endif /* __ARM64_INCLUDE_EFI_H_ */ Modified: stable/11/sys/sys/efi.h ============================================================================== --- stable/11/sys/sys/efi.h Wed Sep 28 09:46:29 2016 (r306403) +++ stable/11/sys/sys/efi.h Wed Sep 28 09:48:39 2016 (r306404) @@ -30,6 +30,7 @@ #define _SYS_EFI_H_ #include +#include #define EFI_PAGE_SHIFT 12 #define EFI_PAGE_SIZE (1 << EFI_PAGE_SHIFT) @@ -118,22 +119,25 @@ struct efi_tblhdr { struct efi_rt { struct efi_tblhdr rt_hdr; - efi_status (*rt_gettime)(struct efi_tm *, struct efi_tmcap *); - efi_status (*rt_settime)(struct efi_tm *); + efi_status (*rt_gettime)(struct efi_tm *, struct efi_tmcap *) + EFIABI_ATTR; + efi_status (*rt_settime)(struct efi_tm *) EFIABI_ATTR; efi_status (*rt_getwaketime)(uint8_t *, uint8_t *, - struct efi_tm *); - efi_status (*rt_setwaketime)(uint8_t, struct efi_tm *); + struct efi_tm *) EFIABI_ATTR; + efi_status (*rt_setwaketime)(uint8_t, struct efi_tm *) + EFIABI_ATTR; efi_status (*rt_setvirtual)(u_long, u_long, uint32_t, - struct efi_md *); - efi_status (*rt_cvtptr)(u_long, void **); + struct efi_md *) EFIABI_ATTR; + efi_status (*rt_cvtptr)(u_long, void **) EFIABI_ATTR; efi_status (*rt_getvar)(efi_char *, struct uuid *, uint32_t *, - u_long *, void *); - efi_status (*rt_scanvar)(u_long *, efi_char *, struct uuid *); + u_long *, void *) EFIABI_ATTR; + efi_status (*rt_scanvar)(u_long *, efi_char *, struct uuid *) + EFIABI_ATTR; efi_status (*rt_setvar)(efi_char *, struct uuid *, uint32_t, - u_long, void *); - efi_status (*rt_gethicnt)(uint32_t *); + u_long, void *) EFIABI_ATTR; + efi_status (*rt_gethicnt)(uint32_t *) EFIABI_ATTR; efi_status (*rt_reset)(enum efi_reset, efi_status, u_long, - efi_char *); + efi_char *) EFIABI_ATTR; }; struct efi_systbl {