Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Aug 2019 13:13:17 +0000 (UTC)
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r350674 - head/sys/dev/ofw
Message-ID:  <201908071313.x77DDHXu057889@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: manu
Date: Wed Aug  7 13:13:16 2019
New Revision: 350674
URL: https://svnweb.freebsd.org/changeset/base/350674

Log:
  ofw: ofw_reg_to_paddr: Use a 256 static array for the cell
  
  Some hardware needs more than 32, bump this value.
  
  We cannot use the _alloc for of getencprop as this function is called
  too early in the boot before pmap is initialized and we only have
  2k of stack when cninit is called.
  
  Discussed with:     ian

Modified:
  head/sys/dev/ofw/ofw_subr.c

Modified: head/sys/dev/ofw/ofw_subr.c
==============================================================================
--- head/sys/dev/ofw/ofw_subr.c	Wed Aug  7 13:11:53 2019	(r350673)
+++ head/sys/dev/ofw/ofw_subr.c	Wed Aug  7 13:13:16 2019	(r350674)
@@ -79,7 +79,8 @@ int
 ofw_reg_to_paddr(phandle_t dev, int regno, bus_addr_t *paddr,
     bus_size_t *psize, pcell_t *ppci_hi)
 {
-	pcell_t cell[32], pci_hi;
+	static pcell_t cell[256];
+	pcell_t pci_hi;
 	uint64_t addr, raddr, baddr;
 	uint64_t size, rsize;
 	uint32_t c, nbridge, naddr, nsize;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908071313.x77DDHXu057889>