From a2f4d2f5b04aca52040a2a362106f77614945df5 Mon Sep 17 00:00:00 2001 From: Pyun YongHyeon Date: Wed, 13 Oct 2004 06:04:01 +0000 Subject: Limit DMA address space to 1GB since the trident audio cards can't handle DMA addresses located above 1GB. The LBA(loop begin address) register which holds DMA base address is 32bits register. But the MSB 2bits are used for other purposes. This effectivly limits the DMA address space up to 1GB. Approved by: jake (mentor) Reviewed by: truckman, matk --- sys/dev/sound/pci/t4dwave.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sys/dev') diff --git a/sys/dev/sound/pci/t4dwave.c b/sys/dev/sound/pci/t4dwave.c index 8622951283c0a..8bcc588f3958a 100644 --- a/sys/dev/sound/pci/t4dwave.c +++ b/sys/dev/sound/pci/t4dwave.c @@ -43,6 +43,16 @@ SND_DECLARE_FILE("$FreeBSD$"); #define TR_DEFAULT_BUFSZ 0x1000 #define TR_TIMEOUT_CDC 0xffff #define TR_MAXPLAYCH 4 +/* + * Though, it's not clearly documented in trident datasheet, trident + * audio cards can't handle DMA addresses located above 1GB. The LBA + * (loop begin address) register which holds DMA base address is 32bits + * register. + * But the MSB 2bits are used for other purposes(I guess it is really + * bad idea). This effectivly limits the DMA address space up to 1GB. + */ +#define TR_MAXADDR ((1 << 30) - 1) + struct tr_info; @@ -851,7 +861,7 @@ tr_pci_attach(device_t dev) } if (bus_dma_tag_create(/*parent*/NULL, /*alignment*/2, /*boundary*/0, - /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, + /*lowaddr*/TR_MAXADDR, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/tr->bufsz, /*nsegments*/1, /*maxsegz*/0x3ffff, -- cgit v1.3