Windows 환경에서 동작하는 Arm Emulator(Simulator)
description
Transcript of Windows 환경에서 동작하는 Arm Emulator(Simulator)
![Page 1: Windows 환경에서 동작하는 Arm Emulator(Simulator)](https://reader033.fdocuments.net/reader033/viewer/2022061615/56815f56550346895dce35d8/html5/thumbnails/1.jpg)
Windows 환경에서 동작하는 Arm Emulator(Simulator)
발표자 : 이원재
![Page 2: Windows 환경에서 동작하는 Arm Emulator(Simulator)](https://reader033.fdocuments.net/reader033/viewer/2022061615/56815f56550346895dce35d8/html5/thumbnails/2.jpg)
Timer Event
Emulation Part DLL( by C )
User Interface Part ( by C# )
Call
Return
Fetch
Decode
Execute
ResultDisplay Result
시스템 흐름도
![Page 3: Windows 환경에서 동작하는 Arm Emulator(Simulator)](https://reader033.fdocuments.net/reader033/viewer/2022061615/56815f56550346895dce35d8/html5/thumbnails/3.jpg)
EZ-S3C2440 메모리 맵
Char SDRAMBuffer[64M]
Char NANDBuffer[64M]
Char SRAMBuffer[4K]
UINT32 R[16]
UINT32 CPSR
UINT32 SPSR
UINT32 Register[136]
Arm Register
S3C2440 Special Regis-ter
Emulation 을 위한 주요변수 1
![Page 4: Windows 환경에서 동작하는 Arm Emulator(Simulator)](https://reader033.fdocuments.net/reader033/viewer/2022061615/56815f56550346895dce35d8/html5/thumbnails/4.jpg)
FAd-
dress
DAd-
dress
EAd-
dress
FCom-mand
DCom-mand
ECom-mand
UINT32 pipeLine[2][3]
UINT32 iWhatCommand[2]D
Command in-dex
ECommand in-
dex
Emulation 을 위한 주요변수 2
pipe
![Page 5: Windows 환경에서 동작하는 Arm Emulator(Simulator)](https://reader033.fdocuments.net/reader033/viewer/2022061615/56815f56550346895dce35d8/html5/thumbnails/5.jpg)
Emulation 의 주요 함수 - Fetch()
CharSDRAM-Buffer(64M)
4byte추출
Little-Endian 4byte2
FAd-
dress
DAd-
dress
EAd-
dress
FCom-mand
DCom-mand
ECom-mand
UINT32 pipeLine[2][3]
3Function Line
Decode()
Fetch()
Execute()F
Ad-dress
DAd-
dress
EAd-
dress
FCom-mand
DCom-mand
ECom-mand
UINT32 pipeLine[2][3]1
![Page 6: Windows 환경에서 동작하는 Arm Emulator(Simulator)](https://reader033.fdocuments.net/reader033/viewer/2022061615/56815f56550346895dce35d8/html5/thumbnails/6.jpg)
Little-Endian 4byte2
FAd-
dress
DAd-
dress
EAd-
dress
FCom-mand
DCom-mand
ECom-mand
UINT32 pipeLine[2][3]
3
Function Line
Fetch()
Decode()
Execute()
Opcode 분석 루틴
UINT32 iWhatCommand[2]D
Command in-dex
ECommand in-
dex
4
Emulation 의 주요 함수 - De-code()
UINT32 iWhatCommand[2]D
Command in-dex
ECommand in-
dex
1
![Page 7: Windows 환경에서 동작하는 Arm Emulator(Simulator)](https://reader033.fdocuments.net/reader033/viewer/2022061615/56815f56550346895dce35d8/html5/thumbnails/7.jpg)
FAd-
dress
DAd-
dress
EAd-
dress
FCom-mand
DCom-mand
ECom-mand
UINT32 pipeLine[2][3]UINT32 iWhatCommand[2]D
Command in-dex
ECommand in-
dex
1
Function Line
Fetch()
Execute()
Decode()
SDRAMBuffer, Register, special Register
2
3
Emulation 의 주요 함수 - Exe-cute()
![Page 8: Windows 환경에서 동작하는 Arm Emulator(Simulator)](https://reader033.fdocuments.net/reader033/viewer/2022061615/56815f56550346895dce35d8/html5/thumbnails/8.jpg)
시연
![Page 9: Windows 환경에서 동작하는 Arm Emulator(Simulator)](https://reader033.fdocuments.net/reader033/viewer/2022061615/56815f56550346895dce35d8/html5/thumbnails/9.jpg)
주요 함수 코드C# 에서 C 로 작성된 DLL 호출 -1
참고 : http://www.codeproject.com/KB/cs/usecdlllibincs.aspx
호출
선언
DLL
C – DLL
C#
![Page 10: Windows 환경에서 동작하는 Arm Emulator(Simulator)](https://reader033.fdocuments.net/reader033/viewer/2022061615/56815f56550346895dce35d8/html5/thumbnails/10.jpg)
주요 함수 코드C# 에서 C 로 작성된 DLL 호출 -2
참고 : http://classname.tistory.com/18?srchid=BR1http%3A%2F%2Fclassname.tistory.com%2F18
● PInvoke( Platform Invocation Service) – 관리코드에서 비관리 코드를 호출하는 것
Why?
C#
Win32 API
![Page 11: Windows 환경에서 동작하는 Arm Emulator(Simulator)](https://reader033.fdocuments.net/reader033/viewer/2022061615/56815f56550346895dce35d8/html5/thumbnails/11.jpg)
주요 함수 코드C# 에서 C 로 작성된 DLL 호출 -3
참고 : http://classname.tistory.com/18?srchid=BR1http%3A%2F%2Fclassname.tistory.com%2F18
![Page 12: Windows 환경에서 동작하는 Arm Emulator(Simulator)](https://reader033.fdocuments.net/reader033/viewer/2022061615/56815f56550346895dce35d8/html5/thumbnails/12.jpg)
주요 함수 코드C or C++ 를 이용한 DLL 작성법
![Page 13: Windows 환경에서 동작하는 Arm Emulator(Simulator)](https://reader033.fdocuments.net/reader033/viewer/2022061615/56815f56550346895dce35d8/html5/thumbnails/13.jpg)
주요 이용 toolsIDA-Pro 소개
참고 : http://www.hex-rays.com/idapro/
![Page 14: Windows 환경에서 동작하는 Arm Emulator(Simulator)](https://reader033.fdocuments.net/reader033/viewer/2022061615/56815f56550346895dce35d8/html5/thumbnails/14.jpg)
주요 이용 toolsIDA-Pro 1
![Page 15: Windows 환경에서 동작하는 Arm Emulator(Simulator)](https://reader033.fdocuments.net/reader033/viewer/2022061615/56815f56550346895dce35d8/html5/thumbnails/15.jpg)
주요 이용 toolsSource Insight 소개
http://www.sourceinsight.com/
![Page 16: Windows 환경에서 동작하는 Arm Emulator(Simulator)](https://reader033.fdocuments.net/reader033/viewer/2022061615/56815f56550346895dce35d8/html5/thumbnails/16.jpg)
주요 이용 toolsSource Insight-1
![Page 17: Windows 환경에서 동작하는 Arm Emulator(Simulator)](https://reader033.fdocuments.net/reader033/viewer/2022061615/56815f56550346895dce35d8/html5/thumbnails/17.jpg)
주요 이용 Sitehttp://www.codeproject.com/
http://forum.falinux.com/zbxe/
![Page 18: Windows 환경에서 동작하는 Arm Emulator(Simulator)](https://reader033.fdocuments.net/reader033/viewer/2022061615/56815f56550346895dce35d8/html5/thumbnails/18.jpg)
Q & A