From owner-p4-projects@FreeBSD.ORG Fri May 30 12:24:51 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1D51C37B404; Fri, 30 May 2003 12:24:51 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B4AE37B401 for ; Fri, 30 May 2003 12:24:50 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 346EA43F3F for ; Fri, 30 May 2003 12:24:50 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4UJOo0U060119 for ; Fri, 30 May 2003 12:24:50 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4UJOnG6060116 for perforce@freebsd.org; Fri, 30 May 2003 12:24:49 -0700 (PDT) Date: Fri, 30 May 2003 12:24:49 -0700 (PDT) Message-Id: <200305301924.h4UJOnG6060116@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm To: Perforce Change Reviews Subject: PERFORCE change 32112 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 May 2003 19:24:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=32112 Change 32112 by peter@peter_hammer on 2003/05/30 12:24:43 get acpica to build/compile (thanks jhb!) Affected files ... .. //depot/projects/hammer/sys/amd64/acpica/OsdEnvironment.c#6 edit .. //depot/projects/hammer/sys/amd64/include/acpica_machdep.h#3 edit .. //depot/projects/hammer/sys/conf/files.amd64#18 edit .. //depot/projects/hammer/sys/dev/acpica/Osd/OsdHardware.c#5 edit Differences ... ==== //depot/projects/hammer/sys/amd64/acpica/OsdEnvironment.c#6 (text+ko) ==== @@ -36,9 +36,9 @@ #include "acpi.h" -u_long i386_acpi_root; +u_long amd64_acpi_root; -SYSCTL_ULONG(_machdep, OID_AUTO, acpi_root, CTLFLAG_RD, &i386_acpi_root, 0, +SYSCTL_ULONG(_machdep, OID_AUTO, acpi_root, CTLFLAG_RD, &amd64_acpi_root, 0, "The physical address of the RSDP"); ACPI_STATUS @@ -59,7 +59,7 @@ ACPI_POINTER ptr; ACPI_STATUS status; - if (i386_acpi_root == 0) { + if (amd64_acpi_root == 0) { /* * The loader passes the physical address at which it found the * RSDP in a hint. We could recover this rather than searching @@ -67,11 +67,11 @@ */ status = AcpiFindRootPointer(Flags, &ptr); if (status == AE_OK) - i386_acpi_root = ptr.Pointer.Physical; + amd64_acpi_root = ptr.Pointer.Physical; } else status = AE_OK; RsdpPhysicalAddress->PointerType = ACPI_PHYSICAL_POINTER; - RsdpPhysicalAddress->Pointer.Physical = i386_acpi_root; + RsdpPhysicalAddress->Pointer.Physical = amd64_acpi_root; return (status); } ==== //depot/projects/hammer/sys/amd64/include/acpica_machdep.h#3 (text+ko) ==== @@ -72,7 +72,6 @@ */ #define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \ do { \ - int dummy; \ asm("1: movl (%1),%%eax;" \ "movl %%eax,%%edx;" \ "andl %2,%%edx;" \ @@ -82,44 +81,26 @@ "jnz 1b;" \ "cmpb $0x3,%%dl;" \ "sbbl %%eax,%%eax" \ - :"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~1L):"dx"); \ + : "=a" (Acq), "+c" (GLptr) : "i" (~1L) : "edx"); \ } while(0) #define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \ do { \ - int dummy; \ asm("1: movl (%1),%%eax;" \ "movl %%eax,%%edx;" \ "andl %2,%%edx;" \ "lock; cmpxchgl %%edx,(%1);" \ "jnz 1b;" \ "andl $0x1,%%eax" \ - :"=a"(Acq),"=c"(dummy):"c"(GLptr),"i"(~3L):"dx"); \ + : "=a" (Acq), "+c" (GLptr) : "i" (~3L) : "edx"); \ } while(0) -/* - * Math helper asm macros - */ -#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \ - asm("divl %2;" \ - :"=a"(q32), "=d"(r32) \ - :"r"(d32), \ - "0"(n_lo), "1"(n_hi)) - - -#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \ - asm("shrl $1,%2;" \ - "rcrl $1,%3;" \ - :"=r"(n_hi), "=r"(n_lo) \ - :"0"(n_hi), "1"(n_lo)) - /*! [End] no source code translation !*/ #endif /* _KERNEL */ #define ACPI_MACHINE_WIDTH 64 #define COMPILER_DEPENDENT_INT64 long #define COMPILER_DEPENDENT_UINT64 unsigned long -#define ACPI_USE_NATIVE_DIVIDE #endif /* __ACPICA_MACHDEP_H__ */ ==== //depot/projects/hammer/sys/conf/files.amd64#18 (text+ko) ==== @@ -44,6 +44,9 @@ dev/syscons/sysmouse.c optional sc isa/atkbd_isa.c optional atkbd +amd64/acpica/OsdEnvironment.c optional acpi +amd64/acpica/acpi_machdep.c optional acpi +amd64/acpica/acpi_wakeup.c optional acpi amd64/amd64/amd64-gdbstub.c optional ddb amd64/amd64/autoconf.c standard amd64/amd64/busdma_machdep.c standard ==== //depot/projects/hammer/sys/dev/acpica/Osd/OsdHardware.c#5 (text+ko) ==== @@ -61,6 +61,10 @@ #define ACPI_BUS_SPACE_IO IA64_BUS_SPACE_IO #define ACPI_BUS_HANDLE 0 #endif +#ifdef __amd64__ +#define ACPI_BUS_SPACE_IO AMD64_BUS_SPACE_IO +#define ACPI_BUS_HANDLE 0 +#endif ACPI_STATUS AcpiOsReadPort (