📄 osdosxf.c
字号:
* ExceptPtr Where status is returned * * RETURN: Handle to the newly installed handler. * * DESCRIPTION: Install an interrupt handler. Used to install the ACPI * OS-independent handler. * *****************************************************************************/UINT32AcpiOsInstallInterruptHandler ( UINT32 InterruptNumber, ACPI_OSD_HANDLER ServiceRoutine, void *Context){ return AE_OK;}/****************************************************************************** * * FUNCTION: AcpiOsRemoveInterruptHandler * * PARAMETERS: Handle Returned when handler was installed * * RETURN: Status * * DESCRIPTION: Uninstalls an interrupt handler. * *****************************************************************************/ACPI_STATUSAcpiOsRemoveInterruptHandler ( UINT32 InterruptNumber, ACPI_OSD_HANDLER ServiceRoutine){ return AE_OK;}/****************************************************************************** * * FUNCTION: AcpiOsGetThreadId * * PARAMETERS: None * * RETURN: Id of the running thread * * DESCRIPTION: Get the Id of the current (running) thread * *****************************************************************************/ACPI_THREAD_IDAcpiOsGetThreadId ( void){ /* Only one thread! */ return (1);}/****************************************************************************** * * FUNCTION: AcpiOsExecute * * PARAMETERS: Type - Type of execution * Function - Address of the function to execute * Context - Passed as a parameter to the function * * RETURN: Status. * * DESCRIPTION: Execute a new thread * *****************************************************************************/ACPI_STATUSAcpiOsExecute ( ACPI_EXECUTE_TYPE Type, ACPI_OSD_EXEC_CALLBACK Function, void *Context){ return 0;}/****************************************************************************** * * FUNCTION: AcpiOsBreakpoint * * PARAMETERS: Msg Message to print * * RETURN: Status * * DESCRIPTION: Print a message and break to the debugger. * *****************************************************************************/ACPI_STATUSAcpiOsBreakpoint ( char *Msg){ /* Print the message and do an INT 3 */ if (Msg) { AcpiOsPrintf ("AcpiOsBreakpoint: %s ****\n", Msg); } else { AcpiOsPrintf ("At AcpiOsBreakpoint ****\n"); } return AE_OK;}/****************************************************************************** * * FUNCTION: AcpiOsStall * * PARAMETERS: microseconds To sleep * * RETURN: Blocks until sleep is completed. * * DESCRIPTION: Sleep at microsecond granularity * *****************************************************************************/voidAcpiOsStall ( UINT32 microseconds){ return;}/****************************************************************************** * * FUNCTION: AcpiOsSleep * * PARAMETERS: milliseconds To sleep * * RETURN: Blocks until sleep is completed. * * DESCRIPTION: Sleep at millisecond granularity * *****************************************************************************/voidAcpiOsSleep ( ACPI_INTEGER milliseconds){ return;}/****************************************************************************** * * FUNCTION: AcpiOsGetTimer * * PARAMETERS: None * * RETURN: Current time in 100 nanosecond units * * DESCRIPTION: Get the current system time * *****************************************************************************/UINT64AcpiOsGetTimer (void){ UINT64 Time; Time.Lo = 0; Time.Hi = 0; return (Time);}/****************************************************************************** * * FUNCTION: AcpiOsValidateInterface * * PARAMETERS: Interface - Requested interface to be validated * * RETURN: AE_OK if interface is supported, AE_SUPPORT otherwise * * DESCRIPTION: Match an interface string to the interfaces supported by the * host. Strings originate from an AML call to the _OSI method. * *****************************************************************************/ACPI_STATUSAcpiOsValidateInterface ( char *Interface){ return (AE_SUPPORT);}/****************************************************************************** * * FUNCTION: AcpiOsValidateAddress * * PARAMETERS: SpaceId - ACPI space ID * Address - Physical address * Length - Address length * * RETURN: AE_OK if Address/Length is valid for the SpaceId. Otherwise, * should return AE_AML_ILLEGAL_ADDRESS. * * DESCRIPTION: Validate a system address via the host OS. Used to validate * the addresses accessed by AML operation regions. * *****************************************************************************/ACPI_STATUSAcpiOsValidateAddress ( UINT8 SpaceId, ACPI_PHYSICAL_ADDRESS Address, ACPI_SIZE Length){ return (AE_OK);}/****************************************************************************** * * FUNCTION: AcpiOsReadPciConfiguration * * PARAMETERS: PciId Seg/Bus/Dev * Register Device Register * Value Buffer where value is placed * Width Number of bits * * RETURN: Status * * DESCRIPTION: Read data from PCI configuration space * *****************************************************************************/ACPI_STATUSAcpiOsReadPciConfiguration ( ACPI_PCI_ID *PciId, UINT32 Register, void *Value, UINT32 Width){ return (AE_OK);}/****************************************************************************** * * FUNCTION: AcpiOsWritePciConfiguration * * PARAMETERS: PciId Seg/Bus/Dev * Register Device Register * Value Value to be written * Width Number of bits * * RETURN: Status. * * DESCRIPTION: Write data to PCI configuration space * *****************************************************************************/ACPI_STATUSAcpiOsWritePciConfiguration ( ACPI_PCI_ID *PciId, UINT32 Register, ACPI_INTEGER Value, UINT32 Width){ return (AE_OK);}/* TEMPORARY STUB FUNCTION */voidAcpiOsDerivePciId( ACPI_HANDLE rhandle, ACPI_HANDLE chandle, ACPI_PCI_ID **PciId){}/****************************************************************************** * * FUNCTION: AcpiOsReadPort * * PARAMETERS: Address Address of I/O port/register to read * Value Where value is placed * Width Number of bits * * RETURN: Value read from port * * DESCRIPTION: Read data from an I/O port or register * *****************************************************************************/ACPI_STATUSAcpiOsReadPort ( ACPI_IO_ADDRESS Address, UINT32 *Value, UINT32 Width){ switch (Width) { case 8: *Value = 0xFF; break; case 16: *Value = 0xFFFF; break; case 32: *Value = 0xFFFFFFFF; break; } return (AE_OK);}/****************************************************************************** * * FUNCTION: AcpiOsWritePort * * PARAMETERS: Address Address of I/O port/register to write * Value Value to write * Width Number of bits * * RETURN: None * * DESCRIPTION: Write data to an I/O port or register * *****************************************************************************/ACPI_STATUSAcpiOsWritePort ( ACPI_IO_ADDRESS Address, UINT32 Value, UINT32 Width){ return (AE_OK);}/****************************************************************************** * * FUNCTION: AcpiOsReadMemory * * PARAMETERS: Address Physical Memory Address to read * Value Where value is placed * Width Number of bits * * RETURN: Value read from physical memory address * * DESCRIPTION: Read data from a physical memory address * *****************************************************************************/ACPI_STATUSAcpiOsReadMemory ( ACPI_PHYSICAL_ADDRESS Address, UINT32 *Value, UINT32 Width){ switch (Width) { case 8: case 16: case 32: *Value = 0; break; default: return (AE_BAD_PARAMETER); break; } return (AE_OK);}/****************************************************************************** * * FUNCTION: AcpiOsWriteMemory * * PARAMETERS: Address Physical Memory Address to write * Value Value to write * Width Number of bits * * RETURN: None * * DESCRIPTION: Write data to a physical memory address * *****************************************************************************/ACPI_STATUSAcpiOsWriteMemory ( ACPI_PHYSICAL_ADDRESS Address, UINT32 Value, UINT32 Width){ return (AE_OK);}/****************************************************************************** * * FUNCTION: AcpiOsSignal * * PARAMETERS: Function ACPI CA signal function code * Info Pointer to function-dependent structure * * RETURN: Status * * DESCRIPTION: Miscellaneous functions * *****************************************************************************/ACPI_STATUSAcpiOsSignal ( UINT32 Function, void *Info){ return (AE_OK);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -