Xilinx / Xilinx/embeddedsw

Dump bdring registers when address space is more than 32 bit in axidma driver

Open
#205 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1.2k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

Function XAxiDma_BdRingDumpRegs inside file xaxidma_bdring.c don't show upper 32 bits for Cur BD REG and Tail BD REG when address space is more than 32 bits.

void XAxiDma_BdRingDumpRegs(XAxiDma_BdRing *RingPtr) {
	UINTPTR RegBase = RingPtr->ChanBase;
	int RingIndex = RingPtr->RingIndex;

	xil_printf("Dump registers %p:\r\n", (void *)RegBase);
	xil_printf("Control REG: %08x\r\n",
		(unsigned int)XAxiDma_ReadReg(RegBase, XAXIDMA_CR_OFFSET));
	xil_printf("Status REG: %08x\r\n",
		(unsigned int)XAxiDma_ReadReg(RegBase, XAXIDMA_SR_OFFSET));

	if (RingIndex) {
	xil_printf("Cur BD REG: %08x\r\n",
		(unsigned int)XAxiDma_ReadReg(RegBase,
		XAXIDMA_RX_CDESC0_OFFSET + ((RingIndex - 1) *  // only XAXIDMA_RX_CDESC0_OFFSET without XAXIDMA_RX_CDESC0_MSB_OFFSET
		XAXIDMA_RX_NDESC_OFFSET)));
	xil_printf("Tail BD REG: %08x\r\n",
		(unsigned int)XAxiDma_ReadReg(RegBase,
		XAXIDMA_RX_TDESC0_OFFSET + ((RingIndex - 1) *  // only XAXIDMA_RX_TDESC0_OFFSET without XAXIDMA_RX_CDESC0_MSB_OFFSET
		XAXIDMA_RX_NDESC_OFFSET)));
	}
	else {
	xil_printf("Cur BD REG: %08x\r\n",
		(unsigned int)XAxiDma_ReadReg(RegBase, XAXIDMA_CDESC_OFFSET));  // only XAXIDMA_CDESC_OFFSET without XAXIDMA_CDESC_MSB_OFFSET
	xil_printf("Tail BD REG: %08x\r\n",
		(unsigned int)XAxiDma_ReadReg(RegBase, XAXIDMA_TDESC_OFFSET));  // only XAXIDMA_TDESC_OFFSET without XAXIDMA_TDESC_MSB_OFFSET
	}

	xil_printf("\r\n");
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in xaxidma_bdring.c at XAxiDma_BdRingDumpRegs and inspect the current and tail descriptor register offsets named in the issue. Verify how upper 32-bit registers are represented for address spaces wider than 32 bits. Done means the dump reports both halves of Cur BD REG and Tail BD REG for both ring paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.