Skip to content

Commit

Permalink
en: Dualboot: Add RestartReasonAddress in config.md
Browse files Browse the repository at this point in the history
- Also fix typo.
  • Loading branch information
sunflower2333 committed Feb 8, 2024
1 parent 7517b92 commit f56c66b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
22 changes: 21 additions & 1 deletion DualBoot/Config.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@ If you do not need it, set the too values to 0.
```
StackBase=0x00000000
StackSize=0x00000000
RestartReasonAddress=0x00000000
```
- The value after `=` must be hex number.
- Config file not in this format will cause unexceptional behavior.
- Config file not in this format will cause unexceptional behavior.

## How to get these values
- `StackBase`
+ StackBase can be found in your device's MemoryMap, which is named `UEFI FD`

- `StackSize`
+ StackSize the right after the base address of `UEFI FD`.

- `RestartReasonAddress`
+ Comming Soon.
+ RestartReasonAddress can be found in a Qualcomm device's device tree.
+ Enter android or recovery, run the following shell cmd with root permission.
+ Output should like this:
```
android:/# printf "RestartReasonAddress=0x%x\n" $((0x$(realpath /sys/firmware/devicetree/base/soc/qcom\,msm-imem@*/restart_reason@* | awk -F'[@/]' '{print $(NF-2)"+0x"$(NF)}')))
RestartReasonAddress=0x146bf65c
```
2 changes: 1 addition & 1 deletion DualBoot/Introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ flowchart TD
subgraph hlos[HLOS]
direction TB
win[Windows]
other_os[Other Operation Systems]
other_os[Other Operating Systems]
android_distribution[Linux/Android Distributions]
end
Expand Down

0 comments on commit f56c66b

Please sign in to comment.