Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
build*/

subprojects/*
!subprojects/*.wrap
subprojects/stdexec.wrap
7 changes: 6 additions & 1 deletion config/amd_ras_gpio_config0.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"GPIO_ALERT_LINES": ["P0_I3C_APML_ALERT_L", "P1_I3C_APML_ALERT_L", "P2_I3C_APML_ALERT_L", "P3_I3C_APML_ALERT_L"]
"GPIO_ALERT_LINES": [
"P0_I3C_APML_ALERT_L",
"P1_I3C_APML_ALERT_L",
"P2_I3C_APML_ALERT_L",
"P3_I3C_APML_ALERT_L"
]
}
20 changes: 4 additions & 16 deletions config/platform_default.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
{
"CpuCount": 1,
"Model": "0x50",
"FamilyID": "0x1A",
"DebugLogID": [
1,
2,
3,
23,
24,
25,
33,
36,
37,
38,
40
]
"CpuCount": 1,
"Model": "0x50",
"FamilyID": "0x1A",
"DebugLogID": [1, 2, 3, 23, 24, 25, 33, 36, 37, 38, 40]
}
34 changes: 24 additions & 10 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ project(
default_options: ['warning_level=3', 'werror=true', 'cpp_std=c++23'],
license: 'Apache-2.0',
version: '1.0',
meson_version: '>=1.1.1',
)

config_file = get_option('config_file')
Expand All @@ -25,7 +26,6 @@ cpp_args = [

libdir = meson.current_source_dir() + './lib/'
cpp = meson.get_compiler('cpp')
apml_dep = cpp.find_library('apml64', dirs: libdir)

boost_args = [
'-DBOOST_ALL_NO_LIB',
Expand All @@ -48,18 +48,20 @@ deps = [

apml = get_option('apml-interface')
if apml
apml_dep = cpp.find_library('apml64', dirs: libdir)
add_project_arguments('-DAPML', language: 'cpp')

apml_nda = get_option('apml-nda')
if apml_nda
add_project_arguments('-DAPML_NDA', language: 'cpp')
endif
endif

pldm = get_option('pldm-interface')
if pldm
add_project_arguments('-DPLDM', language: 'cpp')
endif

apml_nda = get_option('apml-nda')
if apml_nda
add_project_arguments('-DAPML_NDA', language: 'cpp')
endif

sources = [
'src/config_manager.cpp',
Expand Down Expand Up @@ -92,16 +94,28 @@ install_data(
[
join_paths(meson.current_source_dir(), 'config', 'ras_config.json'),
join_paths(meson.current_source_dir(), 'config', 'platform_default.json'),
join_paths(meson.current_source_dir(), 'config', 'amd_ras_gpio_config0.json'),
join_paths(meson.current_source_dir(), 'config', 'amd_ras_gpio_config1.json'),
join_paths(meson.current_source_dir(), 'config', 'amd_ras_gpio_config2.json'),
join_paths(
meson.current_source_dir(),
'config',
'amd_ras_gpio_config0.json',
),
join_paths(
meson.current_source_dir(),
'config',
'amd_ras_gpio_config1.json',
),
join_paths(
meson.current_source_dir(),
'config',
'amd_ras_gpio_config2.json',
),
],
install_dir: ras_config_dir
install_dir: ras_config_dir,
)

systemd = dependency('systemd')

install_data(
['service_files/com.amd.RAS@.service'],
install_dir: systemd.get_pkgconfig_variable('systemdsystemunitdir'),
install_dir: systemd.get_variable('systemd_system_unit_dir'),
)
File renamed without changes.
8 changes: 4 additions & 4 deletions src/config_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ void Manager::updateConfigToDbus()
{
lg2::error("Failed to create directory: {DIR}, ec={EC}", "DIR",
destDir.string(), "EC", ec.message());
throw std::runtime_error("Failed to create directory: " +
destDir.string() + " (" +
ec.message() + ")");
throw std::runtime_error(
"Failed to create directory: " + destDir.string() + " (" +
ec.message() + ")");
}
}

Expand Down Expand Up @@ -214,7 +214,7 @@ void Manager::updateConfigToDbus()
for (const auto& item : data["Configuration"])
{
AttributeType attributeType = sdbusplus::common::com::amd::ras::
Configuration::AttributeType::Boolean;
Configuration::AttributeType::Boolean;
std::string key;
std::string description;
std::variant<bool, std::string, int64_t, std::vector<std::string>,
Expand Down
8 changes: 4 additions & 4 deletions src/utils/cper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -762,10 +762,10 @@ void createFile(const std::shared_ptr<PtrType>& data,
std::string rasErrMsg = "Generated runtime CPER file : ";
rasErrMsg.append(cperFilePath);

sd_journal_send(
"MESSAGE=%s", rasErrMsg.c_str(), "PRIORITY=%i", LOG_ERR,
"REDFISH_MESSAGE_ID=%s", "OpenBMC.0.1.AtScaleDebugConnected",
"REDFISH_MESSAGE_ARGS=%s", rasErrMsg.c_str(), NULL);
sd_journal_send("MESSAGE=%s", rasErrMsg.c_str(), "PRIORITY=%i",
LOG_ERR, "REDFISH_MESSAGE_ID=%s",
"OpenBMC.0.1.AtScaleDebugConnected",
"REDFISH_MESSAGE_ARGS=%s", rasErrMsg.c_str(), NULL);
}
}
fclose(file);
Expand Down
12 changes: 12 additions & 0 deletions subprojects/libgpiod.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[wrap-file]
directory = libgpiod-1.6.3
source_url = https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git/snapshot/libgpiod-1.6.3.tar.gz
source_filename = libgpiod-1.6.3.tar.gz
source_hash = eb446070be1444fd7d32d32bbca53c2f3bbb0a21193db86198cf6050b7a28441
patch_filename = libgpiod_1.6.3-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/libgpiod_1.6.3-1/get_patch
patch_hash = 76821c637073679a88f77593c6f7ce65b4b5abf8c998f823fffa13918c8761df

[provide]
libgpiod = gpiod_dep
libgpiodcxx = gpiodcxx_dep
6 changes: 6 additions & 0 deletions subprojects/nlohmann_json.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[wrap-git]
revision = HEAD
url = https://github.com/nlohmann/json.git

[provide]
nlohmann_json = nlohmann_json_dep
7 changes: 7 additions & 0 deletions subprojects/phosphor-dbus-interfaces.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

[wrap-git]
url = https://github.com/openbmc/phosphor-dbus-interfaces.git
revision = HEAD

[provide]
phosphor-dbus-interfaces = phosphor_dbus_interfaces_dep
6 changes: 6 additions & 0 deletions subprojects/phosphor-logging.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[wrap-git]
url = https://github.com/openbmc/phosphor-logging.git
revision = HEAD

[provide]
phosphor-logging = phosphor_logging_dep
7 changes: 7 additions & 0 deletions subprojects/sdbusplus.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[wrap-git]
url = https://github.com/openbmc/sdbusplus.git
revision = HEAD

[provide]
sdbusplus = sdbusplus_dep
program_names = sdbus++, sdbus++-gen-meson