요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
===========================================
Atomic Operation Control (ATOMCTL) Register
===========================================
We Have Atomic Operation Control (ATOMCTL) Register.
This register determines the effect of using a S32C1I instruction
with various combinations of:
1. With and without an Coherent Cache Controller which
can do Atomic Transactions to the memory internally.
2. With and without An Intelligent Memory Controller which
can do Atomic Transactions itself.
The Core comes up with a default value of for the three types of cache ops::
0x28: (WB: Internal, WT: Internal, BY:Exception)
On the FPGA Cards we typically simulate an Intelligent Memory controller
which can implement RCW transactions. For FPGA cards with an External
Memory controller we let it to the atomic operations internally while
doing a Cached (WB) transaction and use the Memory RCW for un-cached
operations.
For systems without an coherent cache controller, non-MX, we always
use the memory controllers RCW, though non-MX controllers likely
support the Internal Operation.
CUSTOMER-WARNING:
Virtually all customers buy their memory controllers from vendors that
don't support atomic RCW memory transactions and will likely want to
configure this register to not use RCW.
Developers might find using RCW in Bypass mode convenient when testing
with the cache being bypassed; for example studying cache alias problems.
See Section 4.3.12.4 of ISA; Bits::
WB WT BY
5 4 | 3 2 | 1 0
========= ================== ================== ===============
2 Bit
Field
Values WB - Write Back WT - Write Thru BY - Bypass
========= ================== ================== ===============
0 Exception Exception Exception
1 RCW Transaction RCW Transaction RCW Transaction
2 Internal Operation Internal Operation Reserved
3 Reserved Reserved Reserved
========= ================== ================== ===============
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
ATOMCTL register와 기본값
1-18`Atomic Operation Control (ATOMCTL)` register는 `S32C1I` instruction을 사용할 때 system의 atomic-operation 구현 방식에 어떤 효과가 생기는지 결정합니다.
- memory에 대한 atomic transaction을 내부적으로 수행할 수 있는 Coherent Cache Controller의 유무
- atomic transaction을 직접 수행할 수 있는 Intelligent Memory Controller의 유무
core가 시작될 때 세 cache-operation type에 적용되는 기본값은 다음과 같습니다.
0x28: (WB: Internal, WT: Internal, BY:Exception)
memory controller별 atomic 정책
19-35FPGA card에서는 일반적으로 `RCW` transaction을 구현할 수 있는 Intelligent Memory Controller를 simulate합니다. External Memory Controller가 있는 FPGA card에서는 cached (`WB`) transaction에 대해 controller가 atomic operation을 내부 수행하게 하고, uncached operation에는 memory `RCW`를 사용합니다.
coherent cache controller가 없는 non-MX system에서는 memory controller의 `RCW`를 항상 사용합니다. 다만 non-MX controller도 Internal Operation을 지원할 가능성이 큽니다.
CUSTOMER-WARNING: 대부분 고객이 사용하는 vendor memory controller는 atomic `RCW` memory transaction을 지원하지 않습니다. 따라서 `ATOMCTL` register가 `RCW`를 사용하지 않도록 설정해야 할 가능성이 큽니다.
cache를 bypass한 상태에서 cache alias 문제 등을 시험할 때는 Bypass mode에서 `RCW`를 사용하는 것이 개발자에게 편리할 수 있습니다.
ATOMCTL bit field와 값
36-51ISA Section 4.3.12.4에 정의된 bit 배치는 다음과 같습니다.
원문의 WB·WT·BY bit 좌표를 구조화했습니다.
| 2 Bit Field Value | WB - Write Back | WT - Write Thru | BY - Bypass |
|---|---|---|---|
| `0` | Exception | Exception | Exception |
| `1` | RCW Transaction | RCW Transaction | RCW Transaction |
| `2` | Internal Operation | Internal Operation | Reserved |
| `3` | Reserved | Reserved | Reserved |
요약과 해설
atomctl.rst:1-51`ATOMCTL`은 Write Back, Write Thru, Bypass mode마다 Exception, RCW Transaction, Internal Operation 중 하나를 선택합니다. 실제 memory controller의 RCW 지원 여부에 맞춘 설정이 중요합니다.