Marcel Apfelbaum 
							
						 
					 
					
						
						
							
						
						32d9ca15ba 
					 
					
						
						
							
							acpi: add implementation of aml_while() term  
						
						 
						
						... 
						
						
						
						Commit 68e6b0af7  (acpi: add aml_while() term) added
the definition of aml_while without the actual implementation.
Implement the term.
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
Acked-by: Laszlo Ersek <lersek@redhat.com > 
						
						
					 
					
						2015-06-03 18:19:16 +02:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Shannon Zhao 
							
						 
					 
					
						
						
							
						
						afcf905cff 
					 
					
						
						
							
							hw/acpi/aml-build: Fix memory leak  
						
						 
						
						... 
						
						
						
						Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com >
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com > 
						
						
					 
					
						2015-06-01 14:18:54 +02:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Marcel Apfelbaum 
							
						 
					 
					
						
						
							
						
						af39d5363f 
					 
					
						
						
							
							acpi: add aml_increment() term  
						
						 
						
						... 
						
						
						
						Add encoding for ACPI DefIncrement Opcode.
Reviewed-by: Shannon Zhao <zhaoshenglong@huawei.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-06-01 14:18:54 +02:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Marcel Apfelbaum 
							
						 
					 
					
						
						
							
						
						f7bd7b8eb6 
					 
					
						
						
							
							acpi: add aml_shiftright() term  
						
						 
						
						... 
						
						
						
						Add encoding for ACPI DefShiftRight Opcode.
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org > 
						
						
					 
					
						2015-06-01 14:18:54 +02:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Marcel Apfelbaum 
							
						 
					 
					
						
						
							
						
						a57dddddd2 
					 
					
						
						
							
							acpi: add aml_shiftleft() term  
						
						 
						
						... 
						
						
						
						Add encoding for ACPI DefShiftLeft Opcode.
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org > 
						
						
					 
					
						2015-06-01 14:18:54 +02:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Marcel Apfelbaum 
							
						 
					 
					
						
						
							
						
						928b899657 
					 
					
						
						
							
							acpi: add aml_index() term  
						
						 
						
						... 
						
						
						
						Add encoding for ACPI DefIndex Opcode.
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org > 
						
						
					 
					
						2015-06-01 14:18:54 +02:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Marcel Apfelbaum 
							
						 
					 
					
						
						
							
						
						96396e2858 
					 
					
						
						
							
							acpi: add aml_lless() term  
						
						 
						
						... 
						
						
						
						Add encoding for ACPI DefLLess Opcode.
Reviewed-by: Shannon Zhao <zhaoshenglong@huawei.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-06-01 14:18:54 +02:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Marcel Apfelbaum 
							
						 
					 
					
						
						
							
						
						c08cf07042 
					 
					
						
						
							
							acpi: add aml_add() term  
						
						 
						
						... 
						
						
						
						Add encoding for ACPI DefAdd Opcode.
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org > 
						
						
					 
					
						2015-06-01 14:18:54 +02:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Markus Armbruster 
							
						 
					 
					
						
						
							
						
						c3bdc56c18 
					 
					
						
						
							
							acpi: Simplify printing to dynamic string  
						
						 
						
						... 
						
						
						
						build_append_namestringv() and aml_string() first calculate the
resulting string's length with vsnprintf(NULL, ...), then allocate,
then print for real.  Simply use g_strdup_vprintf() or g_vasprintf()
instead.
Signed-off-by: Markus Armbruster <armbru@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
Reviewed-by: John Snow <jsnow@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com > 
						
						
					 
					
						2015-05-31 20:24:07 +02:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Shannon Zhao 
							
						 
					 
					
						
						
							
						
						e1f776c434 
					 
					
						
						
							
							hw/acpi/aml-build: Add Unicode macro  
						
						 
						
						... 
						
						
						
						Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com >
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Message-id: 1432522520-8068-22-git-send-email-zhaoshenglong@huawei.com 
Signed-off-by: Peter Maydell <peter.maydell@linaro.org > 
						
						
					 
					
						2015-05-29 11:28:59 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Shannon Zhao 
							
						 
					 
					
						
						
							
						
						616ef329ad 
					 
					
						
						
							
							hw/acpi/aml-build: Add aml_dword_io() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com >
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Message-id: 1432522520-8068-21-git-send-email-zhaoshenglong@huawei.com 
Signed-off-by: Peter Maydell <peter.maydell@linaro.org > 
						
						
					 
					
						2015-05-29 11:28:58 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Shannon Zhao 
							
						 
					 
					
						
						
							
						
						ed8176a37a 
					 
					
						
						
							
							hw/acpi/aml-build: Add aml_create_dword_field() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com >
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Message-id: 1432522520-8068-20-git-send-email-zhaoshenglong@huawei.com 
Signed-off-by: Peter Maydell <peter.maydell@linaro.org > 
						
						
					 
					
						2015-05-29 11:28:58 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Shannon Zhao 
							
						 
					 
					
						
						
							
						
						467b07dfae 
					 
					
						
						
							
							hw/acpi/aml-build: Add aml_else() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com >
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Message-id: 1432522520-8068-19-git-send-email-zhaoshenglong@huawei.com 
Signed-off-by: Peter Maydell <peter.maydell@linaro.org > 
						
						
					 
					
						2015-05-29 11:28:58 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Shannon Zhao 
							
						 
					 
					
						
						
							
						
						ea7df04a02 
					 
					
						
						
							
							hw/acpi/aml-build: Add aml_lnot() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com >
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Message-id: 1432522520-8068-18-git-send-email-zhaoshenglong@huawei.com 
Signed-off-by: Peter Maydell <peter.maydell@linaro.org > 
						
						
					 
					
						2015-05-29 11:28:58 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Shannon Zhao 
							
						 
					 
					
						
						
							
						
						922cc8823e 
					 
					
						
						
							
							hw/acpi/aml-build: Add aml_or() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com >
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Message-id: 1432522520-8068-17-git-send-email-zhaoshenglong@huawei.com 
Signed-off-by: Peter Maydell <peter.maydell@linaro.org > 
						
						
					 
					
						2015-05-29 11:28:58 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Shannon Zhao 
							
						 
					 
					
						
						
							
						
						b930fb9db4 
					 
					
						
						
							
							hw/acpi/aml-build: Add ToUUID macro  
						
						 
						
						... 
						
						
						
						Add ToUUID macro, this is useful for generating PCIe ACPI table.
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com >
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Message-id: 1432522520-8068-16-git-send-email-zhaoshenglong@huawei.com 
Signed-off-by: Peter Maydell <peter.maydell@linaro.org > 
						
						
					 
					
						2015-05-29 11:28:57 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Shannon Zhao 
							
						 
					 
					
						
						
							
						
						ed8b5847e4 
					 
					
						
						
							
							hw/acpi/aml-build: Make aml_buffer() definition consistent with the spec  
						
						 
						
						... 
						
						
						
						According to ACPI spec, DefBuffer can take two parameters: BufferSize
and ByteList. Make it consistent with the spec. Uninitialized buffer
could be requested by passing ByteList as NULL to reserve space.
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com >
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Message-id: 1432522520-8068-15-git-send-email-zhaoshenglong@huawei.com 
Signed-off-by: Peter Maydell <peter.maydell@linaro.org > 
						
						
					 
					
						2015-05-29 11:28:57 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Shannon Zhao 
							
						 
					 
					
						
						
							
						
						243bdb79fb 
					 
					
						
						
							
							hw/arm/virt-acpi-build: Generate RSDT table  
						
						 
						
						... 
						
						
						
						RSDT points to other tables FADT, MADT, GTDT. This code is shared with x86.
Here we still use RSDT as UEFI puts ACPI tables below 4G address space,
and UEFI ignore the RSDT or XSDT.
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com >
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Message-id: 1432522520-8068-12-git-send-email-zhaoshenglong@huawei.com 
Signed-off-by: Peter Maydell <peter.maydell@linaro.org > 
						
						
					 
					
						2015-05-29 11:28:56 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Shannon Zhao 
							
						 
					 
					
						
						
							
						
						205d1d1c04 
					 
					
						
						
							
							hw/acpi/aml-build: Add aml_interrupt() term  
						
						 
						
						... 
						
						
						
						Add aml_interrupt() for describing device interrupt in resource template.
These can be used to generating DSDT table for ACPI on ARM.
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com >
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Message-id: 1432522520-8068-7-git-send-email-zhaoshenglong@huawei.com 
Signed-off-by: Peter Maydell <peter.maydell@linaro.org > 
						
						
					 
					
						2015-05-29 11:28:55 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Shannon Zhao 
							
						 
					 
					
						
						
							
						
						dc17ab1de5 
					 
					
						
						
							
							hw/acpi/aml-build: Add aml_memory32_fixed() term  
						
						 
						
						... 
						
						
						
						Add aml_memory32_fixed() for describing device mmio region in resource
template. These can be used to generating DSDT table for ACPI on ARM.
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com >
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Message-id: 1432522520-8068-6-git-send-email-zhaoshenglong@huawei.com 
Signed-off-by: Peter Maydell <peter.maydell@linaro.org > 
						
						
					 
					
						2015-05-29 11:28:55 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Shannon Zhao 
							
						 
					 
					
						
						
							
						
						ff80dc7fa8 
					 
					
						
						
							
							hw/acpi/aml-build: Make enum values to be upper case to match coding style  
						
						 
						
						... 
						
						
						
						Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com >
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org >
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Message-id: 1432522520-8068-2-git-send-email-zhaoshenglong@huawei.com 
Signed-off-by: Peter Maydell <peter.maydell@linaro.org > 
						
						
					 
					
						2015-05-29 11:28:54 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Zhu Guihua 
							
						 
					 
					
						
						
							
						
						af50989731 
					 
					
						
						
							
							acpi: extend aml_field() to support UpdateRule  
						
						 
						
						... 
						
						
						
						The flags field is declared with default update rule 'Preserve',
this patch extends aml_field() to support UpdateRule so that we
can specify different values per field.
Reviewed-by: Igor Mammedov <imammedo@redhat.com >
Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-04-27 21:08:20 +02:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Shannon Zhao 
							
						 
					 
					
						
						
							
						
						658c27181b 
					 
					
						
						
							
							hw/i386/acpi-build: move generic acpi building helpers into dedictated file  
						
						 
						
						... 
						
						
						
						Move generic acpi building helpers into dedictated file and this
can be shared with other machines.
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com >
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-04-27 20:49:45 +02:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Stefan Weil 
							
						 
					 
					
						
						
							
						
						c167e2e7ed 
					 
					
						
						
							
							acpi: Add missing GCC_FMT_ATTR to local function  
						
						 
						
						... 
						
						
						
						This fixes these gcc warnings (not enabled in default build):
hw/acpi/aml-build.c:83:5: warning:
 function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
hw/acpi/aml-build.c:88:5: warning:
 function might be possible candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
Cc: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Stefan Weil <sw@weilnetz.de >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-03-25 13:39:24 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Michael S. Tsirkin 
							
						 
					 
					
						
						
							
						
						7927266183 
					 
					
						
						
							
							acpi: specify format for build_append_namestring  
						
						 
						
						... 
						
						
						
						Will catch users if we misused it.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com > 
						
						
					 
					
						2015-03-11 18:24:29 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Marcel Apfelbaum 
							
						 
					 
					
						
						
							
						
						ecdc7bab09 
					 
					
						
						
							
							acpi: fix aml_equal term implementation  
						
						 
						
						... 
						
						
						
						The DefLEqual op does not have a target operand. Remove it.
Signed-off-by: Marcel Apfelbaum <marcel@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com > 
						
						
					 
					
						2015-03-10 16:09:59 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Michael S. Tsirkin 
							
						 
					 
					
						
						
							
						
						aea10cdef2 
					 
					
						
						
							
							aml-build: append opcodes using build_append_byte  
						
						 
						
						... 
						
						
						
						Opcodes are raw bytes, they shouldn't be added
using build_append_int. This only happens to work
with 0 and 1 opcodes.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com > 
						
						
					 
					
						2015-03-10 16:09:59 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Michael S. Tsirkin 
							
						 
					 
					
						
						
							
						
						7d433b0d85 
					 
					
						
						
							
							aml-build: don't modify child  
						
						 
						
						... 
						
						
						
						this code:
    aml_append(foo, bar);
might, non-intuitively, modify bar, which means that e.g. the following
might not DTRT:
    c = ....;
    aml_append(a, c);
    aml_append(b, c);
to fix, simply allocate an intermediate array,
and always modify that.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com >
Reviewed-by: Igor Mammedov <imammedo@redhat.com > 
						
						
					 
					
						2015-03-10 16:09:58 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Michael S. Tsirkin 
							
						 
					 
					
						
						
							
						
						2e5feadbf8 
					 
					
						
						
							
							aml-build: fix build for glib < 2.22  
						
						 
						
						... 
						
						
						
						g_ptr_array_new_with_free_func is there since glib 2.22,
use the older g_ptr_array_foreach instead.
Reported-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-03-03 17:42:18 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						af59b35ce1 
					 
					
						
						
							
							acpi: make build_*() routines static to aml-build.c  
						
						 
						
						... 
						
						
						
						build_*() routines were used for composing AML
structures manually in acpi-build.c but after
conversion to AML API they are not used outside
of aml-build.c anymore, so hide them from external
users.
Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-03-01 12:33:23 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						7056045332 
					 
					
						
						
							
							acpi: add acpi_irq_no_flags() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-03-01 12:33:22 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						6ece7053d6 
					 
					
						
						
							
							acpi: add aml_word_bus_number(), aml_word_io(), aml_dword_memory(), aml_qword_memory() terms  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:18 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						e2ea299b01 
					 
					
						
						
							
							acpi: add aml_reserved_field() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:17 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						a7891dacad 
					 
					
						
						
							
							acpi: add aml_eisaid() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:16 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						3dd1564353 
					 
					
						
						
							
							acpi: add aml_processor() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:16 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						15e44e56d7 
					 
					
						
						
							
							acpi: add aml_equal() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:16 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						a678508e46 
					 
					
						
						
							
							acpi: add aml_varpackage() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:16 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						d5e5830f56 
					 
					
						
						
							
							acpi: add aml_string() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:15 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						b8a5d6894d 
					 
					
						
						
							
							acpi: add aml_local() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:15 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						214ae59f8e 
					 
					
						
						
							
							acpi: add aml_field() & aml_named_field() terms  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:15 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						31127938f4 
					 
					
						
						
							
							acpi: add aml_operation_region() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:14 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						19fff2d405 
					 
					
						
						
							
							acpi: include PkgLength size only when requested  
						
						 
						
						... 
						
						
						
						Named/Reserved{Field} definition uses PkgLength [1] encoding to specify
field length, however it doesn't include size of PkgLength field itself,
while other block objects that have explicit length of its body account
for PkgLength size while encoding it [2].
This special casing isn't mentioned in ACPI spec, but that's what 'iasl'
compiles NamedField to so add extra argument to build_prepend_pkg_length()
to allow it handle the case.
--
1. ACPI Spec 5.0, 20.2.5.2 Named Objects Encoding, page 822
2. ACPI Spec 5.0, 5.4 Definition Block Encoding
Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:14 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						52fa397c58 
					 
					
						
						
							
							acpi: add aml_io() helper  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:14 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						ad4a80bc6f 
					 
					
						
						
							
							acpi: add aml_resource_template() helper  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:14 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						04b8da543d 
					 
					
						
						
							
							acpi: add aml_buffer() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:13 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						3bfa74a7e8 
					 
					
						
						
							
							acpi: add aml_package() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:13 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						3f3992b7c4 
					 
					
						
						
							
							acpi: add aml_call1(), aml_call2(), aml_call3(), aml_call4() helpers  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:13 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						34189453f1 
					 
					
						
						
							
							acpi: add aml_notify() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:12 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						926f5aaefa 
					 
					
						
						
							
							acpi: add aml_and() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:12 +01:00  
					
					
						 
						
						
							
							
							 
							
							
							
							
							 
						
					 
				 
			
				
					
						
							
							
								 
								Igor Mammedov 
							
						 
					 
					
						
						
							
						
						c263b3f754 
					 
					
						
						
							
							acpi: add aml_store() term  
						
						 
						
						... 
						
						
						
						Signed-off-by: Igor Mammedov <imammedo@redhat.com >
Reviewed-by: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Michael S. Tsirkin <mst@redhat.com > 
						
						
					 
					
						2015-02-26 13:04:12 +01:00