/* * Set the type specific flags */ 
/* Set the type specific flags */  
acpi_rs_address32_stream (	struct acpi_resource            *linked_list,	u8                              **output_buffer,	acpi_size                       *bytes_consumed){	u8                              *buffer;	u16                             *length_field;	u8                              temp8;	char                            *temp_pointer;	ACPI_FUNCTION_TRACE ("rs_address32_stream");	buffer = *output_buffer;	/*	 * The descriptor field is static	 */	*buffer = 0x87;	buffer += 1;	/*	 * Set a pointer to the Length field - to be filled in later	 */	length_field = ACPI_CAST_PTR (u16, buffer);	buffer += 2;	/*	 * Set the Resource Type (Memory, Io, bus_number)	 */	temp8 = (u8) (linked_list->data.address32.resource_type & 0x03);	*buffer = temp8;	buffer += 1;	/*	 * Set the general flags	 */	temp8 = (u8) (linked_list->data.address32.producer_consumer & 0x01);	temp8 |= (linked_list->data.address32.decode & 0x01) << 1;	temp8 |= (linked_list->data.address32.min_address_fixed & 0x01) << 2;	temp8 |= (linked_list->data.address32.max_address_fixed & 0x01) << 3;	*buffer = temp8;	buffer += 1;	/*	 * Set the type specific flags	 */	temp8 = 0;	if (ACPI_MEMORY_RANGE == linked_list->data.address32.resource_type) {		temp8 = (u8)			(linked_list->data.address32.attribute.memory.read_write_attribute &			0x01);		temp8 |=			(linked_list->data.address32.attribute.memory.cache_attribute &			 0x03) << 1;	}	else if (ACPI_IO_RANGE == linked_list->data.address32.resource_type) {		temp8 = (u8)			(linked_list->data.address32.attribute.io.range_attribute &			 0x03);		temp8 |=			(linked_list->data.address32.attribute.io.translation_attribute &			 0x03) << 4;	}	*buffer = temp8;	buffer += 1;	/*	 * Set the address space granularity	 */	ACPI_MOVE_32_TO_32 (buffer, &linked_list->data.address32.granularity);	buffer += 4;	/*	 * Set the address range minimum	 */	ACPI_MOVE_32_TO_32 (buffer, &linked_list->data.address32.min_address_range);	buffer += 4;	/*	 * Set the address range maximum	 */	ACPI_MOVE_32_TO_32 (buffer, &linked_list->data.address32.max_address_range);	buffer += 4;	/*	 * Set the address translation offset	 */	ACPI_MOVE_32_TO_32 (buffer, &linked_list->data.address32.address_translation_offset);	buffer += 4;	/*	 * Set the address length	 */	ACPI_MOVE_32_TO_32 (buffer, &linked_list->data.address32.address_length);	buffer += 4;	/*	 * Resource Source Index and Resource Source are optional	 */	if (0 != linked_list->data.address32.resource_source.string_length) {		temp8 = (u8) linked_list->data.address32.resource_source.index;		*buffer = temp8;		buffer += 1;		temp_pointer = (char *) buffer;		/*		 * Copy the string		 */		ACPI_STRCPY (temp_pointer,			linked_list->data.address32.resource_source.string_ptr);		/*		 * Buffer needs to be set to the length of the sting + one for the		 *  terminating null		 */		buffer += (acpi_size)(ACPI_STRLEN (linked_list->data.address32.resource_source.string_ptr) + 1);	}	/*	 * Return the number of bytes consumed in this operation	 */	*bytes_consumed = ACPI_PTR_DIFF (buffer, *output_buffer);	/*	 * Set the length field to the number of bytes consumed	 *  minus the header size (3 bytes)	 */	*length_field = (u16) (*bytes_consumed - 3);	return_ACPI_STATUS (AE_OK);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/44f6c01242da4e162f28d8e1216a8c7a91174605/rsaddr.c/buggy/drivers/acpi/resources/rsaddr.c