Commit 89e39c88 authored by WEI-TAI CHEN's avatar WEI-TAI CHEN

-Solve segmentation fault in do_MIB_NR

-Amend do_ServingCellConfigCommon function
parent 607525f8
...@@ -95,7 +95,7 @@ static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//, ...@@ -95,7 +95,7 @@ static uint32_t gNB_app_register(uint32_t gnb_id_start, uint32_t gnb_id_end)//,
/* note: there is an implicit relationship between the data structure and the message name */ /* note: there is an implicit relationship between the data structure and the message name */
msg_p = itti_alloc_new_message (TASK_GNB_APP, S1AP_REGISTER_ENB_REQ); //Message Temporarily reuse msg_p = itti_alloc_new_message (TASK_GNB_APP, S1AP_REGISTER_ENB_REQ); //Message Temporarily reuse
RCconfig_S1(msg_p, gnb_id); RCconfig_NR_S1(msg_p, gnb_id);
if (gnb_id == 0) RCconfig_gtpu(); if (gnb_id == 0) RCconfig_gtpu();
......
...@@ -258,7 +258,7 @@ void RCconfig_NR_L1(void) { ...@@ -258,7 +258,7 @@ void RCconfig_NR_L1(void) {
if (RC.gNB[j] == NULL) { if (RC.gNB[j] == NULL) {
RC.gNB[j] = (PHY_VARS_gNB **)malloc((1+MAX_NUM_CCs)*sizeof(PHY_VARS_gNB*)); RC.gNB[j] = (PHY_VARS_gNB **)malloc((1+MAX_NUM_CCs)*sizeof(PHY_VARS_gNB*));
LOG_I(NR_PHY,"RC.eNB[%d] = %p\n",j,RC.eNB[j]); LOG_I(NR_PHY,"RC.gNB[%d] = %p\n",j,RC.gNB[j]);
memset(RC.gNB[j],0,(1+MAX_NUM_CCs)*sizeof(PHY_VARS_gNB*)); memset(RC.gNB[j],0,(1+MAX_NUM_CCs)*sizeof(PHY_VARS_gNB*));
} }
...@@ -748,11 +748,13 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) { ...@@ -748,11 +748,13 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
} }
NRRRC_CONFIGURATION_REQ (msg_p).N_RB_DL[j]= N_RB_DL; NRRRC_CONFIGURATION_REQ (msg_p).N_RB_DL[j]= N_RB_DL;
/*
if ((N_RB_DL!=6) && (N_RB_DL!=15) && (N_RB_DL!=25) && (N_RB_DL!=50) && (N_RB_DL!=75) && (N_RB_DL!=100)) { if ((N_RB_DL!=6) && (N_RB_DL!=15) && (N_RB_DL!=25) && (N_RB_DL!=50) && (N_RB_DL!=75) && (N_RB_DL!=100)) {
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for N_RB_DL choice: 6,15,25,50,75,100 !\n", AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for N_RB_DL choice: 6,15,25,50,75,100 !\n",
RC.config_file_name, i, N_RB_DL); RC.config_file_name, i, N_RB_DL);
} }
*/
if (strcmp(frame_type, "FDD") == 0) { if (strcmp(frame_type, "FDD") == 0) {
NRRRC_CONFIGURATION_REQ (msg_p).frame_type[j] = FDD; NRRRC_CONFIGURATION_REQ (msg_p).frame_type[j] = FDD;
...@@ -1136,7 +1138,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) { ...@@ -1136,7 +1138,7 @@ int RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
break; break;
default: default:
AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for ServingCellConfigCommon_dmrs_TypeA_Position choice: -6,0,6 !\n", AssertFatal (0,"Failed to parse gNB configuration file %s, gnb %d unknown value \"%d\" for ServingCellConfigCommon_dmrs_TypeA_Position choice: 2,3 !\n",
RC.config_file_name, i, ServingCellConfigCommon_dmrs_TypeA_Position); RC.config_file_name, i, ServingCellConfigCommon_dmrs_TypeA_Position);
break; break;
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -262,8 +262,8 @@ typedef struct { ...@@ -262,8 +262,8 @@ typedef struct {
uint8_t *MIB; uint8_t *MIB;
uint8_t sizeof_MIB; uint8_t sizeof_MIB;
uint8_t *SIB1; uint8_t *ServingCellConfigCommon;
uint8_t sizeof_SIB1; uint8_t sizeof_servingcellconfigcommon;
//implicit parameters needed //implicit parameters needed
int physCellId; int physCellId;
...@@ -277,7 +277,6 @@ typedef struct { ...@@ -277,7 +277,6 @@ typedef struct {
//are the only static one (memory has been already allocated) //are the only static one (memory has been already allocated)
NR_BCCH_BCH_Message_t mib; NR_BCCH_BCH_Message_t mib;
NR_SIB1_t *sib1;
NR_ServingCellConfigCommon_t *servingcellconfigcommon; NR_ServingCellConfigCommon_t *servingcellconfigcommon;
......
...@@ -60,6 +60,7 @@ int create_gNB_tasks(uint32_t gnb_nb) ...@@ -60,6 +60,7 @@ int create_gNB_tasks(uint32_t gnb_nb)
} }
} }
/*
# if defined(ENABLE_USE_MME) # if defined(ENABLE_USE_MME)
if (gnb_nb > 0) { if (gnb_nb > 0) {
if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) { if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) {
...@@ -85,6 +86,7 @@ int create_gNB_tasks(uint32_t gnb_nb) ...@@ -85,6 +86,7 @@ int create_gNB_tasks(uint32_t gnb_nb)
} }
# endif # endif
*/
if (gnb_nb > 0) { if (gnb_nb > 0) {
LOG_I(NR_RRC,"Creating NR RRC gNB Task\n"); LOG_I(NR_RRC,"Creating NR RRC gNB Task\n");
......
...@@ -41,7 +41,7 @@ gNBs = ...@@ -41,7 +41,7 @@ gNBs =
nb_antennas_rx = 1; nb_antennas_rx = 1;
tx_gain = 90; tx_gain = 90;
rx_gain = 125; rx_gain = 125;
MIB_subCarrierSpacingCommon = 30000; MIB_subCarrierSpacingCommon = 30;
MIB_ssb_SubcarrierOffset = 0; MIB_ssb_SubcarrierOffset = 0;
MIB_dmrs_TypeA_Position = 2; MIB_dmrs_TypeA_Position = 2;
pdcch_ConfigSIB1 = 0; pdcch_ConfigSIB1 = 0;
...@@ -73,7 +73,7 @@ gNBs = ...@@ -73,7 +73,7 @@ gNBs =
UL_BWP_prefix_type = "NORMAL"; UL_BWP_prefix_type = "NORMAL";
ServingCellConfigCommon__ssb_PositionsInBurst_PR = "shortBitmap"; ServingCellConfigCommon__ssb_PositionsInBurst_PR = "shortBitmap";
ServingCellConfigCommon_ssb_periodicityServingCell = 10; ServingCellConfigCommon_ssb_periodicityServingCell = 10;
ServingCellConfigCommon_dmrs_TypeA_Position = 0; ServingCellConfigCommon_dmrs_TypeA_Position = 2;
NIA_SubcarrierSpacing = "kHz15"; NIA_SubcarrierSpacing = "kHz15";
ServingCellConfigCommon_ss_PBCH_BlockPower = -60; ServingCellConfigCommon_ss_PBCH_BlockPower = -60;
referenceSubcarrierSpacing = "kHz15"; referenceSubcarrierSpacing = "kHz15";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment