OSDN Git Service

(split) LDP: Update drafts based on LDP v3.40.
[linuxjm/LDP_man-pages.git] / draft / man2 / kexec_load.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright (C) 2010 Intel Corporation
4 .\" Author: Andi Kleen
5 .\"
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
9 .\"
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
14 .\"
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein.  The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
21 .\" professionally.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
25 .\"*******************************************************************
26 .\"
27 .\" This file was generated with po4a. Translate the source file.
28 .\"
29 .\"*******************************************************************
30 .TH KEXEC_LOAD 2 2010\-11\-04 Linux "Linux Programmer's Manual"
31 .SH 名前
32 kexec_load \- load a new kernel for later execution
33 .SH 書式
34 \fB#include <linux/kexec.h>\fP
35 .br
36 \fBlong kexec_load(unsigned long \fP\fIentry\fP\fB, unsigned long
37 \fP\fInr_segments\fP\fB,\fP
38 .br
39 \fB struct kexec_segment *\fP\fIsegments\fP\fB, unsigned long \fP\fIflags\fP\fB);\fP
40 .SH 説明
41 The \fBkexec_load\fP()  system call loads a new kernel that can be executed
42 later by \fBreboot\fP(2).
43 .PP
44 The \fIflags\fP argument is a mask whose high\-order bits control the operation
45 of the call.  The following values can be specified in \fIflags\fP:
46 .TP 
47 \fBKEXEC_ON_CRASH\fP (since Linux 2.6.13)
48 .\" FIXME figure out how this is really used
49 Execute the new kernel automatically on a system crash.
50 .TP 
51 \fBKEXEC_PRESERVE_CONTEXT\fP (since Linux 2.7.27)
52 Preserve the system hardware and software states before executing the new
53 kernel.  This could be used for system suspend.  This flag is only available
54 if the kernel was configured with \fBCONFIG_KEXEC_JUMP\fP, and is only
55 effective if \fInr_segments\fP is greater than 0.
56 .PP
57 The low\-order bits of \fIflags\fP contain the architecture of the
58 to\-be\-executed kernel.  Specify (OR) the constant \fBKEXEC_ARCH_DEFAULT\fP to
59 use the current architecture, or one of the following architecture constants
60 \fBKEXEC_ARCH_386\fP, \fBKEXEC_ARCH_X86_64\fP, \fBKEXEC_ARCH_PPC\fP,
61 \fBKEXEC_ARCH_PPC64\fP, \fBKEXEC_ARCH_IA_64\fP, \fBKEXEC_ARCH_ARM\fP,
62 \fBKEXEC_ARCH_S390\fP, \fBKEXEC_ARCH_SH\fP, \fBKEXEC_ARCH_MIPS\fP, and
63 \fBKEXEC_ARCH_MIPS_LE\fP.  The architecture must be executable on the CPU of
64 the system.
65
66 The \fIentry\fP argument is the physical entry address in the kernel image.
67 The \fInr_segments\fP argument is the number of segments pointed to by the
68 \fIsegments\fP pointer.  The \fIsegments\fP argument is an array of
69 \fIkexec_segment\fP structures which define the kernel layout:
70 .in +4n
71 .nf
72
73 struct kexec_segment {
74     void   *buf;        /* Buffer in user space */
75     size_t  bufsz;      /* Buffer length in user space */
76     void   *mem;        /* Physical address of kernel */
77     size_t  memsz;      /* Physical address length */
78 };
79 .fi
80 .in
81 .PP
82 .\" FIXME elaborate on the following:
83 The kernel image defined by \fIsegments\fP is copied from the calling process
84 into previously reserved memory.
85 .SH 返り値
86 On success, \fBkexec_load\fP()  returns 0.  On error, \-1 is returned and
87 \fIerrno\fP is set to indicate the error.
88 .SH エラー
89 .TP 
90 \fBEBUSY\fP
91 Another crash kernel is already being loaded or a crash kernel is already in
92 use.
93 .TP 
94 \fBEINVAL\fP
95 .\" KEXEC_SEGMENT_MAX == 16
96 \fIflags\fP is invalid; or \fInr_segments\fP is too large
97 .TP 
98 \fBEPERM\fP
99 The caller does not have the \fBCAP_SYS_BOOT\fP capability.
100 .SH バージョン
101 The \fBkexec_load\fP()  system call first appeared in Linux 2.6.13.
102 .SH 準拠
103 このシステムコールは Linux 固有である。
104 .SH 注意
105 Currently, there is no glibc support for \fBkexec_load\fP().  Call it using
106 \fBsyscall\fP(2).
107 .PP
108 .\" FIXME Andi submitted a patch for this.
109 .\" Check if it got accepted later.
110 The required constants are in the kernel source file \fIlinux/kexec.h\fP, which
111 is not currently exported to glibc.  Therefore, these constants must be
112 defined manually.
113
114 This system call is only available if the kernel was configured with
115 \fBCONFIG_KEXEC\fP.
116 .SH 関連項目
117 \fBreboot\fP(2), \fBsyscall\fP(2)
118 .SH この文書について
119 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.40 の一部
120 である。プロジェクトの説明とバグ報告に関する情報は
121 http://www.kernel.org/doc/man\-pages/ に書かれている。