Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Feb 2015 01:40:56 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r279038 - in head/sys/boot/efi/include: . amd64 i386
Message-ID:  <201502200140.t1K1eubZ031964@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Fri Feb 20 01:40:55 2015
New Revision: 279038
URL: https://svnweb.freebsd.org/changeset/base/279038

Log:
  Allow EFI and ACPI to be included together. When ACPI is included
  first, EFI will use its definitions for {,U}INT{8,16,32,64} and
  BOOLEAN. When EFI is included first, define ACPI_USE_SYSTEM_INTTYPES
  to tell ACPI that these are already defined.
  
  Differential Revision: https://reviews.freebsd.org/D1905

Modified:
  head/sys/boot/efi/include/amd64/efibind.h
  head/sys/boot/efi/include/efidef.h
  head/sys/boot/efi/include/i386/efibind.h

Modified: head/sys/boot/efi/include/amd64/efibind.h
==============================================================================
--- head/sys/boot/efi/include/amd64/efibind.h	Fri Feb 20 01:31:10 2015	(r279037)
+++ head/sys/boot/efi/include/amd64/efibind.h	Fri Feb 20 01:40:55 2015	(r279038)
@@ -85,6 +85,9 @@ Revision History
 // Basic EFI types of various widths
 //
 
+#ifndef ACPI_THREAD_ID		/* ACPI's definitions are fine */
+#define ACPI_USE_SYSTEM_INTTYPES 1	/* Tell ACPI we've defined types */
+
 typedef uint64_t   UINT64;
 typedef int64_t    INT64;
 
@@ -98,6 +101,7 @@ typedef int16_t    INT16;
 typedef uint8_t    UINT8;
 typedef int8_t     INT8;
 
+#endif
 
 #undef VOID
 #define VOID    void

Modified: head/sys/boot/efi/include/efidef.h
==============================================================================
--- head/sys/boot/efi/include/efidef.h	Fri Feb 20 01:31:10 2015	(r279037)
+++ head/sys/boot/efi/include/efidef.h	Fri Feb 20 01:40:55 2015	(r279038)
@@ -30,7 +30,9 @@ Revision History
 
 typedef UINT16          CHAR16;
 typedef UINT8           CHAR8;
+#ifndef ACPI_THREAD_ID		/* ACPI's definitions are fine */
 typedef UINT8           BOOLEAN;
+#endif
 
 #ifndef TRUE
     #define TRUE    ((BOOLEAN) 1)

Modified: head/sys/boot/efi/include/i386/efibind.h
==============================================================================
--- head/sys/boot/efi/include/i386/efibind.h	Fri Feb 20 01:31:10 2015	(r279037)
+++ head/sys/boot/efi/include/i386/efibind.h	Fri Feb 20 01:40:55 2015	(r279038)
@@ -85,6 +85,9 @@ Revision History
 // Basic EFI types of various widths
 //
 
+#ifndef ACPI_THREAD_ID		/* ACPI's definitions are fine, use those */
+#define ACPI_USE_SYSTEM_INTTYPES 1	/* Tell ACPI we've defined types */
+
 typedef uint64_t   UINT64;
 typedef int64_t    INT64;
 
@@ -98,6 +101,7 @@ typedef int16_t    INT16;
 typedef uint8_t    UINT8;
 typedef int8_t     INT8;
 
+#endif
 
 #undef VOID
 #define VOID    void



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502200140.t1K1eubZ031964>