File tree Expand file tree Collapse file tree 2 files changed +17
-8
lines changed
device/silicon_creator/manuf/lib
host/provisioning/orchestrator/src Expand file tree Collapse file tree 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -115,13 +115,15 @@ status_t manuf_individualize_device_hw_cfg(
115115 }
116116
117117 // On non-silicon targets, we expect the CP device ID from flash to be
118- // empty. In this case we set the HW origin portion of the CP device ID to
119- // all 1s to indicate this is an FPGA/Sim generated device ID.
118+ // empty. In this case we set the HW origin and DIN portions of the CP
119+ // device ID to all 1s to indicate this is an FPGA/Sim generated device ID.
120120 // Otherwise, we expect the CP device ID to be present and non-zero.
121121 if (flash_cp_device_id_empty ) {
122122 if (kDeviceType != kDeviceSilicon && kDeviceType != kDeviceSimDV ) {
123123 memset (& cp_device_id , 0 , sizeof (cp_device_id ));
124124 cp_device_id [0 ] = UINT32_MAX ;
125+ cp_device_id [1 ] = UINT32_MAX ;
126+ cp_device_id [2 ] = UINT32_MAX ;
125127 } else {
126128 return NOT_FOUND ();
127129 }
Original file line number Diff line number Diff line change @@ -83,12 +83,19 @@ def to_int(self) -> int:
8383
8484 @staticmethod
8585 def from_int (din : int ) -> "DeviceIdentificationNumber" :
86- year = util .bcd_decode (din & 0xF )
87- week = util .bcd_decode ((din >> 4 ) & 0xFF )
88- lot = util .bcd_decode ((din >> 12 ) & 0xFFF )
89- wafer = util .bcd_decode ((din >> 24 ) & 0xFF )
90- wafer_x_coord = util .bcd_decode ((din >> 32 ) & 0xFFF )
91- wafer_y_coord = util .bcd_decode ((din >> 44 ) & 0xFFF )
86+ year = - 1
87+ week = - 1
88+ lot = - 1
89+ wafer = - 1
90+ wafer_x_coord = - 1
91+ wafer_y_coord = - 1
92+ if din != 0xFFFFFFFFFFFFFFFF :
93+ year = util .bcd_decode (din & 0xF )
94+ week = util .bcd_decode ((din >> 4 ) & 0xFF )
95+ lot = util .bcd_decode ((din >> 12 ) & 0xFFF )
96+ wafer = util .bcd_decode ((din >> 24 ) & 0xFF )
97+ wafer_x_coord = util .bcd_decode ((din >> 32 ) & 0xFFF )
98+ wafer_y_coord = util .bcd_decode ((din >> 44 ) & 0xFFF )
9299 return DeviceIdentificationNumber (year = year ,
93100 week = week ,
94101 lot = lot ,
You can’t perform that action at this time.
0 commit comments