svn commit: r351649 - head/sys/arm/arm

Aleksandr Rybalko ray at FreeBSD.org
Sat Aug 31 21:28:07 UTC 2019


Author: ray
Date: Sat Aug 31 21:28:06 2019
New Revision: 351649
URL: https://svnweb.freebsd.org/changeset/base/351649

Log:
  ARM kernel can get RAM regions three ways:
  o from FDT;
  o from EFI;
  o from Linux Boot API (ATAG).
  U-Boot may pass RAM info all that 3 ways simultaneously.
  We do select between FDT and EFI, but not for ATAG.
  So this is not problem fix, but correctness check.
  
  MFC after:	2 weeks

Modified:
  head/sys/arm/arm/physmem.c

Modified: head/sys/arm/arm/physmem.c
==============================================================================
--- head/sys/arm/arm/physmem.c	Sat Aug 31 20:45:45 2019	(r351648)
+++ head/sys/arm/arm/physmem.c	Sat Aug 31 21:28:06 2019	(r351649)
@@ -264,6 +264,8 @@ insert_region(struct region *regions, size_t rcnt, vm_
 
 	ep = regions + rcnt;
 	for (i = 0, rp = regions; i < rcnt; ++i, ++rp) {
+		if (rp->addr == addr && rp->size == size) /* Pure dup. */
+			return (rcnt);
 		if (flags == rp->flags) {
 			if (addr + size == rp->addr) {
 				rp->addr = addr;


More information about the svn-src-head mailing list