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
This commit is contained in:
Emmanuel Vadot 2019-08-07 13:13:16 +00:00
parent 216cad16b6
commit 0f6efb4445
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=350674

View File

@ -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;