From mboxrd@z Thu Jan 1 00:00:00 1970 From: Catalin Marinas Subject: Re: [patch v11 04/23] ARM64 / ACPI: Get RSDP and ACPI boot-time tables Date: Wed, 25 Mar 2015 16:44:53 +0000 Message-ID: <20150325164453.GC14585@localhost> References: <1427205776-5060-1-git-send-email-hanjun.guo@linaro.org> <1427205776-5060-5-git-send-email-hanjun.guo@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Return-path: Received: from eu-smtp-delivery-143.mimecast.com ([207.82.80.143]:34449 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752018AbbCZBEK convert rfc822-to-8bit (ORCPT ); Wed, 25 Mar 2015 21:04:10 -0400 In-Reply-To: <1427205776-5060-5-git-send-email-hanjun.guo@linaro.org> Content-Disposition: inline Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: Hanjun Guo Cc: "Rafael J. Wysocki" , Will Deacon , Olof Johansson , Grant Likely , Mark Rutland , Ashwin Chaugule , Lorenzo Pieralisi , Robert Richter , Arnd Bergmann , Graeme Gregory , linaro-acpi@lists.linaro.org, Marc Zyngier , Jon Masters , Timur Tabi , Mark Salter , linux-kernel@vger.kernel.org, Tomasz Nowicki , Al Stone , linux-acpi@vger.kernel.org, Mark Brown , Suravee Suthikulpanit , Sudeep Holla , linux-arm-kernel@lists.infradead.org On Tue, Mar 24, 2015 at 10:02:37PM +0800, Hanjun Guo wrote: > From: Al Stone > > As we want to get ACPI tables to parse and then use the information > for system initialization, we should get the RSDP (Root System > Description Pointer) first, it then locates Extended Root Description > Table (XSDT) which contains all the 64-bit physical address that > pointer to other boot-time tables. > > Introduce acpi.c and its related head file in this patch to provide > fundamental needs of extern variables and functions for ACPI core, > and then get boot-time tables as needed. > - asm/acenv.h for arch specific ACPICA environments and > implementation, It is needed unconditionally by ACPI core; > - asm/acpi.h for arch specific variables and functions needed by > ACPI driver core; > - acpi.c for ARM64 related ACPI implementation for ACPI driver > core; > > acpi_boot_table_init() is introduced to get RSDP and boot-time tables, > it will be called in setup_arch() before paging_init(), so we should > use eary_memremap() mechanism here to get the RSDP and all the table > pointers. > > FADT Major.Minor version was introduced in ACPI 5.1, it is the same > as ACPI version. > > In ACPI 5.1, some major gaps are fixed for ARM, such as updates in > MADT table for GIC and SMP init, without those updates, we can not > get the MPIDR for SMP init, and GICv2/3 related init information, so > we can't boot arm64 ACPI properly with table versions predating 5.1. > > If firmware provides ACPI tables with ACPI version less than 5.1, > OS has no way to retrieve the configuration data that is necessary > to init SMP boot protocol and the GIC properly, so disable ACPI if > we get an FADT table with version less that 5.1 when acpi_boot_table_init() > called. > > CC: Catalin Marinas > CC: Will Deacon > CC: Lorenzo Pieralisi > Tested-by: Suravee Suthikulpanit > Tested-by: Yijing Wang > Tested-by: Mark Langsdorf > Tested-by: Jon Masters > Tested-by: Timur Tabi > Tested-by: Robert Richter > Acked-by: Robert Richter > Acked-by: Olof Johansson > Acked-by: Grant Likely > Signed-off-by: Al Stone > Signed-off-by: Graeme Gregory > Signed-off-by: Tomasz Nowicki > Signed-off-by: Hanjun Guo Acked-by: Catalin Marinas From mboxrd@z Thu Jan 1 00:00:00 1970 From: catalin.marinas@arm.com (Catalin Marinas) Date: Wed, 25 Mar 2015 16:44:53 +0000 Subject: [patch v11 04/23] ARM64 / ACPI: Get RSDP and ACPI boot-time tables In-Reply-To: <1427205776-5060-5-git-send-email-hanjun.guo@linaro.org> References: <1427205776-5060-1-git-send-email-hanjun.guo@linaro.org> <1427205776-5060-5-git-send-email-hanjun.guo@linaro.org> Message-ID: <20150325164453.GC14585@localhost> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, Mar 24, 2015 at 10:02:37PM +0800, Hanjun Guo wrote: > From: Al Stone > > As we want to get ACPI tables to parse and then use the information > for system initialization, we should get the RSDP (Root System > Description Pointer) first, it then locates Extended Root Description > Table (XSDT) which contains all the 64-bit physical address that > pointer to other boot-time tables. > > Introduce acpi.c and its related head file in this patch to provide > fundamental needs of extern variables and functions for ACPI core, > and then get boot-time tables as needed. > - asm/acenv.h for arch specific ACPICA environments and > implementation, It is needed unconditionally by ACPI core; > - asm/acpi.h for arch specific variables and functions needed by > ACPI driver core; > - acpi.c for ARM64 related ACPI implementation for ACPI driver > core; > > acpi_boot_table_init() is introduced to get RSDP and boot-time tables, > it will be called in setup_arch() before paging_init(), so we should > use eary_memremap() mechanism here to get the RSDP and all the table > pointers. > > FADT Major.Minor version was introduced in ACPI 5.1, it is the same > as ACPI version. > > In ACPI 5.1, some major gaps are fixed for ARM, such as updates in > MADT table for GIC and SMP init, without those updates, we can not > get the MPIDR for SMP init, and GICv2/3 related init information, so > we can't boot arm64 ACPI properly with table versions predating 5.1. > > If firmware provides ACPI tables with ACPI version less than 5.1, > OS has no way to retrieve the configuration data that is necessary > to init SMP boot protocol and the GIC properly, so disable ACPI if > we get an FADT table with version less that 5.1 when acpi_boot_table_init() > called. > > CC: Catalin Marinas > CC: Will Deacon > CC: Lorenzo Pieralisi > Tested-by: Suravee Suthikulpanit > Tested-by: Yijing Wang > Tested-by: Mark Langsdorf > Tested-by: Jon Masters > Tested-by: Timur Tabi > Tested-by: Robert Richter > Acked-by: Robert Richter > Acked-by: Olof Johansson > Acked-by: Grant Likely > Signed-off-by: Al Stone > Signed-off-by: Graeme Gregory > Signed-off-by: Tomasz Nowicki > Signed-off-by: Hanjun Guo Acked-by: Catalin Marinas