aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-02-19 01:24:22 -0500
committerDavid S. Miller <davem@davemloft.net>2014-02-19 01:24:22 -0500
commit1e8d6421cff2c24fe0b345711e7a21af02e8bcf5 (patch)
tree773b30106efb9b48055bc93958e5a94ac53768ce /Documentation
parentf7b12606b5de323a2bb5ca1696558efde8f25441 (diff)
parent960dfc4eb23a28495276b02604d7458e0e1a1ed8 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/bonding/bond_3ad.h drivers/net/bonding/bond_main.c Two minor conflicts in bonding, both of which were overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/ABI/testing/sysfs-tty3
-rw-r--r--Documentation/devicetree/bindings/mmc/atmel-hsmci.txt5
-rw-r--r--Documentation/devicetree/bindings/net/sti-dwmac.txt58
-rw-r--r--Documentation/devicetree/bindings/power/bq2415x.txt47
-rw-r--r--Documentation/devicetree/bindings/spi/spi_atmel.txt5
-rw-r--r--Documentation/devicetree/bindings/vendor-prefixes.txt6
-rw-r--r--Documentation/i2c/instantiating-devices41
-rw-r--r--Documentation/networking/3c505.txt45
-rw-r--r--Documentation/phy.txt26
-rw-r--r--Documentation/spi/spi-summary17
-rw-r--r--Documentation/zh_CN/arm64/booting.txt65
-rw-r--r--Documentation/zh_CN/arm64/memory.txt46
-rw-r--r--Documentation/zh_CN/arm64/tagged-pointers.txt52
13 files changed, 334 insertions, 82 deletions
diff --git a/Documentation/ABI/testing/sysfs-tty b/Documentation/ABI/testing/sysfs-tty
index ad22fb0ee765..a2ccec35ffce 100644
--- a/Documentation/ABI/testing/sysfs-tty
+++ b/Documentation/ABI/testing/sysfs-tty
@@ -3,7 +3,8 @@ Date: Nov 2010
3Contact: Kay Sievers <kay.sievers@vrfy.org> 3Contact: Kay Sievers <kay.sievers@vrfy.org>
4Description: 4Description:
5 Shows the list of currently configured 5 Shows the list of currently configured
6 console devices, like 'tty1 ttyS0'. 6 tty devices used for the console,
7 like 'tty1 ttyS0'.
7 The last entry in the file is the active 8 The last entry in the file is the active
8 device connected to /dev/console. 9 device connected to /dev/console.
9 The file supports poll() to detect virtual 10 The file supports poll() to detect virtual
diff --git a/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt b/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt
index 0a85c70cd30a..07ad02075a93 100644
--- a/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt
+++ b/Documentation/devicetree/bindings/mmc/atmel-hsmci.txt
@@ -13,6 +13,9 @@ Required properties:
13- #address-cells: should be one. The cell is the slot id. 13- #address-cells: should be one. The cell is the slot id.
14- #size-cells: should be zero. 14- #size-cells: should be zero.
15- at least one slot node 15- at least one slot node
16- clock-names: tuple listing input clock names.
17 Required elements: "mci_clk"
18- clocks: phandles to input clocks.
16 19
17The node contains child nodes for each slot that the platform uses 20The node contains child nodes for each slot that the platform uses
18 21
@@ -24,6 +27,8 @@ mmc0: mmc@f0008000 {
24 interrupts = <12 4>; 27 interrupts = <12 4>;
25 #address-cells = <1>; 28 #address-cells = <1>;
26 #size-cells = <0>; 29 #size-cells = <0>;
30 clock-names = "mci_clk";
31 clocks = <&mci0_clk>;
27 32
28 [ child node definitions...] 33 [ child node definitions...]
29}; 34};
diff --git a/Documentation/devicetree/bindings/net/sti-dwmac.txt b/Documentation/devicetree/bindings/net/sti-dwmac.txt
new file mode 100644
index 000000000000..3dd3d0bf112f
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/sti-dwmac.txt
@@ -0,0 +1,58 @@
1STMicroelectronics SoC DWMAC glue layer controller
2
3The device node has following properties.
4
5Required properties:
6 - compatible : Can be "st,stih415-dwmac", "st,stih416-dwmac" or
7 "st,stid127-dwmac".
8 - reg : Offset of the glue configuration register map in system
9 configuration regmap pointed by st,syscon property and size.
10
11 - reg-names : Should be "sti-ethconf".
12
13 - st,syscon : Should be phandle to system configuration node which
14 encompases this glue registers.
15
16 - st,tx-retime-src: On STi Parts for Giga bit speeds, 125Mhz clocks can be
17 wired up in from different sources. One via TXCLK pin and other via CLK_125
18 pin. This wiring is totally board dependent. However the retiming glue
19 logic should be configured accordingly. Possible values for this property
20
21 "txclk" - if 125Mhz clock is wired up via txclk line.
22 "clk_125" - if 125Mhz clock is wired up via clk_125 line.
23
24 This property is only valid for Giga bit setup( GMII, RGMII), and it is
25 un-used for non-giga bit (MII and RMII) setups. Also note that internal
26 clockgen can not generate stable 125Mhz clock.
27
28 - st,ext-phyclk: This boolean property indicates who is generating the clock
29 for tx and rx. This property is only valid for RMII case where the clock can
30 be generated from the MAC or PHY.
31
32 - clock-names: should be "sti-ethclk".
33 - clocks: Should point to ethernet clockgen which can generate phyclk.
34
35
36Example:
37
38ethernet0: dwmac@fe810000 {
39 device_type = "network";
40 compatible = "st,stih416-dwmac", "snps,dwmac", "snps,dwmac-3.710";
41 reg = <0xfe810000 0x8000>, <0x8bc 0x4>;
42 reg-names = "stmmaceth", "sti-ethconf";
43 interrupts = <0 133 0>, <0 134 0>, <0 135 0>;
44 interrupt-names = "macirq", "eth_wake_irq", "eth_lpi";
45 phy-mode = "mii";
46
47 st,syscon = <&syscfg_rear>;
48
49 snps,pbl = <32>;
50 snps,mixed-burst;
51
52 resets = <&softreset STIH416_ETH0_SOFTRESET>;
53 reset-names = "stmmaceth";
54 pinctrl-0 = <&pinctrl_mii0>;
55 pinctrl-names = "default";
56 clocks = <&CLK_S_GMAC0_PHY>;
57 clock-names = "stmmaceth";
58};
diff --git a/Documentation/devicetree/bindings/power/bq2415x.txt b/Documentation/devicetree/bindings/power/bq2415x.txt
new file mode 100644
index 000000000000..d0327f0b59ad
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/bq2415x.txt
@@ -0,0 +1,47 @@
1Binding for TI bq2415x Li-Ion Charger
2
3Required properties:
4- compatible: Should contain one of the following:
5 * "ti,bq24150"
6 * "ti,bq24150"
7 * "ti,bq24150a"
8 * "ti,bq24151"
9 * "ti,bq24151a"
10 * "ti,bq24152"
11 * "ti,bq24153"
12 * "ti,bq24153a"
13 * "ti,bq24155"
14 * "ti,bq24156"
15 * "ti,bq24156a"
16 * "ti,bq24158"
17- reg: integer, i2c address of the device.
18- ti,current-limit: integer, initial maximum current charger can pull
19 from power supply in mA.
20- ti,weak-battery-voltage: integer, weak battery voltage threshold in mV.
21 The chip will use slow precharge if battery voltage
22 is below this value.
23- ti,battery-regulation-voltage: integer, maximum charging voltage in mV.
24- ti,charge-current: integer, maximum charging current in mA.
25- ti,termination-current: integer, charge will be terminated when current in
26 constant-voltage phase drops below this value (in mA).
27- ti,resistor-sense: integer, value of sensing resistor in milliohm.
28
29Optional properties:
30- ti,usb-charger-detection: phandle to usb charger detection device.
31 (required for auto mode)
32
33Example from Nokia N900:
34
35bq24150a {
36 compatible = "ti,bq24150a";
37 reg = <0x6b>;
38
39 ti,current-limit = <100>;
40 ti,weak-battery-voltage = <3400>;
41 ti,battery-regulation-voltage = <4200>;
42 ti,charge-current = <650>;
43 ti,termination-current = <100>;
44 ti,resistor-sense = <68>;
45
46 ti,usb-charger-detection = <&isp1704>;
47};
diff --git a/Documentation/devicetree/bindings/spi/spi_atmel.txt b/Documentation/devicetree/bindings/spi/spi_atmel.txt
index 07e04cdc0c9e..4f8184d069cb 100644
--- a/Documentation/devicetree/bindings/spi/spi_atmel.txt
+++ b/Documentation/devicetree/bindings/spi/spi_atmel.txt
@@ -5,6 +5,9 @@ Required properties:
5- reg: Address and length of the register set for the device 5- reg: Address and length of the register set for the device
6- interrupts: Should contain spi interrupt 6- interrupts: Should contain spi interrupt
7- cs-gpios: chipselects 7- cs-gpios: chipselects
8- clock-names: tuple listing input clock names.
9 Required elements: "spi_clk"
10- clocks: phandles to input clocks.
8 11
9Example: 12Example:
10 13
@@ -14,6 +17,8 @@ spi1: spi@fffcc000 {
14 interrupts = <13 4 5>; 17 interrupts = <13 4 5>;
15 #address-cells = <1>; 18 #address-cells = <1>;
16 #size-cells = <0>; 19 #size-cells = <0>;
20 clocks = <&spi1_clk>;
21 clock-names = "spi_clk";
17 cs-gpios = <&pioB 3 0>; 22 cs-gpios = <&pioB 3 0>;
18 status = "okay"; 23 status = "okay";
19 24
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index 3f900cd51bf0..40ce2df0e0e9 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -8,6 +8,7 @@ ad Avionic Design GmbH
8adi Analog Devices, Inc. 8adi Analog Devices, Inc.
9aeroflexgaisler Aeroflex Gaisler AB 9aeroflexgaisler Aeroflex Gaisler AB
10ak Asahi Kasei Corp. 10ak Asahi Kasei Corp.
11allwinner Allwinner Technology Co., Ltd.
11altr Altera Corp. 12altr Altera Corp.
12amcc Applied Micro Circuits Corporation (APM, formally AMCC) 13amcc Applied Micro Circuits Corporation (APM, formally AMCC)
13amstaos AMS-Taos Inc. 14amstaos AMS-Taos Inc.
@@ -40,6 +41,7 @@ gmt Global Mixed-mode Technology, Inc.
40gumstix Gumstix, Inc. 41gumstix Gumstix, Inc.
41haoyu Haoyu Microelectronic Co. Ltd. 42haoyu Haoyu Microelectronic Co. Ltd.
42hisilicon Hisilicon Limited. 43hisilicon Hisilicon Limited.
44honeywell Honeywell
43hp Hewlett Packard 45hp Hewlett Packard
44ibm International Business Machines (IBM) 46ibm International Business Machines (IBM)
45idt Integrated Device Technologies, Inc. 47idt Integrated Device Technologies, Inc.
@@ -55,6 +57,7 @@ maxim Maxim Integrated Products
55microchip Microchip Technology Inc. 57microchip Microchip Technology Inc.
56mosaixtech Mosaix Technologies, Inc. 58mosaixtech Mosaix Technologies, Inc.
57national National Semiconductor 59national National Semiconductor
60neonode Neonode Inc.
58nintendo Nintendo 61nintendo Nintendo
59nvidia NVIDIA 62nvidia NVIDIA
60nxp NXP Semiconductors 63nxp NXP Semiconductors
@@ -64,7 +67,7 @@ phytec PHYTEC Messtechnik GmbH
64picochip Picochip Ltd 67picochip Picochip Ltd
65powervr PowerVR (deprecated, use img) 68powervr PowerVR (deprecated, use img)
66qca Qualcomm Atheros, Inc. 69qca Qualcomm Atheros, Inc.
67qcom Qualcomm, Inc. 70qcom Qualcomm Technologies, Inc
68ralink Mediatek/Ralink Technology Corp. 71ralink Mediatek/Ralink Technology Corp.
69ramtron Ramtron International 72ramtron Ramtron International
70realtek Realtek Semiconductor Corp. 73realtek Realtek Semiconductor Corp.
@@ -78,6 +81,7 @@ silabs Silicon Laboratories
78simtek 81simtek
79sirf SiRF Technology, Inc. 82sirf SiRF Technology, Inc.
80snps Synopsys, Inc. 83snps Synopsys, Inc.
84spansion Spansion Inc.
81st STMicroelectronics 85st STMicroelectronics
82ste ST-Ericsson 86ste ST-Ericsson
83stericsson ST-Ericsson 87stericsson ST-Ericsson
diff --git a/Documentation/i2c/instantiating-devices b/Documentation/i2c/instantiating-devices
index c70e7a7638d1..0d85ac1935b7 100644
--- a/Documentation/i2c/instantiating-devices
+++ b/Documentation/i2c/instantiating-devices
@@ -8,8 +8,8 @@ reason, the kernel code must instantiate I2C devices explicitly. There are
8several ways to achieve this, depending on the context and requirements. 8several ways to achieve this, depending on the context and requirements.
9 9
10 10
11Method 1: Declare the I2C devices by bus number 11Method 1a: Declare the I2C devices by bus number
12----------------------------------------------- 12------------------------------------------------
13 13
14This method is appropriate when the I2C bus is a system bus as is the case 14This method is appropriate when the I2C bus is a system bus as is the case
15for many embedded systems. On such systems, each I2C bus has a number 15for many embedded systems. On such systems, each I2C bus has a number
@@ -51,6 +51,43 @@ The devices will be automatically unbound and destroyed when the I2C bus
51they sit on goes away (if ever.) 51they sit on goes away (if ever.)
52 52
53 53
54Method 1b: Declare the I2C devices via devicetree
55-------------------------------------------------
56
57This method has the same implications as method 1a. The declaration of I2C
58devices is here done via devicetree as subnodes of the master controller.
59
60Example:
61
62 i2c1: i2c@400a0000 {
63 /* ... master properties skipped ... */
64 clock-frequency = <100000>;
65
66 flash@50 {
67 compatible = "atmel,24c256";
68 reg = <0x50>;
69 };
70
71 pca9532: gpio@60 {
72 compatible = "nxp,pca9532";
73 gpio-controller;
74 #gpio-cells = <2>;
75 reg = <0x60>;
76 };
77 };
78
79Here, two devices are attached to the bus using a speed of 100kHz. For
80additional properties which might be needed to set up the device, please refer
81to its devicetree documentation in Documentation/devicetree/bindings/.
82
83
84Method 1c: Declare the I2C devices via ACPI
85-------------------------------------------
86
87ACPI can also describe I2C devices. There is special documentation for this
88which is currently located at Documentation/acpi/enumeration.txt.
89
90
54Method 2: Instantiate the devices explicitly 91Method 2: Instantiate the devices explicitly
55-------------------------------------------- 92--------------------------------------------
56 93
diff --git a/Documentation/networking/3c505.txt b/Documentation/networking/3c505.txt
deleted file mode 100644
index 72f38b13101d..000000000000
--- a/Documentation/networking/3c505.txt
+++ /dev/null
@@ -1,45 +0,0 @@
1The 3Com Etherlink Plus (3c505) driver.
2
3This driver now uses DMA. There is currently no support for PIO operation.
4The default DMA channel is 6; this is _not_ autoprobed, so you must
5make sure you configure it correctly. If loading the driver as a
6module, you can do this with "modprobe 3c505 dma=n". If the driver is
7linked statically into the kernel, you must either use an "ether="
8statement on the command line, or change the definition of ELP_DMA in 3c505.h.
9
10The driver will warn you if it has to fall back on the compiled in
11default DMA channel.
12
13If no base address is given at boot time, the driver will autoprobe
14ports 0x300, 0x280 and 0x310 (in that order). If no IRQ is given, the driver
15will try to probe for it.
16
17The driver can be used as a loadable module.
18
19Theoretically, one instance of the driver can now run multiple cards,
20in the standard way (when loading a module, say "modprobe 3c505
21io=0x300,0x340 irq=10,11 dma=6,7" or whatever). I have not tested
22this, though.
23
24The driver may now support revision 2 hardware; the dependency on
25being able to read the host control register has been removed. This
26is also untested, since I don't have a suitable card.
27
28Known problems:
29 I still see "DMA upload timed out" messages from time to time. These
30seem to be fairly non-fatal though.
31 The card is old and slow.
32
33To do:
34 Improve probe/setup code
35 Test multicast and promiscuous operation
36
37Authors:
38 The driver is mainly written by Craig Southeren, email
39 <craigs@ineluki.apana.org.au>.
40 Parts of the driver (adapting the driver to 1.1.4+ kernels,
41 IRQ/address detection, some changes) and this README by
42 Juha Laiho <jlaiho@ichaos.nullnet.fi>.
43 DMA mode, more fixes, etc, by Philip Blundell <pjb27@cam.ac.uk>
44 Multicard support, Software configurable DMA, etc., by
45 Christopher Collins <ccollins@pcug.org.au>
diff --git a/Documentation/phy.txt b/Documentation/phy.txt
index 0103e4b15b0e..ebff6ee52441 100644
--- a/Documentation/phy.txt
+++ b/Documentation/phy.txt
@@ -75,14 +75,26 @@ Before the controller can make use of the PHY, it has to get a reference to
75it. This framework provides the following APIs to get a reference to the PHY. 75it. This framework provides the following APIs to get a reference to the PHY.
76 76
77struct phy *phy_get(struct device *dev, const char *string); 77struct phy *phy_get(struct device *dev, const char *string);
78struct phy *phy_optional_get(struct device *dev, const char *string);
78struct phy *devm_phy_get(struct device *dev, const char *string); 79struct phy *devm_phy_get(struct device *dev, const char *string);
79 80struct phy *devm_phy_optional_get(struct device *dev, const char *string);
80phy_get and devm_phy_get can be used to get the PHY. In the case of dt boot, 81
81the string arguments should contain the phy name as given in the dt data and 82phy_get, phy_optional_get, devm_phy_get and devm_phy_optional_get can
82in the case of non-dt boot, it should contain the label of the PHY. 83be used to get the PHY. In the case of dt boot, the string arguments
83The only difference between the two APIs is that devm_phy_get associates the 84should contain the phy name as given in the dt data and in the case of
84device with the PHY using devres on successful PHY get. On driver detach, 85non-dt boot, it should contain the label of the PHY. The two
85release function is invoked on the the devres data and devres data is freed. 86devm_phy_get associates the device with the PHY using devres on
87successful PHY get. On driver detach, release function is invoked on
88the the devres data and devres data is freed. phy_optional_get and
89devm_phy_optional_get should be used when the phy is optional. These
90two functions will never return -ENODEV, but instead returns NULL when
91the phy cannot be found.
92
93It should be noted that NULL is a valid phy reference. All phy
94consumer calls on the NULL phy become NOPs. That is the release calls,
95the phy_init() and phy_exit() calls, and phy_power_on() and
96phy_power_off() calls are all NOP when applied to a NULL phy. The NULL
97phy is useful in devices for handling optional phy devices.
86 98
875. Releasing a reference to the PHY 995. Releasing a reference to the PHY
88 100
diff --git a/Documentation/spi/spi-summary b/Documentation/spi/spi-summary
index f72e0d1e0da8..7982bcc4d151 100644
--- a/Documentation/spi/spi-summary
+++ b/Documentation/spi/spi-summary
@@ -543,7 +543,22 @@ SPI MASTER METHODS
543 queuing transfers that arrive in the meantime. When the driver is 543 queuing transfers that arrive in the meantime. When the driver is
544 finished with this message, it must call 544 finished with this message, it must call
545 spi_finalize_current_message() so the subsystem can issue the next 545 spi_finalize_current_message() so the subsystem can issue the next
546 transfer. This may sleep. 546 message. This may sleep.
547
548 master->transfer_one(struct spi_master *master, struct spi_device *spi,
549 struct spi_transfer *transfer)
550 The subsystem calls the driver to transfer a single transfer while
551 queuing transfers that arrive in the meantime. When the driver is
552 finished with this transfer, it must call
553 spi_finalize_current_transfer() so the subsystem can issue the next
554 transfer. This may sleep. Note: transfer_one and transfer_one_message
555 are mutually exclusive; when both are set, the generic subsystem does
556 not call your transfer_one callback.
557
558 Return values:
559 negative errno: error
560 0: transfer is finished
561 1: transfer is still in progress
547 562
548 DEPRECATED METHODS 563 DEPRECATED METHODS
549 564
diff --git a/Documentation/zh_CN/arm64/booting.txt b/Documentation/zh_CN/arm64/booting.txt
index 28fa325b7461..6f6d956ac1c9 100644
--- a/Documentation/zh_CN/arm64/booting.txt
+++ b/Documentation/zh_CN/arm64/booting.txt
@@ -7,7 +7,7 @@ help. Contact the Chinese maintainer if this translation is outdated
7or if there is a problem with the translation. 7or if there is a problem with the translation.
8 8
9Maintainer: Will Deacon <will.deacon@arm.com> 9Maintainer: Will Deacon <will.deacon@arm.com>
10Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> 10Chinese maintainer: Fu Wei <wefu@redhat.com>
11--------------------------------------------------------------------- 11---------------------------------------------------------------------
12Documentation/arm64/booting.txt 的中文翻译 12Documentation/arm64/booting.txt 的中文翻译
13 13
@@ -16,9 +16,9 @@ Documentation/arm64/booting.txt 的中文翻译
16译存在问题,请联系中文版维护者。 16译存在问题,请联系中文版维护者。
17 17
18英文版维护者: Will Deacon <will.deacon@arm.com> 18英文版维护者: Will Deacon <will.deacon@arm.com>
19中文版维护者: 傅炜 Fu Wei <tekkamanninja@gmail.com> 19中文版维护者: 傅炜 Fu Wei <wefu@redhat.com>
20中文版翻译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> 20中文版翻译者: 傅炜 Fu Wei <wefu@redhat.com>
21中文版校译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> 21中文版校译者: 傅炜 Fu Wei <wefu@redhat.com>
22 22
23以下为正文 23以下为正文
24--------------------------------------------------------------------- 24---------------------------------------------------------------------
@@ -64,8 +64,8 @@ RAM,或可能使用对这个设备已知的 RAM 信息,还可能使用任何
64 64
65必要性: 强制 65必要性: 强制
66 66
67设备树数据块(dtb)不大于 2 MB于从内核映像起始算起第一个 67设备树数据块(dtb)必须 8 字节对齐位于从内核映像起始算起第一个 512MB
68512MB 2MB 边界。这使得内核可以通过初始页表中的单个节描述符来 68,且不得跨越 2MB 对齐边界。这使得内核可以通过初始页表中的单个节描述符来
69映射此数据块。 69映射此数据块。
70 70
71 71
@@ -84,13 +84,23 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
84 84
85必要性: 强制 85必要性: 强制
86 86
87已解压的内核映像包含一个 32 字节的头,内容如下: 87已解压的内核映像包含一个 64 字节的头,内容如下:
88 88
89 u32 magic = 0x14000008; /* 跳转到 stext, */ 89 u32 code0; /* 执行代码 */
90 u32 res0 = 0; /* */ 90 u32 code1; /* 可执行 */
91 u64 text_offset; /* 映像装载偏移 */ 91 u64 text_offset; /* 映像装载偏移 */
92 u64 res0 = 0; /* 保留 */
92 u64 res1 = 0; /* 保留 */ 93 u64 res1 = 0; /* 保留 */
93 u64 res2 = 0; /* 保留 */ 94 u64 res2 = 0; /* 保留 */
95 u64 res3 = 0; /* 保留 */
96 u64 res4 = 0; /* 保留 */
97 u32 magic = 0x644d5241; /* 魔数, 小端, "ARM\x64" */
98 u32 res5 = 0; /* 保留 */
99
100
101映像头注释:
102
103- code0/code1 负责跳转到 stext.
94 104
95映像必须位于系统 RAM 起始处的特定偏移(当前是 0x80000)。系统 RAM 105映像必须位于系统 RAM 起始处的特定偏移(当前是 0x80000)。系统 RAM
96的起始地址必须是以 2MB 对齐的。 106的起始地址必须是以 2MB 对齐的。
@@ -118,9 +128,9 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
118 外部高速缓存(如果存在)必须配置并禁用。 128 外部高速缓存(如果存在)必须配置并禁用。
119 129
120- 架构计时器 130- 架构计时器
121 CNTFRQ 必须设定为计时器的频率 131 CNTFRQ 必须设定为计时器的频率,且 CNTVOFF 必须设定为对有 CPU
122 如果在 EL1 模式下进入内核,则 CNTHCTL_EL2 中的 EL1PCTEN (bit 0) 132 都一致的果在 EL1 模式下进入内核,则 CNTHCTL_EL2 中的
123 必须置位。 133 EL1PCTEN (bit 0) 必须置位。
124 134
125- 一致性 135- 一致性
126 通过内核启动的所有 CPU 在内核入口地址上必须处于相同的一致性域中。 136 通过内核启动的所有 CPU 在内核入口地址上必须处于相同的一致性域中。
@@ -131,23 +141,40 @@ AArch64 内核当前没有提供自解压代码,因此如果使用了压缩内
131 在进入内核映像的异常级中,所有构架中可写的系统寄存器必须通过软件 141 在进入内核映像的异常级中,所有构架中可写的系统寄存器必须通过软件
132 在一个更高的异常级别下初始化,以防止在 未知 状态下运行。 142 在一个更高的异常级别下初始化,以防止在 未知 状态下运行。
133 143
144以上对于 CPU 模式、高速缓存、MMU、架构计时器、一致性、系统寄存器的
145必要条件描述适用于所有 CPU。所有 CPU 必须在同一异常级别跳入内核。
146
134引导装载程序必须在每个 CPU 处于以下状态时跳入内核入口: 147引导装载程序必须在每个 CPU 处于以下状态时跳入内核入口:
135 148
136- 主 CPU 必须直接跳入内核映像的第一条指令。通过此 CPU 传递的设备树 149- 主 CPU 必须直接跳入内核映像的第一条指令。通过此 CPU 传递的设备树
137 数据块必须在每个 CPU 节点中包含以下内容: 150 数据块必须在每个 CPU 节点中包含一个 ‘enable-method’ 属性,所
138 151 支持的 enable-method 请见下文。
139 1、‘enable-method’属性。目前,此字段支持的值仅为字符串“spin-table”。
140
141 2、‘cpu-release-addr’标识一个 64-bit、初始化为零的内存位置。
142 152
143 引导装载程序必须生成这些设备树属性,并在跳入内核入口之前将其插入 153 引导装载程序必须生成这些设备树属性,并在跳入内核入口之前将其插入
144 数据块。 154 数据块。
145 155
146- 任何辅助 CPU 必须在内存保留区(通过设备树中的 /memreserve/ 域传递 156- enable-method 为 “spin-table” 的 CPU 必须在它们的 CPU
157 节点中包含一个 ‘cpu-release-addr’ 属性。这个属性标识了一个
158 64 位自然对齐且初始化为零的内存位置。
159
160 这些 CPU 必须在内存保留区(通过设备树中的 /memreserve/ 域传递
147 给内核)中自旋于内核之外,轮询它们的 cpu-release-addr 位置(必须 161 给内核)中自旋于内核之外,轮询它们的 cpu-release-addr 位置(必须
148 包含在保留区中)。可通过插入 wfe 指令来降低忙循环开销,而主 CPU 将 162 包含在保留区中)。可通过插入 wfe 指令来降低忙循环开销,而主 CPU 将
149 发出 sev 指令。当对 cpu-release-addr 所指位置的读取操作返回非零值 163 发出 sev 指令。当对 cpu-release-addr 所指位置的读取操作返回非零值
150 时,CPU 必须直接跳入此值所指向的地址。 164 时,CPU 必须跳入此值所指向的地址。此值为一个单独的 64 位小端值,
165 因此 CPU 须在跳转前将所读取的值转换为其本身的端模式。
166
167- enable-method 为 “psci” 的 CPU 保持在内核外(比如,在
168 memory 节点中描述为内核空间的内存区外,或在通过设备树 /memreserve/
169 域中描述为内核保留区的空间中)。内核将会发起在 ARM 文档(编号
170 ARM DEN 0022A:用于 ARM 上的电源状态协调接口系统软件)中描述的
171 CPU_ON 调用来将 CPU 带入内核。
172
173 *译者注:到文档翻译时,此文档已更新为 ARM DEN 0022B。
174
175 设备树必须包含一个 ‘psci’ 节点,请参考以下文档:
176 Documentation/devicetree/bindings/arm/psci.txt
177
151 178
152- 辅助 CPU 通用寄存器设置 179- 辅助 CPU 通用寄存器设置
153 x0 = 0 (保留,将来可能使用) 180 x0 = 0 (保留,将来可能使用)
diff --git a/Documentation/zh_CN/arm64/memory.txt b/Documentation/zh_CN/arm64/memory.txt
index a5f6283829f9..a782704c1cb5 100644
--- a/Documentation/zh_CN/arm64/memory.txt
+++ b/Documentation/zh_CN/arm64/memory.txt
@@ -7,7 +7,7 @@ help. Contact the Chinese maintainer if this translation is outdated
7or if there is a problem with the translation. 7or if there is a problem with the translation.
8 8
9Maintainer: Catalin Marinas <catalin.marinas@arm.com> 9Maintainer: Catalin Marinas <catalin.marinas@arm.com>
10Chinese maintainer: Fu Wei <tekkamanninja@gmail.com> 10Chinese maintainer: Fu Wei <wefu@redhat.com>
11--------------------------------------------------------------------- 11---------------------------------------------------------------------
12Documentation/arm64/memory.txt 的中文翻译 12Documentation/arm64/memory.txt 的中文翻译
13 13
@@ -16,9 +16,9 @@ Documentation/arm64/memory.txt 的中文翻译
16译存在问题,请联系中文版维护者。 16译存在问题,请联系中文版维护者。
17 17
18英文版维护者: Catalin Marinas <catalin.marinas@arm.com> 18英文版维护者: Catalin Marinas <catalin.marinas@arm.com>
19中文版维护者: 傅炜 Fu Wei <tekkamanninja@gmail.com> 19中文版维护者: 傅炜 Fu Wei <wefu@redhat.com>
20中文版翻译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> 20中文版翻译者: 傅炜 Fu Wei <wefu@redhat.com>
21中文版校译者: 傅炜 Fu Wei <tekkamanninja@gmail.com> 21中文版校译者: 傅炜 Fu Wei <wefu@redhat.com>
22 22
23以下为正文 23以下为正文
24--------------------------------------------------------------------- 24---------------------------------------------------------------------
@@ -41,7 +41,7 @@ AArch64 Linux 使用页大小为 4KB 的 3 级转换表配置,对于用户和
41TTBR1 中,且从不写入 TTBR0。 41TTBR1 中,且从不写入 TTBR0。
42 42
43 43
44AArch64 Linux 内存布局: 44AArch64 Linux 页大小为 4KB 时的存布局:
45 45
46起始地址 结束地址 大小 用途 46起始地址 结束地址 大小 用途
47----------------------------------------------------------------------- 47-----------------------------------------------------------------------
@@ -55,15 +55,42 @@ ffffffbc00000000 ffffffbdffffffff 8GB vmemmap
55 55
56ffffffbe00000000 ffffffbffbbfffff ~8GB [防护页,未来用于 vmmemap] 56ffffffbe00000000 ffffffbffbbfffff ~8GB [防护页,未来用于 vmmemap]
57 57
58ffffffbffbc00000 ffffffbffbdfffff 2MB earlyprintk 设备
59
58ffffffbffbe00000 ffffffbffbe0ffff 64KB PCI I/O 空间 60ffffffbffbe00000 ffffffbffbe0ffff 64KB PCI I/O 空间
59 61
60ffffffbbffff0000 ffffffbcffffffff ~2MB [防护页] 62ffffffbffbe10000 ffffffbcffffffff ~2MB [防护页]
61 63
62ffffffbffc000000 ffffffbfffffffff 64MB 模块 64ffffffbffc000000 ffffffbfffffffff 64MB 模块
63 65
64ffffffc000000000 ffffffffffffffff 256GB 内核逻辑内存映射 66ffffffc000000000 ffffffffffffffff 256GB 内核逻辑内存映射
65 67
66 68
69AArch64 Linux 在页大小为 64KB 时的内存布局:
70
71起始地址 结束地址 大小 用途
72-----------------------------------------------------------------------
730000000000000000 000003ffffffffff 4TB 用户空间
74
75fffffc0000000000 fffffdfbfffeffff ~2TB vmalloc
76
77fffffdfbffff0000 fffffdfbffffffff 64KB [防护页]
78
79fffffdfc00000000 fffffdfdffffffff 8GB vmemmap
80
81fffffdfe00000000 fffffdfffbbfffff ~8GB [防护页,未来用于 vmmemap]
82
83fffffdfffbc00000 fffffdfffbdfffff 2MB earlyprintk 设备
84
85fffffdfffbe00000 fffffdfffbe0ffff 64KB PCI I/O 空间
86
87fffffdfffbe10000 fffffdfffbffffff ~2MB [防护页]
88
89fffffdfffc000000 fffffdffffffffff 64MB 模块
90
91fffffe0000000000 ffffffffffffffff 2TB 内核逻辑内存映射
92
93
674KB 页大小的转换表查找: 944KB 页大小的转换表查找:
68 95
69+--------+--------+--------+--------+--------+--------+--------+--------+ 96+--------+--------+--------+--------+--------+--------+--------+--------+
@@ -91,3 +118,10 @@ ffffffc000000000 ffffffffffffffff 256GB 内核逻辑内存映射
91 | | +--------------------------> [41:29] L2 索引 (仅使用 38:29 ) 118 | | +--------------------------> [41:29] L2 索引 (仅使用 38:29 )
92 | +-------------------------------> [47:42] L1 索引 (未使用) 119 | +-------------------------------> [47:42] L1 索引 (未使用)
93 +-------------------------------------------------> [63] TTBR0/1 120 +-------------------------------------------------> [63] TTBR0/1
121
122当使用 KVM 时, 管理程序(hypervisor)在 EL2 中通过相对内核虚拟地址的
123一个固定偏移来映射内核页(内核虚拟地址的高 24 位设为零):
124
125起始地址 结束地址 大小 用途
126-----------------------------------------------------------------------
1270000004000000000 0000007fffffffff 256GB 在 HYP 中映射的内核对象
diff --git a/Documentation/zh_CN/arm64/tagged-pointers.txt b/Documentation/zh_CN/arm64/tagged-pointers.txt
new file mode 100644
index 000000000000..2664d1bd5a1c
--- /dev/null
+++ b/Documentation/zh_CN/arm64/tagged-pointers.txt
@@ -0,0 +1,52 @@
1Chinese translated version of Documentation/arm64/tagged-pointers.txt
2
3If you have any comment or update to the content, please contact the
4original document maintainer directly. However, if you have a problem
5communicating in English you can also ask the Chinese maintainer for
6help. Contact the Chinese maintainer if this translation is outdated
7or if there is a problem with the translation.
8
9Maintainer: Will Deacon <will.deacon@arm.com>
10Chinese maintainer: Fu Wei <wefu@redhat.com>
11---------------------------------------------------------------------
12Documentation/arm64/tagged-pointers.txt 的中文翻译
13
14如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
15交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
16译存在问题,请联系中文版维护者。
17
18英文版维护者: Will Deacon <will.deacon@arm.com>
19中文版维护者: 傅炜 Fu Wei <wefu@redhat.com>
20中文版翻译者: 傅炜 Fu Wei <wefu@redhat.com>
21中文版校译者: 傅炜 Fu Wei <wefu@redhat.com>
22
23以下为正文
24---------------------------------------------------------------------
25 Linux 在 AArch64 中带标记的虚拟地址
26 =================================
27
28作者: Will Deacon <will.deacon@arm.com>
29日期: 2013 年 06 月 12 日
30
31本文档简述了在 AArch64 地址转换系统中提供的带标记的虚拟地址及其在
32AArch64 Linux 中的潜在用途。
33
34内核提供的地址转换表配置使通过 TTBR0 完成的虚拟地址转换(即用户空间
35映射),其虚拟地址的最高 8 位(63:56)会被转换硬件所忽略。这种机制
36让这些位可供应用程序自由使用,其注意事项如下:
37
38 (1) 内核要求所有传递到 EL1 的用户空间地址带有 0x00 标记。
39 这意味着任何携带用户空间虚拟地址的系统调用(syscall)
40 参数 *必须* 在陷入内核前使它们的最高字节被清零。
41
42 (2) 非零标记在传递信号时不被保存。这意味着在应用程序中利用了
43 标记的信号处理函数无法依赖 siginfo_t 的用户空间虚拟
44 地址所携带的包含其内部域信息的标记。此规则的一个例外是
45 当信号是在调试观察点的异常处理程序中产生的,此时标记的
46 信息将被保存。
47
48 (3) 当使用带标记的指针时需特别留心,因为仅对两个虚拟地址
49 的高字节,C 编译器很可能无法判断它们是不同的。
50
51此构架会阻止对带标记的 PC 指针的利用,因此在异常返回时,其高字节
52将被设置成一个为 “55” 的扩展符。