configuring lpc register from user space

Tony_Ao at wiwynn.com Tony_Ao at wiwynn.com
Thu Jan 24 12:30:44 AEDT 2019


Hi Vijay,

The following steps for your reference.

In BMC OS,

1.      Use fw_printenv to check the bootargs

2.      Use fw_setenv to append mem.devmem=1 to the bootargs
root at tiogapass:~# fw_setenv bootargs console=ttyS4,115200n8 root=/dev/ram rw mem.devmem=1


3.      Use fw_printenv to check the bootargs again

4.      Reboot the BMC system

5.      When BMC is ready, you can use devmem to modify the register values

The snapshots:
[cid:image002.png at 01D4B3C7.7B047320]

[cid:image003.png at 01D4B3C7.7B047320]


Regards,
Tony

From: Vijay Khemka [mailto:vijaykhemka at fb.com]
Sent: Thursday, January 24, 2019 2:26 AM
To: Tony Ao/WYHQ/Wiwynn; openbmc at lists.ozlabs.org
Subject: Re: configuring lpc register from user space

Hi Tony,
How do you append this to bootargs, can you please give me some example and I have to enable this in my production code.

Regards
-Vijay

From: "Tony_Ao at wiwynn.com" <Tony_Ao at wiwynn.com>
Date: Tuesday, January 22, 2019 at 9:22 PM
To: Vijay Khemka <vijaykhemka at fb.com>, "openbmc at lists.ozlabs.org" <openbmc at lists.ozlabs.org>
Subject: RE: configuring lpc register from user space

Hi Vijay,

If you want to use devmem to set the specific register, you can append mem.devmem to bootargs and restart the system.

Then you can set the specific register using devmem.
You can refer the below link for details.
https://patchwork.ozlabs.org/patch/982894/<https://urldefense.proofpoint.com/v2/url?u=https-3A__patchwork.ozlabs.org_patch_982894_&d=DwMGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=v9MU0Ki9pWnTXCWwjHPVgpnCR80vXkkcrIaqU7USl5g&m=KA69FVnlR8bLEMZ31BR4OQYBvagLgpv1hn8STKGirbo&s=hzAe_Ozp-uao2QqzTI-4i7xWFnFPihbN1lFEqIUy0aA&e=>

Regards,
Tony

From: openbmc [mailto:openbmc-bounces+tony_ao=wiwynn.com at lists.ozlabs.org] On Behalf Of Vijay Khemka
Sent: Wednesday, January 23, 2019 8:02 AM
To: openbmc at lists.ozlabs.org
Subject: configuring lpc register from user space

Team,
I know /dev/mem is not supported in production, I need to configure some lpc register to route uart output, so please suggest what is the best ways to do the same. Is there any application or driver interface available which can be used to set some lpc register like 0x1E78909C.

Regards
-Vijay
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20190124/c08f0fcd/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 17926 bytes
Desc: image002.png
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20190124/c08f0fcd/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 2585 bytes
Desc: image003.png
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20190124/c08f0fcd/attachment-0003.png>


More information about the openbmc mailing list