[커널 17차] 27주차

2021.03.15 21:26

주영 조회 수:276

2020년 3월 6일

 

linux version : mainline 5.9

 

init/main.c.  start_kernel();

 

arm64_memblock_init() 진행중

 - memblock_remove(max_t(u64, memstart_addr + linear_region_size, __pa_symbol(_end)), ULLONG_MAX);

 if문 까지 진행

 

fixmap 과 대응하여 메모리 계산 및 vmemmap 계산

 

저녁 시간

 

이론 분석

 

http://jake.dothome.co.kr/cache4/

 

Cache

cache - barrier

http://jake.dothome.co.kr/barriers/

 

 

참고 자료

http://jake.dothome.co.kr/fixmap/

 

https://stackoverflow.com/questions/19965076/gcc-memory-barrier-sync-synchronize-vs-asm-volatile-memory

http://cloudrain21.com/about-memory-barrier

https://linux.die.net/man/3/pthread_barrier_init

https://stackoverflow.com/questions/14950614/working-of-asm-volatile-memory

 

https://developer.arm.com/documentation/dui0489/c/arm-and-thumb-instructions/miscellaneous-instructions/dmb--dsb--and-isb

 

(These ARM and 32-bit Thumb instructions are available in ARMv7.)

DSB SY 옵션 생략 가능

- Full system DSB operation. This is the default and can be omitted.

 

https://developer.arm.com/documentation/dui0801/k/A64-General-Instructions/DSB?lang=en

(armv8)

DSB SY 옵션 생략 불가능

- Full system is the required shareability domain, reads and writes are the required access types in both Group A and Group B. This option is referred to as the full system DMB.

 

Arm reference manual (f.c version)

C6.2.82 DSB

crm 필드 확인

asm volatile("dsb #0" ::: "memory");

 

All other encodings of CRm, other than the values 0b0000 and 0b0100, that are not listed above are

reserved, and can be encoded using the #<imm> syntax. All unsupported and reserved options must

execute as a full system barrier operation, but software must not rely on this behavior.

 

지원하지 않는 옵션은 SY로 동작함.

 

자료

https://github.com/iamroot17/linux

XE Login