| /***************************************************************************** |
| * Copyright Statement: |
| * -------------------- |
| * This software is protected by Copyright and the information contained |
| * herein is confidential. The software may not be copied and the information |
| * contained herein may not be used or disclosed except with the written |
| * permission of MediaTek Inc. (C) 2005 |
| * |
| * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES |
| * THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE") |
| * RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON |
| * AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, |
| * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF |
| * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. |
| * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE |
| * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR |
| * SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH |
| * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO |
| * NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S |
| * SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM. |
| * |
| * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE |
| * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE, |
| * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE, |
| * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO |
| * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. |
| * |
| * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE |
| * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF |
| * LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND |
| * RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER |
| * THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC). |
| * |
| *****************************************************************************/ |
| |
| /***************************************************************************** |
| * |
| * Filename: |
| * --------- |
| * system_profiler.h |
| * |
| * Project: |
| * -------- |
| * |
| * |
| * Description: |
| * ------------ |
| * |
| * |
| * Author: |
| * ------- |
| * ------- |
| * |
| *============================================================================ |
| * HISTORY |
| * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| *------------------------------------------------------------------------------ |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| * removed! |
| * removed! |
| * removed! |
| * |
| *------------------------------------------------------------------------------ |
| * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| *============================================================================ |
| ****************************************************************************/ |
| |
| #ifndef SYSPROFILER_PUBLIC_H |
| #define SYSPROFILER_PUBLIC_H |
| |
| #include "swla_public.h" |
| #include "mcu_pmu_montr_public.h" |
| #include "kal_public_defs.h" |
| #include "cpu_info.h" |
| #include "ex_public.h" |
| |
| |
| typedef enum { |
| SYSPRO_SW_SWLA_MODE = 0, |
| SYSPRO_SW_SWTR_MODE, |
| SYSPRO_MODE_END |
| }SYSPRO_MODE; |
| |
| typedef enum |
| { |
| SYSPRO_CORE0 = 0, |
| SYSPRO_CORE1, |
| #if defined(__MD95__) |
| #ifndef __MD95_IS_2CORES__ |
| SYSPRO_CORE2, |
| #endif // ifndef(__MD95_IS_2CORES__) |
| |
| #elif defined(__MD97__) || defined(__MD97P__) |
| SYSPRO_CORE2, |
| SYSPRO_CORE3, |
| #endif |
| SYSPRO_NUM |
| }SYSPRO_MCU_CORE; |
| |
| |
| #if defined(__MTK_TARGET__) && !defined(__MAUI_BASIC__) && !defined(__ESL_HRT__) |
| |
| #if defined(__MD95__) |
| |
| #define __SYSTEM_PROFILER_ON__ |
| #define __SWLA_SNAPSHOT_FEATURE__ |
| #define __SWLA_SNAPSHOT_FEATURE_DEBUG__ |
| |
| #elif defined(__MD97__) || defined(__MD97P__) |
| |
| #define __SYSTEM_PROFILER_ON__ |
| #define __SYSPRO_DEFAULT_MIN_BUFF_SIZE__ |
| //#define __SWLA_SNAPSHOT_FEATURE__ |
| //#define __SWLA_SNAPSHOT_FEATURE_DEBUG__ |
| |
| #else |
| #error "Unsupported chip" |
| #endif |
| #endif |
| |
| /* DHL will call PMU API. So APIs should be exported to be linked.*/ |
| #if defined(__MTK_TARGET__) |
| #define __SWLA_MIPS_PMU_EXIST__ |
| #endif |
| |
| #define MAX_SYSPRO_NUMBER (SYS_MCU_NUM_CORE) |
| #define MAX_SWLA_NUMBER (SYS_MCU_NUM_CORE) |
| #define MAX_SWTR_NUMBER (SYS_MCU_NUM_CORE) |
| #define MAX_SW_SWTR_NUMBER (SYS_MCU_NUM_CORE) |
| #define BASIC_INFO_SIZE (8) |
| #define SYSPROFILER_INITCORE (0) |
| #define SYSPRO_HW_SWTR_DEFAULT_SAMPLE_RATE (4096) |
| |
| #if defined(__MD95__) |
| #define MAX_TC_NUMBER (4) |
| #elif defined(__MD97__) || defined(__MD97P__) |
| #define MAX_TC_NUMBER (6) |
| #else |
| #error "Unsupported chip" |
| #endif |
| |
| #if defined(__MD95__) |
| #define SYS_PRO_HEADER_MINOR_VER (3) |
| #define SYS_PRO_HEADER_MAJOR_VER (1) |
| #elif defined(__MD97__) || defined(__MD97P__) |
| #define SYS_PRO_HEADER_MINOR_VER (0) |
| #define SYS_PRO_HEADER_MAJOR_VER (4) |
| #else |
| #error "Unsupported chip" |
| #endif |
| #define SYS_PRO_HEADER_PADDING (0) |
| #define SYS_PRO_HEADER_MAGIC (0xEE) |
| |
| /* |
| * IF extra add-on parts are required, please modify this following number |
| */ |
| // 14 is the number of ASM add-on (6 built-in and 8 extra data) --> but current is no ASM, can change |
| #define MAX_ADDON_INFO_NUM 14 |
| #define MAX_PLATFORM_NAME_LEN 16 |
| #define MAX_FLAVOR_NAME_LEN 32 |
| #define MAX_SW_LABEL_LEN 64 |
| #define HEADER_SCRATCHPAD_LEN 128 |
| |
| typedef struct SysProfiler_SummayHeader_T |
| { |
| // version Info: since ver 1.03 |
| kal_uint8 minor_ver; |
| kal_uint8 major_ver; |
| kal_uint8 padding; |
| kal_uint8 magic; // should always be 0xEE |
| |
| #if defined(__MD95__) // version Info: since ver1.03(For Gen93/95) |
| kal_uint32 header_sz; |
| kal_uint32 main_desc_sz; |
| #elif defined(__MD97__) || defined(__MD97P__) // version Info: since ver4.0 (For Gen97) |
| kal_uint8 vpe0_ic_info; |
| kal_uint8 vpe1_ic_info; |
| kal_uint8 vpe2_ic_info; |
| kal_uint8 vpe3_ic_info; |
| kal_uint32 platform_info; |
| #else |
| #error "Unsupported chip" |
| #endif |
| kal_uint32 addon_desc_sz; |
| } SysProfiler_SummaryHeader; |
| |
| typedef struct SysProfiler_MainDescHeader_T |
| { |
| kal_char mode_name[4]; |
| kal_uint32 core_id; |
| kal_uint32 mdsys_timebase; |
| kal_uint32 modemsys_timebase_low; |
| kal_uint32 modemsys_timebase_high; |
| kal_uint32 log_sz; |
| kal_uint32 raw_begin_pos; |
| #if defined(__MD97__) || defined(__MD97P__) |
| kal_uint32 cpu_clock_mhz; |
| #else |
| kal_uint32 padding; |
| #endif |
| kal_char platformName[MAX_PLATFORM_NAME_LEN]; |
| kal_char flavorName[MAX_FLAVOR_NAME_LEN]; |
| kal_char SWLabel[MAX_SW_LABEL_LEN]; |
| } SysProfiler_MainDescHeader; |
| |
| typedef struct SysProfiler_AddonDescHeader_T |
| { |
| kal_uint32 log_sz; |
| kal_char ext_name[12]; |
| } SysProfiler_AddonDescHeader; |
| |
| typedef struct SysProfiler_LoggingHeader_T |
| { |
| SysProfiler_SummaryHeader summary; |
| SysProfiler_MainDescHeader main_desc; |
| SysProfiler_AddonDescHeader addon_info[MAX_ADDON_INFO_NUM]; |
| kal_char header_padding[HEADER_SCRATCHPAD_LEN]; /* SPV scratchpad, content will be output to header region of sla.bins */ |
| } SysProfiler_LoggingHeader; |
| |
| typedef struct SysProfiler_DumpMemoryInfo_T |
| { |
| kal_uint32 base_addr1; |
| kal_uint32 length1; |
| kal_uint32 base_addr2; |
| kal_uint32 length2; |
| } SysProfiler_DumpMemInfo; |
| |
| #if defined(__MD95__) |
| #if defined(__SWLA_MIPS_PMU_EXIST__) |
| typedef struct SysProfiler_PMCSettingParameter_T |
| { |
| SYSPRO_MODE mode; |
| SYSPRO_MCU_CORE coreID; |
| kal_uint8 TCID; |
| IAPMU_MONITOR_EVENT_TYPE PMC0Event; |
| IAPMU_MONITOR_TARGET_TYPE PMC0Type; |
| IAPMU_MONITOR_EVENT_TYPE PMC1Event; |
| IAPMU_MONITOR_TARGET_TYPE PMC1Type; |
| } SysProfiler_PMCSettingParameter; |
| |
| typedef struct SysProfiler_DHLPMCParameter_T |
| { |
| SysProfiler_PMCSettingParameter parameter[MAX_SWLA_NUMBER * MAX_TC_NUMBER]; |
| } SysProfiler_DHLPMCParameter; |
| |
| typedef struct SysProfiler_PMCSettingLocalParameterForILM_T |
| { |
| LOCAL_PARA_HDR |
| SysProfiler_PMCSettingParameter parameter[MAX_TC_NUMBER]; |
| } SysProfiler_PMCSettingLocalParameterForILM; |
| |
| #endif |
| #elif defined(__MD97__) || defined(__MD97P__) |
| |
| #define SYSPROFILER_CM2_NUM 4 |
| typedef struct CM2ConfigParameter_T |
| { |
| kal_uint32 Event; |
| kal_uint32 Qualifier; |
| kal_uint32 BegAddr; |
| kal_uint32 EndAddr; |
| kal_uint32 VPEMask; |
| }CM2ConfigParameter; |
| |
| #define SYSPROFILER_PMC_NUM 4 |
| typedef struct PMCConfigParameter_T |
| { |
| kal_uint32 Event; |
| kal_uint32 Type; |
| }PMCConfigParameter; |
| |
| typedef struct SysProfiler_CM2SettingParameter_T |
| { |
| SYSPRO_MODE mode; |
| SYSPRO_MCU_CORE coreID; |
| CM2ConfigParameter CM2_parameter[SYSPROFILER_CM2_NUM]; |
| }SysProfiler_CM2SettingParameter; |
| |
| typedef struct SysProfiler_PMCSettingParameter_T |
| { |
| SYSPRO_MODE mode; |
| SYSPRO_MCU_CORE coreID; |
| PMCConfigParameter PMC_parameter[SYSPROFILER_PMC_NUM]; |
| } SysProfiler_PMCSettingParameter; |
| |
| typedef struct SysProfiler_DHLPMCParameter_T |
| { |
| SysProfiler_PMCSettingParameter parameter[MAX_SWLA_NUMBER * MAX_TC_NUMBER]; |
| } SysProfiler_DHLPMCParameter; |
| |
| typedef struct SysProfiler_PMCSettingLocalParameterForILM_T |
| { |
| LOCAL_PARA_HDR |
| SysProfiler_PMCSettingParameter parameter; |
| } SysProfiler_PMCSettingLocalParameterForILM; |
| |
| #else |
| #error "Unsupported chip" |
| #endif |
| |
| |
| typedef enum |
| { |
| SYSPRO_SW_ADDON, |
| SYSPRO_ADDON_TYPE_END, |
| } SYSPROFILER_ADDON_TYPE; |
| |
| typedef enum |
| { |
| SYSPRO_SWLA_ADDON, |
| SYSPRO_SWTR_ADDON, |
| SYSPRO_ADDON_PROFILER_TYPE_END, |
| } SYSPROFILER_ADDON_PROFILER_TYPE; |
| |
| typedef enum{ |
| SYSPRO_ERROR_CODE_SUCCESS = 0, |
| SYSPRO_ERROR_CODE_START = 0x10, |
| SYSPRO_ERROR_CODE_BUFFER_TOO_SMALL, |
| SYSPRO_ERROR_CODE_BUFFER_TOO_LARGE, |
| SYSPRO_ERROR_CODE_WRONG_MODE, |
| SYSPRO_ERROR_CODE_WAIT_IDLE_FAIL, |
| SYSPRO_ERROR_CODE_OVER_ADDON_INDEX, |
| SYSPRO_ERROR_CODE_OVER_ADDON_SIZE, |
| SYSPRO_ERROR_CODE_INVALID_SAMPLE_RATE, |
| SYSPRO_ERROR_CODE_SW_START = 0x20, |
| SYSPRO_ERROR_CODE_SWLA_ALREADY_ENABLE, |
| SYSPRO_ERROR_CODE_SWLA_RAM_BUFFER_IN_USED, |
| SYSPRO_ERROR_CODE_SWTR_ALREADY_ENABLE, |
| SYSPRO_ERROR_CODE_SWTR_RAM_BUFFER_IN_USED, |
| SYSPRO_ERROR_CODE_OUT_OF_SUPPORT_COREID, |
| SYSPRO_ERROR_CODE_INVALID_MODE, |
| SYSPRO_ERROR_CODE_BUFFER_ADDRESS_SIZE, |
| SYSPRO_ERROR_CODE_PROFILER_NOT_ENABLE, |
| SYSPRO_ERROR_CODE_INVALID_PROFILER_ADDON, |
| SYSPRO_ERROR_CODE_INVALID_ADDON_OPTION, |
| SYSPRO_ERROR_CODE_NO_ADDON_AVAILABLE, |
| SYSPRO_ERROR_CODE_NO_EXTRA_ADDON_AVAILABLE, |
| SYSPRO_ERROR_CODE_DUPLICATED_ADDON, |
| SYSPRO_ERROR_CODE_NULL_FUNCTION_PTR, |
| SYSPRO_ERROR_CODE_PMC_PARAMETER_INVALID, |
| SYSPRO_ERROR_CODE_DEPRECATED_FUNCTION, |
| SYSPRO_ERROR_CODE_NO_AVAILABLE_SNAPSHOT_BUFFER, |
| SYSPRO_ERROR_CODE_SNAPSHOT_AGAIN_IN_SHORT_TIME, |
| SYSPRO_ERROR_CODE_NO_SUPPORT_DUMP_LEVEL, |
| SYSPRO_ERROR_CODE_INIT_FAIL, |
| |
| |
| SYSPRO_ERROR_CODE_CORE_0 = 0x0000, |
| SYSPRO_ERROR_CODE_CORE_1 = 0x0100, |
| SYSPRO_ERROR_CODE_CORE_2 = 0x0200, |
| SYSPRO_ERROR_CODE_CORE_3 = 0x0300, |
| //SYSPRO_ERROR_CODE_MCU_ASM = 0x0400, |
| //SYSPRO_ERROR_CODE_INFRA_ASM = 0x0500, |
| |
| SYSPRO_ERROR_CODE_END, |
| } SYSPROFILER_ERROR_CODE; |
| |
| |
| #if defined(__SWLA_SNAPSHOT_FEATURE__) |
| |
| typedef enum |
| { |
| SYSPRO_SNAPSHOT_CORE_IDLE, |
| SYSPRO_SNAPSHOT_CORE_START, |
| SYSPRO_SNAPSHOT_CORE_DONE |
| } SYSPROFILER_SNAPSHOT_CORE_STATUS_TYPE ; |
| |
| |
| typedef enum |
| { |
| SYSPRO_SNAPSHOT_BUFF_INDEX_0, |
| /* |
| SYSPRO_SNAPSHOT_BUFF_INDEX_1, |
| SYSPRO_SNAPSHOT_BUFF_INDEX_2, |
| SYSPRO_SNAPSHOT_BUFF_INDEX_3, |
| SYSPRO_SNAPSHOT_BUFF_INDEX_4, |
| SYSPRO_SNAPSHOT_BUFF_INDEX_5, |
| SYSPRO_SNAPSHOT_BUFF_INDEX_19=19, |
| */ |
| SYSPRO_SNAPSHOT_BUFF_NUM, |
| SYSPRO_SNAPSHOT_BUFF_COMMON, /* Reserved for common case */ |
| SYSPRO_SNAPSHOT_BUFF_HRT_FAIL, /* For Hard-Read-Time fail case */ |
| SYSPRO_SNAPSHOT_BUFF_END = 0xFFFFFFFF /* Force this enum 32bit */ |
| } SYSPROFILER_SNAPSHOT_BUFF_ID_ENUM ; |
| |
| /* if this structure change, should also modify tool */ |
| typedef struct SysProifler_Snapshot_Core_t |
| { |
| kal_uint32 seg1_src_addr; |
| kal_uint32 seg1_dst_addr; |
| kal_uint32 seg1_size; |
| kal_uint32 seg1_gdma_result; |
| kal_uint32 seg2_src_addr; |
| kal_uint32 seg2_dst_addr; |
| kal_uint32 seg2_size; |
| kal_uint32 seg2_gdma_result; |
| kal_uint32 lisr_used; |
| kal_uint32 lisr_in_time; |
| kal_uint32 lisr_out_time; |
| SysProfiler_LoggingHeader header; |
| SYSPROFILER_ERROR_CODE err_code; |
| SYSPROFILER_SNAPSHOT_CORE_STATUS_TYPE status; |
| SYSPRO_MODE mode; |
| |
| } SysProfiler_Snapshot_Core; |
| |
| /* if this structure change, should also modify tool */ |
| typedef struct SysProfiler_Snapshot_Info_t |
| { |
| kal_uint32 has_snapshot; |
| kal_uint32 trigger_time_us; |
| kal_uint32 trigger_time_tick; |
| kal_uint32 trigger_vpe; |
| kal_uint32 caller; |
| SysProfiler_Snapshot_Core core[MAX_SYSPRO_NUMBER]; |
| }SysProfiler_Snapshot_Info; |
| |
| #endif |
| |
| typedef enum |
| { |
| SYSPRO_MIN_BUFF_SIZE, |
| SYSPRO_MAX_BUFF_SIZE, |
| SYSPRO_CUSTOM_BUFF_SIZE, |
| }SYSPROFILER_ADJUST_BUFF_TYPE; |
| |
| #define IS_SWLA_MODE(MODE) ( MODE == SYSPRO_SW_SWLA_MODE ) |
| #define IS_SWTR_MODE(MODE) ( MODE == SYSPRO_SW_SWTR_MODE ) |
| |
| void SysProfiler_Init(void); |
| kal_uint32 SysProfiler_Start(void); |
| kal_uint32 SysProfiler_StartCoreProfilerByMode( SYSPRO_MODE mode, kal_uint32 samplingRate); |
| kal_uint32 SysProfiler_StartPlatformProfilerByMode( SYSPRO_MODE mode, kal_uint32 sysSamplingRate, kal_uint32 infraSamplingRate); |
| kal_uint32 SysProfiler_Stop(void); |
| kal_uint32 SysProfiler_StopCoreProfiler(void); |
| kal_uint32 SysProfiler_StopPlatformProfiler(void); |
| void SysProfiler_ASMStop(void); |
| SYSPROFILER_ERROR_CODE SysProfiler_SetMode(SYSPRO_MODE mode); |
| SYSPROFILER_ERROR_CODE SysProfiler_SetSampleRate(kal_uint32 sampleRate); |
| kal_uint32 SysProfiler_RetriveHeader( kal_uint8** headerStartAddress, kal_uint32* headerSize, kal_uint8 coreID); |
| kal_uint32 SysProfiler_RetriveLoggingBuffer(kal_uint32 **info, kal_uint16 *count, kal_uint8* region_config, kal_uint8 coreID); |
| kal_bool SysProfiler_CheckRAMAvailability(kal_uint32 idx, kal_uint8 coreID); |
| SYSPROFILER_ERROR_CODE SysProfiler_RegisterAddon( SYSPROFILER_ADDON_TYPE addonType, kal_uint32 addonSize, kal_char addonName[], void (*SYSPRO_AddonInfoInitFunc)(void), void *SA_AddonInfoLoggingFunc, kal_bool SA_SwapOutLogging, SYSPROFILER_ADDON_PROFILER_TYPE profilerType, SYSPRO_MCU_CORE coreID); |
| kal_bool SysProfiler_QueryCoreProfilerModeAndRunningStatus( SYSPRO_MODE* returnMode, kal_bool* returnRunningStatus); |
| kal_bool SysProfiler_QueryPlatformProfilerModeAndRunningStatus( SYSPRO_MODE* returnMode, kal_bool* returnRunningStatus); |
| kal_bool SysProfiler_QueryAddonExist(char *addonPrefix, SYSPRO_MODE mode, kal_uint32 coreID); |
| kal_bool SysProfiler_QueryHeaderScratchpad(kal_uint8 coreID, kal_uint8** addr, kal_uint32* size, kal_uint32* header_offset); |
| |
| #if defined(__SWLA_MIPS_PMU_EXIST__) |
| SYSPROFILER_ERROR_CODE SysProfiler_PassPMCParameterFromDHL(SysProfiler_DHLPMCParameter* DHLParameter); |
| #if defined(__MD95__) |
| kal_bool SysProfiler_PassPMCParameterFromMDDBG(SysProfiler_PMCSettingParameter PMCParameter[], ilm_struct ilm); |
| #elif defined(__MD97__) || defined(__MD97P__) |
| kal_bool SysProfiler_PassPMCParameterFromMDDBG(SysProfiler_PMCSettingParameter PMCParameter, ilm_struct ilm); |
| #else |
| #error "Unsupported chip" |
| #endif |
| #endif |
| SYSPROFILER_ERROR_CODE SysProfiler_PassPMCParameterByATCMD(kal_uint8* data_str); |
| SYSPROFILER_ERROR_CODE SysProfiler_TurnOnELMAddon(kal_uint32 coreID); |
| SYSPROFILER_ERROR_CODE SysProfiler_TurnOnEBMAddon(kal_uint32 coreID); |
| #if defined(__MD95__) |
| SYSPROFILER_ERROR_CODE SysProfiler_TurnOnCM2Addon(kal_uint32 coreID, kal_uint32 counter); |
| SYSPROFILER_ERROR_CODE SysProfiler_TurnOnICM2Addon(kal_uint32 coreID, kal_uint32 counter); |
| #elif defined(__MD97__) || defined(__MD97P__) |
| SYSPROFILER_ERROR_CODE SysProfiler_ConfigCM2fromATCMD(kal_uint32 coreID, kal_uint8* data_str, SysProfiler_CM2SettingParameter* config); |
| SYSPROFILER_ERROR_CODE SysProfiler_TurnOnCM2Addon(kal_uint32 coreID, SysProfiler_CM2SettingParameter *config); |
| #else |
| #error "Unsupported chip" |
| #endif |
| void SysProfiler_Adjust_buffer(SYSPROFILER_ADJUST_BUFF_TYPE type, kal_uint32 buffersize); |
| SYSPROFILER_ERROR_CODE SysProfiler_TriggerInitAddonByATCMD(kal_uint8 *data_str); |
| kal_bool SysProfiler_RegisterDefaultAddonFromMDDBG(void); |
| #if defined(__SWLA_SNAPSHOT_FEATURE__) |
| SYSPROFILER_ERROR_CODE SysProfiler_BufferSnapshot(SYSPROFILER_SNAPSHOT_BUFF_ID_ENUM* buffer_id); |
| #endif |
| |
| #endif |