From nobody Thu Jan 18 01:05:30 2024 X-Original-To: dev-commits-doc-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TFl0p3KPhz57Dbn for ; Thu, 18 Jan 2024 01:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TFl0p1rWWz4YBC; Thu, 18 Jan 2024 01:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705539930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qNN+DcZ+NzhCUpkl2JL34wf8AStQw/TO+9eqeTSg134=; b=BOfIsnk6wp62eW6cGsTNnpVj0dZdRTR6xMhrbBBI0t2FbaCpHPxcTbRpw55Hg1LhOehg1y nQ+3BgmTuDCB4TmuOqdT8PVkZzVYNn5MTwpaYswJBh+S9LGD80O7XPgI5Wf6+RXGYB4fyQ 8Z/Lws1FIjsMtaaCYJzl/cXGOS03V652/N3/J8RbmRGOZJYM65eGCAVnEMWE29iBZo1cOO jWDC2kC5jSqKMzihf5OTtqsFw4JRkW5TepLpuAGDp5RtVkeoFS2ocPhRf5YgAnocH6Jrd+ JJYT7MhB63au+c6r8+Plu1vKb3v13gtFU3MbJGZ6iz+kEyDqNChekFVDCQjL/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705539930; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qNN+DcZ+NzhCUpkl2JL34wf8AStQw/TO+9eqeTSg134=; b=Y2N02CP4QF/r7YC45g8SHEy1YAMoEY8K+E9O0vlYGtqwS+Wo97WorM6GpZDV5lO/diw+xZ POHOoS41+GGSaXDFuYFViXR5x/XolK5CWA6xCra3ZdYSUL+gA7IBXfOrDuduqamwWBED7I dWwTg/D4vV3MXh5cH6Xirk3f5/lUjB4E0Mn0oWlvw0chx/pg1eiFCAFXy9Ja/LHRrRope+ JHrAX+yivP3JJTnkEMcefXCF6Vt0GKLMqS5BD96Ysuu3/DWeabx9k0ZikdgYAHm2Vm89Gq ePNp6As+UntetaCDeUOwhHWN1prS0OCjZzmRF6WX9/8C6JzRDwKzxoOO+ebURg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705539930; a=rsa-sha256; cv=none; b=FpWJwuQKWGYKs5HzAMxRnBo4UfxRZCNx9dJmmUcGlWf/0IEQSQ4idw3QcRmmtKB8LocWk0 qOsk++tKuEXR8NHBUHvXAfio8b6NFH9DwuzNf2BDwSSCXn5LNVfMXuZQ0iC9CjYlQa7xCU 90j9Mri57wJLK5WiuOa0t1qkyxlOI4sZEDHvoffGOOhFmdCyukICs5eEcmrbWIin7MonUB iOKyBQXqQs1KhqMGWFrH52DTRGFlNhuWp4XLfZyO57aRSx+3ZVeiQC54PoglqHbgrCqgoC txZ0WHrb/B1WV2REsbyH2NFQWuShlr3LW6WWXqFVIp+Bstn/6axrnHg2kalynw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TFl0p0wjmzmZm; Thu, 18 Jan 2024 01:05:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40I15UcF037189; Thu, 18 Jan 2024 01:05:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40I15Ufc037186; Thu, 18 Jan 2024 01:05:30 GMT (envelope-from git) Date: Thu, 18 Jan 2024 01:05:30 GMT Message-Id: <202401180105.40I15Ufc037186@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: "Danilo G. Baio" Subject: git: ebe2d2cd7a - main - arch-handbook/boot: Add missing space between phrases List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-doc-all@freebsd.org X-BeenThere: dev-commits-doc-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dbaio X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ebe2d2cd7a6b02fecaf2d37e164fcd8e857a5648 Auto-Submitted: auto-generated The branch main has been updated by dbaio: URL: https://cgit.FreeBSD.org/doc/commit/?id=ebe2d2cd7a6b02fecaf2d37e164fcd8e857a5648 commit ebe2d2cd7a6b02fecaf2d37e164fcd8e857a5648 Author: rilysh AuthorDate: 2024-01-03 04:47:50 +0000 Commit: Danilo G. Baio CommitDate: 2024-01-18 00:54:02 +0000 arch-handbook/boot: Add missing space between phrases Reviewed by: Mina Galić Pull Request: https://github.com/freebsd/freebsd-doc/pull/320 Signed-off-by: rilysh --- documentation/content/en/books/arch-handbook/boot/_index.adoc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/documentation/content/en/books/arch-handbook/boot/_index.adoc b/documentation/content/en/books/arch-handbook/boot/_index.adoc index 75543a7e99..9f1eefae53 100644 --- a/documentation/content/en/books/arch-handbook/boot/_index.adoc +++ b/documentation/content/en/books/arch-handbook/boot/_index.adoc @@ -265,7 +265,7 @@ The next block is responsible for the relocation and subsequent jump to the relo [.programlisting] .... - movw %sp,%si # Source + movw %sp,%si # Source movw $start,%di # Destination movw $0x100,%cx # Word count rep # Relocate @@ -283,7 +283,8 @@ As [.filename]#boot0# is loaded by the BIOS to address `0x7C00`, it copies itsel The source address, `0x7c00`, is copied to register `%si`. The destination address, `0x600`, to register `%di`. The number of words to copy, `256` (the program's size = 512 bytes), is copied to register `%cx`. -Next, the `rep` instruction repeats the instruction that follows, that is, `movsw`, the number of times dictated by the `%cx` register.The `movsw` instruction copies the word pointed to by `%si` to the address pointed to by `%di`. +Next, the `rep` instruction repeats the instruction that follows, that is, `movsw`, the number of times dictated by the `%cx` register. +The `movsw` instruction copies the word pointed to by `%si` to the address pointed to by `%di`. This is repeated another 255 times. On each repetition, both the source and destination registers, `%si` and `%di`, are incremented by one. Thus, upon completion of the 256-word (512-byte) copy, `%di` has the value `0x600`+`512`= `0x800`, and `%si` has the value `0x7c00`+`512`= `0x7e00`; we have thus completed the code _relocation_. @@ -296,7 +297,8 @@ Now, `stosw` is executed 8 times. This instruction copies a `0` value to the address pointed to by the destination register (`%di`, which is `0x800`), and increments it. This is repeated another 7 times, so `%di` ends up with value `0x810`. Effectively, this clears the address range `0x800`-`0x80f`. -This range is used as a (fake) partition table for writing the MBR back to disk.Finally, the sector field for the CHS addressing of this fake partition is given the value 1 and a jump is made to the main function from the relocated code. +This range is used as a (fake) partition table for writing the MBR back to disk. +Finally, the sector field for the CHS addressing of this fake partition is given the value 1 and a jump is made to the main function from the relocated code. Note that until this jump to the relocated code, any reference to an absolute address was avoided. The following code block tests whether the drive number provided by the BIOS should be used, or the one stored in [.filename]#boot0#.