windows 환경에서 동작하는 arm emulator(simulator)

18
Windows 환환환환 환환환환 Arm Emulator(Simulator) 발발발 : 발발발

Upload: annona

Post on 16-Feb-2016

122 views

Category:

Documents


0 download

DESCRIPTION

Windows 환경에서 동작하는 Arm Emulator(Simulator). 발표자 : 이원재. 시스템 흐름도 . Emulation Part DLL( by C ). User Interface Part ( by C# ). Fetch. Timer Event. Call. Decode. Execute. Display Result. Result. Return. Emulation 을 위한 주요변수 1. EZ-S3C2440 메모리 맵. Char SRAMBuffer[4K]. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Windows  환경에서 동작하는  Arm Emulator(Simulator)

Windows 환경에서 동작하는 Arm Emulator(Simulator)

발표자 : 이원재

Page 2: Windows  환경에서 동작하는  Arm Emulator(Simulator)

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)

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)

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)

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)

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)

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)

시연

Page 9: Windows  환경에서 동작하는  Arm Emulator(Simulator)

주요 함수 코드C# 에서 C 로 작성된 DLL 호출 -1

참고 : http://www.codeproject.com/KB/cs/usecdlllibincs.aspx

호출

선언

DLL

C – DLL

C#

Page 10: Windows  환경에서 동작하는  Arm Emulator(Simulator)

주요 함수 코드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)

주요 함수 코드C# 에서 C 로 작성된 DLL 호출 -3

참고 : http://classname.tistory.com/18?srchid=BR1http%3A%2F%2Fclassname.tistory.com%2F18

Page 12: Windows  환경에서 동작하는  Arm Emulator(Simulator)

주요 함수 코드C or C++ 를 이용한 DLL 작성법

Page 13: Windows  환경에서 동작하는  Arm Emulator(Simulator)

주요 이용 toolsIDA-Pro 소개

참고 : http://www.hex-rays.com/idapro/

Page 14: Windows  환경에서 동작하는  Arm Emulator(Simulator)

주요 이용 toolsIDA-Pro 1

Page 15: Windows  환경에서 동작하는  Arm Emulator(Simulator)

주요 이용 toolsSource Insight 소개

http://www.sourceinsight.com/

Page 16: Windows  환경에서 동작하는  Arm Emulator(Simulator)

주요 이용 toolsSource Insight-1

Page 17: Windows  환경에서 동작하는  Arm Emulator(Simulator)

주요 이용 Sitehttp://www.codeproject.com/

http://forum.falinux.com/zbxe/

Page 18: Windows  환경에서 동작하는  Arm Emulator(Simulator)

Q & A