Back to home page

Quest Cross Reference

 
 

    


Warning, cross-references for /kernel/drivers/acpi/quest-acpica.c need to be fixed.

0001 /******************************************************************************
0002  *
0003  * Name: quest-acpica.c - Quest interface for ACPICA
0004  *
0005  *****************************************************************************/
0006 
0007 
0008 /******************************************************************************
0009  *
0010  * 1. Copyright Notice
0011  *
0012  * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp.
0013  * All rights reserved.
0014  *
0015  * 2. License
0016  *
0017  * 2.1. This is your license from Intel Corp. under its intellectual property
0018  * rights.  You may have additional license terms from the party that provided
0019  * you this software, covering your right to use that party's intellectual
0020  * property rights.
0021  *
0022  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
0023  * copy of the source code appearing in this file ("Covered Code") an
0024  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
0025  * base code distributed originally by Intel ("Original Intel Code") to copy,
0026  * make derivatives, distribute, use and display any portion of the Covered
0027  * Code in any form, with the right to sublicense such rights; and
0028  *
0029  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
0030  * license (with the right to sublicense), under only those claims of Intel
0031  * patents that are infringed by the Original Intel Code, to make, use, sell,
0032  * offer to sell, and import the Covered Code and derivative works thereof
0033  * solely to the minimum extent necessary to exer
0034  se the above copyright
0035  * license, and in no event shall the patent license extend to any additions
0036  * to or modifications of the Original Intel Code.  No other license or right
0037  * is granted directly or by implication, estoppel or otherwise;
0038  *
0039  * The above copyright and patent license is granted only if the following
0040  * conditions are met:
0041  *
0042  * 3. Conditions
0043  *
0044  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
0045  * Redistribution of source code of any substantial portion of the Covered
0046  * Code or modification with rights to further distribute source must include
0047  * the above Copyright Notice, the above License, this list of Conditions,
0048  * and the following Disclaimer and Export Compliance provision.  In addition,
0049  * Licensee must cause all Covered Code to which Licensee contributes to
0050  * contain a file documenting the changes Licensee made to create that Covered
0051  * Code and the date of any change.  Licensee must include in that file the
0052  * documentation of any changes made by any predecessor Licensee.  Licensee
0053  * must include a prominent statement that the modification is derived,
0054  * directly or indirectly, from Original Intel Code.
0055  *
0056  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
0057  * Redistribution of source code of any substantial portion of the Covered
0058  * Code or modification without rights to further distribute source must
0059  * include the following Disclaimer and Export Compliance provision in the
0060  * documentation and/or other materials provided with distribution.  In
0061  * addition, Licensee may not authorize further sublicense of source of any
0062  * portion of the Covered Code, and must include terms to the effect that the
0063  * license from Licensee to its licensee is limited to the intellectual
0064  * property embodied in the software Licensee provides to its licensee, and
0065  * not to intellectual property embodied in modifications its licensee may
0066  * make.
0067  *
0068  * 3.3. Redistribution of Executable. Redistribution in executable form of any
0069  * substantial portion of the Covered Code or modification must reproduce the
0070  * above Copyright Notice, and the following Disclaimer and Export Compliance
0071  * provision in the documentation and/or other materials provided with the
0072  * distribution.
0073  *
0074  * 3.4. Intel retains all right, title, and interest in and to the Original
0075  * Intel Code.
0076  *
0077  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
0078  * Intel shall be used in advertising or otherwise to promote the sale, use or
0079  * other dealings in products derived from or relating to the Covered Code
0080  * without prior written authorization from Intel.
0081  *
0082  * 4. Disclaimer and Export Compliance
0083  *
0084  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
0085  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
0086  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
0087  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
0088  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
0089  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
0090  * PARTICULAR PURPOSE.
0091  *
0092  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
0093  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
0094  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
0095  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
0096  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
0097  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
0098  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
0099  * LIMITED REMEDY.
0100  *
0101  * 4.3. Licensee shall not export, either directly or indirectly, any of this
0102  * software or system incorporating such software without first obtaining any
0103  * required license or other approval from the U. S. Department of Commerce or
0104  * any other agency or department of the United States Government.  In the
0105  * event Licensee exports any such software from the United States or
0106  * re-exports any such software from a foreign destination, Licensee shall
0107  * ensure that the distribution and export/re-export of the software is in
0108  * compliance with all laws, regulations, orders, or other restrictions of the
0109  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
0110  * any of its subsidiaries will export/re-export any technical data, process,
0111  * software, or service, directly or indirectly, to any country for which the
0112  * United States government or any agency thereof requires an export license,
0113  * other governmental approval, or letter of assurance, without first obtaining
0114  * such license, approval or letter.
0115  *
0116  *****************************************************************************/
0117 
0118 /*                    The Quest Operating System
0119  *  Portions Copyright (C) 2005-2010  Richard West, Boston University
0120  *
0121  *  This program is free software: you can redistribute it and/or modify
0122  *  it under the terms of the GNU General Public License as published by
0123  *  the Free Software Foundation, either version 3 of the License, or
0124  *  (at your option) any later version.
0125  *
0126  *  This program is distributed in the hope that it will be useful,
0127  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0128  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0129  *  GNU General Public License for more details.
0130  *
0131  *  You should have received a copy of the GNU General Public License
0132  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
0133  */
0134 
0135 /* Ported to Quest by: Matthew Danish (md) */
0136 
0137 #include"smp/spinlock.h"
0138 #include"smp/semaphore.h"
0139 #include"kernel.h"
0140 #include"drivers/pci/pci.h"
0141 #include"drivers/acpi/acpi.h"
0142 #include"util/printf.h"
0143 #include"mem/mem.h"
0144 #include"smp/smp.h"
0145 #include"smp/apic.h"
0146 #include "sched/sched.h"
0147 
0148 /*
0149  * OSL Initialization and shutdown primitives
0150  */
0151 ACPI_STATUS
0152 AcpiOsInitialize (void)
0153 {
0154   return AE_OK;
0155 }
0156 
0157 
0158 ACPI_STATUS
0159 AcpiOsTerminate (void)
0160 {
0161   return AE_OK;
0162 }
0163 
0164 
0165 
0166 /*
0167  * ACPI Table interfaces
0168  */
0169 ACPI_PHYSICAL_ADDRESS
0170 AcpiOsGetRootPointer (void)
0171 {
0172   ACPI_SIZE addr;
0173   if (AcpiFindRootPointer (&addr) == AE_OK)
0174     return (ACPI_PHYSICAL_ADDRESS) addr;
0175   else
0176     return 0;
0177 }
0178 
0179 
0180 ACPI_STATUS
0181 AcpiOsPredefinedOverride (const ACPI_PREDEFINED_NAMES * InitVal,
0182                           ACPI_STRING * NewVal)
0183 {
0184   *NewVal = NULL;
0185   return AE_OK;
0186 }
0187 
0188 
0189 ACPI_STATUS
0190 AcpiOsTableOverride (ACPI_TABLE_HEADER * ExistingTable,
0191                      ACPI_TABLE_HEADER ** NewTable)
0192 {
0193   *NewTable = NULL;
0194   return AE_OK;
0195 }
0196 
0197 
0198 
0199 /*
0200  * Spinlock primitives
0201  */
0202 ACPI_STATUS
0203 AcpiOsCreateLock (ACPI_SPINLOCK * OutHandle)
0204 {
0205   *OutHandle = AcpiOsAllocate (sizeof (spinlock));
0206   spinlock_init (*OutHandle);
0207   return AE_OK;
0208 }
0209 
0210 
0211 void
0212 AcpiOsDeleteLock (ACPI_SPINLOCK Handle)
0213 {
0214   AcpiOsFree (Handle);
0215   return;
0216 }
0217 
0218 
0219 ACPI_CPU_FLAGS
0220 AcpiOsAcquireLock (ACPI_SPINLOCK Handle)
0221 {
0222   spinlock_lock (Handle);
0223   return 0;
0224 }
0225 
0226 
0227 void
0228 AcpiOsReleaseLock (ACPI_SPINLOCK Handle, ACPI_CPU_FLAGS Flags)
0229 {
0230   spinlock_unlock (Handle);
0231   return;
0232 }
0233 
0234 
0235 
0236 /*
0237  * Semaphore primitives
0238  */
0239 ACPI_STATUS
0240 AcpiOsCreateSemaphore (UINT32 MaxUnits,
0241                        UINT32 InitialUnits, ACPI_SEMAPHORE * OutHandle)
0242 {
0243   *OutHandle = AcpiOsAllocate (sizeof (semaphore));
0244   semaphore_init (*OutHandle, MaxUnits, InitialUnits);
0245   return AE_OK;
0246 }
0247 
0248 
0249 ACPI_STATUS
0250 AcpiOsDeleteSemaphore (ACPI_SEMAPHORE Handle)
0251 {
0252   semaphore_destroy (Handle);
0253   AcpiOsFree (Handle);
0254   return AE_OK;
0255 }
0256 
0257 
0258 ACPI_STATUS
0259 AcpiOsWaitSemaphore (ACPI_SEMAPHORE Handle, UINT32 Units, UINT16 Timeout)
0260 {
0261   semaphore_wait (Handle, Units, Timeout);
0262   return AE_OK;
0263 }
0264 
0265 
0266 ACPI_STATUS
0267 AcpiOsSignalSemaphore (ACPI_SEMAPHORE Handle, UINT32 Units)
0268 {
0269   if (semaphore_signal (Handle, Units) == 0)
0270     return AE_OK;
0271   else
0272     return AE_LIMIT;
0273 }
0274 
0275 
0276 
0277 /*
0278  * Mutex primitives. May be configured to use semaphores instead via
0279  * ACPI_MUTEX_TYPE (see platform/acenv.h)
0280  */
0281 #if (ACPI_MUTEX_TYPE != ACPI_BINARY_SEMAPHORE)
0282 
0283 ACPI_STATUS
0284 AcpiOsCreateMutex (ACPI_MUTEX * OutHandle)
0285 {
0286   return;
0287 }
0288 
0289 
0290 void
0291 AcpiOsDeleteMutex (ACPI_MUTEX Handle)
0292 {
0293   return;
0294 }
0295 
0296 
0297 ACPI_STATUS
0298 AcpiOsAcquireMutex (ACPI_MUTEX Handle, UINT16 Timeout)
0299 {
0300   return AE_NOT_IMPLEMENTED;
0301 }
0302 
0303 
0304 void
0305 AcpiOsReleaseMutex (ACPI_MUTEX Handle)
0306 {
0307   return;
0308 }
0309 
0310 #endif
0311 
0312 
0313 void *
0314 AcpiOsAllocate (ACPI_SIZE Size)
0315 {
0316   /* use pow2 memory allocator */
0317   uint8 *ptr;
0318   pow2_alloc (Size, &ptr);
0319   return (void *) ptr;
0320 }
0321 
0322 void
0323 AcpiOsFree (void *Memory)
0324 {
0325   pow2_free ((uint8 *) Memory);
0326 }
0327 
0328 void *
0329 AcpiOsMapMemory (ACPI_PHYSICAL_ADDRESS Where, ACPI_SIZE Length)
0330 {
0331   ACPI_PHYSICAL_ADDRESS start_frame = Where & (~0xFFF);
0332   ACPI_PHYSICAL_ADDRESS end_frame = (Where + Length) & (~0xFFF);
0333   ACPI_SIZE num_frames = ((end_frame - start_frame) >> 12) + 1;
0334   void *virt = map_contiguous_virtual_pages (start_frame | 3, num_frames);
0335   if (virt)
0336     return (void *) ((uint32) virt | (Where & 0xFFF));        /* mask back in the offset */
0337   else
0338     return NULL;
0339 }
0340 
0341 
0342 void
0343 AcpiOsUnmapMemory (void *LogicalAddress, ACPI_SIZE Size)
0344 {
0345   uint32 start_addr = (uint32) LogicalAddress & (~0xFFF);
0346   uint32 end_addr = ((uint32) LogicalAddress + Size) & (~0xFFF);
0347   ACPI_SIZE num_pages = ((end_addr - start_addr) >> 12) + 1;
0348 
0349   return unmap_virtual_pages ((void *) start_addr, num_pages);
0350 }
0351 
0352 
0353 ACPI_STATUS
0354 AcpiOsGetPhysicalAddress (void *LogicalAddress,
0355                           ACPI_PHYSICAL_ADDRESS * PhysicalAddress)
0356 {
0357   *PhysicalAddress = (ACPI_PHYSICAL_ADDRESS) get_phys_addr (LogicalAddress);
0358   return AE_OK;
0359 }
0360 
0361 
0362 
0363 #if 0
0364 /*
0365  * Memory/Object Cache
0366  */
0367 ACPI_STATUS
0368 AcpiOsCreateCache (char *CacheName,
0369                    UINT16 ObjectSize,
0370                    UINT16 MaxDepth, ACPI_CACHE_T ** ReturnCache)
0371 {
0372   return AE_NOT_IMPLEMENTED;
0373 }
0374 
0375 
0376 ACPI_STATUS
0377 AcpiOsDeleteCache (ACPI_CACHE_T * Cache)
0378 {
0379   return AE_NOT_IMPLEMENTED;
0380 }
0381 
0382 
0383 ACPI_STATUS
0384 AcpiOsPurgeCache (ACPI_CACHE_T * Cache)
0385 {
0386   return AE_NOT_IMPLEMENTED;
0387 }
0388 
0389 
0390 void *
0391 AcpiOsAcquireObject (ACPI_CACHE_T * Cache)
0392 {
0393   return NULL;
0394 }
0395 
0396 
0397 ACPI_STATUS
0398 AcpiOsReleaseObject (ACPI_CACHE_T * Cache, void *Object)
0399 {
0400   return AE_NOT_IMPLEMENTED;
0401 }
0402 
0403 #endif
0404 
0405 /*
0406  * Interrupt handlers
0407  */
0408 
0409 ACPI_OSD_HANDLER acpi_service_routine = NULL;
0410 void *acpi_service_routine_context;
0411 
0412 ACPI_STATUS
0413 AcpiOsInstallInterruptHandler (UINT32 InterruptNumber,
0414                                ACPI_OSD_HANDLER ServiceRoutine, void *Context)
0415 {
0416   logger_printf ("AcpiOsInstallInterruptHandler (0x%X, 0x%p, 0x%p)\n",
0417                  InterruptNumber, ServiceRoutine, Context);
0418 
0419   acpi_service_routine = ServiceRoutine;
0420   acpi_service_routine_context = Context;
0421   //IOAPIC_map_GSI (IRQ_to_GSI (mp_ISA_bus_id, InterruptNumber),
0422   //                0x29, 0x0100000000000800LL);
0423   return AE_OK;
0424 }
0425 
0426 
0427 ACPI_STATUS
0428 AcpiOsRemoveInterruptHandler (UINT32 InterruptNumber,
0429                               ACPI_OSD_HANDLER ServiceRoutine)
0430 {
0431   acpi_service_routine = NULL;
0432   return AE_OK;
0433 }
0434 
0435 
0436 
0437 /*
0438  * Threads and Scheduling
0439  */
0440 ACPI_THREAD_ID
0441 AcpiOsGetThreadId (void)
0442 {
0443   /* ACPICA whines about thread ID==0, even though it calls this
0444    * function during early boot -- far before anything like "threads"
0445    * could possibly even begin to exist.  Stupid Intel. */
0446 
0447   /* After whining it defaults to ThreadId=1.  So let's just shut it
0448    * up here and now. */
0449   return str () || 1;
0450 }
0451 
0452 
0453 ACPI_STATUS
0454 AcpiOsExecute (ACPI_EXECUTE_TYPE Type,
0455                ACPI_OSD_EXEC_CALLBACK Function, void *Context)
0456 {
0457   return AE_NOT_IMPLEMENTED;
0458 }
0459 
0460 
0461 void
0462 AcpiOsWaitEventsComplete (void *Context)
0463 {
0464   return;
0465 }
0466 
0467 
0468 void
0469 AcpiOsSleep (ACPI_INTEGER Milliseconds)
0470 {
0471   sched_usleep (Milliseconds * 1000);
0472 }
0473 
0474 
0475 void
0476 AcpiOsStall (UINT32 Microseconds)
0477 {
0478   tsc_delay_usec (Microseconds);
0479 }
0480 
0481 
0482 
0483 /*
0484  * Platform and hardware-independent I/O interfaces
0485  */
0486 ACPI_STATUS
0487 AcpiOsReadPort (ACPI_IO_ADDRESS Address, UINT32 * Value, UINT32 Width)
0488 {
0489   switch (Width) {
0490   case 8:
0491     *Value = inb (Address);
0492     break;
0493   case 16:
0494     *Value = inw (Address);
0495     break;
0496   case 32:
0497     *Value = inl (Address);
0498     break;
0499   }
0500   //logger_printf ("AcpiOsReadPort (0x%.04X, %d) = 0x%X\n", Address, Width, (*Value) & ((1 << Width) - 1));
0501   return AE_OK;
0502 }
0503 
0504 
0505 ACPI_STATUS
0506 AcpiOsWritePort (ACPI_IO_ADDRESS Address, UINT32 Value, UINT32 Width)
0507 {
0508   //logger_printf ("AcpiOsWritePort (0x%.04X, 0x%X, %d)\n", Address, (Value) & ((1 << Width) - 1), Width);
0509   switch (Width) {
0510   case 8:
0511     outb ((UINT8) Value, Address);
0512     break;
0513   case 16:
0514     outw ((UINT16) Value, Address);
0515     break;
0516   case 32:
0517     outl (Value, Address);
0518     break;
0519   }
0520   return AE_OK;
0521 }
0522 
0523 
0524 
0525 /*
0526  * Platform and hardware-independent physical memory interfaces
0527  */
0528 ACPI_STATUS
0529 AcpiOsReadMemory (ACPI_PHYSICAL_ADDRESS Address, UINT32 * Value, UINT32 Width)
0530 {
0531   logger_printf ("AcpiOsReadMemory (0x%p, %d)\n", Address, Width);
0532   if (Width != 8 && Width != 16 && Width != 32)
0533     return AE_BAD_PARAMETER;
0534   u32 frame = Address & ~(0xFFF);
0535   u32 offset = Address - frame;
0536   u8 *virt = map_virtual_page (frame | 3);
0537   if (!virt) return AE_NO_MEMORY;
0538   switch (Width) {
0539   case 8:
0540     *Value = *((u8 *) (&virt[offset]));
0541     break;
0542   case 16:
0543     *Value = *((u16 *) (&virt[offset]));
0544     break;
0545   case 32:
0546     *Value = *((u32 *) (&virt[offset]));
0547     break;
0548   }
0549   unmap_virtual_page (virt);
0550   return AE_OK;
0551 }
0552 
0553 
0554 ACPI_STATUS
0555 AcpiOsWriteMemory (ACPI_PHYSICAL_ADDRESS Address, UINT32 Value, UINT32 Width)
0556 {
0557   logger_printf ("AcpiOsWriteMemory (0x%p, 0x%p, %d)\n", Address, Value, Width);
0558   if (Width != 8 && Width != 16 && Width != 32)
0559     return AE_BAD_PARAMETER;
0560   u32 frame = Address & ~(0xFFF);
0561   u32 offset = Address - frame;
0562   u8 *virt = map_virtual_page (frame | 3);
0563   if (!virt) return AE_NO_MEMORY;
0564   switch (Width) {
0565   case 8:
0566     *((u8 *) (&virt[offset])) = (u8) Value;
0567     break;
0568   case 16:
0569     *((u16 *) (&virt[offset])) = (u16) Value;
0570     break;
0571   case 32:
0572     *((u32 *) (&virt[offset])) = (u32) Value;
0573     break;
0574   }
0575   unmap_virtual_page (virt);
0576   return AE_OK;
0577 }
0578 
0579 
0580 
0581 /*
0582  * Platform and hardware-independent PCI configuration space access
0583  * Note: Can't use "Register" as a parameter, changed to "Reg" --
0584  * certain compilers complain.
0585  */
0586 ACPI_STATUS
0587 AcpiOsReadPciConfiguration (ACPI_PCI_ID * PciId,
0588                             UINT32 Reg, void *Value, UINT32 Width)
0589 {
0590   pci_config_addr a;
0591   uint8 v8;
0592   uint16 v16;
0593   uint32 v32;
0594   com1_printf
0595     ("AcpiOsReadPciConfiguration(%.4X:%.4X:%.4X:%.4X, %.8X, ..., %d)",
0596      PciId->Segment, PciId->Bus, PciId->Device, PciId->Function, Reg, Width);
0597   pci_config_addr_init (&a, PciId->Bus, PciId->Device, PciId->Function, Reg);
0598   switch (Width) {
0599   case 8:
0600     v8 = pci_read_byte (a);
0601     *((ACPI_INTEGER *) Value) = (ACPI_INTEGER) v8;
0602     break;
0603   case 16:
0604     v16 = pci_read_word (a);
0605     *((ACPI_INTEGER *) Value) = (ACPI_INTEGER) v16;
0606     break;
0607   case 32:
0608     v32 = pci_read_dword (a);
0609     *((ACPI_INTEGER *) Value) = (ACPI_INTEGER) v32;
0610     break;
0611   default:
0612     com1_printf (" = error\n");
0613     return AE_BAD_PARAMETER;
0614   }
0615   com1_printf (" = 0x%x\n", *((ACPI_INTEGER *) Value));
0616   return AE_OK;
0617 }
0618 
0619 
0620 ACPI_STATUS
0621 AcpiOsWritePciConfiguration (ACPI_PCI_ID * PciId,
0622                              UINT32 Reg, ACPI_INTEGER Value, UINT32 Width)
0623 {
0624   pci_config_addr a;
0625   com1_printf ("AcpiOsWritePciConfiguration\n");
0626   pci_config_addr_init (&a, PciId->Bus, PciId->Device, PciId->Function, Reg);
0627   switch (Width) {
0628   case 8:
0629     pci_write_byte (a, (uint8) Value);
0630     break;
0631   case 16:
0632     pci_write_word (a, (uint16) Value);
0633     break;
0634   case 32:
0635     pci_write_dword (a, (uint32) Value);
0636     break;
0637   default:
0638     return AE_BAD_PARAMETER;
0639   }
0640   return AE_OK;
0641 }
0642 
0643 
0644 
0645 /*
0646  * Interim function needed for PCI IRQ routing
0647  */
0648 void
0649 AcpiOsDerivePciId (ACPI_HANDLE Rhandle,
0650                    ACPI_HANDLE Chandle, ACPI_PCI_ID ** PciId)
0651 {
0652   com1_printf ("AcpiOsDerivePciId\n");
0653   return;
0654 }
0655 
0656 
0657 
0658 /*
0659  * Miscellaneous
0660  */
0661 ACPI_STATUS
0662 AcpiOsValidateInterface (char *Interface)
0663 {
0664   logger_printf ("AcpiOsValidateInterface (%s)\n", Interface);
0665   return AE_SUPPORT;
0666 }
0667 
0668 
0669 BOOLEAN
0670 AcpiOsReadable (void *Pointer, ACPI_SIZE Length)
0671 {
0672   return AE_NOT_IMPLEMENTED;
0673 }
0674 
0675 
0676 BOOLEAN
0677 AcpiOsWritable (void *Pointer, ACPI_SIZE Length)
0678 {
0679   return AE_NOT_IMPLEMENTED;
0680 }
0681 
0682 
0683 UINT64
0684 AcpiOsGetTimer (void)
0685 {
0686   return AE_NOT_IMPLEMENTED;
0687 }
0688 
0689 
0690 ACPI_STATUS
0691 AcpiOsSignal (UINT32 Function, void *Info)
0692 {
0693   return AE_NOT_IMPLEMENTED;
0694 }
0695 
0696 
0697 
0698 /*
0699  * Debug print routines
0700  */
0701 void ACPI_INTERNAL_VAR_XFACE
0702 AcpiOsPrintf (const char *Fmt, ...)
0703 {
0704   va_list Args;
0705   va_start (Args, Fmt);
0706   AcpiOsVprintf (Fmt, Args);
0707   va_end (Args);
0708 }
0709 
0710 
0711 void
0712 AcpiOsVprintf (const char *Format, va_list Args)
0713 {
0714   fun_vprintf (com1_putc, Format, Args);
0715 }
0716 
0717 
0718 void
0719 AcpiOsRedirectOutput (void *Destination)
0720 {
0721   return;
0722 }
0723 
0724 
0725 
0726 /*
0727  * Debug input
0728  */
0729 UINT32
0730 AcpiOsGetLine (char *Buffer)
0731 {
0732   return 0;
0733 }
0734 
0735 
0736 
0737 /*
0738  * Directory manipulation
0739  */
0740 void *
0741 AcpiOsOpenDirectory (char *Pathname,
0742                      char *WildcardSpec, char RequestedFileType)
0743 {
0744   return NULL;
0745 }
0746 
0747 char *
0748 AcpiOsGetNextFilename (void *DirHandle)
0749 {
0750   return NULL;
0751 }
0752 
0753 
0754 void
0755 AcpiOsCloseDirectory (void *DirHandle)
0756 {
0757   return;
0758 }
0759 
0760 /*
0761  * Local Variables:
0762  * indent-tabs-mode: nil
0763  * mode: C
0764  * c-file-style: "gnu"
0765  * c-basic-offset: 2
0766  * End:
0767  */
0768 
0769 /* vi: set et sw=2 sts=2: */