본문 바로가기

리눅스 커널의 구조와 원리/ARM Processor

(3)
[LinuxKernel][ARM] char buf[32]; vs char buf[32]={0}; Quite interesting patch was released under the following url.https://source.codeaurora.org/quic/la/kernel/msm-3.18/commit/?h=rel/msm-3.18&id=a0039b1e721b7b3ee1cbe7f7f9d44d451ac74543 The detailed patch is to initialize the stack array with a different way as below.-------------------------------------------------------------------------------------usb : dwc3: Initialize kernel stack variables pro..
[LinuxKernel][ARM] Aarch64: How stack is pushed in Aarch64? [1]: SP address is now FFFFFFEB67BE7A40[2]: With "str x21,[SP,#-0x30]!" instruction, the stack is pushed up to 0x30 byte.[3]: X19 and X20 is pushed into stack.[4]: X29 and X30 is pushed into stack. 15 collision = find_worker_executing_work(pool, work);16 if (unlikely(collision)) {17 move_linked_works(work, &collision->scheduled, NULL);18 return;19 } ZSX:FFFFFF8B40CE71B8|F81D0FF5 set_next_entity:..
[ARM] tst 명령어를 실행하면 ARM CPSR 레지스터가 어떻게 변경될까? tst 명령어를 실행하면 ARM CPSR 레지스터가 어떻게 변경될까? tst 명령어는 연산자와 비연산자 사이 AND 비트 연산을 수행합니다. AND 비트 연산 결과에 따라 CPSR 레지스터 Z 비트는 다음과 같이 변경됩니다.Z: 0 ( AND 비트 연산 결과가 1인 경우)Z: 1 ( AND 비트 연산 결과가 0인 경우) tst 명령어가 위와 같이 동작하는지 증명하기 위해 T32 디버거를 실행해 보겠습니다.다음 화면은 tst 명령어를 실행하기 직전입니다. NSR:80107E6C|ret_to_user_from_irq: ldr r2,[r9,#0x8]NSR:80107E70| cmp r2,#0x7F000000 ; r2,#2130706432NSR:80107E74| blne 0x8010B5FC ; addr_limit..