arm: add acpi support for the arm
Subsystems (2)
PATCH 1/1 arm: add acpi support for the arm
This adds acpi code for arm and the acpi tables about Phytium Durian Board. The acpi table only support rsdp, rsdt, xsdt, fadt, dsdt, ssdt, gtdt, madt, mcfg, iort, spcr.
--- MAINTAINERS | 3 + Makefile | 1 + arch/arm/Kconfig | 85 +++ arch/arm/include/asm/acpi_table.h | 39 ++ arch/arm/include/asm/acpi_table/acpi61.h | 755 +++++++++++++++++++++ arch/arm/include/asm/acpi_table/acpi_lib.h | 89 +++ arch/arm/include/asm/acpi_table/arm_platform.h | 93 +++ .../include/asm/acpi_table/io_remapping_table.h | 179 +++++ arch/arm/include/asm/acpi_table/spcr_table.h | 175 +++++ arch/arm/lib/Makefile | 1 + arch/arm/lib/acpi_table.c | 244 +++++++ board/phytium/durian/Makefile | 18 + board/phytium/durian/acpi_platform.h | 38 ++ board/phytium/durian/acpi_table.c | 53 ++ board/phytium/durian/acpi_table/dsdt.asl | 305 +++++++++ board/phytium/durian/acpi_table/fadt.c | 83 +++ board/phytium/durian/acpi_table/gtdt.c | 81 +++ board/phytium/durian/acpi_table/iort.c | 117 ++++ board/phytium/durian/acpi_table/madt.c | 69 ++ board/phytium/durian/acpi_table/mcfg.c | 68 ++ board/phytium/durian/acpi_table/rsdp.c | 25 + board/phytium/durian/acpi_table/rsdt.c | 28 + board/phytium/durian/acpi_table/spcr.c | 78 +++ board/phytium/durian/acpi_table/ssdt.asl | 190 ++++++ board/phytium/durian/acpi_table/xsdt.c | 31 + cmd/bootefi.c | 6 +- configs/durian_defconfig | 9 + include/configs/durian.h | 8 +- lib/efi_loader/Makefile | 1 + lib/efi_loader/efi_setup.c | 3 +- scripts/Makefile.lib | 8 + 31 files changed, 2877 insertions(+), 6 deletions(-) create mode 100644 arch/arm/include/asm/acpi_table.h create mode 100644 arch/arm/include/asm/acpi_table/acpi61.h create mode 100644 arch/arm/include/asm/acpi_table/acpi_lib.h create mode 100644 arch/arm/include/asm/acpi_table/arm_platform.h create mode 100644 arch/arm/include/asm/acpi_table/io_remapping_table.h create mode 100644 arch/arm/include/asm/acpi_table/spcr_table.h create mode 100644 arch/arm/lib/acpi_table.c create mode 100644 board/phytium/durian/acpi_platform.h create mode 100644 board/phytium/durian/acpi_table.c create mode 100644 board/phytium/durian/acpi_table/dsdt.asl create mode 100644 board/phytium/durian/acpi_table/fadt.c create mode 100644 board/phytium/durian/acpi_table/gtdt.c create mode 100644 board/phytium/durian/acpi_table/iort.c create mode 100644 board/phytium/durian/acpi_table/madt.c create mode 100644 board/phytium/durian/acpi_table/mcfg.c create mode 100644 board/phytium/durian/acpi_table/rsdp.c create mode 100644 board/phytium/durian/acpi_table/rsdt.c create mode 100644 board/phytium/durian/acpi_table/spcr.c create mode 100644 board/phytium/durian/acpi_table/ssdt.asl create mode 100644 board/phytium/durian/acpi_table/xsdt.c
MAINTAINERS +3 -0
@@ -487,6 +487,9 @@ M: shuyiqi <[email protected]> S: Maintained F: drivers/pci/pcie_phytium.c F: arch/arm/dts/phytium-durian.dts +F: arch/arm/include/asm/acpi_table.h +F: arch/arm/include/asm/acpi_table/* +F: arch/arm/lib/acpi_table.c BINMAN M: Simon Glass <[email protected]>
Makefile +1 -0
@@ -1933,6 +1933,7 @@ clean: $(clean-dirs) -o -name '*.symtypes' -o -name 'modules.order' \ -o -name modules.builtin -o -name '.tmp_*.o.*' \ -o -name 'dsdt.aml' -o -name 'dsdt.asl.tmp' -o -name 'dsdt.c' \ + -o -name 'ssdt.aml' -o -name 'ssdt.asl.tmp' -o -name 'ssdt.c' \ -o -name '*.efi' -o -name '*.gcno' -o -name '*.so' \) \ -type f -print | xargs rm -f \ bl31.c bl31.elf bl31_*.bin image.map tispl.bin*
arch/arm/Kconfig +85 -0
91 lines not on this page · raw message
arch/arm/include/asm/acpi_table.h new file +39 -0
@@ -0,0 +1,39 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright (C) 2019, PHYTIUM <@phytium.com.cn> +* Steven Hao <[email protected]> +*/ + +#ifndef __ASM_ACPI_TABLE_H__ +#define __ASM_ACPI_TABLE_H__ + +extern const unsigned char DsdtAmlCode[]; +extern const unsigned char SsdtAmlCode[]; + +extern unsigned char *rsdp_data; +extern unsigned char *rsdt_data; +extern unsigned char *xsdt_data; +extern unsigned char *fadt_data; +extern unsigned char *madt_data; +extern unsigned char *gtdt_data; +extern unsigned char *mcfg_data; +extern unsigned char *spcr_data; +extern unsigned char *iort_data; + +extern unsigned char *array_acpi_table_address[32 ]; +extern unsigned char acpi_table_count; + +/* These can be used by the target port */ +ulong write_acpi_tables (ulong start); + +void register_acpi_table_data (void ); + +void dynamic_modify_fadt_table (void *table); +void dynamic_modify_gtdt_table (void *table); +void dynamic_modify_madt_table (void *table); +void dynamic_modify_mcfg_table (void *table); +void dynamic_modify_spcr_table (void *table); +void dynamic_modify_iort_table (void *table); + +#endif +
arch/arm/include/asm/acpi_table/acpi61.h new file +755 -0
755 lines not on this page · raw message
arch/arm/include/asm/acpi_table/acpi_lib.h new file +89 -0
89 lines not on this page · raw message
arch/arm/include/asm/acpi_table/arm_platform.h new file +93 -0
93 lines not on this page · raw message
arch/arm/include/asm/acpi_table/io_remapping_table.h new file +179 -0
179 lines not on this page · raw message
arch/arm/include/asm/acpi_table/spcr_table.h new file +175 -0
175 lines not on this page · raw message
arch/arm/lib/Makefile +1 -0
@@ -28,6 +28,7 @@ else obj-y += relocate.o endif +obj-$(CONFIG_ARM_ACPI_TABLE) += acpi_table.o obj-$(CONFIG_CPU_V7M) += cmd_boot.o obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o obj-$(CONFIG_CMD_BOOTI) += bootm.o image.o
arch/arm/lib/acpi_table.c new file +244 -0
244 lines not on this page · raw message
board/phytium/durian/Makefile +18 -0
@@ -7,3 +7,21 @@ obj-y += durian.o +ifdef CONFIG_ARM_ACPI_TABLE + obj-y +=acpi_table.o + +obj-$(CONFIG_DSDT_TABLE) += acpi_table/dsdt.o +obj-$(CONFIG_SSDT_TABLE) += acpi_table/ssdt.o + +obj-y += acpi_table/rsdp.o +obj-y += acpi_table/rsdt.o +obj-y += acpi_table/xsdt.o +obj-$(CONFIG_FADT_TABLE) += acpi_table/fadt.o +obj-$(CONFIG_MADT_TABLE) += acpi_table/madt.o +obj-$(CONFIG_MCFG_TABLE) += acpi_table/mcfg.o +obj-$(CONFIG_GTDT_TABLE) += acpi_table/gtdt.o +obj-$(CONFIG_IORT_TABLE) += acpi_table/iort.o +obj-$(CONFIG_SPCR_TABLE) += acpi_table/spcr.o +obj-$(CONFIG_SRAT_TABLE) += acpi_table/srat.o +obj-$(CONFIG_SLIT_TABLE) += acpi_table/slit.o +endif
board/phytium/durian/acpi_platform.h new file +38 -0
@@ -0,0 +1,38 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Based on acpi61.h from edk2 +* +* (C) Copyright 2019 +* Phytium Technology Ltd <www.phytium.com> +* Steven Hao <[email protected]> +*/ + +#ifndef __ARM_PHYT_BOARD_H__ +#define __ARM_PHYT_BOARD_H__ +/* +* ACPI table information used to initialize tables. +*/ +#define EFI_ACPI_ARM_OEM_ID { 'A', 'R', 'M', 'L', 'T', 'D' } +#define EFI_ACPI_ARM_OEM_TABLE_ID \ + SIGNATURE_64('A', 'R', 'M', '-', 'P', 'H', 'Y', 'T') +#define EFI_ACPI_ARM_OEM_REVISION 0x20180509 +#define EFI_ACPI_ARM_CREATOR_ID SIGNATURE_32('A', 'R', 'M', ' ') +#define EFI_ACPI_ARM_CREATOR_REVISION 0x00000099 + +/* +* A macro to initialise the common header part of EFI ACPI tables +* as defined by EFI_ACPI_DESCRIPTION_HEADER structure. +*/ +#define arm_acpi_header (signature, type, revision) { \ + signature,/* u32 signature */ \ +sizeof (type),/* u32 length */ \ + revision,/* u8 revision */ \ +0 ,/* u8 checksum */ \ +EFI_ACPI_ARM_OEM_ID ,/* u8 oem_id[6] */ \ +EFI_ACPI_ARM_OEM_TABLE_ID ,/* u64 oem_table_id */ \ +EFI_ACPI_ARM_OEM_REVISION ,/* u32 oem_revision */ \ +EFI_ACPI_ARM_CREATOR_ID ,/* u32 creator_id */ \ +EFI_ACPI_ARM_CREATOR_REVISION /* u32 creator_revision */ \ +} +#endif +
board/phytium/durian/acpi_table.c new file +53 -0
53 lines not on this page · raw message
board/phytium/durian/acpi_table/dsdt.asl new file +305 -0
305 lines not on this page · raw message
board/phytium/durian/acpi_table/fadt.c new file +83 -0
83 lines not on this page · raw message
board/phytium/durian/acpi_table/gtdt.c new file +81 -0
81 lines not on this page · raw message
board/phytium/durian/acpi_table/iort.c new file +117 -0
117 lines not on this page · raw message
board/phytium/durian/acpi_table/madt.c new file +69 -0
69 lines not on this page · raw message
board/phytium/durian/acpi_table/mcfg.c new file +68 -0
68 lines not on this page · raw message
board/phytium/durian/acpi_table/rsdp.c new file +25 -0
@@ -0,0 +1,25 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* (C) Copyright 2019 +* Steven Hao <[email protected]> +*/ + +#include <common.h> +#include <asm/acpi_table.h> +#include <asm/acpi_table/acpi61.h> +#include <asm/acpi_table/arm_platform.h> +#include "../acpi_platform.h" + +struct efi_acpi_6_1_root_system_description_pointer phy_rsdp = { +EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_POINTER_SIGNATURE , +0 , +EFI_ACPI_ARM_OEM_ID , +2 , +0 , +sizeof (struct efi_acpi_6_1_root_system_description_pointer ), +0 , +0 , + {0 ,0 ,0 } +}; + +unsigned char *rsdp_data = (unsigned char *)&phy_rsdp;
board/phytium/durian/acpi_table/rsdt.c new file +28 -0
@@ -0,0 +1,28 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* (C) Copyright 2019 +* Steven Hao <[email protected]> +*/ + +#include <common.h> +#include <asm/acpi_table.h> +#include <asm/acpi_table/acpi61.h> +#include <asm/acpi_table/arm_platform.h> +#include "../acpi_platform.h" + +#define PHYTIUM_RSDT_SIGNATURE \ + EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_TABLE_SIGNATURE + +struct efi_acpi_6_1_root_system_description_table phy_rsdt = { +arm_acpi_header + (PHYTIUM_RSDT_SIGNATURE , + struct efi_acpi_6_1_root_system_description_table, +EFI_ACPI_6_1_ROOT_SYSTEM_DESCRIPTION_TABLE_REVISION + ), + { +0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 + } +}; + +unsigned char *rsdt_data = (unsigned char *)&phy_rsdt;
board/phytium/durian/acpi_table/spcr.c new file +78 -0
78 lines not on this page · raw message
board/phytium/durian/acpi_table/ssdt.asl new file +190 -0
190 lines not on this page · raw message
board/phytium/durian/acpi_table/xsdt.c new file +31 -0
@@ -0,0 +1,31 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* +* (C) Copyright 2019 +* Steven Hao <[email protected]> +*/ + +#include <common.h> +#include <asm/acpi_table.h> +#include <asm/acpi_table/acpi61.h> +#include <asm/acpi_table/arm_platform.h> +#include "../acpi_platform.h" + +#define PHYTIUM_XSDT_SIGNATURE \ + EFI_ACPI_6_1_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE + +/* +* XSDT table +*/ +struct efi_acpi_6_1_extended_system_description_table phy_xsdt = { +arm_acpi_header + (PHYTIUM_XSDT_SIGNATURE , + struct efi_acpi_6_1_extended_system_description_table, +EFI_ACPI_6_1_EXTENDED_SYSTEM_DESCRIPTION_TABLE_REVISION + ), + { +0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 , +0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 + } +}; + +unsigned char *xsdt_data = (unsigned char *)&phy_xsdt;
cmd/bootefi.c +4 -2
@@ -73,7 +73,8 @@ out: efi_root, NULL)); } -#if !CONFIG_IS_ENABLED (GENERATE_ACPI_TABLE ) +#if (!CONFIG_IS_ENABLED (GENERATE_ACPI_TABLE ) && \ + !CONFIG_IS_ENABLED (ARM_ACPI_TABLE ))/** * copy_fdt() - Copy the device tree to a new location available to EFI
@@ -214,7 +215,8 @@ static efi_status_t efi_install_fdt(const char *fdt_opt)* The EBBR spec requires that we have either an FDT or an ACPI table * but not both. */ -#if CONFIG_IS_ENABLED (GENERATE_ACPI_TABLE ) +#if (CONFIG_IS_ENABLED (GENERATE_ACPI_TABLE ) || \ +CONFIG_IS_ENABLED (ARM_ACPI_TABLE ))if (fdt_opt) {printf ("ERROR: can't have ACPI table and device tree.\n" );return EFI_LOAD_ERROR ;
configs/durian_defconfig +9 -0
@@ -1,5 +1,14 @@ CONFIG_ARM=y CONFIG_ARM_SMCCC=y +CONFIG_ARM_ACPI_TABLE=y +CONFIG_DSDT_TABLE=y +CONFIG_SSDT_TABLE=y +CONFIG_FADT_TABLE=y +CONFIG_GTDT_TABLE=y +CONFIG_MADT_TABLE=y +CONFIG_MCFG_TABLE=y +CONFIG_IORT_TABLE=y +CONFIG_SPCR_TABLE=y CONFIG_TARGET_DURIAN=y CONFIG_SYS_TEXT_BASE=0x500000 CONFIG_NR_DRAM_BANKS=1
include/configs/durian.h +5 -3
@@ -36,9 +36,11 @@#define CONFIG_SYS_BOOTM_LEN (60 * 1024 * 1024)#define CONFIG_EXTRA_ENV_SETTINGS \ - "load_kernel=ext4load scsi 0:1 0x90100000 uImage-2004\0" \ - "load_fdt=ext4load scsi 0:1 0x95000000 ft2004-pci-64.dtb\0"\ + "load_kernel=ext4load scsi 0:1 0x90100000 uImage-durian\0" \ + "load_fdt=ext4load scsi 0:1 0x95000000 phytium-durian.dtb\0"\ "boot_fdt=bootm 0x90100000 -:- 0x95000000\0" \ - "distro_bootcmd=run load_kernel; run load_fdt; run boot_fdt" + "distro_bootcmd=run load_kernel; run load_fdt; run boot_fdt\0"\ + "load_acpi_kernel=ext4load scsi 0:1 0x90100000 Image-durian\0"\ + "acpi_boot=bootefi 0x90100000\0"#endif
lib/efi_loader/Makefile +1 -0
@@ -39,3 +39,4 @@ obj-$(CONFIG_PARTITIONS) += efi_disk.o obj-$(CONFIG_NET) += efi_net.o obj-$(CONFIG_GENERATE_ACPI_TABLE) += efi_acpi.o obj-$(CONFIG_GENERATE_SMBIOS_TABLE) += efi_smbios.o +obj-$(CONFIG_ARM_ACPI_TABLE) += efi_acpi.o
lib/efi_loader/efi_setup.c +2 -1
@@ -160,7 +160,8 @@ efi_status_t efi_init_obj_list(void)if (ret !=EFI_SUCCESS ) goto out;#endif -#ifdef CONFIG_GENERATE_ACPI_TABLE +//#ifdef CONFIG_GENERATE_ACPI_TABLE +#ifdef CONFIG_ARM_ACPI_TABLE ret =efi_acpi_register ();if (ret !=EFI_SUCCESS ) goto out;
scripts/Makefile.lib +8 -0
@@ -416,6 +416,14 @@ $(obj)/dsdt.c: $(src)/dsdt.asl $(call cmd,acpi_c_asl) $(Q)sed -i -e "s,dsdt_aml_code,AmlCode," $@ +$(obj)/acpi_table/dsdt.c: $(src)/acpi_table/dsdt.asl + $(call cmd,acpi_c_asl) + $(Q)sed -i -e "s,dsdt_aml_code,DsdtAmlCode," $@ + +$(obj)/acpi_table/ssdt.c: $(src)/acpi_table/ssdt.asl + $(call cmd,acpi_c_asl) + $(Q)sed -i -e "s,ssdt_aml_code,SsdtAmlCode," $@ + # Bzip2 # ---------------------------------------------------------------------------
Signature · 1 line
2.7.4
PATCH 1/1 arm: add acpi support for the arm
+Andy Shevchenko
Hi Steven,
Quoted 51 lines · Steven Hao
This adds acpi code for arm and the acpi tables about Phytium Durian Board. The acpi table only support rsdp, rsdt, xsdt, fadt, dsdt, ssdt, gtdt, madt, mcfg, iort, spcr.
Signed-off-by Steven Hao <[email protected]>--- MAINTAINERS | 3 + Makefile | 1 + arch/arm/Kconfig | 85 +++ arch/arm/include/asm/acpi_table.h | 39 ++ arch/arm/include/asm/acpi_table/acpi61.h | 755 +++++++++++++++++++++ arch/arm/include/asm/acpi_table/acpi_lib.h | 89 +++ arch/arm/include/asm/acpi_table/arm_platform.h | 93 +++ .../include/asm/acpi_table/io_remapping_table.h | 179 +++++ arch/arm/include/asm/acpi_table/spcr_table.h | 175 +++++ arch/arm/lib/Makefile | 1 + arch/arm/lib/acpi_table.c | 244 +++++++ board/phytium/durian/Makefile | 18 + board/phytium/durian/acpi_platform.h | 38 ++ board/phytium/durian/acpi_table.c | 53 ++ board/phytium/durian/acpi_table/dsdt.asl | 305 +++++++++ board/phytium/durian/acpi_table/fadt.c | 83 +++ board/phytium/durian/acpi_table/gtdt.c | 81 +++ board/phytium/durian/acpi_table/iort.c | 117 ++++ board/phytium/durian/acpi_table/madt.c | 69 ++ board/phytium/durian/acpi_table/mcfg.c | 68 ++ board/phytium/durian/acpi_table/rsdp.c | 25 + board/phytium/durian/acpi_table/rsdt.c | 28 + board/phytium/durian/acpi_table/spcr.c | 78 +++ board/phytium/durian/acpi_table/ssdt.asl | 190 ++++++ board/phytium/durian/acpi_table/xsdt.c | 31 + cmd/bootefi.c | 6 +- configs/durian_defconfig | 9 + include/configs/durian.h | 8 +- lib/efi_loader/Makefile | 1 + lib/efi_loader/efi_setup.c | 3 +- scripts/Makefile.lib | 8 + 31 files changed, 2877 insertions(+), 6 deletions(-) create mode 100644 arch/arm/include/asm/acpi_table.h create mode 100644 arch/arm/include/asm/acpi_table/acpi61.h create mode 100644 arch/arm/include/asm/acpi_table/acpi_lib.h create mode 100644 arch/arm/include/asm/acpi_table/arm_platform.h create mode 100644 arch/arm/include/asm/acpi_table/io_remapping_table.h create mode 100644 arch/arm/include/asm/acpi_table/spcr_table.h create mode 100644 arch/arm/lib/acpi_table.c create mode 100644 board/phytium/durian/acpi_platform.h create mode 100644 board/phytium/durian/acpi_table.c create mode 100644 board/phytium/durian/acpi_table/dsdt.asl create mode 100644 board/phytium/durian/acpi_table/fadt.c create mode 100644 board/phytium/durian/acpi_table/gtdt.c
Quoted 9 lines
create mode 100644 board/phytium/durian/acpi_table/iort.c create mode 100644 board/phytium/durian/acpi_table/madt.c create mode 100644 board/phytium/durian/acpi_table/mcfg.c create mode 100644 board/phytium/durian/acpi_table/rsdp.c create mode 100644 board/phytium/durian/acpi_table/rsdt.c create mode 100644 board/phytium/durian/acpi_table/spcr.c create mode 100644 board/phytium/durian/acpi_table/ssdt.asl create mode 100644 board/phytium/durian/acpi_table/xsdt.c
One generic comment, could you please check whether the existing x86 ACPI support can be reused/refactored to support ARM?
Regards,
Bin
PATCH 1/1 arm: add acpi support for the arm
Quoted 1 line · Bin Meng
+Andy Shevchenko
Thanks!
Quoted 62 lines · Steven Hao
Quoted 51 lines
This adds acpi code for arm and the acpi tables about Phytium Durian Board. The acpi table only support rsdp, rsdt, xsdt, fadt, dsdt, ssdt, gtdt, madt, mcfg, iort, spcr.
Signed-off-by Steven Hao <[email protected]>--- MAINTAINERS | 3 + Makefile | 1 + arch/arm/Kconfig | 85 +++ arch/arm/include/asm/acpi_table.h | 39 ++ arch/arm/include/asm/acpi_table/acpi61.h | 755 +++++++++++++++++++++ arch/arm/include/asm/acpi_table/acpi_lib.h | 89 +++ arch/arm/include/asm/acpi_table/arm_platform.h | 93 +++ .../include/asm/acpi_table/io_remapping_table.h | 179 +++++ arch/arm/include/asm/acpi_table/spcr_table.h | 175 +++++ arch/arm/lib/Makefile | 1 + arch/arm/lib/acpi_table.c | 244 +++++++ board/phytium/durian/Makefile | 18 + board/phytium/durian/acpi_platform.h | 38 ++ board/phytium/durian/acpi_table.c | 53 ++ board/phytium/durian/acpi_table/dsdt.asl | 305 +++++++++ board/phytium/durian/acpi_table/fadt.c | 83 +++ board/phytium/durian/acpi_table/gtdt.c | 81 +++ board/phytium/durian/acpi_table/iort.c | 117 ++++ board/phytium/durian/acpi_table/madt.c | 69 ++ board/phytium/durian/acpi_table/mcfg.c | 68 ++ board/phytium/durian/acpi_table/rsdp.c | 25 + board/phytium/durian/acpi_table/rsdt.c | 28 + board/phytium/durian/acpi_table/spcr.c | 78 +++ board/phytium/durian/acpi_table/ssdt.asl | 190 ++++++ board/phytium/durian/acpi_table/xsdt.c | 31 + cmd/bootefi.c | 6 +- configs/durian_defconfig | 9 + include/configs/durian.h | 8 +- lib/efi_loader/Makefile | 1 + lib/efi_loader/efi_setup.c | 3 +- scripts/Makefile.lib | 8 + 31 files changed, 2877 insertions(+), 6 deletions(-) create mode 100644 arch/arm/include/asm/acpi_table.h create mode 100644 arch/arm/include/asm/acpi_table/acpi61.h create mode 100644 arch/arm/include/asm/acpi_table/acpi_lib.h create mode 100644 arch/arm/include/asm/acpi_table/arm_platform.h create mode 100644 arch/arm/include/asm/acpi_table/io_remapping_table.h create mode 100644 arch/arm/include/asm/acpi_table/spcr_table.h create mode 100644 arch/arm/lib/acpi_table.c create mode 100644 board/phytium/durian/acpi_platform.h create mode 100644 board/phytium/durian/acpi_table.c create mode 100644 board/phytium/durian/acpi_table/dsdt.asl create mode 100644 board/phytium/durian/acpi_table/fadt.c create mode 100644 board/phytium/durian/acpi_table/gtdt.cQuoted 9 lines
create mode 100644 board/phytium/durian/acpi_table/iort.c create mode 100644 board/phytium/durian/acpi_table/madt.c create mode 100644 board/phytium/durian/acpi_table/mcfg.c create mode 100644 board/phytium/durian/acpi_table/rsdp.c create mode 100644 board/phytium/durian/acpi_table/rsdt.c create mode 100644 board/phytium/durian/acpi_table/spcr.c create mode 100644 board/phytium/durian/acpi_table/ssdt.asl create mode 100644 board/phytium/durian/acpi_table/xsdt.c
Quoted 2 lines
One generic comment, could you please check whether the existing x86 ACPI support can be reused/refactored to support ARM?
Exactly!
My understanding that current x86 support has to be refactored to something like lib/acpi/generate and then be re-used by other architectures.
Signature · 2 lines
With Best Regards, Andy Shevchenko
PATCH 1/1 arm: add acpi support for the arm
In reply to Bin MengHi Bin:
There are a little difference about acpi specification between the arm and x86,so the arm-acpi-support is needed.
Thank you
Steven Hao
获取 Outlook for iOS<https://aka.ms/o0ukef>
________________________________
发件人: Bin Meng <[email protected]>
发送时间: Wednesday, November 20, 2019 6:21:33 PM
收件人: Steven Hao <[email protected]>; Andy Shevchenko <[email protected]>
抄送: xypron.glpk at gmx.de <[email protected]>; liuhao at phytium.com.cn <[email protected]>; agraf at csgraf.de <[email protected]>; jagan at amarulasolutions.com <[email protected]>; marek.vasut at gmail.com <[email protected]>; sr at denx.de <[email protected]>; patrice.chotard at st.com <[email protected]>; afd at ti.com <[email protected]>; horatiu.vultur at microchip.com <[email protected]>; narmstrong at baylibre.com <[email protected]>; ryder.lee at mediatek.com <[email protected]>; igor.opaniuk at gmail.com <[email protected]>; patrick.delaunay at st.com <[email protected]>; eugen.hristev at microchip.com <[email protected]>; sjg at chromium.org <[email protected]>; judge.packham at gmail.com <[email protected]>; yamada.masahiro at socionext.com <[email protected]>; swarren at nvidia.com <[email protected]>; michal.simek at xilinx.com <[email protected]>; u-boot at lists.denx.de <[email protected]> 主题: Re: [PATCH] arm: add acpi support for the arm
+Andy Shevchenko
Hi Steven,
Quoted 51 lines · Steven Hao
This adds acpi code for arm and the acpi tables about Phytium Durian Board. The acpi table only support rsdp, rsdt, xsdt, fadt, dsdt, ssdt, gtdt, madt, mcfg, iort, spcr.
Signed-off-by Steven Hao <[email protected]>--- MAINTAINERS | 3 + Makefile | 1 + arch/arm/Kconfig | 85 +++ arch/arm/include/asm/acpi_table.h | 39 ++ arch/arm/include/asm/acpi_table/acpi61.h | 755 +++++++++++++++++++++ arch/arm/include/asm/acpi_table/acpi_lib.h | 89 +++ arch/arm/include/asm/acpi_table/arm_platform.h | 93 +++ .../include/asm/acpi_table/io_remapping_table.h | 179 +++++ arch/arm/include/asm/acpi_table/spcr_table.h | 175 +++++ arch/arm/lib/Makefile | 1 + arch/arm/lib/acpi_table.c | 244 +++++++ board/phytium/durian/Makefile | 18 + board/phytium/durian/acpi_platform.h | 38 ++ board/phytium/durian/acpi_table.c | 53 ++ board/phytium/durian/acpi_table/dsdt.asl | 305 +++++++++ board/phytium/durian/acpi_table/fadt.c | 83 +++ board/phytium/durian/acpi_table/gtdt.c | 81 +++ board/phytium/durian/acpi_table/iort.c | 117 ++++ board/phytium/durian/acpi_table/madt.c | 69 ++ board/phytium/durian/acpi_table/mcfg.c | 68 ++ board/phytium/durian/acpi_table/rsdp.c | 25 + board/phytium/durian/acpi_table/rsdt.c | 28 + board/phytium/durian/acpi_table/spcr.c | 78 +++ board/phytium/durian/acpi_table/ssdt.asl | 190 ++++++ board/phytium/durian/acpi_table/xsdt.c | 31 + cmd/bootefi.c | 6 +- configs/durian_defconfig | 9 + include/configs/durian.h | 8 +- lib/efi_loader/Makefile | 1 + lib/efi_loader/efi_setup.c | 3 +- scripts/Makefile.lib | 8 + 31 files changed, 2877 insertions(+), 6 deletions(-) create mode 100644 arch/arm/include/asm/acpi_table.h create mode 100644 arch/arm/include/asm/acpi_table/acpi61.h create mode 100644 arch/arm/include/asm/acpi_table/acpi_lib.h create mode 100644 arch/arm/include/asm/acpi_table/arm_platform.h create mode 100644 arch/arm/include/asm/acpi_table/io_remapping_table.h create mode 100644 arch/arm/include/asm/acpi_table/spcr_table.h create mode 100644 arch/arm/lib/acpi_table.c create mode 100644 board/phytium/durian/acpi_platform.h create mode 100644 board/phytium/durian/acpi_table.c create mode 100644 board/phytium/durian/acpi_table/dsdt.asl create mode 100644 board/phytium/durian/acpi_table/fadt.c create mode 100644 board/phytium/durian/acpi_table/gtdt.c
Quoted 9 lines
create mode 100644 board/phytium/durian/acpi_table/iort.c create mode 100644 board/phytium/durian/acpi_table/madt.c create mode 100644 board/phytium/durian/acpi_table/mcfg.c create mode 100644 board/phytium/durian/acpi_table/rsdp.c create mode 100644 board/phytium/durian/acpi_table/rsdt.c create mode 100644 board/phytium/durian/acpi_table/spcr.c create mode 100644 board/phytium/durian/acpi_table/ssdt.asl create mode 100644 board/phytium/durian/acpi_table/xsdt.c
One generic comment, could you please check whether the existing x86 ACPI support can be reused/refactored to support ARM?
Regards,
Bin
PATCH 1/1 arm: add acpi support for the arm
Quoted 3 lines · Steven Hao
Hi Bin:
There are a little difference about acpi specification between the arm and x86,so the arm-acpi-support is needed.
Nobody disputes against it. The point is that ACPI table generation here and there is fundamentally the same, the contents may be differ. Moreover, for some tables I don't believe, for instance SPCR, has anything new in ARM vs. x86.
Quoted 5 lines
One generic comment, could you please check whether the existing x86 ACPI support can be reused/refactored to support ARM?
Regards,
Bin
Signature · 2 lines
With Best Regards, Andy Shevchenko