Skip to content

Commit d99e833

Browse files
Program L3 error detection behavior.
Change-Id: Ifeccb707376f5b267de58ffd6ad009cf000c5047
1 parent 4ac2c07 commit d99e833

File tree

6 files changed

+52
-38
lines changed

6 files changed

+52
-38
lines changed

runtime/gen10/reg_configs.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2017-2018 Intel Corporation
2+
* Copyright (C) 2017-2019 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -13,8 +13,8 @@ namespace OCLRT {
1313
struct CNLFamily;
1414
template <>
1515
struct L3CNTLREGConfig<IGFX_CANNONLAKE> {
16-
static const uint32_t valueForSLM = 0xA0000121u;
17-
static const uint32_t valueForNoSLM = 0xc0000140u;
16+
static const uint32_t valueForSLM = 0xA0000321u;
17+
static const uint32_t valueForNoSLM = 0xc0000340u;
1818
};
1919

2020
template <>

runtime/gen8/reg_configs.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2017-2018 Intel Corporation
2+
* Copyright (C) 2017-2019 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -13,8 +13,8 @@ namespace OCLRT {
1313
struct BDWFamily;
1414
template <>
1515
struct L3CNTLREGConfig<IGFX_BROADWELL> {
16-
static const uint32_t valueForSLM = 0x60000121u;
17-
static const uint32_t valueForNoSLM = 0x80000140u;
16+
static const uint32_t valueForSLM = 0x60000321u;
17+
static const uint32_t valueForNoSLM = 0x80000340u;
1818
};
1919

2020
template <>

runtime/gen9/reg_configs.h

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,8 @@
11
/*
2-
* Copyright (c) 2017, Intel Corporation
2+
* Copyright (C) 2018-2019 Intel Corporation
33
*
4-
* Permission is hereby granted, free of charge, to any person obtaining a
5-
* copy of this software and associated documentation files (the "Software"),
6-
* to deal in the Software without restriction, including without limitation
7-
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8-
* and/or sell copies of the Software, and to permit persons to whom the
9-
* Software is furnished to do so, subject to the following conditions:
4+
* SPDX-License-Identifier: MIT
105
*
11-
* The above copyright notice and this permission notice shall be included
12-
* in all copies or substantial portions of the Software.
13-
*
14-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15-
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17-
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
18-
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19-
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20-
* OTHER DEALINGS IN THE SOFTWARE.
216
*/
227

238
#pragma once
@@ -28,8 +13,8 @@ namespace OCLRT {
2813
struct SKLFamily;
2914
template <>
3015
struct L3CNTLREGConfig<IGFX_SKYLAKE> {
31-
static const uint32_t valueForSLM = 0x60000121u;
32-
static const uint32_t valueForNoSLM = 0x80000140u;
16+
static const uint32_t valueForSLM = 0x60000321u;
17+
static const uint32_t valueForNoSLM = 0x80000340u;
3318
};
3419

3520
template <>
@@ -39,8 +24,8 @@ struct L3CNTLRegisterOffset<SKLFamily> {
3924

4025
template <>
4126
struct L3CNTLREGConfig<IGFX_BROXTON> {
42-
static const uint32_t valueForSLM = 0x60000121u;
43-
static const uint32_t valueForNoSLM = 0x80000140u;
27+
static const uint32_t valueForSLM = 0x60000321u;
28+
static const uint32_t valueForNoSLM = 0x80000340u;
4429
};
4530

4631
namespace DebugControlReg2 {

unit_tests/gen10/test_preamble_gen10.cpp

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2017-2018 Intel Corporation
2+
* Copyright (C) 2017-2019 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -112,8 +112,8 @@ CNLTEST_F(Gen10PreambleVfeState, WaOn) {
112112

113113
TEST(L3CNTLREGConfig, checkValidValues) {
114114

115-
uint32_t validCNLNoSLMConfigs[] = {0x80000180, 0x00418180, 0x00420160, 0x00030140, 0xc0000140, 0x00428140};
116-
uint32_t validCNLSLMConfigs[] = {0, 0xa0000121, 0x01008121, 0xc0000101};
115+
uint32_t validCNLNoSLMConfigs[] = {0x80000180, 0x00418180, 0x00420160, 0x00030140, 0xc0000340, 0x00428140};
116+
uint32_t validCNLSLMConfigs[] = {0, 0xa0000321, 0x01008121, 0xc0000101};
117117

118118
bool noSLMConfigValid = false;
119119
bool SLMConfigValid = false;
@@ -136,6 +136,19 @@ TEST(L3CNTLREGConfig, checkValidValues) {
136136
EXPECT_TRUE(noSLMConfigValid);
137137
}
138138

139+
typedef PreambleFixture L3ErrorDetectionBit;
140+
GEN10TEST_F(L3ErrorDetectionBit, GivenGen10WhenProgrammingL3ThenErrorDetectionBehaviorControlBitSet) {
141+
uint32_t l3Config = 0;
142+
143+
l3Config = getL3ConfigHelper<IGFX_CANNONLAKE>(true);
144+
145+
uint32_t errorDetectionBehaviorControlBit = 1 << 9;
146+
EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0);
147+
148+
l3Config = getL3ConfigHelper<IGFX_CANNONLAKE>(false);
149+
EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0);
150+
}
151+
139152
typedef PreambleFixture PreemptionWatermarkGen10;
140153
GEN10TEST_F(PreemptionWatermarkGen10, givenPreambleThenPreambleWorkAroundsIsNotProgrammed) {
141154
typedef CNLFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;

unit_tests/gen8/test_preamble_gen8.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2018 Intel Corporation
2+
* Copyright (C) 2018-2019 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -40,15 +40,21 @@ BDWTEST_F(Gen8L3Config, checkNoSLM) {
4040
uint32_t l3Config = 0;
4141

4242
l3Config = getL3ConfigHelper<IGFX_BROADWELL>(slmUsed);
43-
EXPECT_EQ(0x80000140u, l3Config);
43+
EXPECT_EQ(0x80000340u, l3Config);
44+
45+
uint32_t errorDetectionBehaviorControlBit = 1 << 9;
46+
EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0);
4447
}
4548

4649
BDWTEST_F(Gen8L3Config, checkSLM) {
4750
bool slmUsed = true;
4851
uint32_t l3Config = 0;
4952

5053
l3Config = getL3ConfigHelper<IGFX_BROADWELL>(slmUsed);
51-
EXPECT_EQ(0x60000121u, l3Config);
54+
EXPECT_EQ(0x60000321u, l3Config);
55+
56+
uint32_t errorDetectionBehaviorControlBit = 1 << 9;
57+
EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0);
5258
}
5359

5460
typedef PreambleFixture ThreadArbitrationGen8;

unit_tests/gen9/skl/test_preamble_skl.cpp

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2018 Intel Corporation
2+
* Copyright (C) 2018-2019 Intel Corporation
33
*
44
* SPDX-License-Identifier: MIT
55
*
@@ -42,21 +42,31 @@ SKLTEST_F(Gen9L3Config, checkNoSLM) {
4242
uint32_t l3Config = 0;
4343

4444
l3Config = getL3ConfigHelper<IGFX_SKYLAKE>(slmUsed);
45-
EXPECT_EQ(0x80000140u, l3Config);
45+
EXPECT_EQ(0x80000340u, l3Config);
46+
47+
uint32_t errorDetectionBehaviorControlBit = 1 << 9;
48+
EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0);
4649

4750
l3Config = getL3ConfigHelper<IGFX_BROXTON>(slmUsed);
48-
EXPECT_EQ(0x80000140u, l3Config);
51+
EXPECT_EQ(0x80000340u, l3Config);
52+
53+
EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0);
4954
}
5055

5156
SKLTEST_F(Gen9L3Config, checkSLM) {
5257
bool slmUsed = true;
5358
uint32_t l3Config = 0;
5459

5560
l3Config = getL3ConfigHelper<IGFX_SKYLAKE>(slmUsed);
56-
EXPECT_EQ(0x60000121u, l3Config);
61+
EXPECT_EQ(0x60000321u, l3Config);
62+
63+
uint32_t errorDetectionBehaviorControlBit = 1 << 9;
64+
EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0);
5765

5866
l3Config = getL3ConfigHelper<IGFX_BROXTON>(slmUsed);
59-
EXPECT_EQ(0x60000121u, l3Config);
67+
EXPECT_EQ(0x60000321u, l3Config);
68+
69+
EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0);
6070
}
6171

6272
typedef PreambleFixture ThreadArbitration;

0 commit comments

Comments
 (0)