mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-20 15:43:16 +00:00
Panic openly if we cannot retrieve memory information from the device tree.
This is a critical condition and can lead to all sorts of misterious hangs if not handled. Obtained from: Semihalf Also reported by: thompsa
This commit is contained in:
parent
aa6bc7dc29
commit
691df1a1f8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=236325
@ -76,7 +76,7 @@ static int bare_smp_start_cpu(platform_t, struct pcpu *cpu);
|
||||
static void booke_reset(platform_t);
|
||||
|
||||
static platform_method_t bare_methods[] = {
|
||||
PLATFORMMETHOD(platform_probe, bare_probe),
|
||||
PLATFORMMETHOD(platform_probe, bare_probe),
|
||||
PLATFORMMETHOD(platform_mem_regions, bare_mem_regions),
|
||||
PLATFORMMETHOD(platform_timebase_freq, bare_timebase_freq),
|
||||
|
||||
@ -143,9 +143,9 @@ bare_mem_regions(platform_t plat, struct mem_region **phys, int *physsz,
|
||||
int i, rv;
|
||||
|
||||
rv = fdt_get_mem_regions(avail_regions, availsz, &memsize);
|
||||
|
||||
if (rv != 0)
|
||||
return;
|
||||
panic("%s: could not retrieve mem regions from the 'memory' "
|
||||
"node, error: %d", __func__, rv);
|
||||
|
||||
for (i = 0; i < *availsz; i++) {
|
||||
if (avail_regions[i].mr_start < 1048576) {
|
||||
|
Loading…
Reference in New Issue
Block a user