Reduce RAM to 768 MiB to avoid a memory problem
This commit is contained in:
parent
28efecdbc7
commit
b7dba89d63
23
JOURNAL.md
23
JOURNAL.md
@ -1206,3 +1206,26 @@ the actual physical memory.
|
|||||||
|
|
||||||
I will try a similar test with uboot with the `mtest` command, but requires
|
I will try a similar test with uboot with the `mtest` command, but requires
|
||||||
enabling it first.
|
enabling it first.
|
||||||
|
|
||||||
|
### OBSERVATION: Memory in the 0xb0000000..0xc0000000 range is bad
|
||||||
|
|
||||||
|
Reproduced from U-Boot:
|
||||||
|
|
||||||
|
=> mtest 0x80000000 0x90000000 0 2
|
||||||
|
Testing 80000000 ... 90000000:
|
||||||
|
Pattern FFFFFFFFFFFFFFFF Writing... Reading...Iteration: 2
|
||||||
|
Tested 2 iteration(s) with 0 errors.
|
||||||
|
=> mtest 0x90000000 0xa0000000 0 2
|
||||||
|
Testing 90000000 ... a0000000:
|
||||||
|
Pattern FFFFFFFFFFFFFFFF Writing... Reading...Iteration: 2
|
||||||
|
Tested 2 iteration(s) with 0 errors.
|
||||||
|
=> mtest 0xa0000000 0xb0000000 0 2
|
||||||
|
Testing a0000000 ... b0000000:
|
||||||
|
Pattern FFFFFFFFFFFFFFFF Writing... Reading...Iteration: 2
|
||||||
|
Tested 2 iteration(s) with 0 errors.
|
||||||
|
=> mtest 0xb0000000 0xc0000000 0 2
|
||||||
|
Testing b0000000 ... c0000000:
|
||||||
|
Pattern 0000000000000000 Writing...
|
||||||
|
|
||||||
|
Let's see if we can fix the boot hang by reducing the memory enough to avoid
|
||||||
|
this bad region.
|
||||||
|
@ -132,17 +132,17 @@
|
|||||||
''
|
''
|
||||||
echo 0 > /proc/sys/vm/compaction_proactiveness
|
echo 0 > /proc/sys/vm/compaction_proactiveness
|
||||||
''
|
''
|
||||||
+
|
# +
|
||||||
# Show stacktrace on calls to the hvc_remove function.
|
# # Show stacktrace on calls to the hvc_remove function.
|
||||||
''
|
# ''
|
||||||
echo "Mount debugfs"
|
# echo "Mount debugfs"
|
||||||
mkdir -p /sys/kernel/debug/
|
# mkdir -p /sys/kernel/debug/
|
||||||
mount -t debugfs none /sys/kernel/debug/
|
# mount -t debugfs none /sys/kernel/debug/
|
||||||
td=/sys/kernel/debug/tracing
|
# td=/sys/kernel/debug/tracing
|
||||||
echo hvc_remove > $td/set_ftrace_filter
|
# echo hvc_remove > $td/set_ftrace_filter
|
||||||
echo function > $td/current_tracer
|
# echo function > $td/current_tracer
|
||||||
echo 1 > $td/options/func_stack_trace
|
# echo 1 > $td/options/func_stack_trace
|
||||||
''
|
# ''
|
||||||
# FIXME: Disable sched_switch for now, as it still hangs the boot...
|
# FIXME: Disable sched_switch for now, as it still hangs the boot...
|
||||||
# +
|
# +
|
||||||
# # Exclude the second pid, which is the kthread that will dump the trace to
|
# # Exclude the second pid, which is the kthread that will dump the trace to
|
||||||
@ -288,6 +288,7 @@
|
|||||||
fdt set /memory@80000000 reg <0x0 0x80000000 0x0 0xc0000000>
|
fdt set /memory@80000000 reg <0x0 0x80000000 0x0 0xc0000000>
|
||||||
|
|
||||||
# Set kernel bootcmd options.
|
# Set kernel bootcmd options.
|
||||||
|
# rdinit=/init2 boot custom init script
|
||||||
# NixOS interesting options:
|
# NixOS interesting options:
|
||||||
# debug1 enable debug shell in stage 1
|
# debug1 enable debug shell in stage 1
|
||||||
# boot.trace enable set -x in stage 1
|
# boot.trace enable set -x in stage 1
|
||||||
@ -298,7 +299,7 @@
|
|||||||
# tp_printk write ftrace events to console
|
# tp_printk write ftrace events to console
|
||||||
# trace_buf_size=1M set ftrace buffer to 1M
|
# trace_buf_size=1M set ftrace buffer to 1M
|
||||||
#
|
#
|
||||||
setenv bootargs "root=/dev/ram0 loglevel=7 debug rw earlycon=sbi console=hvc0 tp_printk trace_buf_size=1M rdinit=/init2 init=${init}"
|
setenv bootargs "root=/dev/ram0 loglevel=7 debug rw earlycon=sbi console=hvc0 init=${init}"
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
@ -70,14 +70,15 @@
|
|||||||
*
|
*
|
||||||
* [0x0_6000_0000, 0x0_7000_0000) -> DMA pool (256 MiB)
|
* [0x0_6000_0000, 0x0_7000_0000) -> DMA pool (256 MiB)
|
||||||
* [0x0_7000_0000, 0x0_8000_0000) -> DMA pool (256 MiB)
|
* [0x0_7000_0000, 0x0_8000_0000) -> DMA pool (256 MiB)
|
||||||
* [0x0_8000_0000, 0x0_fff0_0000) -> RAM memory (1024 MiB)
|
* [0x0_8000_0000, 0x0_b000_0000) -> RAM memory (768 MiB)
|
||||||
* [0x0_fff0_0000, 0x1_0000_0000) -> Empty (1024 MiB)
|
* [0x0_b000_0000, 0x0_c000_0000) -> Broken? (256 MiB)
|
||||||
|
* [0x0_c000_0000, 0x1_0000_0000) -> Empty (1024 MiB)
|
||||||
* [0x1_0000_0000, 0x1_c000_0000) -> PMEM (3072 MiB)
|
* [0x1_0000_0000, 0x1_c000_0000) -> PMEM (3072 MiB)
|
||||||
* [0x1_c000_0000, 0x2_8000_0000) -> Empty (3072 MiB)
|
* [0x1_c000_0000, 0x2_8000_0000) -> Empty (3072 MiB)
|
||||||
*/
|
*/
|
||||||
memory@80000000 {
|
memory@80000000 {
|
||||||
device_type = "memory";
|
device_type = "memory";
|
||||||
reg = <0x0 0x80000000 0x0 0x40000000>;
|
reg = <0x0 0x80000000 0x0 0x30000000>;
|
||||||
};
|
};
|
||||||
reserved-memory {
|
reserved-memory {
|
||||||
#address-cells = <2>; /* Starting address and size */
|
#address-cells = <2>; /* Starting address and size */
|
||||||
|
Loading…
Reference in New Issue
Block a user