Skip to content

Commit

Permalink
Bump up security list table size datatype
Browse files Browse the repository at this point in the history
Change-Id: I29a6efe5cfd65393deec0d828cecb5052cf68d42
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60300
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: RAJA DAS <rajadas2@in.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
(cherry picked from commit 9f63d2dfe644009fc2389f566830802db2011e96)
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60288
Tested-by: Sachin Gupta <sgupta2m@in.ibm.com>
  • Loading branch information
Shakeebbk authored and sgupta2m committed Jun 11, 2018
1 parent 0c4dc80 commit 7d1ec1f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/build/security/securityRegListGen.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# OpenPOWER sbe Project
#
# Contributors Listed Below - COPYRIGHT 2017
# Contributors Listed Below - COPYRIGHT 2017,2018
# [+] International Business Machines Corp.
#
#
Expand Down Expand Up @@ -100,7 +100,7 @@ def gen_file(whitelist_tables, blacklist_tables):
table1_index_type = "uint8_t"
# table 2 value and running count type
table2_value_type = "uint8_t"
table2_index_type = "uint8_t"
table2_index_type = "uint16_t"
# table 3 value type
table3_value_type = "uint16_t"
for namespace, tablename, table in tables:
Expand Down Expand Up @@ -135,9 +135,9 @@ def gen_file(whitelist_tables, blacklist_tables):
then table 1 will have a = 1, b = 1, c = 4
1 byte for key
1 byte for number of paths
We are good with uint8_t,
till the number of paths to table 3 from each key is less than 256
2 byte for number of paths
We are good with uint16_t,
till the number of paths to table 3 from each key is less than 65536
*/
map_t< """+table2_value_type+""", """+table2_index_type+""" > _t2[] = {
// length of the table = """+s_list_len(table[1])+"""
Expand Down
5 changes: 3 additions & 2 deletions src/sbefw/core/sbeSecurity.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
/* */
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2017 */
/* Contributors Listed Below - COPYRIGHT 2017,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
Expand Down Expand Up @@ -54,7 +55,7 @@ namespace SBE_SECURITY
template <typename T>
struct table
{
uint8_t size;
uint32_t size;
uint32_t mask;
T *table;
};
Expand Down

0 comments on commit 7d1ec1f

Please sign in to comment.