Skip to contentSkip to conversation

phosphor-isolation

DISCUSSION James Feist 4 participants 7 messages Sep 19, 2019 – Sep 21, 2019

lore
Share & tools
lore
#0 lore raw

I enabled phosphor-isolation on my system and noticed that kcs no longer worked afterwards. Commenting out this section:

https://github.com/openbmc/meta-phosphor/blob/a1cee09419cb1467c3d2b7bf996b40089f0d06f4/aspeed-layer/recipes-bsp/u-boot/files/0001-aspeed-Disable-unnecessary-features.patch#L230

+ /* iLPC2AHB */
+ val = readl(AST_SCU_BASE + AST_SCU_HW_STRAP1);
+ val |= SCU_HW_STRAP_LPC_DEC_SUPER_IO;
+ writel(val, AST_SCU_BASE + AST_SCU_HW_STRAP1);

Seems to make KCS work again. Do we need this part set? If so, should we create a phosphor-isolation-kcs and phosphor-isolation-bt?

Thanks

-James

#1 lore raw
Quoted 11 lines · James Feist

I enabled phosphor-isolation on my system and noticed that kcs no longer worked afterwards. Commenting out this section:

https://github.com/openbmc/meta-phosphor/blob/a1cee09419cb1467c3d2b7bf996b40089f0d06f4/aspeed-layer/recipes-bsp/u-boot/files/0001-aspeed-Disable-unnecessary-features.patch#L230

(quoted diff) +4 -0
+	/* iLPC2AHB */
+	val = readl(AST_SCU_BASE + AST_SCU_HW_STRAP1);
+	val |= SCU_HW_STRAP_LPC_DEC_SUPER_IO;
+	writel(val, AST_SCU_BASE + AST_SCU_HW_STRAP1);
Quoted 1 line

Seems to make KCS work again.

That is an unexpected result. Have you asked ASPEED about it? I've added Ryan to Cc. I must admit I didn't test the patch with systems that use KCS because OpenPOWER exclusively uses BT for IPMI (though we're starting to exploit the KCS interfaces for an LPC MCTP binding).

Having said that, the systems that we're testing our LPC MCTP binding on would have this patch applied, so presumably we're not seeing the same effect there. They're 2500-based systems, is that what you're testing with?

Quoted 2 lines

Do we need this part set? If so, should we
create a phosphor-isolation-kcs and phosphor-isolation-bt?

I hope not, given that leaving the SuperIO decoding enable allows the host to (slowly) scrape BMC memory (or if iLPC2AHB writes are allowed, open faster backdoors). We should root-cause the issue before exploring this path.

Andrew

#2 lore raw
Quoted 21 lines · Andrew Jeffery
Quoted 11 lines · James Feist

I enabled phosphor-isolation on my system and noticed that kcs no longer worked afterwards. Commenting out this section:

https://github.com/openbmc/meta-phosphor/blob/a1cee09419cb1467c3d2b7bf996b40089f0d06f4/aspeed-layer/recipes-bsp/u-boot/files/0001-aspeed-Disable-unnecessary-features.patch#L230

(quoted diff) +4 -0
+	/* iLPC2AHB */
+	val = readl(AST_SCU_BASE + AST_SCU_HW_STRAP1);
+	val |= SCU_HW_STRAP_LPC_DEC_SUPER_IO;
+	writel(val, AST_SCU_BASE + AST_SCU_HW_STRAP1);
Quoted 1 line

Seems to make KCS work again.

That is an unexpected result. Have you asked ASPEED about it? I've added Ryan to Cc. I must admit I didn't test the patch with systems that use KCS because OpenPOWER exclusively uses BT for IPMI (though we're starting to exploit the KCS interfaces for an LPC MCTP binding).

Quoted 3 lines

Having said that, the systems that we're testing our LPC MCTP binding on would have this patch applied, so presumably we're not seeing the same effect there. They're 2500-based systems, is that what you're testing with?

Yes I am.

Quoted 11 lines
Quoted 3 lines

Do we need this part set? If so, should we
create a phosphor-isolation-kcs and phosphor-isolation-bt?

I hope not, given that leaving the SuperIO decoding enable allows the host to (slowly) scrape BMC memory (or if iLPC2AHB writes are allowed, open faster backdoors). We should root-cause the issue before exploring this path.

Andrew

#3 lore raw
Quoted 9 lines · James Feist
Quoted 8 lines · Andrew Jeffery
Quoted 7 lines · James Feist

I enabled phosphor-isolation on my system and noticed that kcs no longer
worked afterwards. Commenting out this section:

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
(quoted diff) +4 -0
+	/* iLPC2AHB */
+	val = readl(AST_SCU_BASE + AST_SCU_HW_STRAP1);
+	val |= SCU_HW_STRAP_LPC_DEC_SUPER_IO;
+	writel(val, AST_SCU_BASE + AST_SCU_HW_STRAP1);

Seems to make KCS work again.

That configuration is disabling superio decoding, which means the host will no longer be able to configure the superio hardware on the LPC bus.

Quoted 9 lines
Quoted 9 lines

That is an unexpected result. Have you asked ASPEED about it? I've added
Ryan to Cc. I must admit I didn't test the patch with systems that use KCS
because OpenPOWER exclusively uses BT for IPMI (though we're starting
to exploit the KCS interfaces for an LPC MCTP binding).

Quoted 9 lines
Quoted 6 lines

Having said that, the systems that we're testing our LPC MCTP binding on
would have this patch applied, so presumably we're not seeing the same
effect there. They're 2500-based systems, is that what you're testing with?

Yes I am.

As an outside observer without hardware, can you check:

(1) Did you check from the OS or just from a BIOS inventory?

(2) Is there code to enable the KCS peripheral from the bmc

(3) Will the host try to use the KCS even though it can not find the superio to choose the port and interrupt?

Quoted 12 lines
Quoted 5 lines
Quoted 3 lines

Do we need this part set? If so, should we
create a phosphor-isolation-kcs and phosphor-isolation-bt?

I hope not, given that leaving the SuperIO decoding enable allows

the

Quoted 6 lines

host to (slowly) scrape BMC memory (or if iLPC2AHB writes are allowed,
open faster backdoors). We should root-cause the issue before exploring this path.

Andrew

#4 lore raw
Quoted 37 lines · Milton Miller II
Quoted 9 lines · James Feist
Quoted 8 lines · Andrew Jeffery
Quoted 7 lines · James Feist

I enabled phosphor-isolation on my system and noticed that kcs no longer
worked afterwards. Commenting out this section:

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
(quoted diff) +4 -0
+	/* iLPC2AHB */
+	val = readl(AST_SCU_BASE + AST_SCU_HW_STRAP1);
+	val |= SCU_HW_STRAP_LPC_DEC_SUPER_IO;
+	writel(val, AST_SCU_BASE + AST_SCU_HW_STRAP1);

Seems to make KCS work again.

That configuration is disabling superio decoding, which means the host will no longer be able to configure the superio hardware on the LPC bus.

Quoted 16 lines
Quoted 15 lines

That is an unexpected result. Have you asked ASPEED about it? I've added
Ryan to Cc. I must admit I didn't test the patch with systems that use KCS
because OpenPOWER exclusively uses BT for IPMI (though we're starting
to exploit the KCS interfaces for an LPC MCTP binding).

Having said that, the systems that we're testing our LPC MCTP binding on
would have this patch applied, so presumably we're not seeing the same
effect there. They're 2500-based systems, is that what you're testing with?

Quoted 6 lines
Quoted 2 lines

Yes I am.

As an outside observer without hardware, can you check:

(1) Did you check from the OS or just from a BIOS inventory?

Attempting to send ipmi commands from uefi/linux stopped working. Linux driver on host reported issues communicating to bmc.

Quoted 2 lines

(2) Is there code to enable the KCS peripheral from the bmc

There is a driver and kcsbridged.

Quoted 3 lines

(3) Will the host try to use the KCS even though it can not find the superio to choose the port and interrupt?

Yes.

Quoted 18 lines
Quoted 17 lines
Quoted 10 lines
Quoted 8 lines

Do we need this part set? If so, should we
create a phosphor-isolation-kcs and phosphor-isolation-bt?

I hope not, given that leaving the SuperIO decoding enable allows

the

Quoted 6 lines

host to (slowly) scrape BMC memory (or if iLPC2AHB writes are allowed,
open faster backdoors). We should root-cause the issue before exploring this path.

Andrew

#5 lore raw
Quoted 49 lines · Milton Miller II
Quoted 17 lines · James Feist
Quoted 16 lines · Andrew Jeffery
Quoted 15 lines · James Feist
Quoted 14 lines

I enabled phosphor-isolation on my system and noticed that kcs

Quoted 1 line

no

longer
worked afterwards. Commenting out this section:

(quoted diff) +4 -0
+	/* iLPC2AHB */
+	val = readl(AST_SCU_BASE + AST_SCU_HW_STRAP1);
+	val |= SCU_HW_STRAP_LPC_DEC_SUPER_IO;
+	writel(val, AST_SCU_BASE + AST_SCU_HW_STRAP1);
Quoted 3 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

Seems to make KCS work again.

That configuration is disabling superio decoding, which means the

host

Quoted 1 line

will no longer be able to configure the superio hardware on the LPC

bus.

Quoted 19 lines
Quoted 19 lines
Quoted 18 lines

That is an unexpected result. Have you asked ASPEED about it? I've
added
Ryan to Cc. I must admit I didn't test the patch with systems that
use KCS
because OpenPOWER exclusively uses BT for IPMI (though we're starting
to exploit the KCS interfaces for an LPC MCTP binding).

Having said that, the systems that we're testing our LPC MCTP binding on
would have this patch applied, so presumably we're not seeing the same
effect there. They're 2500-based systems, is that what you're testing with?

Quoted 6 lines
Quoted 2 lines

Yes I am.

As an outside observer without hardware, can you check:

(1) Did you check from the OS or just from a BIOS inventory?

Quoted 8 lines

Attempting to send ipmi commands from uefi/linux stopped working. Linux
driver on host reported issues communicating to bmc.

Quoted 2 lines

(2) Is there code to enable the KCS peripheral from the bmc

There is a driver and kcsbridged.

Those are probably drivers to respond to data sent over the bridge. I was looking more to "is the KCS peripherial enabled on the LPC bus at the expected address?"

If you add mem.devmem=y [1] to the kernel command line you can use devmem at runtime to reverse that bit via /dev/mem and then use an sio configuration tool from the host to query how its configured.

There is probably another way to do it from the bmc side but I don't know where to start looking (probably somewhere in the lpc space).

[1] https://github.com/openbmc/linux/blob/707b68f43a8cc94fe5dcc4e35dad778828ca9cc9/drivers/char/mem.c#L921

Quoted 23 lines
Quoted 3 lines

(3) Will the host try to use the KCS even though it can not find the superio to choose the port and interrupt?

Yes.

Quoted 17 lines
Quoted 17 lines
Quoted 17 lines
Quoted 8 lines

Do we need this part set? If so, should we
create a phosphor-isolation-kcs and phosphor-isolation-bt?

I hope not, given that leaving the SuperIO decoding enable allows the
host to (slowly) scrape BMC memory (or if iLPC2AHB writes are allowed,
open faster backdoors). We should root-cause the issue before exploring this path.

Andrew

milton

#6 lore raw
In reply to James Feist

Hello James,

	This patch is just enable LPC decode for 0x2e/0x4e. also not effect KCS. 
	Could you check the SCU0c[8] disable or not?

Ryan

-----Original Message-----
From: James Feist [mailto:[email protected]]
Sent: Saturday, September 21, 2019 2:17 AM
To: Milton Miller II <[email protected]>
Cc: Andrew Jeffery <[email protected]>; OpenBMC Maillist <[email protected]>; Ryan Chen <[email protected]>
Subject: Re: phosphor-isolation

Quoted 32 lines · Milton Miller II
Quoted 8 lines · James Feist
Quoted 7 lines · Andrew Jeffery
Quoted 6 lines · James Feist

I enabled phosphor-isolation on my system and noticed that kcs no longer worked afterwards. Commenting out this section:

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
(quoted diff) +4 -0
+	/* iLPC2AHB */
+	val = readl(AST_SCU_BASE + AST_SCU_HW_STRAP1);
+	val |= SCU_HW_STRAP_LPC_DEC_SUPER_IO;
+	writel(val, AST_SCU_BASE + AST_SCU_HW_STRAP1);

Seems to make KCS work again.

That configuration is disabling superio decoding, which means the host will no longer be able to configure the superio hardware on the LPC bus.

Quoted 12 lines
Quoted 11 lines

That is an unexpected result. Have you asked ASPEED about it? I've added Ryan to Cc. I must admit I didn't test the patch with systems that use KCS because OpenPOWER exclusively uses BT for IPMI (though we're starting to exploit the KCS interfaces for an LPC MCTP binding).

Having said that, the systems that we're testing our LPC MCTP binding on would have this patch applied, so presumably we're not seeing the same effect there. They're 2500-based systems, is that what you're testing with?

Quoted 6 lines
Quoted 2 lines

Yes I am.

As an outside observer without hardware, can you check:

(1) Did you check from the OS or just from a BIOS inventory?

Attempting to send ipmi commands from uefi/linux stopped working. Linux driver on host reported issues communicating to bmc.

Quoted 2 lines

(2) Is there code to enable the KCS peripheral from the bmc

There is a driver and kcsbridged.

Quoted 3 lines

(3) Will the host try to use the KCS even though it can not find the superio to choose the port and interrupt?

Yes.

Quoted 17 lines
Quoted 16 lines
Quoted 10 lines
Quoted 8 lines

Do we need this part set? If so, should we create a phosphor-isolation-kcs and phosphor-isolation-bt?

I hope not, given that leaving the SuperIO decoding enable allows

the

Quoted 5 lines

host to (slowly) scrape BMC memory (or if iLPC2AHB writes are allowed, open faster backdoors). We should root-cause the issue before exploring this path.

Andrew