Skip to content

Commit c80b057

Browse files
Changes for 11364 release for Chrome
1 parent d2c8f54 commit c80b057

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+269
-165
lines changed

Common/Ver.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020

2121
#define VER_MAJOR 1
2222
#define VER_MINOR 0
23-
#define VER_HOTFIX 11363
24-
#define VER_BUILD 34997
23+
#define VER_HOTFIX 11364
24+
#define VER_BUILD 43042

Common/ipf_sdk_version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include <stdlib.h>
2525

2626
// Current IPF SDK Version: Major.Minor.Revision where same Major.Minor compatible with other Revisions, but not newer Major.Minor
27-
#define IPF_SDK_VERSION "1.0.11363"
27+
#define IPF_SDK_VERSION "1.0.11364"
2828

2929
typedef u64 ipfsdk_version_t; // IPF SDK Encoded Version Number
3030

DPTF/Linux/CMakeLists.txt

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
project(DPTF)
2-
2+
cmake_minimum_required(VERSION 3.9)
33
cmake_minimum_required(VERSION 2.8.6)
44

55
message ("CXX Flags (initial) : " ${CMAKE_CXX_FLAGS})
66
message ("C Flags (initial) : " ${CMAKE_C_FLAGS})
77

88
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
9-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++14 -Wall -Werror -Wno-unused-value -Wno-unused-variable -Wno-unqualified-std-cast-call -Wno-missing-braces -fPIC -Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -DDPTF_REMOVE_UNIT_TESTS -fvisibility=hidden")
10-
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wno-unused-value -Wno-unused-variable -Wno-missing-braces -fPIC -Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -DDPTF_REMOVE_UNIT_TESTS -fvisibility=hidden")
9+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17 -Wall -Werror -Wno-unused-value -Wno-unused-variable -Wno-unqualified-std-cast-call -Wno-missing-braces -fPIC -Wformat -Wformat-security -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -DDPTF_REMOVE_UNIT_TESTS -fvisibility=hidden -Wl,--no-undefined ")
10+
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wno-unused-value -Wno-unused-variable -Wno-missing-braces -fPIC -Wformat -Wformat-security -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -DDPTF_REMOVE_UNIT_TESTS -fvisibility=hidden")
1111

1212
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9.0")
1313
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector")
@@ -41,6 +41,12 @@ if (CHROMIUM_BUILD MATCHES YES)
4141
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/x64)
4242
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/x64)
4343
endif()
44+
# Add below WA for Chrome builds with latest CROS SDK
45+
set(CMAKE_THREAD_LIBS_INIT "-lpthread")
46+
set(CMAKE_HAVE_THREADS_LIBRARY 1)
47+
set(CMAKE_USE_WIN32_THREADS_INIT 0)
48+
set(CMAKE_USE_PTHREADS_INIT 1)
49+
set(THREADS_PREFER_PTHREAD_FLAG ON)
4450

4551
else()
4652
message("Building for Linux...")

DPTF/Sources/DptfVer.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
#define VER_MAJOR 9
2222
#define VER_MINOR 0
23-
#define VER_HOTFIX 11363
24-
#define VER_BUILD 34997
23+
#define VER_HOTFIX 11364
24+
#define VER_BUILD 43042
2525

2626
#define ARG_TOSTR(arg) #arg
2727
#define VER_TOSTR(arg) ARG_TOSTR(arg)

DPTF/Sources/Manager/DataManager.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ void DataManager::setTableObject(
129129
if (tableData.notEmpty())
130130
{
131131
m_dptfManager->getEsifServices()->writeConfigurationBinary(
132-
tableData.get(), tableData.size(), tableData.size(), nameSpace, elementPath);
132+
tableData.get(), tableData.size(), tableData.size(), nameSpace, elementPath, ESIF_SERVICE_CONFIG_PERSIST);
133133
}
134134
else
135135
{
@@ -274,7 +274,7 @@ void DataManager::setTableObjectBasedOnAlternativeDataSourceAndKey(
274274
if (tableData.notEmpty())
275275
{
276276
m_dptfManager->getEsifServices()->writeConfigurationBinary(
277-
tableData.get(), tableData.size(), tableData.size(), nameSpace, elementPath);
277+
tableData.get(), tableData.size(), tableData.size(), nameSpace, elementPath, ESIF_SERVICE_CONFIG_PERSIST);
278278
}
279279
else
280280
{
@@ -301,7 +301,7 @@ void DataManager::setTableObjectForNoPersist(DptfBuffer tableData, TableObjectTy
301301
auto dvType = DataVaultType::Override;
302302

303303
m_dptfManager->getEsifServices()->writeConfigurationBinary(
304-
tableData.get(), tableData.size(), tableData.size(), DataVaultType::ToString(dvType), elementPath);
304+
tableData.get(), tableData.size(), tableData.size(), DataVaultType::ToString(dvType), elementPath, 0);
305305
sendTableChangedEvent(tableType, Constants::EmptyString, Constants::Esif::NoParticipant);
306306
}
307307

@@ -357,7 +357,7 @@ void DataManager::writeEmptyTable(string nameSpace, string elementPath)
357357
u8 dummyBuffer = 0;
358358

359359
m_dptfManager->getEsifServices()->writeConfigurationBinary(
360-
&dummyBuffer, sizeof(dummyBuffer), 0, nameSpace, elementPath);
360+
&dummyBuffer, sizeof(dummyBuffer), 0, nameSpace, elementPath, ESIF_SERVICE_CONFIG_PERSIST);
361361
}
362362

363363
void DataManager::sendTableChangedEvent(TableObjectType::Type tableObjectType, string uuid, UIntN participantIndex)

DPTF/Sources/Manager/Domain.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,14 @@ Domain::Domain(DptfManagerInterface* dptfManager)
7474

7575
Domain::~Domain(void)
7676
{
77-
destroyDomain();
77+
try
78+
{
79+
destroyDomain();
80+
}
81+
catch(...)
82+
{
83+
84+
}
7885
}
7986

8087
void Domain::createDomain(

DPTF/Sources/Manager/EsifServices.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@ UInt32 EsifServices::readConfigurationUInt32(const string& nameSpace, const stri
106106
return esifResult;
107107
}
108108

109-
void EsifServices::writeConfigurationUInt32(const string& elementPath, UInt32 elementValue)
109+
void EsifServices::writeConfigurationUInt32(const string& elementPath, UInt32 elementValue, UInt32 flags)
110110
{
111111
eEsifError rc = m_appServices->setConfigurationValue(
112112
m_esifHandle,
113113
(const esif_handle_t)(UInt64)m_dptfManager,
114114
EsifDataString("dptf"),
115115
EsifDataString(elementPath),
116116
EsifDataUInt32(elementValue),
117-
ESIF_SERVICE_CONFIG_PERSIST);
117+
flags);
118118

119119
if (rc != ESIF_OK)
120120
{
@@ -189,15 +189,16 @@ void EsifServices::writeConfigurationBinary(
189189
UInt32 bufferLength,
190190
UInt32 dataLength,
191191
const string& nameSpace,
192-
const string& key)
192+
const string& key,
193+
UInt32 flags)
193194
{
194195
eEsifError rc = m_appServices->setConfigurationValue(
195196
m_esifHandle,
196197
(const esif_handle_t)(UInt64)m_dptfManager,
197198
EsifDataString(nameSpace),
198199
EsifDataString(key),
199200
EsifDataContainer(ESIF_DATA_BINARY, bufferPtr, bufferLength, dataLength),
200-
ESIF_SERVICE_CONFIG_PERSIST);
201+
flags);
201202

202203
if (rc != ESIF_OK)
203204
{

DPTF/Sources/Manager/EsifServices.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,16 @@ class dptf_export EsifServices : public EsifServicesInterface
3636

3737
virtual UInt32 readConfigurationUInt32(const std::string& elementPath) override;
3838
virtual UInt32 readConfigurationUInt32(const std::string& nameSpace, const std::string& elementPath) override;
39-
virtual void writeConfigurationUInt32(const std::string& elementPath, UInt32 elementValue) override;
39+
virtual void writeConfigurationUInt32(const std::string& elementPath, UInt32 elementValue, UInt32 flags) override;
4040
virtual std::string readConfigurationString(const std::string& nameSpace, const std::string& elementPath) override;
4141
virtual DptfBuffer readConfigurationBinary(const std::string& nameSpace, const std::string& elementPath) override;
4242
virtual void writeConfigurationBinary(
4343
void* bufferPtr,
4444
UInt32 bufferLength,
4545
UInt32 dataLength,
4646
const std::string& nameSpace,
47-
const std::string& elementPath) override;
47+
const std::string& elementPath,
48+
UInt32 flags) override;
4849
virtual void deleteConfigurationBinary(
4950
const std::string& nameSpace,
5051
const std::string& elementPath) override;

DPTF/Sources/Manager/EsifServicesInterface.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,16 @@ class dptf_export EsifServicesInterface
4747

4848
virtual UInt32 readConfigurationUInt32(const std::string& elementPath) = 0;
4949
virtual UInt32 readConfigurationUInt32(const std::string& nameSpace, const std::string& elementPath) = 0;
50-
virtual void writeConfigurationUInt32(const std::string& elementPath, UInt32 elementValue) = 0;
50+
virtual void writeConfigurationUInt32(const std::string& elementPath, UInt32 elementValue, UInt32 flags) = 0;
5151
virtual std::string readConfigurationString(const std::string& nameSpace, const std::string& elementPath) = 0;
5252
virtual DptfBuffer readConfigurationBinary(const std::string& nameSpace, const std::string& elementPath) = 0;
5353
virtual void writeConfigurationBinary(
5454
void* bufferPtr,
5555
UInt32 bufferLength,
5656
UInt32 dataLength,
5757
const std::string& nameSpace,
58-
const std::string& elementPath) = 0;
58+
const std::string& elementPath,
59+
UInt32 flags) = 0;
5960
virtual void deleteConfigurationBinary(const std::string& nameSpace, const std::string& elementPath) = 0;
6061

6162
// Primitives

DPTF/Sources/Manager/Participant.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,14 @@ Participant::Participant(DptfManagerInterface* dptfManager)
4141

4242
Participant::~Participant(void)
4343
{
44-
destroyParticipant();
44+
try
45+
{
46+
destroyParticipant();
47+
}
48+
catch(...)
49+
{
50+
51+
}
4552
}
4653

4754
void Participant::createParticipant(

DPTF/Sources/Manager/ParticipantManager.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,14 @@ ParticipantManager::ParticipantManager(DptfManagerInterface* dptfManager)
3232

3333
ParticipantManager::~ParticipantManager(void)
3434
{
35-
destroyAllParticipants();
35+
try
36+
{
37+
destroyAllParticipants();
38+
}
39+
catch(...)
40+
{
41+
42+
}
3643
}
3744

3845
UIntN ParticipantManager::allocateNextParticipantIndex()

DPTF/Sources/Manager/PolicyManager.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,14 @@ PolicyManager::PolicyManager(DptfManagerInterface* dptfManager, const set<Guid>&
4242

4343
PolicyManager::~PolicyManager(void)
4444
{
45-
destroyAllPolicies();
45+
try
46+
{
47+
destroyAllPolicies();
48+
}
49+
catch(...)
50+
{
51+
52+
}
4653
}
4754

4855
void PolicyManager::createAllPolicies(const string& dptfPolicyDirectoryPath)

DPTF/Sources/Manager/PolicyServicesPlatformConfigurationData.cpp

+5-4
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ UInt32 PolicyServicesPlatformConfigurationData::readConfigurationUInt32(
4848
return value;
4949
}
5050

51-
void PolicyServicesPlatformConfigurationData::writeConfigurationUInt32(const std::string& key, UInt32 data)
51+
void PolicyServicesPlatformConfigurationData::writeConfigurationUInt32(const std::string& key, UInt32 data, UInt32 flags)
5252
{
5353
throwIfNotWorkItemThread();
54-
getEsifServices()->writeConfigurationUInt32(key, data);
54+
getEsifServices()->writeConfigurationUInt32(key, data, flags);
5555
}
5656

5757
std::string PolicyServicesPlatformConfigurationData::readConfigurationString(
@@ -76,10 +76,11 @@ void PolicyServicesPlatformConfigurationData::writeConfigurationBinary(
7676
UInt32 bufferLength,
7777
UInt32 dataLength,
7878
const std::string& nameSpace,
79-
const std::string& key)
79+
const std::string& key,
80+
UInt32 flags)
8081
{
8182
throwIfNotWorkItemThread();
82-
return getEsifServices()->writeConfigurationBinary(bufferPtr, bufferLength, dataLength, nameSpace, key);
83+
return getEsifServices()->writeConfigurationBinary(bufferPtr, bufferLength, dataLength, nameSpace, key, flags);
8384
}
8485

8586
void PolicyServicesPlatformConfigurationData::deleteConfigurationBinary(

DPTF/Sources/Manager/PolicyServicesPlatformConfigurationData.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,16 @@ class PolicyServicesPlatformConfigurationData final : public PolicyServices, pub
3232

3333
virtual UInt32 readConfigurationUInt32(const std::string& key) override final;
3434
virtual UInt32 readConfigurationUInt32(const std::string& nameSpace, const std::string& key) override final;
35-
virtual void writeConfigurationUInt32(const std::string& key, UInt32 data) override final;
35+
virtual void writeConfigurationUInt32(const std::string& key, UInt32 data, UInt32 flags) override final;
3636
virtual std::string readConfigurationString(const std::string& nameSpace, const std::string& key) override final;
3737
virtual DptfBuffer readConfigurationBinary(const std::string& nameSpace, const std::string& key) override final;
3838
virtual void writeConfigurationBinary(
3939
void* bufferPtr,
4040
UInt32 bufferLength,
4141
UInt32 dataLength,
4242
const std::string& nameSpace,
43-
const std::string& key) override final;
43+
const std::string& key,
44+
UInt32 flags) override final;
4445
virtual void deleteConfigurationBinary(const std::string& nameSpace, const std::string& elementPath) override final;
4546
virtual eEsifError sendCommand(UInt32 argc, const std::string& argv) override final;
4647

DPTF/Sources/SharedLib/BasicTypesLib/DptfExceptions.cpp

+3-7
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,13 @@
1818

1919
#include "DptfExceptions.h"
2020

21-
dptf_exception::dptf_exception(const std::string& description) throw()
22-
: std::logic_error(description.c_str())
21+
dptf_exception::dptf_exception(const std::string& description)
22+
: std::logic_error(description)
2323
, m_description(description)
2424
{
2525
}
2626

27-
dptf_exception::~dptf_exception() throw()
28-
{
29-
}
30-
31-
const char* dptf_exception::what() const throw()
27+
const char* dptf_exception::what() const noexcept
3228
{
3329
return m_description.c_str();
3430
}

DPTF/Sources/SharedLib/BasicTypesLib/DptfExceptions.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@
2828
class dptf_exception : public std::logic_error
2929
{
3030
public:
31-
dptf_exception(const std::string& description) throw();
32-
virtual ~dptf_exception() throw();
33-
virtual const char* what() const throw();
31+
dptf_exception(const std::string& description);
32+
const char* what() const noexcept override;
3433
std::string getDescription() const;
3534

3635
protected:

DPTF/Sources/SharedLib/DptfObjectsLib/BinaryParse.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ UInt64 BinaryParse::extractBits(UInt16 startBit, UInt16 stopBit, UInt64 data)
2727
}
2828

2929
UInt64 bitCount = (startBit - stopBit) + 1;
30-
UInt64 mask = (1 << bitCount) - 1;
30+
UInt64 mask = ((UInt64)1 << bitCount) - 1;
3131

3232
return (data >> stopBit) & mask;
3333
}

DPTF/Sources/SharedLib/ParticipantControlsLib/PowerControlDynamicCapsSet.cpp

-3
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,6 @@ PowerControlDynamicCapsSet PowerControlDynamicCapsSet::createFromPpcc(const Dptf
112112

113113
UIntN PowerControlDynamicCapsSet::getPpccDataRows(const DptfBuffer& buffer)
114114
{
115-
UInt8* data = reinterpret_cast<UInt8*>(buffer.get());
116-
data += sizeof(esif_data_variant); // Ignore revision field
117-
118115
if (buffer.size() == 0)
119116
{
120117
throw dptf_exception("Received empty PPCC buffer.");

DPTF/Sources/SharedLib/PlatformConfigurationDataInterface.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@ class PlatformConfigurationDataInterface
2828

2929
virtual UInt32 readConfigurationUInt32(const std::string& key) = 0;
3030
virtual UInt32 readConfigurationUInt32(const std::string& nameSpace, const std::string& key) = 0;
31-
virtual void writeConfigurationUInt32(const std::string& key, UInt32 data) = 0;
31+
virtual void writeConfigurationUInt32(const std::string& key, UInt32 data, UInt32 flags) = 0;
3232
virtual std::string readConfigurationString(const std::string& nameSpace, const std::string& key) = 0;
3333
virtual DptfBuffer readConfigurationBinary(const std::string& nameSpace, const std::string& key) = 0;
3434
virtual void writeConfigurationBinary(
3535
void* bufferPtr,
3636
UInt32 bufferLength,
3737
UInt32 dataLength,
3838
const std::string&,
39-
const std::string&) = 0;
39+
const std::string&,
40+
UInt32 flags) = 0;
4041
virtual void deleteConfigurationBinary(const std::string& nameSpace, const std::string& elementPath) = 0;
4142
virtual eEsifError sendCommand(UInt32 argc, const std::string& argv) = 0;
4243

DPTF/Sources/UnifiedParticipant/DomainActiveControl_001.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@ DomainActiveControl_001::DomainActiveControl_001(
3434

3535
DomainActiveControl_001::~DomainActiveControl_001(void)
3636
{
37-
restore();
37+
try
38+
{
39+
restore();
40+
}
41+
catch(const std::exception& e)
42+
{
43+
44+
}
3845
}
3946

4047
DptfBuffer DomainActiveControl_001::getActiveControlStaticCaps(UIntN participantIndex, UIntN domainIndex)

DPTF/Sources/UnifiedParticipant/DomainCoreControl_001.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ DomainCoreControl_001::DomainCoreControl_001(
3131

3232
DomainCoreControl_001::~DomainCoreControl_001(void)
3333
{
34-
restore();
34+
try
35+
{
36+
restore();
37+
}
38+
catch(...)
39+
{
40+
41+
}
3542
}
3643

3744
CoreControlStaticCaps DomainCoreControl_001::getCoreControlStaticCaps(UIntN participantIndex, UIntN domainIndex)

DPTF/Sources/UnifiedParticipant/DomainDisplayControl_001.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,14 @@ DomainDisplayControl_001::DomainDisplayControl_001(
3535

3636
DomainDisplayControl_001::~DomainDisplayControl_001(void)
3737
{
38-
restore();
38+
try
39+
{
40+
restore();
41+
}
42+
catch(...)
43+
{
44+
45+
}
3946
}
4047

4148
DisplayControlDynamicCaps DomainDisplayControl_001::getDisplayControlDynamicCaps(

0 commit comments

Comments
 (0)