Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
リセットとフリーズで解析する電子辞書リバエン記 / reverse-engineer-e-dictionaries-with-reset-and-freeze
Takumi Sueda
November 20, 2021
Technology
0
4.3k
リセットとフリーズで解析する電子辞書リバエン記 / reverse-engineer-e-dictionaries-with-reset-and-freeze
Kernel/VM 探検隊 online part4 LT
小説版:
https://www.zopfco.de/entry/reset_freeze_re
Takumi Sueda
November 20, 2021
Tweet
Share
More Decks by Takumi Sueda
See All by Takumi Sueda
詳解・電子辞書で Linux がブートするまで / boot-linux-on-sharp-brain-explained
puhitaku
5
2.8k
MicroPython × BLE × テプラ 〜リバースエンジニアリングを添えて〜 /micropython-ble-tepra
puhitaku
1
390
TEPRA Lite ではじめる BLE リバースエンジニアリング / tepra-lite-ble-reverse-engineering
puhitaku
9
4.9k
勢いあるハックと勢いあるコミュニティの試行
puhitaku
0
610
ハックの学び方、の学び方
puhitaku
21
8.8k
プレゼンの作り方
puhitaku
3
680
フォーク、ナイフ、ものづくり
puhitaku
3
1.5k
電子辞書は組み込みLinuxの夢を見るか? Ver. 2.0.0
puhitaku
4
2.7k
電子辞書は組み込みLinuxの夢を見るか? Ver. 1.1.0
puhitaku
3
1.4k
Other Decks in Technology
See All in Technology
Backlog × RPAでいろいろ捗った話
z_tetsu
0
380
今 SLI/SLO の監視をするなら Sloth が良さそうという話
shotakitazawa
1
280
Trusted Web プロトタイプ
finengine
0
330
VS Code Meetup #21 - もう一度知りたい基礎編 - ファイル操作、コーディングの基本編
74th
0
190
疎ベクトル検索と密ベクトル検索: 第68回 Machine Learning 15minutes! Broadcast
keyakkie
1
250
eBPF-based Container Networking
johnlin
2
1.1k
PMMやプロダクト関係者と協働するために役割を整理した話 / 20220810_pdmtipslt
rakus_dev
0
110
CloudWatchアラームによるサービス継続のための監視入門 / Introduction to Monitoring for Service Continuity with CloudWatch Alarms
inomasosan
1
420
Power BI のうらがわ
hanaseleb
1
140
Oracle Cloud Infrastructure:2022年7月度サービス・アップデート
oracle4engineer
PRO
0
190
セキュキャンを卒業してその後
kurochan
0
580
Continuous Architecture Design for Modernization
humank
1
460
Featured
See All Featured
Designing the Hi-DPI Web
ddemaree
272
32k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
29
4.4k
Web Components: a chance to create the future
zenorocha
303
40k
Keith and Marios Guide to Fast Websites
keithpitt
404
21k
Practical Orchestrator
shlominoach
178
8.7k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
316
19k
Done Done
chrislema
174
14k
From Idea to $5000 a Month in 5 Months
shpigford
373
44k
WebSockets: Embracing the real-time Web
robhawkes
57
5.6k
In The Pink: A Labor of Love
frogandcode
131
21k
Git: the NoSQL Database
bkeepers
PRO
415
59k
The Mythical Team-Month
searls
210
39k
Transcript
Kernel/VM online part 4 LT @puhitaku
Takumi Sueda @puhitaku NICT HOMMA Inc. Twitter
SHARP Brain SHARP Windows CE CE exe (PE) 2011
TOSHIBA TMPA 9 10 CRAXBG (armv 5 tej) + 64 MiB DRAM Windows CE 2012 2020 NXP i.MX 2 83 (armv 5 tej) + 12 8 MiB DRAM Windows CE 2021 ??? SHARP Brain 3 https://jp.sharp/edictionary/products/pwsh 1 _overviiew.html
SHARP Brain 2019 2020 SHARP Brain PW-SH 1 Linux +
i.MX 283 Raspberry Pi Brain Linux SD Brain Linux 4 https://jp.sharp/edictionary/products/pwsh 1 _overviiew.html
2021 1 Brain
Brain https://jp.sharp/edictionary/topics/ 6
Brain https://brain-library.com/ 7
Brain OS SoC i.MX 283 8
Brain 9
Brain 10
Brain 11
Brain SoC NXP i.MX 7 ULP i.MX 7 ULP =
Cortex-A 7 + Cortex-M 4 12
Brain (Windows CE PE) OS 13
None
objdump 0 Arm 15
as ELF .text 16
17
resource hog 18
_start return 19
20
0x 00 0000 00 21
return 0 x 0 00000 0 0 22
U-Boot
U-Boot 1 . MMU 2 . MMU U-Boot U-Boot 24
U-Boot & OS API JTAG UART TX UART I/O
25
U-Boot 1bit 26
U-Boot 1 MMU
U-Boot MMU MMU mrc SCTSR MMU mcr MMU 28 SCTSR
U-Boot MMU mrc 29
U-Boot MMU 30
U-Boot MMU mrc SCTSR return 31
U-Boot 2 U-Boot
U-Boot U-Boot U-Boot MMU U-Boot 3 : 1 .
Brain 2 . DRAM 1. 1. 3 . 2. 64 KiB (large page) 1. U-Boot 33
U-Boot 2 U-Boot 1
U-Boot U-Boot 1 35 Brain 1 MiB NOP mov pc,
lr NOP = mov r0, r0
U-Boot U-Boot 1 36 1 5 MiB Brain 15 MiB
1 ( 4 Bytes) 1 5 MiB DRAM 128 MiB 11.7%
U-Boot 2 U-Boot 2
U-Boot U-Boot 38 NOP MMU NOP 1 NOP 6 4
KiB NOP NOP ……… 2 1
U-Boot U-Boot 2 39 Virtual Memory 1 5 MiB
1 MMU Physical Memory MMU
U-Boot U-Boot 2 40 1 Physical Memory 0 x
6000 000 0 0 x 6800 000 0 1 !"#$ %&'( !"#$ 1
U-Boot U-Boot 2 41 1 Physical Memory 0 x
6 78000 0 0 DRAM 15 MiB %&'( 0 x 6000 000 0 0 x 6800 000 0
U-Boot 2 U-Boot 3
U-Boot U-Boot 43 2 MMU NOP NOP 6 4
KiB NOP 3 1 NOP NOP NOP NOP
U-Boot U-Boot 44 112 64 KiB NOP NOP 6 4
KiB 3 1 NOP NOP NOP NOP 112 …
U-Boot U-Boot 1 . ✅ U-Boot 2 . ✅ MMU
3 . ✅ MMU U-Boot 1 5 MiB 0x 7 0 0 0 0 0 u-boot.bin 0x 67 800000 U-Boot U-Boot 45
U-Boot
U-Boot i.MX 7 ULP con fi g 47
U-Boot 48
U-Boot U-Boot shell 49
Linux
Linux U-Boot Image printk UART Linux 51
Linux @pepepper_cpp Mailbox Unit Linux MU NXP upstream MU merge
52
Linux Linux Linux 53
None
μITRON RTOS I/O I/O 55
& Speakerdeck 56