NXP i.MX SoC Family/i.MX Linux Reference Manual

i.MX Linux Reference Manual - Unit Tests - Security

까마귀75 2022. 9. 2. 10:52
728x90
반응형

10.7 Security

10.7.1 Display Content Integrity Checker (DCIC)

10.7.1.1 Test Name

  • mxc_dcic_test.out

10.7.1.1.1 Location

 

/unit_tests/DCIC/

 

10.7.1.1.2 Functionality

 

DCIC의 목표는 디스플레이로 전송된 안전에 중요한 정보가 손상되지 않았는지 확인하는 것이다.

 

10.7.1.1.3 Configuration

 

None

 

10.7.1.1.4 Use Case and Expected Output

 

# ./mxc_dcic_test.out -bw 18 -dev 1

mxc_dcic_test.out에 대한 예상 출력:

Opened fb0
open /dev/dcic1
bpp=16, bus_width=18
Config ROI=1
Config ROI=3
Config ROI=5
ROI=0,crcRS=0x0, crcCS=0x0
ROI=1,crcRS=0x6cd6b18d, crcCS=0x6cd6b18d
ROI=2,crcRS=0x0, crcCS=0x0
ROI=3,crcRS=0xc9da7ae6, crcCS=0xc9da7ae6
ROI=4,crcRS=0x0, crcCS=0x0
ROI=5,crcRS=0xb5ba1453, crcCS=0xb5ba1453
ROI=6,crcRS=0x0, crcCS=0x0
ROI=7,crcRS=0x0, crcCS=0x0
ROI=8,crcRS=0x0, crcCS=0x0
ROI=9,crcRS=0x0, crcCS=0x0
ROI=10,crcRS=0x0, crcCS=0x0
ROI=11,crcRS=0x0, crcCS=0x0
ROI=12,crcRS=0x0, crcCS=0x0
ROI=13,crcRS=0x0, crcCS=0x0
ROI=14,crcRS=0x0, crcCS=0x0
ROI=15,crcRS=0x0, crcCS=0x0
All ROI CRC check success!

 

10.7.2 SIM

10.7.2.1 Test Name

  • mxc_sim_test.out

10.7.2.1.1 Location

 

/unit_tests/SIM/

 

10.7.2.1.2 Functionality

 

SIM 카드 인터페이스의 기본 테스트.

 

10.7.2.1.3 Configuration

 

None

 

10.7.2.1.4 Use Case and Expected Output

 

/unit_tests/mxc_sim_test.out

Expected output
atr[0]= 0x3b atr[1]= 0x68 atr[2]= 0x0 atr[3]= 0x0 atr[4]= 0x0 atr[5]= 0x73 atr[6]=
0xc8
atr[7]= 0x40 atr[8]= 0x0 atr[9]= 0x0 atr[10]= 0x90 atr[11]= 0x0
rx[0] = 0x6e rx[1] = 0x0
rx[0] = 0x6d rx[1] = 0x0
rx[0] = 0x6e rx[1] = 0x0

 

10.7.3 SNVS Real Time Clock (SRTC)

10.7.3.1 Test Name

  • autorun-rtc.sh
  • rtctest.out
  • rtcwakeup.out

10.7.3.1.1 Location

 

/unit_tests/SRTC/

 

10.7.3.1.2 Functionality

 

이 테스트는 시간과 날짜를 유지하는 데 사용되는 RTC(Real Time Clock) 모듈을 검사한다. 사용자에게 인증 가능한 시간을 제공하고 카운터 변조가 감지되면 알람을 발생시킬 수 있다.

 

10.7.3.1.3 Configuration

 

autorun-rtc.sh, rtctest.outrtcwakeup.out를 작동하려면, 대상 보드 defconfig 파일에 다음 라인을 추가한다:

CONFIG_RTC_DRV_SNVS=y

 

10.7.3.1.4 Use Case and Expected Output

 

./autorun-rtc.sh
or
./rtctest.out $lt;arg>
--full run all tests
--no-periodic don't run periodic interrupt tests
or
./rtcwakeup.out -d rtc0 -m mem -s 10

Expected output
autorun-rtc.sh: Exit with PASS results.
rtctest.out: The program ends with "Test complete" status.
rtcwakeup.out: System is wakeup after 10s.

i.MX 7D Sabre SD의 예상 출력

  • autorun-rtc.sh
  • autorun-rtc.sh
    i.MX7D
    Checking for devnode: /dev/rtc0
    autorun-rtc.sh: PASS devnode found: /dev/rtc0
    Running test case: ./rtctest.out --no-periodic
    
    RTC Driver Test Example.
    Counting 5 update (1/sec) interrupts from reading /dev/rtc0: 1 2 3 4 5
    Again, from using select(2) on /dev/rtc0: 1 2 3 4 5
    Current RTC date/time is 21-2-2017, 23:13:07.
    Alarm time now set to 23:13:12.
    Waiting 5 seconds for alarm... okay. Alarm rang.
    
    *** Test complete ***
    Typing "cat /proc/interrupts" will show 1 more events on IRQ rtc.
    autorun-rtc.sh: PASS test case: ./rtctest.out --no-periodic
    rtc irqs before running unit test: 303
    rtc irqs after running unit test: 314
    so rtc irqs during test was:
    11
    checking rtc interrupts PASS
    autorun-rtc.sh: Exiting PASS
  • rtctest.out --full
  • ./rtctest.out --full
    			RTC Driver Test Example.
    Counting 5 update (1/sec) interrupts from reading /dev/rtc0: 1 2 3 4 5
    Again, from using select(2) on /dev/rtc0: 1 2 3 4 5
    Current RTC date/time is 21-2-2017, 23:14:48.
    Alarm time now set to 23:14:53.
    Waiting 5 seconds for alarm... okay. Alarm rang.
    Periodic IRQ rate was 1Hz.
    Counting 20 interrupts at:
    2Hz: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
    4Hz: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
    8Hz: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
    16Hz: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
    32Hz: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
    64Hz: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
    
    			*** Test complete ***
    Typing "cat /proc/interrupts" will show 131 more events on IRQ rtc.
  • rtctest.out --no-periodic
  • /rtctest.out --no-periodic
    
    RTC Driver Test Example.
    Counting 5 update (1/sec) interrupts from reading /dev/rtc0: 1 2 3 4 5
    Again, from using select(2) on /dev/rtc0: 1 2 3 4 5
    Current RTC date/time is 21-2-2017, 23:16:24.
    Alarm time now set to 23:16:29.
    Waiting 5 seconds for alarm... okay. Alarm rang.
    
    			*** Test complete ***
    Typing "cat /proc/interrupts" will show 1 more events on IRQ rtc.
  • rtcwakeup.out -d rtc0 -m mem -s 10
  • ./rtcwakeup.out -d rtc0 -m mem -s 10
    rtcwakeup.out: wakeup from "mem" using rtc0 at Wed Feb 22 23:17:29 2017
    PM: Syncing filesystems ... done.
    Freezing user space processes ... (elapsed 0.001 seconds) done.
    Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
    Suspending console(s) (use no_console_suspend to debug)
    PM: suspend of devices complete after 639.100 msecs
    PM: suspend devices took 0.640 seconds
    PM: late suspend of devices complete after 1.236 msecs
    PM: noirq suspend of devices complete after 1.202 msecs
    Disabling non-boot CPUs ...
    CPU1: shutdown
    Turn off Mega/Fast mix in DSM
    Enabling non-boot CPUs ...
    CPU1 is up
    PM: noirq resume of devices complete after 0.756 msecs
    imx-sdma 30bd0000.sdma: loaded firmware 4.2
    PM: early resume of devices complete after 0.972 msecs
    PM: resume of devices complete after 483.302 msecs
    PM: resume devices took 0.480 seconds
    Restarting tasks ... done.

 

728x90
반응형