当前位置: 首页>>代码示例>>C++>>正文


C++ ACPI_REPORT_ERROR函数代码示例

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


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

示例1: acpi_tb_get_table_header

acpi_status
acpi_tb_get_table_header (
	struct acpi_pointer             *address,
	struct acpi_table_header        *return_header)
{
	acpi_status                     status = AE_OK;
	struct acpi_table_header        *header = NULL;


	ACPI_FUNCTION_TRACE ("tb_get_table_header");


	/*
	 * Flags contains the current processor mode (Virtual or Physical
	 * addressing) The pointer_type is either Logical or Physical
	 */
	switch (address->pointer_type) {
	case ACPI_PHYSMODE_PHYSPTR:
	case ACPI_LOGMODE_LOGPTR:

		/* Pointer matches processor mode, copy the header */

		ACPI_MEMCPY (return_header, address->pointer.logical,
			sizeof (struct acpi_table_header));
		break;


	case ACPI_LOGMODE_PHYSPTR:

		/* Create a logical address for the physical pointer*/

		status = acpi_os_map_memory (address->pointer.physical,
				 sizeof (struct acpi_table_header), (void *) &header);
		if (ACPI_FAILURE (status)) {
			ACPI_REPORT_ERROR ((
				"Could not map memory at %8.8X%8.8X for length %X\n",
				ACPI_FORMAT_UINT64 (address->pointer.physical),
				sizeof (struct acpi_table_header)));
			return_ACPI_STATUS (status);
		}

		/* Copy header and delete mapping */

		ACPI_MEMCPY (return_header, header, sizeof (struct acpi_table_header));
		acpi_os_unmap_memory (header, sizeof (struct acpi_table_header));
		break;


	default:

		ACPI_REPORT_ERROR (("Invalid address flags %X\n",
			address->pointer_type));
		return_ACPI_STATUS (AE_BAD_PARAMETER);
	}

	ACPI_DEBUG_PRINT ((ACPI_DB_TABLES, "Table Signature: [%4.4s]\n",
		return_header->signature));

	return_ACPI_STATUS (AE_OK);
}
开发者ID:kzlin129,项目名称:tt-gpl,代码行数:60,代码来源:tbget.c

示例2: acpi_ev_install_xrupt_handlers

acpi_status
acpi_ev_install_xrupt_handlers (
	void)
{
	acpi_status                     status;


	ACPI_FUNCTION_TRACE ("ev_install_xrupt_handlers");


	/* Install the SCI handler */

	status = acpi_ev_install_sci_handler ();
	if (ACPI_FAILURE (status)) {
		ACPI_REPORT_ERROR ((
				"Unable to install System Control Interrupt Handler, %s\n",
				acpi_format_exception (status)));
		return_ACPI_STATUS (status);
	}

	/* Install the handler for the Global Lock */

	status = acpi_ev_init_global_lock_handler ();
	if (ACPI_FAILURE (status)) {
		ACPI_REPORT_ERROR ((
				"Unable to initialize Global Lock handler, %s\n",
				acpi_format_exception (status)));
		return_ACPI_STATUS (status);
	}

	acpi_gbl_events_initialized = TRUE;
	return_ACPI_STATUS (status);
}
开发者ID:Antonio-Zhou,项目名称:Linux-2.6.11,代码行数:33,代码来源:evevent.c

示例3: acpi_tb_install_table

acpi_status
acpi_tb_install_table (
    struct acpi_table_desc          *table_info)
{
    acpi_status                     status;

    ACPI_FUNCTION_TRACE ("tb_install_table");


    /* Lock tables while installing */

    status = acpi_ut_acquire_mutex (ACPI_MTX_TABLES);
    if (ACPI_FAILURE (status)) {
        ACPI_REPORT_ERROR (("Could not acquire table mutex for [%4.4s], %s\n",
                            table_info->pointer->signature, acpi_format_exception (status)));
        return_ACPI_STATUS (status);
    }

    /* Install the table into the global data structure */

    status = acpi_tb_init_table_descriptor (table_info->type, table_info);
    if (ACPI_FAILURE (status)) {
        ACPI_REPORT_ERROR (("Could not install ACPI table [%4.4s], %s\n",
                            table_info->pointer->signature, acpi_format_exception (status)));
    }

    ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "%s located at %p\n",
                       acpi_gbl_table_data[table_info->type].name, table_info->pointer));

    (void) acpi_ut_release_mutex (ACPI_MTX_TABLES);
    return_ACPI_STATUS (status);
}
开发者ID:Dronevery,项目名称:JetsonTK1-kernel,代码行数:32,代码来源:tbinstal.c

示例4: acpi_ev_initialize_events

acpi_status acpi_ev_initialize_events(void)
{
	acpi_status status;

	ACPI_FUNCTION_TRACE("ev_initialize_events");

	/* Make sure we have ACPI tables */

	if (!acpi_gbl_DSDT) {
		ACPI_DEBUG_PRINT((ACPI_DB_WARN, "No ACPI tables present!\n"));
		return_ACPI_STATUS(AE_NO_ACPI_TABLES);
	}

	/*
	 * Initialize the Fixed and General Purpose Events. This is done prior to
	 * enabling SCIs to prevent interrupts from occurring before the handlers are
	 * installed.
	 */
	status = acpi_ev_fixed_event_initialize();
	if (ACPI_FAILURE(status)) {
		ACPI_REPORT_ERROR(("Unable to initialize fixed events, %s\n",
				   acpi_format_exception(status)));
		return_ACPI_STATUS(status);
	}

	status = acpi_ev_gpe_initialize();
	if (ACPI_FAILURE(status)) {
		ACPI_REPORT_ERROR(("Unable to initialize general purpose events, %s\n", acpi_format_exception(status)));
		return_ACPI_STATUS(status);
	}

	return_ACPI_STATUS(status);
}
开发者ID:BackupTheBerlios,项目名称:tew632-brp-svn,代码行数:33,代码来源:evevent.c

示例5: acpi_tb_table_override

static acpi_status
acpi_tb_table_override (
	struct acpi_table_header        *header,
	struct acpi_table_desc          *table_info)
{
	struct acpi_table_header        *new_table;
	acpi_status                     status;
	struct acpi_pointer             address;


	ACPI_FUNCTION_TRACE ("tb_table_override");


	/*
	 * The OSL will examine the header and decide whether to override this
	 * table.  If it decides to override, a table will be returned in new_table,
	 * which we will then copy.
	 */
	status = acpi_os_table_override (header, &new_table);
	if (ACPI_FAILURE (status)) {
		/* Some severe error from the OSL, but we basically ignore it */

		ACPI_REPORT_ERROR (("Could not override ACPI table, %s\n",
			acpi_format_exception (status)));
		return_ACPI_STATUS (status);
	}

	if (!new_table) {
		/* No table override */

		return_ACPI_STATUS (AE_NO_ACPI_TABLES);
	}

	/*
	 * We have a new table to override the old one.  Get a copy of
	 * the new one.  We know that the new table has a logical pointer.
	 */
	address.pointer_type    = ACPI_LOGICAL_POINTER | ACPI_LOGICAL_ADDRESSING;
	address.pointer.logical = new_table;

	status = acpi_tb_get_this_table (&address, new_table, table_info);
	if (ACPI_FAILURE (status)) {
		ACPI_REPORT_ERROR (("Could not copy override ACPI table, %s\n",
			acpi_format_exception (status)));
		return_ACPI_STATUS (status);
	}

	/* Copy the table info */

	ACPI_REPORT_INFO (("Table [%4.4s] replaced by host OS\n",
		table_info->pointer->signature));

	return_ACPI_STATUS (AE_OK);
}
开发者ID:kzlin129,项目名称:tt-gpl,代码行数:54,代码来源:tbget.c

示例6: acpi_initialize_subsystem

acpi_status
acpi_initialize_subsystem (
	void)
{
	acpi_status                     status;

	ACPI_FUNCTION_TRACE ("acpi_initialize_subsystem");


	ACPI_DEBUG_EXEC (acpi_ut_init_stack_ptr_trace ());


	/* Initialize all globals used by the subsystem */

	acpi_ut_init_globals ();

	/* Initialize the OS-Dependent layer */

	status = acpi_os_initialize ();
	if (ACPI_FAILURE (status)) {
		ACPI_REPORT_ERROR (("OSD failed to initialize, %s\n",
			acpi_format_exception (status)));
		return_ACPI_STATUS (status);
	}

	/* Create the default mutex objects */

	status = acpi_ut_mutex_initialize ();
	if (ACPI_FAILURE (status)) {
		ACPI_REPORT_ERROR (("Global mutex creation failure, %s\n",
			acpi_format_exception (status)));
		return_ACPI_STATUS (status);
	}

	/*
	 * Initialize the namespace manager and
	 * the root of the namespace tree
	 */

	status = acpi_ns_root_initialize ();
	if (ACPI_FAILURE (status)) {
		ACPI_REPORT_ERROR (("Namespace initialization failure, %s\n",
			acpi_format_exception (status)));
		return_ACPI_STATUS (status);
	}


	/* If configured, initialize the AML debugger */

	ACPI_DEBUGGER_EXEC (status = acpi_db_initialize ());

	return_ACPI_STATUS (status);
}
开发者ID:Brainiarc7,项目名称:ralink_sdk,代码行数:53,代码来源:utxface.c

示例7: acpi_tb_validate_rsdt

acpi_status
acpi_tb_validate_rsdt (
	struct acpi_table_header        *table_ptr)
{
	int                             no_match;


	ACPI_FUNCTION_NAME ("tb_validate_rsdt");


	/*
	 * For RSDP revision 0 or 1, we use the RSDT.
	 * For RSDP revision 2 and above, we use the XSDT
	 */
	if (acpi_gbl_RSDP->revision < 2) {
		no_match = ACPI_STRNCMP ((char *) table_ptr, RSDT_SIG,
				  sizeof (RSDT_SIG) -1);
	}
	else {
		no_match = ACPI_STRNCMP ((char *) table_ptr, XSDT_SIG,
				  sizeof (XSDT_SIG) -1);
	}

	if (no_match) {
		/* Invalid RSDT or XSDT signature */

		ACPI_REPORT_ERROR (("Invalid signature where RSDP indicates RSDT/XSDT should be located\n"));

		ACPI_DUMP_BUFFER (acpi_gbl_RSDP, 20);

		ACPI_DEBUG_PRINT_RAW ((ACPI_DB_ERROR,
			"RSDT/XSDT signature at %X (%p) is invalid\n",
			acpi_gbl_RSDP->rsdt_physical_address,
			(void *) (acpi_native_uint) acpi_gbl_RSDP->rsdt_physical_address));

		if (acpi_gbl_RSDP->revision < 2) {
			ACPI_REPORT_ERROR (("Looking for RSDT (RSDP->Rev < 2)\n"))
		}
		else {
			ACPI_REPORT_ERROR (("Looking for XSDT (RSDP->Rev >= 2)\n"))
		}

		ACPI_DUMP_BUFFER ((char *) table_ptr, 48);

		return (AE_BAD_SIGNATURE);
	}

	return (AE_OK);
}
开发者ID:Antonio-Zhou,项目名称:Linux-2.6.11,代码行数:49,代码来源:tbrsdt.c

示例8: AcpiNsGetExternalPathname

NATIVE_CHAR *
AcpiNsGetExternalPathname (
    ACPI_NAMESPACE_NODE     *Node)
{
    NATIVE_CHAR             *NameBuffer;
    ACPI_SIZE               Size;


    ACPI_FUNCTION_TRACE_PTR ("NsGetExternalPathname", Node);


    /* Calculate required buffer size based on depth below root */

    Size = AcpiNsGetPathnameLength (Node);

    /* Allocate a buffer to be returned to caller */

    NameBuffer = ACPI_MEM_CALLOCATE (Size);
    if (!NameBuffer)
    {
        ACPI_REPORT_ERROR (("NsGetTablePathname: allocation failure\n"));
        return_PTR (NULL);
    }

    /* Build the path in the allocated buffer */

    AcpiNsBuildExternalPath (Node, Size, NameBuffer);
    return_PTR (NameBuffer);
}
开发者ID:UnitedMarsupials,项目名称:kame,代码行数:29,代码来源:nsnames.c

示例9: acpi_ex_system_do_stall

acpi_status
acpi_ex_system_do_stall (
	u32                             how_long)
{
	acpi_status                     status = AE_OK;


	ACPI_FUNCTION_ENTRY ();


	if (how_long > 255) /* 255 microseconds */ {
		/*
		 * Longer than 255 usec, this is an error
		 *
		 * (ACPI specifies 100 usec as max, but this gives some slack in
		 * order to support existing BIOSs)
		 */
		ACPI_REPORT_ERROR (("Stall: Time parameter is too large (%d)\n", how_long));
		status = AE_AML_OPERAND_VALUE;
	}
	else {
		acpi_os_stall (how_long);
	}

	return (status);
}
开发者ID:Antonio-Zhou,项目名称:Linux-2.6.11,代码行数:26,代码来源:exsystem.c

示例10: AcpiUtDivide

ACPI_STATUS
AcpiUtDivide (
    ACPI_INTEGER            *InDividend,
    ACPI_INTEGER            *InDivisor,
    ACPI_INTEGER            *OutQuotient,
    ACPI_INTEGER            *OutRemainder)
{
    ACPI_FUNCTION_TRACE ("UtDivide");


    /* Always check for a zero divisor */

    if (*InDivisor == 0)
    {
        ACPI_REPORT_ERROR (("AcpiUtDivide: Divide by zero\n"));
        return_ACPI_STATUS (AE_AML_DIVIDE_BY_ZERO);
    }


    /* Return only what was requested */

    if (OutQuotient)
    {
        *OutQuotient = *InDividend / *InDivisor;
    }
    if (OutRemainder)
    {
        *OutRemainder = *InDividend % *InDivisor;
    }

    return_ACPI_STATUS (AE_OK);
}
开发者ID:kame,项目名称:kame,代码行数:32,代码来源:utmath.c

示例11: acpi_ev_global_lock_handler

static u32
acpi_ev_global_lock_handler (
	void                            *context)
{
	u8                              acquired = FALSE;
	acpi_status                     status;


	/*
	 * Attempt to get the lock
	 * If we don't get it now, it will be marked pending and we will
	 * take another interrupt when it becomes free.
	 */
	ACPI_ACQUIRE_GLOBAL_LOCK (acpi_gbl_common_fACS.global_lock, acquired);
	if (acquired) {
		/* Got the lock, now wake all threads waiting for it */

		acpi_gbl_global_lock_acquired = TRUE;

		/* Run the Global Lock thread which will signal all waiting threads */

		status = acpi_os_queue_for_execution (OSD_PRIORITY_HIGH,
				  acpi_ev_global_lock_thread, context);
		if (ACPI_FAILURE (status)) {
			ACPI_REPORT_ERROR (("Could not queue Global Lock thread, %s\n",
				acpi_format_exception (status)));

			return (ACPI_INTERRUPT_NOT_HANDLED);
		}
	}

	return (ACPI_INTERRUPT_HANDLED);
}
开发者ID:SimonKagstrom,项目名称:mci500h-linux-2.4.27,代码行数:33,代码来源:evmisc.c

示例12: acpi_ut_divide

acpi_status
acpi_ut_divide (
	acpi_integer                    in_dividend,
	acpi_integer                    in_divisor,
	acpi_integer                    *out_quotient,
	acpi_integer                    *out_remainder)
{
	ACPI_FUNCTION_TRACE ("ut_divide");


	/* Always check for a zero divisor */

	if (in_divisor == 0) {
		ACPI_REPORT_ERROR (("acpi_ut_divide: Divide by zero\n"));
		return_ACPI_STATUS (AE_AML_DIVIDE_BY_ZERO);
	}


	/* Return only what was requested */

	if (out_quotient) {
		*out_quotient = in_dividend / in_divisor;
	}
	if (out_remainder) {
		*out_remainder = in_dividend % in_divisor;
	}

	return_ACPI_STATUS (AE_OK);
}
开发者ID:Antonio-Zhou,项目名称:Linux-2.6.11,代码行数:29,代码来源:utmath.c

示例13: ACPI_FUNCTION_TRACE_U32

union acpi_operand_object *acpi_ut_create_string_object(acpi_size string_size)
{
	union acpi_operand_object *string_desc;
	char *string;

	ACPI_FUNCTION_TRACE_U32("ut_create_string_object", string_size);

	/* Create a new String object */

	string_desc = acpi_ut_create_internal_object(ACPI_TYPE_STRING);
	if (!string_desc) {
		return_PTR(NULL);
	}

	/*
	 * Allocate the actual string buffer -- (Size + 1) for NULL terminator.
	 * NOTE: Zero-length strings are NULL terminated
	 */
	string = ACPI_MEM_CALLOCATE(string_size + 1);
	if (!string) {
		ACPI_REPORT_ERROR(("create_string: could not allocate size %X\n", (u32) string_size));
		acpi_ut_remove_reference(string_desc);
		return_PTR(NULL);
	}

	/* Complete string object initialization */

	string_desc->string.pointer = string;
	string_desc->string.length = (u32) string_size;

	/* Return the new string descriptor */

	return_PTR(string_desc);
}
开发者ID:BackupTheBerlios,项目名称:tew632-brp-svn,代码行数:34,代码来源:utobject.c

示例14: acpi_ns_get_external_pathname

char *
acpi_ns_get_external_pathname (
	struct acpi_namespace_node      *node)
{
	char                            *name_buffer;
	acpi_size                       size;


	ACPI_FUNCTION_TRACE_PTR ("ns_get_external_pathname", node);


	/* Calculate required buffer size based on depth below root */

	size = acpi_ns_get_pathname_length (node);

	/* Allocate a buffer to be returned to caller */

	name_buffer = ACPI_MEM_CALLOCATE (size);
	if (!name_buffer) {
		ACPI_REPORT_ERROR (("ns_get_table_pathname: allocation failure\n"));
		return_PTR (NULL);
	}

	/* Build the path in the allocated buffer */

	acpi_ns_build_external_path (node, size, name_buffer);
	return_PTR (name_buffer);
}
开发者ID:leonsh,项目名称:eldk30ppc,代码行数:28,代码来源:nsnames.c

示例15: acpi_ev_fixed_event_dispatch

u32
acpi_ev_fixed_event_dispatch (
	u32                             event)
{


	ACPI_FUNCTION_ENTRY ();


	/* Clear the status bit */

	(void) acpi_set_register (acpi_gbl_fixed_event_info[event].status_register_id,
			 1, ACPI_MTX_DO_NOT_LOCK);

	/*
	 * Make sure we've got a handler.  If not, report an error.
	 * The event is disabled to prevent further interrupts.
	 */
	if (NULL == acpi_gbl_fixed_event_handlers[event].handler) {
		(void) acpi_set_register (acpi_gbl_fixed_event_info[event].enable_register_id,
				0, ACPI_MTX_DO_NOT_LOCK);

		ACPI_REPORT_ERROR (
			("No installed handler for fixed event [%08X]\n",
			event));

		return (ACPI_INTERRUPT_NOT_HANDLED);
	}

	/* Invoke the Fixed Event handler */

	return ((acpi_gbl_fixed_event_handlers[event].handler)(
			  acpi_gbl_fixed_event_handlers[event].context));
}
开发者ID:Antonio-Zhou,项目名称:Linux-2.6.11,代码行数:34,代码来源:evevent.c


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