← Documents Documentation/arch/arm/setup.rst GitHub 원문 ↗

Linux 6.18.37 · Architecture

Kernel initialisation parameters on ARM Linux

legacy struct param_struct가 loader에서 ARM kernel로 전달하는 memory, console, root, initrd, machine identity parameter를 정리합니다.

Source pathDocumentation/arch/arm/setup.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

setup.rst:1-108

`struct param_struct`는 loader와 kernel 초기화 사이의 임시 계약입니다. 값의 생명주기가 짧고 일부 field는 obsolete이므로 `setup_arch()` 이후의 일반 runtime interface처럼 사용하면 안 됩니다.

Parameter 책임 구분
영역대표 field주의
Memorypage_size, nr_pages, pages_in_bankVRAM 분리
Bootrootdev, initrd_start, commandlineloader가 전달
Consolevideo_num_cols/rows, video_x/yVGA 용도 한정
Legacyramdisk_size, pathsobsolete

field를 memory, boot device, display, platform identity로 나누면 legacy structure의 목적이 선명해집니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 =============================================
2 Kernel initialisation parameters on ARM Linux
3 =============================================
4
5 The following document describes the kernel initialisation parameter
6 structure, otherwise known as 'struct param_struct' which is used
7 for most ARM Linux architectures.
8
9 This structure is used to pass initialisation parameters from the
10 kernel loader to the Linux kernel proper, and may be short lived
11 through the kernel initialisation process. As a general rule, it
12 should not be referenced outside of arch/arm/kernel/setup.c:setup_arch().
13
14 There are a lot of parameters listed in there, and they are described
15 below:
16
17 page_size
18 This parameter must be set to the page size of the machine, and
19 will be checked by the kernel.
20
21 nr_pages
22 This is the total number of pages of memory in the system. If
23 the memory is banked, then this should contain the total number
24 of pages in the system.
25
26 If the system contains separate VRAM, this value should not
27 include this information.
28
29 ramdisk_size
30 This is now obsolete, and should not be used.
31
32 flags
33 Various kernel flags, including:
34
35 ===== ========================
36 bit 0 1 = mount root read only
37 bit 1 unused
38 bit 2 0 = load ramdisk
39 bit 3 0 = prompt for ramdisk
40 ===== ========================
41
42 rootdev
43 major/minor number pair of device to mount as the root filesystem.
44
45 video_num_cols / video_num_rows
46 These two together describe the character size of the dummy console,
47 or VGA console character size. They should not be used for any other
48 purpose.
49
50 It's generally a good idea to set these to be either standard VGA, or
51 the equivalent character size of your fbcon display. This then allows
52 all the bootup messages to be displayed correctly.
53
54 video_x / video_y
55 This describes the character position of cursor on VGA console, and
56 is otherwise unused. (should not be used for other console types, and
57 should not be used for other purposes).
58
59 memc_control_reg
60 MEMC chip control register for Acorn Archimedes and Acorn A5000
61 based machines. May be used differently by different architectures.
62
63 sounddefault
64 Default sound setting on Acorn machines. May be used differently by
65 different architectures.
66
67 adfsdrives
68 Number of ADFS/MFM disks. May be used differently by different
69 architectures.
70
71 bytes_per_char_h / bytes_per_char_v
72 These are now obsolete, and should not be used.
73
74 pages_in_bank[4]
75 Number of pages in each bank of the systems memory (used for RiscPC).
76 This is intended to be used on systems where the physical memory
77 is non-contiguous from the processors point of view.
78
79 pages_in_vram
80 Number of pages in VRAM (used on Acorn RiscPC). This value may also
81 be used by loaders if the size of the video RAM can't be obtained
82 from the hardware.
83
84 initrd_start / initrd_size
85 This describes the kernel virtual start address and size of the
86 initial ramdisk.
87
88 rd_start
89 Start address in sectors of the ramdisk image on a floppy disk.
90
91 system_rev
92 system revision number.
93
94 system_serial_low / system_serial_high
95 system 64-bit serial number
96
97 mem_fclk_21285
98 The speed of the external oscillator to the 21285 (footbridge),
99 which control's the speed of the memory bus, timer & serial port.
100 Depending upon the speed of the cpu its value can be between
101 0-66 MHz. If no params are passed or a value of zero is passed,
102 then a value of 50 Mhz is the default on 21285 architectures.
103
104 paths[8][128]
105 These are now obsolete, and should not be used.
106
107 commandline
108 Kernel command line parameters. Details can be found elsewhere.
109

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Kernel initialisation parameters on ARM Linux

1-16

이 문서는 대부분의 ARM Linux architecture가 사용하는 kernel initialization parameter structure인 `struct param_struct`를 설명합니다.

이 structure는 kernel loader에서 실제 Linux kernel로 initialization parameter를 전달하며 kernel initialization 동안만 잠시 존재할 수 있습니다. 일반 원칙상 `arch/arm/kernel/setup.c:setup_arch()` 밖에서 참조하면 안 됩니다.

Memory and ramdisk parameters

17-31
parameter설명
`page_size`machine의 page size로 설정해야 하며 kernel이 값을 검사합니다.
`nr_pages`system 전체 memory page 수. memory가 bank로 나뉘어도 합계이며 별도 VRAM은 포함하지 않습니다.
`ramdisk_size`obsolete이므로 사용하면 안 됩니다.

Flags, root device and console geometry

32-58

`flags`에는 다음 kernel flag bit가 들어갑니다.

bit값과 의미
bit 0`1` = root를 read-only로 mount
bit 1unused
bit 2`0` = ramdisk load
bit 3`0` = ramdisk를 요청하는 prompt 표시
parameter설명
`rootdev`root filesystem으로 mount할 device의 major/minor number pair
`video_num_cols` / `video_num_rows`dummy console 또는 VGA console의 character 크기. 표준 VGA나 fbcon display와 같은 character 크기로 두면 boot message를 올바르게 표시할 수 있으며 다른 목적으로 쓰면 안 됩니다.
`video_x` / `video_y`VGA console cursor의 character position. 다른 console type이나 다른 용도로 쓰면 안 됩니다.

Legacy platform and bank parameters

59-83
parameter설명
`memc_control_reg`Acorn Archimedes와 A5000 계열 machine의 MEMC chip control register. architecture마다 다르게 쓸 수 있습니다.
`sounddefault`Acorn machine의 기본 sound 설정. architecture마다 다르게 쓸 수 있습니다.
`adfsdrives`ADFS/MFM disk 수. architecture마다 다르게 쓸 수 있습니다.
`bytes_per_char_h` / `bytes_per_char_v`obsolete이므로 사용하면 안 됩니다.
`pages_in_bank[4]`RiscPC에서 각 system memory bank의 page 수. processor 관점에서 physical memory가 연속적이지 않은 system용입니다.
`pages_in_vram`Acorn RiscPC의 VRAM page 수. hardware에서 video RAM 크기를 얻을 수 없을 때 loader도 사용할 수 있습니다.

Initial RAM disk and system identity

84-108
parameter설명
`initrd_start` / `initrd_size`initial ramdisk의 kernel virtual 시작 address와 크기
`rd_start`floppy disk 안 ramdisk image의 sector 단위 시작 address
`system_rev`system revision number
`system_serial_low` / `system_serial_high`system의 64-bit serial number
`mem_fclk_21285`21285(footbridge) 외부 oscillator 속도. memory bus, timer, serial port 속도를 제어하며 CPU에 따라 0~66MHz입니다. parameter가 없거나 0이면 21285 architecture에서 50MHz가 기본입니다.
`paths[8][128]`obsolete이므로 사용하면 안 됩니다.
`commandline`kernel command-line parameter. 상세 내용은 다른 문서에 있습니다.