From e11c340f01e67116aa38f48f3f0d51a2f8684ce3 Mon Sep 17 00:00:00 2001 From: Venkata Naga Sai Krishna Kolapalli Date: Tue, 3 Mar 2015 17:51:51 +0530 Subject: [PATCH] standalone : Removed profiling support for A53/R5. This patch modifies standalone.tcl, A53 gcc makefile and R5 gcc makefile such that profiling support for these A53/R5 bsps was removed. Signed-off-by: Venkata Naga Sai Krishna Kolapalli --- lib/bsp/standalone/data/standalone.tcl | 52 +++++-------------- lib/bsp/standalone/src/cortexa53/gcc/Makefile | 10 +--- lib/bsp/standalone/src/cortexr5/gcc/Makefile | 12 ++--- 3 files changed, 19 insertions(+), 55 deletions(-) diff --git a/lib/bsp/standalone/data/standalone.tcl b/lib/bsp/standalone/data/standalone.tcl index 5e86d5ad..96bfc049 100755 --- a/lib/bsp/standalone/data/standalone.tcl +++ b/lib/bsp/standalone/data/standalone.tcl @@ -35,7 +35,7 @@ # We can obtain the scu timer/gic baseaddr from the xml, but other parameters # need to be hardcoded. hardcode everything.. # ---------------------------------------------------------------------------- -#TODO these hardcoding parameters can be removed. It can directl come from PS7 IP +#TODO these hardcoding parameters can be removed. It can directly come from PS7 IP set scutimer_baseaddr 0xF8F00600 set scutimer_intr 29 set scugic_cpu_base 0xF8F00100 @@ -87,7 +87,7 @@ proc generate {os_handle} { set need_config_file "true" set mb_exceptions [mb_has_exceptions $hw_proc_handle] } - "psu_microblaze" { + "psu_microblaze" { foreach entry [glob -nocomplain [file join $mbsrcdir *]] { # Copy over only files that are not related to exception handling. All such files have exception in their names file copy -force $entry "./src/" @@ -104,8 +104,12 @@ proc generate {os_handle} { foreach entry [glob -nocomplain [file join $ccdir *]] { file copy -force $entry "./src/" } - file delete -force "./src/gcc" + file delete -force "./src/gcc" + file delete -force "./src/profile" + if { $enable_sw_profile == "true" } { + error "ERROR: Profiling is not supported for A53" + } set file_handle [::hsi::utils::open_include_file "xparameters.h"] puts $file_handle "#include \"xparameters_ps.h\"" puts $file_handle "" @@ -120,8 +124,12 @@ proc generate {os_handle} { foreach entry [glob -nocomplain [file join $ccdir *]] { file copy -force $entry "./src/" } - file delete -force "./src/gcc" + file delete -force "./src/gcc" + file delete -force "./src/profile" + if { $enable_sw_profile == "true" } { + error "ERROR: Profiling is not supported for R5" + } set file_handle [::hsi::utils::open_include_file "xparameters.h"] puts $file_handle "#include \"xparameters_ps.h\"" puts $file_handle "" @@ -577,7 +585,7 @@ proc handle_profile { os_handle proctype } { set proc [hsi::get_sw_processor] - if {{$proctype == "psu_cortexa53"} | {$proctype == "psu_cortexr5"} | {$proctype == "ps7_cortexa9"}} { + if {$proctype == "ps7_cortexa9"} { set sw_proc_handle [hsi::get_sw_processor] set hw_proc_handle [hsi::get_cells [common::get_property HW_INSTANCE $sw_proc_handle]] set cpu_freq [common::get_property CONFIG.C_CPU_CLK_FREQ_HZ $hw_proc_handle] @@ -606,7 +614,7 @@ proc handle_profile { os_handle proctype } { puts $config_file "#define SAMPLE_FREQ_HZ 100000" puts $config_file "#define TIMER_CLK_TICKS [expr $cpu_freq / 100000]" - # proctype should be "microblaze" or "psu_cortexa53" + # proctype should be "microblaze" or "psu_cortexa9" switch $proctype { "microblaze" { # Microblaze Processor. @@ -619,38 +627,6 @@ proc handle_profile { os_handle proctype } { handle_profile_opbtimer $config_file $timer_inst } } - - "psu_cortexa53" { - # Cortex A53 Processor. - - puts $config_file "#define PROC_CORTEXA53 1" - set timer_inst [common::get_property CONFIG.profile_timer $os_handle] - if { [string compare -nocase $timer_inst "none"] == 0 } { - # SCU Timer - puts $config_file "#define ENABLE_SCU_TIMER 1" - puts $config_file "#define ENABLE_SYS_INTR 1" - puts $config_file "#define PROFILE_TIMER_BASEADDR $scutimer_baseaddr" - puts $config_file "#define PROFILE_TIMER_INTR_ID $scutimer_intr" - puts $config_file "#define SCUGIC_CPU_BASEADDR $scugic_cpu_base" - puts $config_file "#define SCUGIC_DIST_BASEADDR $scugic_dist_base" - } - } - "psu_cortexr5" { - # Cortex R5 Processor. - - puts $config_file "#define PROC_CORTEXR5 1" - set timer_inst [common::get_property CONFIG.profile_timer $os_handle] - if { [string compare -nocase $timer_inst "none"] == 0 } { - # SCU Timer - puts $config_file "#define ENABLE_SCU_TIMER 1" - puts $config_file "#define ENABLE_SYS_INTR 1" - puts $config_file "#define PROFILE_TIMER_BASEADDR $scutimer_baseaddr" - puts $config_file "#define PROFILE_TIMER_INTR_ID $scutimer_intr" - puts $config_file "#define SCUGIC_CPU_BASEADDR $scugic_cpu_base" - puts $config_file "#define SCUGIC_DIST_BASEADDR $scugic_dist_base" - } - } - "ps7_cortexa9" { # Cortex A9 Processor. diff --git a/lib/bsp/standalone/src/cortexa53/gcc/Makefile b/lib/bsp/standalone/src/cortexa53/gcc/Makefile index ad3c4156..f41e6669 100644 --- a/lib/bsp/standalone/src/cortexa53/gcc/Makefile +++ b/lib/bsp/standalone/src/cortexa53/gcc/Makefile @@ -64,18 +64,12 @@ standalone_libs: $(LIBSOURCES) $(CC) $(CC_FLAGS) $(ECC_FLAGS) $(INCLUDES) $^ $(ARCHIVER) -r ${RELEASEDIR}/${LIB} ${OUTS} -profile_libs: - $(MAKE) -C profile COMPILER_FLAGS="$(COMPILER_FLAGS)" EXTRA_COMPILER_FLAGS="$(EXTRA_COMPILER_FLAGS)" COMPILER="$(CC)" ARCHIVER="$(ARCHIVER)" AS="$(AS)" libs - .PHONY: include -include: standalone_includes profile_includes +include: standalone_includes standalone_includes: ${CP} ${INCLUDEFILES} ${INCLUDEDIR} -profile_includes: - $(MAKE) -C profile COMPILER_FLAGS="$(COMPILER_FLAGS)" EXTRA_COMPILER_FLAGS="$(EXTRA_COMPILER_FLAGS)" COMPILER="$(CC)" ARCHIVER="$(ARCHIVER)" AS="$(AS)" include - clean: rm -rf ${OUTS} - $(MAKE) -C profile COMPILER_FLAGS="$(COMPILER_FLAGS)" EXTRA_COMPILER_FLAGS="$(EXTRA_COMPILER_FLAGS)" COMPILER="$(CC)" ARCHIVER="$(ARCHIVER)" AS="$(AS)" clean + $(MAKE) -C COMPILER_FLAGS="$(COMPILER_FLAGS)" EXTRA_COMPILER_FLAGS="$(EXTRA_COMPILER_FLAGS)" COMPILER="$(CC)" ARCHIVER="$(ARCHIVER)" AS="$(AS)" clean diff --git a/lib/bsp/standalone/src/cortexr5/gcc/Makefile b/lib/bsp/standalone/src/cortexr5/gcc/Makefile index b89898d9..17ccb915 100644 --- a/lib/bsp/standalone/src/cortexr5/gcc/Makefile +++ b/lib/bsp/standalone/src/cortexr5/gcc/Makefile @@ -63,22 +63,16 @@ INCLUDEFILES=*.h libs: $(LIBS) standalone_libs: $(LIBSOURCES) - echo "Compiling standalone" + echo "Compiling standalone R5" $(CC) $(CC_FLAGS) $(ECC_FLAGS) $(INCLUDES) $^ $(ARCHIVER) -r ${RELEASEDIR}/${LIB} ${OUTS} -profile_libs: - $(MAKE) -C profile COMPILER_FLAGS="$(COMPILER_FLAGS)" EXTRA_COMPILER_FLAGS="$(EXTRA_COMPILER_FLAGS)" COMPILER="$(CC)" ARCHIVER="$(ARCHIVER)" AS="$(AS)" libs - .PHONY: include -include: standalone_includes profile_includes +include: standalone_includes standalone_includes: ${CP} ${INCLUDEFILES} ${INCLUDEDIR} -profile_includes: - $(MAKE) -C profile COMPILER_FLAGS="$(COMPILER_FLAGS)" EXTRA_COMPILER_FLAGS="$(EXTRA_COMPILER_FLAGS)" COMPILER="$(CC)" ARCHIVER="$(ARCHIVER)" AS="$(AS)" include - clean: rm -rf ${OUTS} - $(MAKE) -C profile COMPILER_FLAGS="$(COMPILER_FLAGS)" EXTRA_COMPILER_FLAGS="$(EXTRA_COMPILER_FLAGS)" COMPILER="$(CC)" ARCHIVER="$(ARCHIVER)" AS="$(AS)" clean + $(MAKE) -C COMPILER_FLAGS="$(COMPILER_FLAGS)" EXTRA_COMPILER_FLAGS="$(EXTRA_COMPILER_FLAGS)" COMPILER="$(CC)" ARCHIVER="$(ARCHIVER)" AS="$(AS)" clean