Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arch-handbook/boot: add a space between the next word and the previous stop #320

Closed
wants to merge 4 commits into from

Conversation

rilysh
Copy link
Contributor

@rilysh rilysh commented Jan 3, 2024

Currently, it's

This range is used as a (fake) partition table for writing the MBR back to disk.Finally, the sector field

It should be

This range is used as a (fake) partition table for writing the MBR back to disk. Finally, the sector field

(Add a space)

…s stop

Signed-off-by: rilysh <nightquick@proton.me>
Copy link
Contributor

@igalic igalic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We usually do one sentence per line for easier diffs. looks like that's what's actually missing here

@rilysh
Copy link
Contributor Author

rilysh commented Jan 6, 2024

We usually do one sentence per line for easier diffs. looks like that's what's actually missing here

Does it mean a commit message needs to be added before the email address?
e.g.

Hello world

Signed-off-by: mail

Sorry, I don't understand it. I'm not sure how FreeBSD does this, but an example of it would be nice!

@igalic
Copy link
Contributor

igalic commented Jan 6, 2024

the format for the commit message can be found here https://github.com/freebsd/freebsd-doc/blob/main/.hooks/prepare-commit-msg#L44

what i was talking about is the format for the documentation: https://docs.freebsd.org/en/books/fdp-primer/writing-style/

@rilysh
Copy link
Contributor Author

rilysh commented Jan 6, 2024

what i was talking about is the format for the documentation: https://docs.freebsd.org/en/books/fdp-primer/writing-style/

Perhaps but the first line is quite a bit small already, maybe if you or someone from doc team approves it, I will separate it too with in this PR.

https://docs.freebsd.org/en/books/fdp-primer/writing-style/#one-sentence-per-line
(I hope I understand the context).

@igalic
Copy link
Contributor

igalic commented Jan 7, 2024

it doesn't matter how big or small the line is.
the main reason for doing this is to make the raw document readable in a text editor, and to make diffs readable.

diffs usually happen on sentence level, unless someone goes around and does some big restructuring.
so having one sentence per line really helps.

i don't know why this isn't the case here, but it should be.

your current patch is an okay fix for the issue at hand.
a better fix would be to insert a newline instead of the space.

and an even better fix than that would be to do that for the entire document.

I hope this helps and provides you with guidance

Signed-off-by: rilysh <nightquick@proton.me>
@rilysh
Copy link
Contributor Author

rilysh commented Jan 14, 2024

@igalic Thank you for your reply! It seems the documentation also adds new lines after a comma, but I'm not too sure about it. I saw a few examples, and sometimes there's a new line (after a comma) and sometimes there isn't.

I've updated the page (I didn't test it). I hope I didn't break anything, please let me know if anything is wrong.

Signed-off-by: rilysh <nightquick@proton.me>
@rilysh
Copy link
Contributor Author

rilysh commented Jan 14, 2024

Hmm, it's weird. On my editor it tab looks okay whereas on GitHub it looks different.
9eb158a#diff-b809eeca053495a1bb88831285c7b0326cb7b6065e7b510898d04e0f0eb8bb03R272

Copy link
Contributor

@igalic igalic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hope this helps

@@ -163,7 +163,8 @@ This memory contains various low-level routines that are specific to the hardwar
The processor will first jump to the address 0xfffffff0, which really resides in the BIOS's memory.
Usually this address contains a jump instruction to the BIOS's POST routines.

The POST (Power On Self Test) is a set of routines including the memory check, system bus check, and other low-level initialization so the CPU can set up the computer properly.
The POST (Power On Self Test) is a set of routines including the memory check, system bus check,
and other low-level initialization so the CPU can set up the computer properly.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not a sentence

@@ -215,17 +216,20 @@ This program uses low-level "tricks" like taking advantage of the side effects o
Care must also be taken when handling the partition table, which is embedded in the MBR itself.
For these reasons, be very careful when modifying [.filename]#boot0.S#.

Note that the [.filename]#boot0.S# source file is assembled "as is": instructions are translated one by one to binary, with no additional information (no ELF file format, for example).
Note that the [.filename]#boot0.S# source file is assembled "as is": instructions are translated one by one to binary,
with no additional information (no ELF file format, for example).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not a sentence

This kind of low-level control is achieved at link time through special control flags passed to the linker.
For example, the text section of the program is set to be located at address `0x600`.
In practice this means that [.filename]#boot0# must be loaded to memory address `0x600` in order to function properly.

It is worth looking at the [.filename]#Makefile# for [.filename]#boot0# ([.filename]#stand/i386/boot0/Makefile#), as it defines some of the run-time behavior of [.filename]#boot0#.
It is worth looking at the [.filename]#Makefile# for [.filename]#boot0# ([.filename]#stand/i386/boot0/Makefile#),
as it defines some of the run-time behavior of [.filename]#boot0#.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not a sentence

For instance, if a terminal connected to the serial port (COM1) is used for I/O, the macro `SIO` must be defined (`-DSIO`).
`-DPXE` enables boot through PXE by pressing kbd:[F6].
Additionally, the program defines a set of _flags_ that allow further modification of its behavior.
All of this is illustrated in the [.filename]#Makefile#.
For example, look at the linker directives which command the linker to start the text section at address `0x600`, and to build the output file "as is" (strip out any file formatting):
For example, look at the linker directives which command the linker to start the text section at address `0x600`,
and to build the output file "as is" (strip out any file formatting):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not a sentence

@@ -283,7 +287,9 @@ 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not a sentence

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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is

…r-line

Signed-off-by: rilysh <nightquick@proton.me>
@rilysh
Copy link
Contributor Author

rilysh commented Jan 14, 2024

Thanks for your review! I've updated it.

@dbaio dbaio self-assigned this Jan 18, 2024
freebsd-git pushed a commit that referenced this pull request Jan 18, 2024
Reviewed by:	Mina Galić <freebsd@igalic.co>
Pull Request:	#320
Signed-off-by:	rilysh <nightquick@proton.me>
@dbaio dbaio added the merged label Jan 18, 2024
@dbaio
Copy link
Member

dbaio commented Jan 18, 2024

@rilysh, thanks for your contribution.
@igalic, thanks for reviewing.

@dbaio dbaio closed this Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants