- Reduce the DVMA preallocation limit from 128kB to 32kB. 128kB were

quite excessive, and caused the available space to be used up too
  easily. The new limit should be a better estimation of how much the
  caller will need at most.
- Double the IOTSB size 64kB, for a DVMA area size of 64MB.

This should fix DMA problems on e450s and other large machines due
to DVMA space exhaustion, which were introduced in my last IOMMU
code revision in January.

Reported and tested by:	fenner
This commit is contained in:
tmm 2003-05-02 01:21:37 +00:00
parent 675505de16
commit ac4c685175
3 changed files with 3 additions and 3 deletions

View File

@ -571,7 +571,7 @@ psycho_attach(device_t dev)
sc->sc_is->is_sb[1] = 0;
if (OF_getproplen(sc->sc_node, "no-streaming-cache") < 0)
sc->sc_is->is_sb[0] = sc->sc_pcictl + PCR_STRBUF;
psycho_iommu_init(sc, 2);
psycho_iommu_init(sc, 3);
} else {
/* Just copy IOMMU state, config tag and address */
sc->sc_is = osc->sc_is;

View File

@ -430,7 +430,7 @@ sbus_probe(device_t dev)
* DMA pointer will be translated by the first page of the IOTSB.
* To detect bugs we'll allocate and ignore the first entry.
*/
iommu_init(name, &sc->sc_is, 2, -1, 1);
iommu_init(name, &sc->sc_is, 3, -1, 1);
/* Enable the over-temperature and power-fail intrrupts. */
rid = 0;

View File

@ -143,7 +143,7 @@
/*
* Tuning constants.
*/
#define IOMMU_MAX_PRE (128 * 1024)
#define IOMMU_MAX_PRE (32 * 1024)
#define IOMMU_MAX_PRE_SEG 3
MALLOC_DEFINE(M_IOMMU, "dvmamem", "IOMMU DVMA Buffers");