本网站可以出售:只需60000元直接拥有。QQ:939804642
您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ ACPI_FUNCTION_ENTRY函数代码示例

51自学网 2021-06-01 19:32:38
  C++
这篇教程C++ ACPI_FUNCTION_ENTRY函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中ACPI_FUNCTION_ENTRY函数的典型用法代码示例。如果您正苦于以下问题:C++ ACPI_FUNCTION_ENTRY函数的具体用法?C++ ACPI_FUNCTION_ENTRY怎么用?C++ ACPI_FUNCTION_ENTRY使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了ACPI_FUNCTION_ENTRY函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: AcpiExSystemResetEvent

ACPI_STATUSAcpiExSystemResetEvent (    ACPI_OPERAND_OBJECT     *ObjDesc){    ACPI_STATUS             Status = AE_OK;    ACPI_SEMAPHORE          TempSemaphore;    ACPI_FUNCTION_ENTRY ();    /*     * We are going to simply delete the existing semaphore and     * create a new one!     */    Status = AcpiOsCreateSemaphore (ACPI_NO_UNIT_LIMIT, 0, &TempSemaphore);    if (ACPI_SUCCESS (Status))    {        (void) AcpiOsDeleteSemaphore (ObjDesc->Event.OsSemaphore);        ObjDesc->Event.OsSemaphore = TempSemaphore;    }    return (Status);}
开发者ID:Lxg1582,项目名称:freebsd,代码行数:24,


示例2: acpi_ds_init_one_object

static acpi_statusacpi_ds_init_one_object(acpi_handle obj_handle,			u32 level, void *context, void **return_value){	struct acpi_init_walk_info *info =	    (struct acpi_init_walk_info *)context;	struct acpi_namespace_node *node =	    (struct acpi_namespace_node *)obj_handle;	acpi_status status;	union acpi_operand_object *obj_desc;	ACPI_FUNCTION_ENTRY();	/*	 * We are only interested in NS nodes owned by the table that	 * was just loaded	 */	if (node->owner_id != info->owner_id) {		return (AE_OK);	}	info->object_count++;	/* And even then, we are only interested in a few object types */	switch (acpi_ns_get_type(obj_handle)) {	case ACPI_TYPE_REGION:		status = acpi_ds_initialize_region(obj_handle);		if (ACPI_FAILURE(status)) {			ACPI_EXCEPTION((AE_INFO, status,					"During Region initialization %p [%4.4s]",					obj_handle,					acpi_ut_get_node_name(obj_handle)));		}		info->op_region_count++;		break;	case ACPI_TYPE_METHOD:		/*		 * Auto-serialization support. We will examine each method that is		 * not_serialized to determine if it creates any Named objects. If		 * it does, it will be marked serialized to prevent problems if		 * the method is entered by two or more threads and an attempt is		 * made to create the same named object twice -- which results in		 * an AE_ALREADY_EXISTS exception and method abort.		 */		info->method_count++;		obj_desc = acpi_ns_get_attached_object(node);		if (!obj_desc) {			break;		}		/* Ignore if already serialized */		if (obj_desc->method.info_flags & ACPI_METHOD_SERIALIZED) {			info->serial_method_count++;			break;		}		if (acpi_gbl_auto_serialize_methods) {			/* Parse/scan method and serialize it if necessary */			acpi_ds_auto_serialize_method(node, obj_desc);			if (obj_desc->method.			    info_flags & ACPI_METHOD_SERIALIZED) {				/* Method was just converted to Serialized */				info->serial_method_count++;				info->serialized_method_count++;				break;			}		}		info->non_serial_method_count++;		break;	case ACPI_TYPE_DEVICE:		info->device_count++;		break;	default:		break;	}	/*	 * We ignore errors from above, and always return OK, since	 * we don't want to abort the walk on a single error.	 */	return (AE_OK);}
开发者ID:forgivemyheart,项目名称:linux,代码行数:96,


示例3: acpi_ex_do_math_op

acpi_integeracpi_ex_do_math_op (	u16                             opcode,	acpi_integer                    operand0,	acpi_integer                    operand1){	ACPI_FUNCTION_ENTRY ();	switch (opcode) {	case AML_ADD_OP:                /* Add (Operand0, Operand1, Result) */		return (operand0 + operand1);	case AML_BIT_AND_OP:            /* And (Operand0, Operand1, Result) */		return (operand0 & operand1);	case AML_BIT_NAND_OP:           /* NAnd (Operand0, Operand1, Result) */		return (~(operand0 & operand1));	case AML_BIT_OR_OP:             /* Or (Operand0, Operand1, Result) */		return (operand0 | operand1);	case AML_BIT_NOR_OP:            /* NOr (Operand0, Operand1, Result) */		return (~(operand0 | operand1));	case AML_BIT_XOR_OP:            /* XOr (Operand0, Operand1, Result) */		return (operand0 ^ operand1);	case AML_MULTIPLY_OP:           /* Multiply (Operand0, Operand1, Result) */		return (operand0 * operand1);	case AML_SHIFT_LEFT_OP:         /* shift_left (Operand, shift_count, Result) */		return (operand0 << operand1);	case AML_SHIFT_RIGHT_OP:        /* shift_right (Operand, shift_count, Result) */		return (operand0 >> operand1);	case AML_SUBTRACT_OP:           /* Subtract (Operand0, Operand1, Result) */		return (operand0 - operand1);	default:		return (0);	}}
开发者ID:BackupTheBerlios,项目名称:tuxap,代码行数:65,


示例4: AeInstallEarlyHandlers

ACPI_STATUSAeInstallEarlyHandlers (    void){    ACPI_STATUS             Status;    UINT32                  i;    ACPI_HANDLE             Handle;    ACPI_FUNCTION_ENTRY ();    Status = AcpiInstallInterfaceHandler (AeInterfaceHandler);    if (ACPI_FAILURE (Status))    {        printf ("Could not install interface handler, %s/n",            AcpiFormatException (Status));    }    Status = AcpiInstallTableHandler (AeTableHandler, NULL);    if (ACPI_FAILURE (Status))    {        printf ("Could not install table handler, %s/n",            AcpiFormatException (Status));    }    Status = AcpiInstallExceptionHandler (AeExceptionHandler);    if (ACPI_FAILURE (Status))    {        printf ("Could not install exception handler, %s/n",            AcpiFormatException (Status));    }    /* Install global notify handlers */    Status = AcpiInstallNotifyHandler (ACPI_ROOT_OBJECT, ACPI_SYSTEM_NOTIFY,        AeSystemNotifyHandler, NULL);    if (ACPI_FAILURE (Status))    {        printf ("Could not install a global system notify handler, %s/n",            AcpiFormatException (Status));    }    Status = AcpiInstallNotifyHandler (ACPI_ROOT_OBJECT, ACPI_DEVICE_NOTIFY,        AeDeviceNotifyHandler, NULL);    if (ACPI_FAILURE (Status))    {        printf ("Could not install a global notify handler, %s/n",            AcpiFormatException (Status));    }    Status = AcpiGetHandle (NULL, "//_SB", &Handle);    if (ACPI_SUCCESS (Status))    {        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,            AeNotifyHandler1, NULL);        if (ACPI_FAILURE (Status))        {            printf ("Could not install a notify handler, %s/n",                AcpiFormatException (Status));        }        Status = AcpiRemoveNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,            AeNotifyHandler1);        if (ACPI_FAILURE (Status))        {            printf ("Could not remove a notify handler, %s/n",                AcpiFormatException (Status));        }        Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,            AeNotifyHandler1, NULL);        AE_CHECK_OK (AcpiInstallNotifyHandler, Status);        Status = AcpiRemoveNotifyHandler (Handle, ACPI_ALL_NOTIFY,            AeNotifyHandler1);        AE_CHECK_OK (AcpiRemoveNotifyHandler, Status);#if 0        Status = AcpiInstallNotifyHandler (Handle, ACPI_ALL_NOTIFY,            AeNotifyHandler1, NULL);        if (ACPI_FAILURE (Status))        {            printf ("Could not install a notify handler, %s/n",                AcpiFormatException (Status));        }#endif        /* Install two handlers for _SB_ */        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,            AeNotifyHandler1, ACPI_CAST_PTR (void, 0x01234567));        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,            AeNotifyHandler2, ACPI_CAST_PTR (void, 0x89ABCDEF));        /* Attempt duplicate handler installation, should fail */        Status = AcpiInstallNotifyHandler (Handle, ACPI_SYSTEM_NOTIFY,            AeNotifyHandler1, ACPI_CAST_PTR (void, 0x77777777));//.........这里部分代码省略.........
开发者ID:victoredwardocallaghan,项目名称:DragonFlyBSD,代码行数:101,


示例5: AcpiExConvertToAscii

static UINT32AcpiExConvertToAscii (    UINT64                  Integer,    UINT16                  Base,    UINT8                   *String,    UINT8                   DataWidth){    UINT64                  Digit;    UINT32                  i;    UINT32                  j;    UINT32                  k = 0;    UINT32                  HexLength;    UINT32                  DecimalLength;    UINT32                  Remainder;    BOOLEAN                 SupressZeros;    ACPI_FUNCTION_ENTRY ();    switch (Base)    {    case 10:        /* Setup max length for the decimal number */        switch (DataWidth)        {        case 1:            DecimalLength = ACPI_MAX8_DECIMAL_DIGITS;            break;        case 4:            DecimalLength = ACPI_MAX32_DECIMAL_DIGITS;            break;        case 8:        default:            DecimalLength = ACPI_MAX64_DECIMAL_DIGITS;            break;        }        SupressZeros = TRUE;     /* No leading zeros */        Remainder = 0;        for (i = DecimalLength; i > 0; i--)        {            /* Divide by nth factor of 10 */            Digit = Integer;            for (j = 0; j < i; j++)            {                (void) AcpiUtShortDivide (Digit, 10, &Digit, &Remainder);            }            /* Handle leading zeros */            if (Remainder != 0)            {                SupressZeros = FALSE;            }            if (!SupressZeros)            {                String[k] = (UINT8) (ACPI_ASCII_ZERO + Remainder);                k++;            }        }        break;    case 16:        /* HexLength: 2 ascii hex chars per data byte */        HexLength = ACPI_MUL_2 (DataWidth);        for (i = 0, j = (HexLength-1); i < HexLength; i++, j--)        {            /* Get one hex digit, most significant digits first */            String[k] = (UINT8) AcpiUtHexToAsciiChar (Integer, ACPI_MUL_4 (j));            k++;        }        break;    default:        return (0);    }    /*     * Since leading zeros are suppressed, we must check for the case where     * the integer equals 0     *     * Finally, null terminate the string and return the length     */    if (!k)    {        String [0] = ACPI_ASCII_ZERO;//.........这里部分代码省略.........
开发者ID:Alkzndr,项目名称:freebsd,代码行数:101,


示例6: AcpiDbSecondPassParse

ACPI_STATUSAcpiDbSecondPassParse (    ACPI_PARSE_OBJECT       *Root){    ACPI_PARSE_OBJECT       *Op = Root;    ACPI_PARSE_OBJECT       *Method;    ACPI_PARSE_OBJECT       *SearchOp;    ACPI_PARSE_OBJECT       *StartOp;    ACPI_STATUS             Status = AE_OK;    UINT32                  BaseAmlOffset;    ACPI_WALK_STATE         *WalkState;    ACPI_FUNCTION_ENTRY ();    AcpiOsPrintf ("Pass two parse ..../n");    while (Op)    {        if (Op->Common.AmlOpcode == AML_METHOD_OP)        {            Method = Op;            /* Create a new walk state for the parse */            WalkState = AcpiDsCreateWalkState (0, NULL, NULL, NULL);            if (!WalkState)            {                return (AE_NO_MEMORY);            }            /* Init the Walk State */            WalkState->ParserState.Aml          =            WalkState->ParserState.AmlStart     = Method->Named.Data;            WalkState->ParserState.AmlEnd       =            WalkState->ParserState.PkgEnd       = Method->Named.Data +                                                  Method->Named.Length;            WalkState->ParserState.StartScope   = Op;            WalkState->DescendingCallback       = AcpiDsLoad1BeginOp;            WalkState->AscendingCallback        = AcpiDsLoad1EndOp;            /* Perform the AML parse */            Status = AcpiPsParseAml (WalkState);            BaseAmlOffset = (Method->Common.Value.Arg)->Common.AmlOffset + 1;            StartOp = (Method->Common.Value.Arg)->Common.Next;            SearchOp = StartOp;            while (SearchOp)            {                SearchOp->Common.AmlOffset += BaseAmlOffset;                SearchOp = AcpiPsGetDepthNext (StartOp, SearchOp);            }        }        if (Op->Common.AmlOpcode == AML_REGION_OP)        {            /* TBD: [Investigate] this isn't quite the right thing to do! */            /*             *             * Method = (ACPI_DEFERRED_OP *) Op;             * Status = AcpiPsParseAml (Op, Method->Body, Method->BodyLength);             */        }        if (ACPI_FAILURE (Status))        {            break;        }        Op = AcpiPsGetDepthNext (Root, Op);    }    return (Status);}
开发者ID:cloudius-systems,项目名称:acpica,代码行数:79,


示例7: AcpiDmParseDeferredOps

ACPI_STATUSAcpiDmParseDeferredOps (    ACPI_PARSE_OBJECT       *Root){    const ACPI_OPCODE_INFO  *OpInfo;    ACPI_PARSE_OBJECT       *Op = Root;    ACPI_STATUS             Status;    ACPI_FUNCTION_ENTRY ();    /* Traverse the entire parse tree */    while (Op)    {        OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);        if (!(OpInfo->Flags & AML_DEFER))        {            Op = AcpiPsGetDepthNext (Root, Op);            continue;        }        /* Now we know we have a deferred opcode */        switch (Op->Common.AmlOpcode)        {        case AML_METHOD_OP:        case AML_BUFFER_OP:        case AML_PACKAGE_OP:        case AML_VAR_PACKAGE_OP:            Status = AcpiDmDeferredParse (Op, Op->Named.Data, Op->Named.Length);            if (ACPI_FAILURE (Status))            {                return (Status);            }            break;        /* We don't need to do anything for these deferred opcodes */        case AML_REGION_OP:        case AML_DATA_REGION_OP:        case AML_CREATE_QWORD_FIELD_OP:        case AML_CREATE_DWORD_FIELD_OP:        case AML_CREATE_WORD_FIELD_OP:        case AML_CREATE_BYTE_FIELD_OP:        case AML_CREATE_BIT_FIELD_OP:        case AML_CREATE_FIELD_OP:        case AML_BANK_FIELD_OP:            break;        default:            ACPI_ERROR ((AE_INFO, "Unhandled deferred AML opcode [0x%.4X]",                 Op->Common.AmlOpcode));            break;        }        Op = AcpiPsGetDepthNext (Root, Op);    }    return (AE_OK);}
开发者ID:99corps,项目名称:runtime,代码行数:65,


示例8: acpi_ex_convert_to_ascii

static u32acpi_ex_convert_to_ascii(acpi_integer integer,			 u16 base, u8 * string, u8 data_width){	acpi_integer digit;	acpi_native_uint i;	acpi_native_uint j;	acpi_native_uint k = 0;	acpi_native_uint hex_length;	acpi_native_uint decimal_length;	u32 remainder;	u8 supress_zeros;	ACPI_FUNCTION_ENTRY();	switch (base) {	case 10:		/* Setup max length for the decimal number */		switch (data_width) {		case 1:			decimal_length = ACPI_MAX8_DECIMAL_DIGITS;			break;		case 4:			decimal_length = ACPI_MAX32_DECIMAL_DIGITS;			break;		case 8:		default:			decimal_length = ACPI_MAX64_DECIMAL_DIGITS;			break;		}		supress_zeros = TRUE;	/* No leading zeros */		remainder = 0;		for (i = decimal_length; i > 0; i--) {			/* Divide by nth factor of 10 */			digit = integer;			for (j = 0; j < i; j++) {				(void)acpi_ut_short_divide(digit, 10, &digit,							   &remainder);			}			/* Handle leading zeros */			if (remainder != 0) {				supress_zeros = FALSE;			}			if (!supress_zeros) {				string[k] = (u8) (ACPI_ASCII_ZERO + remainder);				k++;			}		}		break;	case 16:		/* hex_length: 2 ascii hex chars per data byte */		hex_length = (acpi_native_uint) ACPI_MUL_2(data_width);		for (i = 0, j = (hex_length - 1); i < hex_length; i++, j--) {			/* Get one hex digit, most significant digits first */			string[k] =			    (u8) acpi_ut_hex_to_ascii_char(integer,							   ACPI_MUL_4(j));			k++;		}		break;	default:		return (0);	}	/*	 * Since leading zeros are supressed, we must check for the case where	 * the integer equals 0	 *	 * Finally, null terminate the string and return the length	 */	if (!k) {		string[0] = ACPI_ASCII_ZERO;		k = 1;	}	string[k] = 0;	return ((u32) k);}
开发者ID:laitianli,项目名称:kernel-analyze_linux-2.6.18,代码行数:95,


示例9: AcpiHwGetGpeStatus

ACPI_STATUSAcpiHwGetGpeStatus (    ACPI_GPE_EVENT_INFO     *GpeEventInfo,    ACPI_EVENT_STATUS       *EventStatus){    UINT32                  InByte;    UINT32                  RegisterBit;    ACPI_GPE_REGISTER_INFO  *GpeRegisterInfo;    ACPI_EVENT_STATUS       LocalEventStatus = 0;    ACPI_STATUS             Status;    ACPI_FUNCTION_ENTRY ();    if (!EventStatus)    {        return (AE_BAD_PARAMETER);    }    /* GPE currently handled? */    if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) !=            ACPI_GPE_DISPATCH_NONE)    {        LocalEventStatus |= ACPI_EVENT_FLAG_HAS_HANDLER;    }    /* Get the info block for the entire GPE register */    GpeRegisterInfo = GpeEventInfo->RegisterInfo;    /* Get the register bitmask for this GPE */    RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo);    /* GPE currently enabled? (enabled for runtime?) */    if (RegisterBit & GpeRegisterInfo->EnableForRun)    {        LocalEventStatus |= ACPI_EVENT_FLAG_ENABLED;    }    /* GPE enabled for wake? */    if (RegisterBit & GpeRegisterInfo->EnableForWake)    {        LocalEventStatus |= ACPI_EVENT_FLAG_WAKE_ENABLED;    }    /* GPE currently enabled (enable bit == 1)? */    Status = AcpiHwRead (&InByte, &GpeRegisterInfo->EnableAddress);    if (ACPI_FAILURE (Status))    {        return (Status);    }    if (RegisterBit & InByte)    {        LocalEventStatus |= ACPI_EVENT_FLAG_ENABLE_SET;    }    /* GPE currently active (status bit == 1)? */    Status = AcpiHwRead (&InByte, &GpeRegisterInfo->StatusAddress);    if (ACPI_FAILURE (Status))    {        return (Status);    }    if (RegisterBit & InByte)    {        LocalEventStatus |= ACPI_EVENT_FLAG_STATUS_SET;    }    /* Set return value */    (*EventStatus) = LocalEventStatus;    return (AE_OK);}
开发者ID:Strongc,项目名称:reactos,代码行数:81,


示例10: AcpiGetHandle

ACPI_STATUSAcpiGetHandle (    ACPI_HANDLE             Parent,    ACPI_STRING             Pathname,    ACPI_HANDLE             *RetHandle){    ACPI_STATUS             Status;    ACPI_NAMESPACE_NODE     *Node = NULL;    ACPI_NAMESPACE_NODE     *PrefixNode = NULL;    ACPI_FUNCTION_ENTRY ();    /* Parameter Validation */    if (!RetHandle || !Pathname)    {        return (AE_BAD_PARAMETER);    }    /* Convert a parent handle to a prefix node */    if (Parent)    {        PrefixNode = AcpiNsMapHandleToNode (Parent);        if (!PrefixNode)        {            return (AE_BAD_PARAMETER);        }    }    /*     * Valid cases are:     * 1) Fully qualified pathname     * 2) Parent + Relative pathname     *     * Error for <null Parent + relative path>     */    if (AcpiNsValidRootPrefix (Pathname[0]))    {        /* Pathname is fully qualified (starts with '/') */        /* Special case for root-only, since we can't search for it */        if (!ACPI_STRCMP (Pathname, ACPI_NS_ROOT_PATH))        {            *RetHandle = AcpiNsConvertEntryToHandle (AcpiGbl_RootNode);            return (AE_OK);        }    }    else if (!PrefixNode)    {        /* Relative path with null prefix is disallowed */        return (AE_BAD_PARAMETER);    }    /* Find the Node and convert to a handle */    Status = AcpiNsGetNode (PrefixNode, Pathname, ACPI_NS_NO_UPSEARCH, &Node);    if (ACPI_SUCCESS (Status))    {        *RetHandle = AcpiNsConvertEntryToHandle (Node);    }    return (Status);}
开发者ID:samueldotj,项目名称:AceOS,代码行数:68,


示例11: AcpiPsGetDepthNext

ACPI_PARSE_OBJECT *AcpiPsGetDepthNext (    ACPI_PARSE_OBJECT       *Origin,    ACPI_PARSE_OBJECT       *Op){    ACPI_PARSE_OBJECT       *Next = NULL;    ACPI_PARSE_OBJECT       *Parent;    ACPI_PARSE_OBJECT       *Arg;    ACPI_FUNCTION_ENTRY ();    if (!Op)    {        return (NULL);    }    /* Look for an argument or child */    Next = AcpiPsGetArg (Op, 0);    if (Next)    {        return (Next);    }    /* Look for a sibling */    Next = Op->Common.Next;    if (Next)    {        return (Next);    }    /* Look for a sibling of parent */    Parent = Op->Common.Parent;    while (Parent)    {        Arg = AcpiPsGetArg (Parent, 0);        while (Arg && (Arg != Origin) && (Arg != Op))        {            Arg = Arg->Common.Next;        }        if (Arg == Origin)        {            /* Reached parent of origin, end search */            return (NULL);        }        if (Parent->Common.Next)        {            /* Found sibling of parent */            return (Parent->Common.Next);        }        Op = Parent;        Parent = Parent->Common.Parent;    }    return (Next);}
开发者ID:CSRedRat,项目名称:reactos,代码行数:66,


示例12: AcpiPsAppendArg

voidAcpiPsAppendArg (    ACPI_PARSE_OBJECT       *Op,    ACPI_PARSE_OBJECT       *Arg){    ACPI_PARSE_OBJECT       *PrevArg;    const ACPI_OPCODE_INFO  *OpInfo;    ACPI_FUNCTION_ENTRY ();    if (!Op)    {        return;    }    /* Get the info structure for this opcode */    OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);    if (OpInfo->Class == AML_CLASS_UNKNOWN)    {        /* Invalid opcode */        ACPI_ERROR ((AE_INFO, "Invalid AML Opcode: 0x%2.2X",            Op->Common.AmlOpcode));        return;    }    /* Check if this opcode requires argument sub-objects */    if (!(OpInfo->Flags & AML_HAS_ARGS))    {        /* Has no linked argument objects */        return;    }    /* Append the argument to the linked argument list */    if (Op->Common.Value.Arg)    {        /* Append to existing argument list */        PrevArg = Op->Common.Value.Arg;        while (PrevArg->Common.Next)        {            PrevArg = PrevArg->Common.Next;        }        PrevArg->Common.Next = Arg;    }    else    {        /* No argument list, this will be the first argument */        Op->Common.Value.Arg = Arg;    }    /* Set the parent in this arg and any args linked after it */    while (Arg)    {        Arg->Common.Parent = Op;        Arg = Arg->Common.Next;        Op->Common.ArgListLength++;    }}
开发者ID:CSRedRat,项目名称:reactos,代码行数:68,


示例13: AcpiHwGetGpeStatus

ACPI_STATUSAcpiHwGetGpeStatus (    ACPI_GPE_EVENT_INFO     *GpeEventInfo,    ACPI_EVENT_STATUS       *EventStatus){    UINT32                  InByte;    UINT8                   RegisterBit;    ACPI_GPE_REGISTER_INFO  *GpeRegisterInfo;    ACPI_STATUS             Status;    ACPI_EVENT_STATUS       LocalEventStatus = 0;    ACPI_FUNCTION_ENTRY ();    if (!EventStatus)    {        return (AE_BAD_PARAMETER);    }    /* Get the info block for the entire GPE register */    GpeRegisterInfo = GpeEventInfo->RegisterInfo;    /* Get the register bitmask for this GPE */    RegisterBit = (UINT8) (1 <<        (GpeEventInfo->GpeNumber - GpeEventInfo->RegisterInfo->BaseGpeNumber));    /* GPE currently enabled? (enabled for runtime?) */    if (RegisterBit & GpeRegisterInfo->EnableForRun)    {        LocalEventStatus |= ACPI_EVENT_FLAG_ENABLED;    }    /* GPE enabled for wake? */    if (RegisterBit & GpeRegisterInfo->EnableForWake)    {        LocalEventStatus |= ACPI_EVENT_FLAG_WAKE_ENABLED;    }    /* GPE currently active (status bit == 1)? */    Status = AcpiRead (&InByte, &GpeRegisterInfo->StatusAddress);    if (ACPI_FAILURE (Status))    {        goto UnlockAndExit;    }    if (RegisterBit & InByte)    {        LocalEventStatus |= ACPI_EVENT_FLAG_SET;    }    /* Set return value */    (*EventStatus) = LocalEventStatus;UnlockAndExit:    return (Status);}
开发者ID:MatiasNAmendola,项目名称:AuroraUX-SunOS,代码行数:64,


示例14: AcpiExDoMathOp

UINT64AcpiExDoMathOp (    UINT16                  Opcode,    UINT64                  Integer0,    UINT64                  Integer1){    ACPI_FUNCTION_ENTRY ();    switch (Opcode)    {    case AML_ADD_OP:                /* Add (Integer0, Integer1, Result) */        return (Integer0 + Integer1);    case AML_BIT_AND_OP:            /* And (Integer0, Integer1, Result) */        return (Integer0 & Integer1);    case AML_BIT_NAND_OP:           /* NAnd (Integer0, Integer1, Result) */        return (~(Integer0 & Integer1));    case AML_BIT_OR_OP:             /* Or (Integer0, Integer1, Result) */        return (Integer0 | Integer1);    case AML_BIT_NOR_OP:            /* NOr (Integer0, Integer1, Result) */        return (~(Integer0 | Integer1));    case AML_BIT_XOR_OP:            /* XOr (Integer0, Integer1, Result) */        return (Integer0 ^ Integer1);    case AML_MULTIPLY_OP:           /* Multiply (Integer0, Integer1, Result) */        return (Integer0 * Integer1);    case AML_SHIFT_LEFT_OP:         /* ShiftLeft (Operand, ShiftCount, Result)*/        /*         * We need to check if the shiftcount is larger than the integer bit         * width since the behavior of this is not well-defined in the C language.         */        if (Integer1 >= AcpiGbl_IntegerBitWidth)        {            return (0);        }        return (Integer0 << Integer1);    case AML_SHIFT_RIGHT_OP:        /* ShiftRight (Operand, ShiftCount, Result) */        /*         * We need to check if the shiftcount is larger than the integer bit         * width since the behavior of this is not well-defined in the C language.         */        if (Integer1 >= AcpiGbl_IntegerBitWidth)        {            return (0);        }        return (Integer0 >> Integer1);    case AML_SUBTRACT_OP:           /* Subtract (Integer0, Integer1, Result) */        return (Integer0 - Integer1);    default:        return (0);    }}
开发者ID:ryo,项目名称:netbsd-src,代码行数:73,


示例15: AcpiHwLowSetGpe

ACPI_STATUSAcpiHwLowSetGpe (    ACPI_GPE_EVENT_INFO     *GpeEventInfo,    UINT32                  Action){    ACPI_GPE_REGISTER_INFO  *GpeRegisterInfo;    ACPI_STATUS             Status;    UINT32                  EnableMask;    UINT32                  RegisterBit;    ACPI_FUNCTION_ENTRY ();    /* Get the info block for the entire GPE register */    GpeRegisterInfo = GpeEventInfo->RegisterInfo;    if (!GpeRegisterInfo)    {        return (AE_NOT_EXIST);    }    /* Get current value of the enable register that contains this GPE */    Status = AcpiHwRead (&EnableMask, &GpeRegisterInfo->EnableAddress);    if (ACPI_FAILURE (Status))    {        return (Status);    }    /* Set or clear just the bit that corresponds to this GPE */    RegisterBit = AcpiHwGetGpeRegisterBit (GpeEventInfo, GpeRegisterInfo);    switch (Action)    {    case ACPI_GPE_CONDITIONAL_ENABLE:        /* Only enable if the EnableForRun bit is set */        if (!(RegisterBit & GpeRegisterInfo->EnableForRun))        {            return (AE_BAD_PARAMETER);        }        /*lint -fallthrough */    case ACPI_GPE_ENABLE:        ACPI_SET_BIT (EnableMask, RegisterBit);        break;    case ACPI_GPE_DISABLE:        ACPI_CLEAR_BIT (EnableMask, RegisterBit);        break;    default:        ACPI_ERROR ((AE_INFO, "Invalid GPE Action, %u/n", Action));        return (AE_BAD_PARAMETER);    }    /* Write the updated enable mask */    Status = AcpiHwWrite (EnableMask, &GpeRegisterInfo->EnableAddress);    return (Status);}
开发者ID:Aresthu,项目名称:ucore_plus,代码行数:64,


示例16: AcpiNsGetInternalNameLength

voidAcpiNsGetInternalNameLength (    ACPI_NAMESTRING_INFO    *Info){    const char              *NextExternalChar;    UINT32                  i;    ACPI_FUNCTION_ENTRY ();    NextExternalChar = Info->ExternalName;    Info->NumCarats = 0;    Info->NumSegments = 0;    Info->FullyQualified = FALSE;    /*     * For the internal name, the required length is 4 bytes per segment,     * plus 1 each for RootPrefix, MultiNamePrefixOp, segment count,     * trailing null (which is not really needed, but no there's harm in     * putting it there)     *     * strlen() + 1 covers the first NameSeg, which has no path separator     */    if (ACPI_IS_ROOT_PREFIX (*NextExternalChar))    {        Info->FullyQualified = TRUE;        NextExternalChar++;        /* Skip redundant RootPrefix, like //_SB.PCI0.SBRG.EC0 */        while (ACPI_IS_ROOT_PREFIX (*NextExternalChar))        {            NextExternalChar++;        }    }    else    {        /* Handle Carat prefixes */        while (ACPI_IS_PARENT_PREFIX (*NextExternalChar))        {            Info->NumCarats++;            NextExternalChar++;        }    }    /*     * Determine the number of ACPI name "segments" by counting the number of     * path separators within the string. Start with one segment since the     * segment count is [(# separators) + 1], and zero separators is ok.     */    if (*NextExternalChar)    {        Info->NumSegments = 1;        for (i = 0; NextExternalChar[i]; i++)        {            if (ACPI_IS_PATH_SEPARATOR (NextExternalChar[i]))            {                Info->NumSegments++;            }        }    }    Info->Length = (ACPI_NAME_SIZE * Info->NumSegments) +        4 + Info->NumCarats;    Info->NextExternalChar = NextExternalChar;}
开发者ID:ariscop,项目名称:reactos,代码行数:69,


示例17: AcpiDsInitOneObject

static ACPI_STATUSAcpiDsInitOneObject (    ACPI_HANDLE             ObjHandle,    UINT32                  Level,    void                    *Context,    void                    **ReturnValue){    ACPI_INIT_WALK_INFO     *Info = (ACPI_INIT_WALK_INFO *) Context;    ACPI_NAMESPACE_NODE     *Node = (ACPI_NAMESPACE_NODE *) ObjHandle;    ACPI_OBJECT_TYPE        Type;    ACPI_STATUS             Status;    ACPI_FUNCTION_ENTRY ();    /*     * We are only interested in NS nodes owned by the table that     * was just loaded     */    if (Node->OwnerId != Info->OwnerId)    {        return (AE_OK);    }    Info->ObjectCount++;    /* And even then, we are only interested in a few object types */    Type = AcpiNsGetType (ObjHandle);    switch (Type)    {    case ACPI_TYPE_REGION:        Status = AcpiDsInitializeRegion (ObjHandle);        if (ACPI_FAILURE (Status))        {            ACPI_EXCEPTION ((AE_INFO, Status,                "During Region initialization %p [%4.4s]",                ObjHandle, AcpiUtGetNodeName (ObjHandle)));        }        Info->OpRegionCount++;        break;    case ACPI_TYPE_METHOD:        Info->MethodCount++;        break;    case ACPI_TYPE_DEVICE:        Info->DeviceCount++;        break;    default:        break;    }    /*     * We ignore errors from above, and always return OK, since     * we don't want to abort the walk on a single error.     */    return (AE_OK);}
开发者ID:Aresthu,项目名称:ucore_plus,代码行数:69,


示例18: AcpiUtValidateException

const char *AcpiUtValidateException (    ACPI_STATUS             Status){    UINT32                  SubStatus;    const char              *Exception = NULL;    ACPI_FUNCTION_ENTRY ();    /*     * Status is composed of two parts, a "type" and an actual code     */    SubStatus = (Status & ~AE_CODE_MASK);    switch (Status & AE_CODE_MASK)    {    case AE_CODE_ENVIRONMENTAL:        if (SubStatus <= AE_CODE_ENV_MAX)        {            Exception = AcpiGbl_ExceptionNames_Env [SubStatus];        }        break;    case AE_CODE_PROGRAMMER:        if (SubStatus <= AE_CODE_PGM_MAX)        {            Exception = AcpiGbl_ExceptionNames_Pgm [SubStatus];        }        break;    case AE_CODE_ACPI_TABLES:        if (SubStatus <= AE_CODE_TBL_MAX)        {            Exception = AcpiGbl_ExceptionNames_Tbl [SubStatus];        }        break;    case AE_CODE_AML:        if (SubStatus <= AE_CODE_AML_MAX)        {            Exception = AcpiGbl_ExceptionNames_Aml [SubStatus];        }        break;    case AE_CODE_CONTROL:        if (SubStatus <= AE_CODE_CTRL_MAX)        {            Exception = AcpiGbl_ExceptionNames_Ctrl [SubStatus];        }        break;    default:        break;    }    return (ACPI_CAST_PTR (const char, Exception));}
开发者ID:vkhromov,项目名称:freebsd,代码行数:64,


示例19: acpi_ex_do_math_op

acpi_integeracpi_ex_do_math_op (	u16                             opcode,	acpi_integer                    integer0,	acpi_integer                    integer1){	ACPI_FUNCTION_ENTRY ();	switch (opcode) {	case AML_ADD_OP:                /* Add (Integer0, Integer1, Result) */		return (integer0 + integer1);	case AML_BIT_AND_OP:            /* And (Integer0, Integer1, Result) */		return (integer0 & integer1);	case AML_BIT_NAND_OP:           /* NAnd (Integer0, Integer1, Result) */		return (~(integer0 & integer1));	case AML_BIT_OR_OP:             /* Or (Integer0, Integer1, Result) */		return (integer0 | integer1);	case AML_BIT_NOR_OP:            /* NOr (Integer0, Integer1, Result) */		return (~(integer0 | integer1));	case AML_BIT_XOR_OP:            /* XOr (Integer0, Integer1, Result) */		return (integer0 ^ integer1);	case AML_MULTIPLY_OP:           /* Multiply (Integer0, Integer1, Result) */		return (integer0 * integer1);	case AML_SHIFT_LEFT_OP:         /* shift_left (Operand, shift_count, Result) */		return (integer0 << integer1);	case AML_SHIFT_RIGHT_OP:        /* shift_right (Operand, shift_count, Result) */		return (integer0 >> integer1);	case AML_SUBTRACT_OP:           /* Subtract (Integer0, Integer1, Result) */		return (integer0 - integer1);	default:		return (0);	}}
开发者ID:GodFox,项目名称:magx_kernel_xpixl,代码行数:65,


示例20: AcpiRsMoveData

voidAcpiRsMoveData (    void                    *Destination,    void                    *Source,    UINT16                  ItemCount,    UINT8                   MoveType){    UINT32                  i;    ACPI_FUNCTION_ENTRY ();    /* One move per item */    for (i = 0; i < ItemCount; i++)    {        switch (MoveType)        {        /*         * For the 8-bit case, we can perform the move all at once         * since there are no alignment or endian issues         */        case ACPI_RSC_MOVE8:        case ACPI_RSC_MOVE_GPIO_RES:        case ACPI_RSC_MOVE_SERIAL_VEN:        case ACPI_RSC_MOVE_SERIAL_RES:            ACPI_MEMCPY (Destination, Source, ItemCount);            return;        /*         * 16-, 32-, and 64-bit cases must use the move macros that perform         * endian conversion and/or accommodate hardware that cannot perform         * misaligned memory transfers         */        case ACPI_RSC_MOVE16:        case ACPI_RSC_MOVE_GPIO_PIN:            ACPI_MOVE_16_TO_16 (&ACPI_CAST_PTR (UINT16, Destination)[i],                                &ACPI_CAST_PTR (UINT16, Source)[i]);            break;        case ACPI_RSC_MOVE32:                        ACPI_MOVE_32_TO_32 (&ACPI_CAST_PTR (UINT32, Destination)[i],                                &ACPI_CAST_PTR (UINT32, Source)[i]);            break;        case ACPI_RSC_MOVE64:            ACPI_MOVE_64_TO_64 (&ACPI_CAST_PTR (UINT64, Destination)[i],                                &ACPI_CAST_PTR (UINT64, Source)[i]);            break;        default:            return;        }    }}
开发者ID:rodero95,项目名称:sys,代码行数:61,


示例21: acpi_ut_copy_ielement_to_eelement

acpi_statusacpi_ut_copy_ielement_to_eelement (	u8                              object_type,	union acpi_operand_object       *source_object,	union acpi_generic_state        *state,	void                            *context){	acpi_status                     status = AE_OK;	struct acpi_pkg_info            *info = (struct acpi_pkg_info *) context;	acpi_size                       object_space;	u32                             this_index;	union acpi_object               *target_object;	ACPI_FUNCTION_ENTRY ();	this_index   = state->pkg.index;	target_object = (union acpi_object *)			  &((union acpi_object *)(state->pkg.dest_object))->package.elements[this_index];	switch (object_type) {	case ACPI_COPY_TYPE_SIMPLE:		/*		 * This is a simple or null object		 */		status = acpi_ut_copy_isimple_to_esimple (source_object,				  target_object, info->free_space, &object_space);		if (ACPI_FAILURE (status)) {			return (status);		}		break;	case ACPI_COPY_TYPE_PACKAGE:		/*		 * Build the package object		 */		target_object->type             = ACPI_TYPE_PACKAGE;		target_object->package.count    = source_object->package.count;		target_object->package.elements = ACPI_CAST_PTR (union acpi_object, info->free_space);		/*		 * Pass the new package object back to the package walk routine		 */		state->pkg.this_target_obj = target_object;		/*		 * Save space for the array of objects (Package elements)		 * update the buffer length counter		 */		object_space = ACPI_ROUND_UP_TO_NATIVE_WORD (				   (acpi_size) target_object->package.count * sizeof (union acpi_object));		break;	default:		return (AE_BAD_PARAMETER);	}	info->free_space  += object_space;	info->length      += object_space;	return (status);}
开发者ID:Dronevery,项目名称:JetsonTK1-kernel,代码行数:66,


示例22: acpi_ds_init_one_object

static acpi_statusacpi_ds_init_one_object(acpi_handle obj_handle,			u32 level, void *context, void **return_value){	struct acpi_init_walk_info *info =	    (struct acpi_init_walk_info *)context;	struct acpi_namespace_node *node =	    (struct acpi_namespace_node *)obj_handle;	acpi_object_type type;	acpi_status status;	ACPI_FUNCTION_ENTRY();	/*	 * We are only interested in NS nodes owned by the table that	 * was just loaded	 */	if (node->owner_id != info->owner_id) {		return (AE_OK);	}	info->object_count++;	/* And even then, we are only interested in a few object types */	type = acpi_ns_get_type(obj_handle);	switch (type) {	case ACPI_TYPE_REGION:		status = acpi_ds_initialize_region(obj_handle);		if (ACPI_FAILURE(status)) {			ACPI_EXCEPTION((AE_INFO, status,					"During Region initialization %p [%4.4s]",					obj_handle,					acpi_ut_get_node_name(obj_handle)));		}		info->op_region_count++;		break;	case ACPI_TYPE_METHOD:		info->method_count++;		break;	case ACPI_TYPE_DEVICE:		info->device_count++;		break;	default:		break;	}	/*	 * We ignore errors from above, and always return OK, since	 * we don't want to abort the walk on a single error.	 */	return (AE_OK);}
开发者ID:Core2idiot,项目名称:Kernel-Samsung-3.0...-,代码行数:61,


示例23: acpi_ut_copy_ielement_to_ielement

acpi_statusacpi_ut_copy_ielement_to_ielement (	u8                              object_type,	union acpi_operand_object       *source_object,	union acpi_generic_state        *state,	void                            *context){	acpi_status                     status = AE_OK;	u32                             this_index;	union acpi_operand_object       **this_target_ptr;	union acpi_operand_object       *target_object;	ACPI_FUNCTION_ENTRY ();	this_index    = state->pkg.index;	this_target_ptr = (union acpi_operand_object **)			   &state->pkg.dest_object->package.elements[this_index];	switch (object_type) {	case ACPI_COPY_TYPE_SIMPLE:		/* A null source object indicates a (legal) null package element */		if (source_object) {			/*			 * This is a simple object, just copy it			 */			target_object = acpi_ut_create_internal_object (					   ACPI_GET_OBJECT_TYPE (source_object));			if (!target_object) {				return (AE_NO_MEMORY);			}			status = acpi_ut_copy_simple_object (source_object, target_object);			if (ACPI_FAILURE (status)) {				goto error_exit;			}			*this_target_ptr = target_object;		}		else {			/* Pass through a null element */			*this_target_ptr = NULL;		}		break;	case ACPI_COPY_TYPE_PACKAGE:		/*		 * This object is a package - go down another nesting level		 * Create and build the package object		 */		target_object = acpi_ut_create_internal_object (ACPI_TYPE_PACKAGE);		if (!target_object) {			return (AE_NO_MEMORY);		}		target_object->package.count = source_object->package.count;		target_object->common.flags = source_object->common.flags;		/*		 * Create the object array		 */		target_object->package.elements =			ACPI_MEM_CALLOCATE (((acpi_size) source_object->package.count + 1) *					 sizeof (void *));		if (!target_object->package.elements) {			status = AE_NO_MEMORY;			goto error_exit;		}		/*		 * Pass the new package object back to the package walk routine		 */		state->pkg.this_target_obj = target_object;		/*		 * Store the object pointer in the parent package object		 */		*this_target_ptr = target_object;		break;	default:		return (AE_BAD_PARAMETER);	}	return (status);error_exit:	acpi_ut_remove_reference (target_object);	return (status);}
开发者ID:Dronevery,项目名称:JetsonTK1-kernel,代码行数:97,


示例24: acpi_ex_do_concatenate

acpi_statusacpi_ex_do_concatenate (	union acpi_operand_object       *obj_desc1,	union acpi_operand_object       *obj_desc2,	union acpi_operand_object       **actual_return_desc,	struct acpi_walk_state          *walk_state){	acpi_status                     status;	u32                             i;	acpi_integer                    this_integer;	union acpi_operand_object       *return_desc;	char                            *new_buf;	ACPI_FUNCTION_ENTRY ();	/*	 * There are three cases to handle:	 *	 * 1) Two Integers concatenated to produce a new Buffer	 * 2) Two Strings concatenated to produce a new String	 * 3) Two Buffers concatenated to produce a new Buffer	 */	switch (ACPI_GET_OBJECT_TYPE (obj_desc1)) {	case ACPI_TYPE_INTEGER:		/* Result of two Integers is a Buffer */		/* Need enough buffer space for two integers */		return_desc = acpi_ut_create_buffer_object (acpi_gbl_integer_byte_width * 2);		if (!return_desc) {			return (AE_NO_MEMORY);		}		new_buf = (char *) return_desc->buffer.pointer;		/* Convert the first integer */		this_integer = obj_desc1->integer.value;		for (i = 0; i < acpi_gbl_integer_byte_width; i++) {			new_buf[i] = (char) this_integer;			this_integer >>= 8;		}		/* Convert the second integer */		this_integer = obj_desc2->integer.value;		for (; i < (ACPI_MUL_2 (acpi_gbl_integer_byte_width)); i++) {			new_buf[i] = (char) this_integer;			this_integer >>= 8;		}		break;	case ACPI_TYPE_STRING:		/* Result of two Strings is a String */		return_desc = acpi_ut_create_internal_object (ACPI_TYPE_STRING);		if (!return_desc) {			return (AE_NO_MEMORY);		}		/* Operand0 is string  */		new_buf = ACPI_MEM_CALLOCATE ((acpi_size) obj_desc1->string.length +				   (acpi_size) obj_desc2->string.length + 1);		if (!new_buf) {			ACPI_REPORT_ERROR				(("ex_do_concatenate: String allocation failure/n"));			status = AE_NO_MEMORY;			goto cleanup;		}		/* Concatenate the strings */		ACPI_STRCPY (new_buf, obj_desc1->string.pointer);		ACPI_STRCPY (new_buf + obj_desc1->string.length,				  obj_desc2->string.pointer);		/* Complete the String object initialization */		return_desc->string.pointer = new_buf;		return_desc->string.length = obj_desc1->string.length +				   obj_desc2->string.length;		break;	case ACPI_TYPE_BUFFER:		/* Result of two Buffers is a Buffer */		return_desc = acpi_ut_create_buffer_object (				   (acpi_size) obj_desc1->buffer.length +				   (acpi_size) obj_desc2->buffer.length);		if (!return_desc) {			return (AE_NO_MEMORY);		}//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:tuxap,代码行数:101,


示例25: AcpiDbSingleStep

ACPI_STATUSAcpiDbSingleStep (    ACPI_WALK_STATE         *WalkState,    ACPI_PARSE_OBJECT       *Op,    UINT32                  OpcodeClass){    ACPI_PARSE_OBJECT       *Next;    ACPI_STATUS             Status = AE_OK;    UINT32                  OriginalDebugLevel;    ACPI_PARSE_OBJECT       *DisplayOp;    ACPI_PARSE_OBJECT       *ParentOp;    ACPI_FUNCTION_ENTRY ();    /* Check the abort flag */    if (AcpiGbl_AbortMethod)    {        AcpiGbl_AbortMethod = FALSE;        return (AE_ABORT_METHOD);    }    /* Check for single-step breakpoint */    if (WalkState->MethodBreakpoint &&            (WalkState->MethodBreakpoint <= Op->Common.AmlOffset))    {        /* Check if the breakpoint has been reached or passed */        /* Hit the breakpoint, resume single step, reset breakpoint */        AcpiOsPrintf ("***Break*** at AML offset %X/n", Op->Common.AmlOffset);        AcpiGbl_CmSingleStep = TRUE;        AcpiGbl_StepToNextCall = FALSE;        WalkState->MethodBreakpoint = 0;    }    /* Check for user breakpoint (Must be on exact Aml offset) */    else if (WalkState->UserBreakpoint &&             (WalkState->UserBreakpoint == Op->Common.AmlOffset))    {        AcpiOsPrintf ("***UserBreakpoint*** at AML offset %X/n",                      Op->Common.AmlOffset);        AcpiGbl_CmSingleStep = TRUE;        AcpiGbl_StepToNextCall = FALSE;        WalkState->MethodBreakpoint = 0;    }    /*     * Check if this is an opcode that we are interested in --     * namely, opcodes that have arguments     */    if (Op->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP)    {        return (AE_OK);    }    switch (OpcodeClass)    {    case AML_CLASS_UNKNOWN:    case AML_CLASS_ARGUMENT:    /* constants, literals, etc.  do nothing */        return (AE_OK);    default:        /* All other opcodes -- continue */        break;    }    /*     * Under certain debug conditions, display this opcode and its operands     */    if ((AcpiGbl_DbOutputToFile)            ||            (AcpiGbl_CmSingleStep)              ||            (AcpiDbgLevel & ACPI_LV_PARSE))    {        if ((AcpiGbl_DbOutputToFile)        ||                (AcpiDbgLevel & ACPI_LV_PARSE))        {            AcpiOsPrintf ("/n[AmlDebug] Next AML Opcode to execute:/n");        }        /*         * Display this op (and only this op - zero out the NEXT field         * temporarily, and disable parser trace output for the duration of         * the display because we don't want the extraneous debug output)         */        OriginalDebugLevel = AcpiDbgLevel;        AcpiDbgLevel &= ~(ACPI_LV_PARSE | ACPI_LV_FUNCTIONS);        Next = Op->Common.Next;        Op->Common.Next = NULL;        DisplayOp = Op;        ParentOp = Op->Common.Parent;        if (ParentOp)        {            if ((WalkState->ControlState) &&                    (WalkState->ControlState->Common.State ==//.........这里部分代码省略.........
开发者ID:oza,项目名称:FreeBSD-7.3-dyntick,代码行数:101,


示例26: acpi_ex_do_logical_op

u8acpi_ex_do_logical_op (	u16                             opcode,	union acpi_operand_object       *obj_desc0,	union acpi_operand_object       *obj_desc1){	acpi_integer                    operand0;	acpi_integer                    operand1;	u8                              *ptr0;	u8                              *ptr1;	u32                             length0;	u32                             length1;	u32                             i;	ACPI_FUNCTION_ENTRY ();	if (ACPI_GET_OBJECT_TYPE (obj_desc0) == ACPI_TYPE_INTEGER) {		/* Both operands are of type integer */		operand0 = obj_desc0->integer.value;		operand1 = obj_desc1->integer.value;		switch (opcode) {		case AML_LAND_OP:               /* LAnd (Operand0, Operand1) */			if (operand0 && operand1) {				return (TRUE);			}			break;		case AML_LEQUAL_OP:             /* LEqual (Operand0, Operand1) */			if (operand0 == operand1) {				return (TRUE);			}			break;		case AML_LGREATER_OP:           /* LGreater (Operand0, Operand1) */			if (operand0 > operand1) {				return (TRUE);			}			break;		case AML_LLESS_OP:              /* LLess (Operand0, Operand1) */			if (operand0 < operand1) {				return (TRUE);			}			break;		case AML_LOR_OP:                 /* LOr (Operand0, Operand1) */			if (operand0 || operand1) {				return (TRUE);			}			break;		default:			break;		}	}	else {		/*		 * Case for Buffer/String objects.		 * NOTE: takes advantage of common Buffer/String object fields		 */		length0 = obj_desc0->buffer.length;		ptr0    = obj_desc0->buffer.pointer;		length1 = obj_desc1->buffer.length;		ptr1    = obj_desc1->buffer.pointer;		switch (opcode) {		case AML_LEQUAL_OP:             /* LEqual (Operand0, Operand1) */			/* Length and all bytes must be equal */			if (length0 != length1) {				return (FALSE);			}			for (i = 0; i < length0; i++) {				if (ptr0[i] != ptr1[i]) {					return (FALSE);				}			}			return (TRUE);		case AML_LGREATER_OP:           /* LGreater (Operand0, Operand1) */			/* Lexicographic compare:  Scan the 1-to-1 data */			for (i = 0; (i < length0) && (i < length1); i++) {				if (ptr0[i] > ptr1[i]) {					return (TRUE);				}			}//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:tuxap,代码行数:101,


示例27: AcpiRsDumpResourceList

voidAcpiRsDumpResourceList (    ACPI_RESOURCE           *ResourceList){    UINT32                  Count = 0;    UINT32                  Type;    ACPI_FUNCTION_ENTRY ();    /* Check if debug output enabled */    if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))    {        return;    }    /* Walk list and dump all resource descriptors (END_TAG terminates) */    do    {        AcpiOsPrintf ("/n[%02X] ", Count);        Count++;        /* Validate Type before dispatch */        Type = ResourceList->Type;        if (Type > ACPI_RESOURCE_TYPE_MAX)        {            AcpiOsPrintf (                "Invalid descriptor type (%X) in resource list/n",                ResourceList->Type);            return;        }        /* Sanity check the length. It must not be zero, or we loop forever */        if (!ResourceList->Length)        {            AcpiOsPrintf (                "Invalid zero length descriptor in resource list/n");            return;        }        /* Dump the resource descriptor */        if (Type == ACPI_RESOURCE_TYPE_SERIAL_BUS)        {            AcpiRsDumpDescriptor (&ResourceList->Data,                AcpiGbl_DumpSerialBusDispatch[                    ResourceList->Data.CommonSerialBus.Type]);        }        else        {            AcpiRsDumpDescriptor (&ResourceList->Data,                AcpiGbl_DumpResourceDispatch[Type]);        }        /* Point to the next resource structure */        ResourceList = ACPI_NEXT_RESOURCE (ResourceList);        /* Exit when END_TAG descriptor is reached */    } while (Type != ACPI_RESOURCE_TYPE_END_TAG);}
开发者ID:derekmarcotte,项目名称:freebsd,代码行数:67,



注:本文中的ACPI_FUNCTION_ENTRY函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ ACPI_FUNCTION_TRACE函数代码示例
C++ ACPI_FREE函数代码示例
51自学网自学EXCEL、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。
京ICP备13026421号-1