AlphaStation 200 NVRAM Problem

Robert Jarratt robert.jarratt at ntlworld.com
Sun Apr 24 14:00:12 CDT 2016



> If you post a few lines of code, someone might spot the problem. I assume
> you are getting SS$_ACCVIO as return?
> So either return_va_64 or return_length_64 wasn't passed by reference (or
> wasn't long enough but you'd have to be really lucky to pass in a 32-bit
value
> that sat at the very end of a page ...)
> 


Thanks. I have since managed to find the problem with that. But I do have a
problem that with a successful creation of the section I don't seem to be
accessing the right location. This is the code now:

	long long int startPhysicalAddress = 0x100000000;
	long long int endPhysicalAddress =   0x100100000;

	long long int regionId;
	__align (quadword) void *address;
	__align(quadword) long long int length;
	unsigned int pfn = startPhysicalAddress >> PAGE_SIZE;
	unsigned int pagesToMap = ((endPhysicalAddress -
startPhysicalAddress) >> PAGE_SIZE) + 1;
	unsigned int flags = SEC$M_EXPREG | SEC$M_PFNMAP | SEC$M_WRT;
	int status;

	regionId = VA$C_P2;
	
	status = sys$crmpsc_pfn_64(&regionId, pfn, pagesToMap, PSL$C_USER,
flags, &address, &length, 0);
	PrintStatus(status);

	flashbusIndexRegister = (unsigned int *)address;
	flashbusDataRegister = (unsigned int *)((char *)address +
(endPhysicalAddress - startPhysicalAddress));

If I try to write to the index register by dereferencing
flashbusIndexRegister the machine dies.

Regards

Rob



More information about the cctech mailing list