Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Oct 2001 09:45:49 +0100 (BST)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Peter Wemm <peter@wemm.org>
Cc:        <ia64@FreeBSD.ORG>
Subject:   Re: Making progress 
Message-ID:  <20011004094448.V1298-100000@salmon.nlsystems.com>
In-Reply-To: <20011004015023.3ECC63808@overcee.netplex.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 3 Oct 2001, Peter Wemm wrote:

> Doug Rabson wrote:
> > I've managed to get quite a long way with this thing so far. ACPI is a bit
> > confused (and needed a few patches to cope with the 64bit architecture)
> > but its looking promising.
> >
> > I guess I need to figure out how interrupts work next...
> >
> > ACPI debug layer 0xfffffff  debug level 0x2d
> > Copyright (c) 1992-2001 The FreeBSD Project.
> > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
> > 	The Regents of the University of California. All rights reserved.
>
> I finally managed to get a working loader, but I'm not having any luck
> with the kernel..  Have you committed everything?  For example, acpica
> is still missing your tweaks (eg: no definition for INT64 etc),
> sys/ia64/acpica/OsdEnvironment.c etc is missing and so on.

I've just committed the last of that. I'll append a set of patches to the
core intel code to make that build (and work).

>
> Mind you, John just suggested that it might only be working on the serial
> console..  Trying that now..

This is very likely. The vga console isn't wired up yet.

Index: acgcc.h
===================================================================
RCS file: /home/ncvs/src/sys/contrib/dev/acpica/acgcc.h,v
retrieving revision 1.9
diff -u -r1.9 acgcc.h
--- acgcc.h	2001/09/07 02:52:26	1.9
+++ acgcc.h	2001/09/28 15:28:12
@@ -121,9 +121,12 @@
 #ifdef __ia64__
 #define _IA64

+#define COMPILER_DEPENDENT_INT64    long
 #define COMPILER_DEPENDENT_UINT64   unsigned long
 /* Single threaded */
+#ifndef __FreeBSD__
 #define ACPI_APPLICATION
+#endif

 #define ACPI_ASM_MACROS
 #define causeinterrupt(level)
@@ -134,11 +137,23 @@

 /*! [Begin] no source code translation */

+#ifdef __FreeBSD__
+
+#include <sys/param.h>
+#include <machine/pal.h>
+
+#define halt()		ia64_call_pal_static(PAL_HALT_LIGHT, 0, 0, 0)
+#define safe_halt()	ia64_call_pal_static(PAL_HALT, 0, 0, 0)
+
+#else
+
 #include <asm/pal.h>

 #define halt()              ia64_pal_halt_light()           /* PAL_HALT[_LIGHT] */
 #define safe_halt()         ia64_pal_halt(1)                /* PAL_HALT */

+#endif
+

 #define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \
     do { \
@@ -185,6 +200,7 @@


 #else /* DO IA32 */
+#define COMPILER_DEPENDENT_INT64    long long
 #define COMPILER_DEPENDENT_UINT64   unsigned long long
 #define ACPI_ASM_MACROS
 #define causeinterrupt(level)
Index: actypes.h
===================================================================
RCS file: /home/ncvs/src/sys/contrib/dev/acpica/actypes.h,v
retrieving revision 1.1.1.11
diff -u -r1.1.1.11 actypes.h
--- actypes.h	2001/09/07 01:22:23	1.1.1.11
+++ actypes.h	2001/09/29 10:17:32
@@ -150,6 +150,7 @@
 typedef unsigned short                  UINT16;
 typedef int                             INT32;
 typedef unsigned int                    UINT32;
+typedef COMPILER_DEPENDENT_INT64        INT64;
 typedef COMPILER_DEPENDENT_UINT64       UINT64;

 typedef UINT64                          NATIVE_UINT;
@@ -1150,7 +1151,7 @@
 #define ACPI_RESOURCE_LENGTH            12
 #define ACPI_RESOURCE_LENGTH_NO_DATA    8       /* Id + Length fields */

-#define SIZEOF_RESOURCE(Type)   (ACPI_RESOURCE_LENGTH_NO_DATA + sizeof (Type))
+#define SIZEOF_RESOURCE(Type)   ROUND_UP_TO_NATIVE_WORD (ACPI_RESOURCE_LENGTH_NO_DATA + sizeof (Type))

 #define NEXT_RESOURCE(Res)      (ACPI_RESOURCE *)((UINT8 *) Res + Res->length)

Index: rsaddr.c
===================================================================
RCS file: /home/ncvs/src/sys/contrib/dev/acpica/rsaddr.c,v
retrieving revision 1.1.1.6
diff -u -r1.1.1.6 rsaddr.c
--- rsaddr.c	2001/09/07 01:22:25	1.1.1.6
+++ rsaddr.c	2001/09/29 09:30:54
@@ -332,7 +332,7 @@
          * StructSize to the next 32-bit boundary.
          */
         Temp8 = (UINT8) (Index + 1);
-        StructSize += ROUND_UP_TO_32BITS (Temp8);
+        StructSize += ROUND_UP_TO_NATIVE_WORD (Temp8);
     }

     else
@@ -737,7 +737,7 @@
          *  StructSize to the next 32-bit boundary.
          */
         Temp8 = (UINT8) (Index + 1);
-        StructSize += ROUND_UP_TO_32BITS (Temp8);
+        StructSize += ROUND_UP_TO_NATIVE_WORD (Temp8);
     }

     else
@@ -1143,7 +1143,7 @@
          * StructSize to the next 32-bit boundary.
          */
         Temp8 = (UINT8) (Index + 1);
-        StructSize += ROUND_UP_TO_32BITS (Temp8);
+        StructSize += ROUND_UP_TO_NATIVE_WORD (Temp8);
     }

     else
Index: rscalc.c
===================================================================
RCS file: /home/ncvs/src/sys/contrib/dev/acpica/rscalc.c,v
retrieving revision 1.1.1.8
diff -u -r1.1.1.8 rscalc.c
--- rscalc.c	2001/09/07 01:22:25	1.1.1.8
+++ rscalc.c	2001/09/29 09:30:53
@@ -440,7 +440,7 @@
             /*
              * Ensure a 32-bit boundary for the structure
              */
-            Temp16 = (UINT16) ROUND_UP_TO_32BITS (Temp16);
+            Temp16 = (UINT16) ROUND_UP_TO_NATIVE_WORD (Temp16);

             StructureSize = SIZEOF_RESOURCE (ACPI_RESOURCE_VENDOR) +
                                 (Temp16 * sizeof (UINT8));
@@ -541,7 +541,7 @@
             /*
              * Ensure a 32-bit boundary for the structure
              */
-            Temp8 = (UINT8) ROUND_UP_TO_32BITS (Temp8);
+            Temp8 = (UINT8) ROUND_UP_TO_NATIVE_WORD (Temp8);

             StructureSize = SIZEOF_RESOURCE (ACPI_RESOURCE_ADDRESS32) +
                                 (Temp8 * sizeof (UINT8));
@@ -581,7 +581,7 @@
             /*
              * Ensure a 32-bit boundary for the structure
              */
-            Temp8 = (UINT8) ROUND_UP_TO_32BITS (Temp8);
+            Temp8 = (UINT8) ROUND_UP_TO_NATIVE_WORD (Temp8);

             StructureSize = SIZEOF_RESOURCE (ACPI_RESOURCE_ADDRESS16) +
                                 (Temp8 * sizeof (UINT8));
@@ -636,7 +636,7 @@
             /*
              * Ensure a 32-bit boundary for the structure
              */
-            Temp8 = (UINT8) ROUND_UP_TO_32BITS (Temp8);
+            Temp8 = (UINT8) ROUND_UP_TO_NATIVE_WORD (Temp8);

             StructureSize = SIZEOF_RESOURCE (ACPI_RESOURCE_EXT_IRQ) +
                                 (AdditionalBytes * sizeof (UINT8)) +
@@ -780,7 +780,7 @@
             /*
              * Ensure a 32-bit boundary for the structure
              */
-            Temp8 = (UINT8) ROUND_UP_TO_32BITS (Temp8);
+            Temp8 = (UINT8) ROUND_UP_TO_NATIVE_WORD (Temp8);
             StructureSize = SIZEOF_RESOURCE (ACPI_RESOURCE_VENDOR) +
                                 (Temp8 * sizeof (UINT8));
             break;
Index: rsirq.c
===================================================================
RCS file: /home/ncvs/src/sys/contrib/dev/acpica/rsirq.c,v
retrieving revision 1.1.1.6
diff -u -r1.1.1.6 rsirq.c
--- rsirq.c	2001/09/07 01:22:24	1.1.1.6
+++ rsirq.c	2001/09/29 09:30:52
@@ -538,7 +538,7 @@
          * StructSize to the next 32-bit boundary.
          */
         Temp8 = (UINT8) (Index + 1);
-        StructSize += ROUND_UP_TO_32BITS (Temp8);
+        StructSize += ROUND_UP_TO_NATIVE_WORD (Temp8);
     }

     else
Index: rsmisc.c
===================================================================
RCS file: /home/ncvs/src/sys/contrib/dev/acpica/rsmisc.c,v
retrieving revision 1.1.1.6
diff -u -r1.1.1.6 rsmisc.c
--- rsmisc.c	2001/09/07 01:22:25	1.1.1.6
+++ rsmisc.c	2001/09/29 09:29:54
@@ -332,7 +332,7 @@
      * calculate the length of the vendor string and expand the
      * StructSize to the next 32-bit boundary.
      */
-    StructSize += ROUND_UP_TO_32BITS (Temp16);
+    StructSize += ROUND_UP_TO_NATIVE_WORD (Temp16);

     /*
      * Set the Length parameter

-- 
Doug Rabson				Mail:  dfr@nlsystems.com
					Phone: +44 20 8348 6160



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ia64" in the body of the message




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