The legacy .conf file format is not better on side of readability.
So that change the configuration file format to json style to improve
readability.
Change-Id: I378d14bfae6f0ae3bbb58362e2eda0212cef6b11
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${pkgs_LDFLAGS} -ldl)
SET(CONF_FILES
- ${CMAKE_CURRENT_SOURCE_DIR}/scripts/pass.conf
- ${CMAKE_CURRENT_SOURCE_DIR}/scripts/pass-cpu0.conf
- ${CMAKE_CURRENT_SOURCE_DIR}/scripts/pass-memory.conf)
+ ${CMAKE_CURRENT_SOURCE_DIR}/scripts/pass.json
+ ${CMAKE_CURRENT_SOURCE_DIR}/scripts/pass-cpu0.json
+ ${CMAKE_CURRENT_SOURCE_DIR}/scripts/pass-memory.json)
INSTALL(FILES ${CONF_FILES} DESTINATION /hal/etc/pass)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/scripts/pass-hal.conf DESTINATION /hal/lib/tmpfiles.d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION ${HAL_LICENSEDIR}/${PROJECT_NAME})
%{_hal_licensedir}/%{name}/LICENSE
%{_hal_libdir}/*.so
/hal/lib/tmpfiles.d/pass-hal.conf
-%config %{_hal_sysconfdir}/pass/pass.conf
-%config %{_hal_sysconfdir}/pass/pass-cpu0.conf
-%config %{_hal_sysconfdir}/pass/pass-memory.conf
+%config %{_hal_sysconfdir}/pass/pass.json
+%config %{_hal_sysconfdir}/pass/pass-cpu0.json
+%config %{_hal_sysconfdir}/pass/pass-memory.json
+++ /dev/null
-[Pass]
-pass_support=1
-pass_gov_type=1
-
-pass_num_scenario_levels=3
-pass_init_scenario_level=0
-
-####################################################
-### Scenario Level for PMQoS and Thermal Monitor ###
-####################################################
-[ScenarioLevel0]
-limit_min_freq=600000
-limit_max_freq=1500000
-
-[ScenarioLevel1]
-limit_min_freq=1500000
-limit_max_freq=1500000
-
-[ScenarioLevel2]
-limit_min_freq=600000
-limit_max_freq=600000
-
-#########################
-### Scenario of PMQoS ###
-#########################
-[PassScenario]
-pass_scenario_support=yes
-pass_num_scenarios=3
-
-[Scenario0]
-name=AppLaunch
-support=yes
-scenario_level=1
-
-[Scenario1]
-name=UltraPowerSaving
-support=yes
-scenario_level=2
-
-[Scenario2]
-name=Performance
-support=yes
-scenario_level=1
-
-########################
-### Thermal Monitor ###
-########################
-
-# Following action name are defiend on Tizen platform.
-# The 'temperature' of thermal.scenario must be defined in descending order.
-# If you change the following name, doesn't guarantee the compatibility.
-# - Release, Warning, LimitAction, Shutdown
-
-[thermal]
-thermal_support=yes
-thermal_number_of_scenario=4
-thermal_timer_interval_ms=5000
-
-[thermal.scenario0]
-support=yes
-name=Release
-temperature=73
-timer_interval_ms=5000
-scenario_level=0
-
-[thermal.scenario1]
-support=yes
-name=Warning
-temperature=77
-timer_interval_ms=3000
-
-[thermal.scenario2]
-support=yes
-name=LimitAction
-temperature=80
-timer_interval_ms=1000
-scenario_level=2
-
-[thermal.scenario3]
-support=yes
-name=Shutdown
-temperature=85
-timer_interval_ms=1000
-scenario_level=2
--- /dev/null
+{
+ "support" : true,
+ "init_level" : 0,
+ "level_list" :
+ [
+ {
+ "level" : 0,
+ "dvfs,minimum_frequency_khz" : 600000,
+ "dvfs,maximum_frequency_khz" : 1500000
+ }, {
+ "level" : 1,
+ "dvfs,minimum_frequency_khz" : 1500000,
+ "dvfs,maximum_frequency_khz" : 1500000
+ }, {
+ "level" : 2,
+ "dvfs,minimum_frequency_khz" : 600000,
+ "dvfs,maximum_frequency_khz" : 600000
+ }
+ ],
+
+ "pmqos_support" : true,
+ "pmqos_scenario_list":
+ [
+ {
+ "name" : "AppLaunch",
+ "target_level" : 1
+ }, {
+ "name" : "UltraPowerSaving",
+ "target_level" : 2
+ }, {
+ "name" : "Performance",
+ "target_level" : 1
+ }
+ ],
+
+ "thermal_support" : true,
+ "thermal_timer_interval_ms" : 5000,
+ "thermal_scenario_list":
+ [
+ {
+ "name" : "Release",
+ "temperature" : 73,
+ "timer_interval_ms" : 5000,
+ "target_level" : 0
+ }, {
+ "name" : "Warning",
+ "temperature" : 77,
+ "timer_interval_ms" : 3000,
+ "target_level" : 0
+ }, {
+ "name" : "LimitAction",
+ "temperature" : 80,
+ "timer_interval_ms" : 1000,
+ "target_level" : 2
+ }, {
+ "name" : "Shutdown",
+ "temperature" : 85,
+ "timer_interval_ms" : 1000,
+ "target_level" : 2
+ }
+ ],
+
+ "cpuhp_support" : false
+}
+++ /dev/null
-[Pass]
-pass_support=1
-pass_gov_type=0
-
-pass_num_scenario_levels=2
-pass_init_scenario_level=0
-
-####################################################
-### Scenario Level for PMQoS and Thermal Monitor ###
-####################################################
-[ScenarioLevel0]
-fault_around_bytes=4096
-
-[ScenarioLevel1]
-fault_around_bytes=65536
-
-#########################
-### Scenario of PMQoS ###
-#########################
-[PassScenario]
-pass_scenario_support=yes
-pass_num_scenarios=2
-
-[Scenario0]
-name=AppLaunch
-support=yes
-scenario_level=0
-
-[Scenario1]
-name=UltraPowerSaving
-support=yes
-scenario_level=0
-
-[Scenario1]
-name=Performance
-support=yes
-scenario_level=1
--- /dev/null
+{
+ "support" : true,
+ "init_level" : 0,
+ "level_list" :
+ [
+ {
+ "level" : 0,
+ "memory,fault_around_bytes" : 4096
+ }, {
+ "level" : 1,
+ "memory,fault_around_bytes" : 65536
+ }
+ ],
+
+ "pmqos_support" : true,
+ "pmqos_scenario_list" :
+ [
+ {
+ "name" : "AppLaunch",
+ "target_level" : 0
+ }, {
+ "name" : "UltraPowerSaving",
+ "target_level" : 0
+ }, {
+ "name" : "Performance",
+ "target_level" : 1
+ }
+ ],
+
+ "thermal_support" : false,
+
+ "cpuhp_support" : false
+}
+++ /dev/null
-# Default pass.conf
-# - If you want to use PASS(Power Aware System Service), you have to create
-# new 'pass-[target type].conf' configuration file.
-[PassResource]
-pass_compatible=raspberrypi,4-model-b
-pass_path_compatible=/proc/device-tree/compatible
-pass_num_resources=2
-
-[PassResource0]
-pass_res_type=cpu
-pass_res_name=cpu0
-pass_res_thermal_name=thermal_zone0
-pass_path_conf_file=/hal/etc/pass/pass-cpu0.conf
-pass_first_cpu=0
-pass_num_cpus=4
-
-[PassResource1]
-pass_res_type=memory
-pass_res_name=memory
-pass_path_conf_file=/hal/etc/pass/pass-memory.conf
--- /dev/null
+{
+ "board_name" : "raspberrypi,4-model-b",
+ "board_name_path" : "/proc/device-tree/compatible",
+ "device_list" :
+ [
+ {
+ "device_type" : "cpu",
+ "device_name" : "cpu0",
+ "device_config_path" : "/hal/etc/pass/pass-cpu0.json",
+ "thermal_device_name" : "thermal_zone0",
+ "cpu,number_of_cpus" : 4,
+ "cpu,first_cpu" : 0,
+ "cpu,cpu_load_path" : null
+ }, {
+ "device_type" : "memory",
+ "device_name" : "memory",
+ "device_config_path" : "/hal/etc/pass/pass-memory.json"
+ }
+ ]
+}