Read registers in AST-2500

AKASH G J akashgj91 at gmail.com
Mon Oct 22 17:37:01 AEDT 2018


Hi all,

I used the following code to get the value of the control register 'SCU13C'
in BMC Aspeed AST-2500.

#include<stdio.h>

#define SCU13C_ADDR 0x1E6E213C
int main()
{
long reg;
reg=123;
reg = *(volatile long *)(SCU13C_ADDR);
printf("%li",reg);
return 1;
}

Running the code I am getting Segmentation Fault (Core Dumped). Please
someone help to resolve the issue.


Thanks and Regards,

Akash
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20181022/151157c0/attachment.html>


More information about the openbmc mailing list