PERFORCE change 32112 for review
Peter Wemm
peter at FreeBSD.org
Fri May 30 12:24:52 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=32112
Change 32112 by peter at 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 (
More information about the p4-projects
mailing list