Issue with Printing Full CPU Unique ID on iMX8MP - Only Last 16 Bits Are Printed

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Issue with Printing Full CPU Unique ID on iMX8MP - Only Last 16 Bits Are Printed

1,433件の閲覧回数
Dheeraj_8
Contributor I

Hello,

I am working with an iMX8MP platform and am trying to print the full CPU Unique ID using the get_board_serial function. However, I am encountering an issue where only the last 16 bits of the CPU Unique ID are being printed, rather than the full 64-bit value.

Description of the Issue:

  • The get_board_serial function is returning a 64-bit serial number, which is stored in the serialnr structure.
  • I am using the following code to print the serial number:
    printf("\tCPU Unique ID : 0x%08X%08X\n", serialnr.high, serialnr.low);

    However, this is only printing the last 16 bits of the serial number and not the complete 64-bit value. The expected serial number should be a full 64-bit value (e.g., 0x469660D3D0C2B602021820003BDAA647), but instead, I am only seeing the last 16 bits like 0x21820003BDAA647.

    Could you please assist with the following:

    1. Clarification on how to correctly retrieve and print the full 64-bit serial number from the get_board_serial function.


      Regards


0 件の賞賛
返信
5 返答(返信)

1,404件の閲覧回数
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

You could read it directly with the next command:

cat /sys/devices/soc0/serial_number

Best regards.

0 件の賞賛
返信

1,391件の閲覧回数
Dheeraj_8
Contributor I

Hello

Thank you for your response. While the cat /sys/devices/soc0/serial_number command works for reading the full CPU Unique ID from userspace, my requirement is to include this information directly in the boot prints.

I need the full 128-bit CPU Unique ID to be printed in the system details, specifically under the "Board Info" section, as shown below:

Board Info:
BSP Version : <BSP_VERSION>
SOM Version : iW-PRGQZ-AP-01-Rx.x
CPU Unique ID : 0x1E176800945ADC86
Carrier Board Version : iW-EMFJR-AP-01-R2.0

here can you please share what changes has to done to print all the 128 bits of CPU ID?

Regards

0 件の賞賛
返信

1,355件の閲覧回数
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

In this case, you could modify SPL to read Unique ID registers at boot.

Create a function in void board_init_f(ulong dummy) to read all the bits.

Best regards.

0 件の賞賛
返信

1,412件の閲覧回数
stmatscaps
Contributor III

At the risk of stating the obvious, but 0x21820003BDAA647 is a 64-bit number.

0 件の賞賛
返信

1,392件の閲覧回数
Dheeraj_8
Contributor I
What changes are required to correctly fetch and display the full 128-bit ID?
0 件の賞賛
返信