diff mbox series

[Linaro-uefi,v2,02/10] Platforms/AMD/Overdrive: disable second SATA port

Message ID 20170627132145.28159-3-ard.biesheuvel@linaro.org
State Accepted
Commit 79aafbadadffb6913728e90d47f8bf3cc53325e5
Headers show
Series Platforms/AMD/Styx: various Cello related fixes | expand

Commit Message

Ard Biesheuvel June 27, 2017, 1:21 p.m. UTC
The second SATA port is only available on B1 silicon, but as it turns
out, not on /all/ versions of it: the Overdrive 3000 is B1 based as well,
but any attempts to use the second SATA controller cause the firmware to
crash. So just disable it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
---
 Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Alan Ott July 29, 2017, 1:17 a.m. UTC | #1
Sorry I'm really late to this thread.

On 06/27/2017 09:21 AM, Ard Biesheuvel wrote:
> The second SATA port is only available on B1 silicon, but as it turns
> out, not on /all/ versions of it: the Overdrive 3000 is B1 based as well,
> but any attempts to use the second SATA controller cause the firmware to
> crash. So just disable it.

This is not true. The SoftIron OverDrive 3000 has 14 SATA ports that all 
work. Did someone at SoftIron tell you this?

> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>   Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc | 7 +++++--
>   1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc
> index 7ac3ce3760fa..9d533149af07 100644
> --- a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc
> +++ b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc
> @@ -409,10 +409,13 @@ DEFINE DO_KCS       = 1
>     gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0xE112F000
>   
>     #
> -  # Overdrive B1 has 14 SATA ports across 2 controllers.
> +  # AMD's B1 based Overdrive has 14 SATA ports across 2 controllers. However,
> +  # it appears that Softiron's Overdrive 3000, which is also B1 based, does
> +  # not have the second SATA controller enabled, and any attempts to use it
> +  # will crash the firmware. So use the first controller only.
>     #
>     gAmdStyxTokenSpaceGuid.PcdSata0PortCount|8
> -  gAmdStyxTokenSpaceGuid.PcdSata1PortCount|6
> +  gAmdStyxTokenSpaceGuid.PcdSata1PortCount|0
>   
>     # PCIe Support
>     gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xF0000000
Ard Biesheuvel July 29, 2017, 10:23 a.m. UTC | #2
On 29 July 2017 at 02:17, Alan Ott <alan@softiron.com> wrote:
> Sorry I'm really late to this thread.
>
> On 06/27/2017 09:21 AM, Ard Biesheuvel wrote:
>>
>> The second SATA port is only available on B1 silicon, but as it turns
>> out, not on /all/ versions of it: the Overdrive 3000 is B1 based as well,
>> but any attempts to use the second SATA controller cause the firmware to
>> crash. So just disable it.
>
>
> This is not true. The SoftIron OverDrive 3000 has 14 SATA ports that all
> work. Did someone at SoftIron tell you this?
>

Interesting. Do they all work in UEFI as well?

I programmed the open source Overdrive firmware on a SoftIron box at
the ARM office (Punit's), and it crashed in UEFI when trying to
initialize the second SATA controller. The same code works fine on my
non-SoftIron B1 Overdrive, so I wonder what the difference is.
Alan Ott July 31, 2017, 5:39 p.m. UTC | #3
On 07/29/2017 06:23 AM, Ard Biesheuvel wrote:
> On 29 July 2017 at 02:17, Alan Ott <alan@softiron.com> wrote:
>> Sorry I'm really late to this thread.
>>
>> On 06/27/2017 09:21 AM, Ard Biesheuvel wrote:
>>> The second SATA port is only available on B1 silicon, but as it turns
>>> out, not on /all/ versions of it: the Overdrive 3000 is B1 based as well,
>>> but any attempts to use the second SATA controller cause the firmware to
>>> crash. So just disable it.
>>
>> This is not true. The SoftIron OverDrive 3000 has 14 SATA ports that all
>> work. Did someone at SoftIron tell you this?
>>
> Interesting. Do they all work in UEFI as well?

Hi Ard,

We use the 2nd controller from Linux extensively.

Regarding use from within UEFI, this obviously doesn't get as much use 
by us as does using the drives from Linux (since as you might expect we 
typically boot from the first port), but I just now booted successfully 
from all 6 drives on the second controller using debug and release builds.

> I programmed the open source Overdrive firmware on a SoftIron box at
> the ARM office (Punit's), and it crashed in UEFI when trying to
> initialize the second SATA controller. The same code works fine on my
> non-SoftIron B1 Overdrive, so I wonder what the difference is.

I can't say for sure. If you have a bad unit, we'd be happy to help you 
with that.

Alan.
Ard Biesheuvel July 31, 2017, 7:30 p.m. UTC | #4
On 31 July 2017 at 18:39, Alan Ott <alan@softiron.com> wrote:
> On 07/29/2017 06:23 AM, Ard Biesheuvel wrote:
>>
>> On 29 July 2017 at 02:17, Alan Ott <alan@softiron.com> wrote:
>>>
>>> Sorry I'm really late to this thread.
>>>
>>> On 06/27/2017 09:21 AM, Ard Biesheuvel wrote:
>>>>
>>>> The second SATA port is only available on B1 silicon, but as it turns
>>>> out, not on /all/ versions of it: the Overdrive 3000 is B1 based as
>>>> well,
>>>> but any attempts to use the second SATA controller cause the firmware to
>>>> crash. So just disable it.
>>>
>>>
>>> This is not true. The SoftIron OverDrive 3000 has 14 SATA ports that all
>>> work. Did someone at SoftIron tell you this?
>>>
>> Interesting. Do they all work in UEFI as well?
>
>
> Hi Ard,
>
> We use the 2nd controller from Linux extensively.
>
> Regarding use from within UEFI, this obviously doesn't get as much use by us
> as does using the drives from Linux (since as you might expect we typically
> boot from the first port), but I just now booted successfully from all 6
> drives on the second controller using debug and release builds.
>

OK, interesting. I had the same experience on my B1, but flashing this
one SoftIron 3000 to the open source firmware resulted in the crash I
mentioned.

What I don't remember exactly is whether I updated the secure part as
well, or only the EDK2 code and var partitions on the SPI flash.

>> I programmed the open source Overdrive firmware on a SoftIron box at
>> the ARM office (Punit's), and it crashed in UEFI when trying to
>> initialize the second SATA controller. The same code works fine on my
>> non-SoftIron B1 Overdrive, so I wonder what the difference is.
>
>
> I can't say for sure. If you have a bad unit, we'd be happy to help you with
> that.
>

I must admit disabling the second port was also useful in fixing the
Gen1/2/3 setting in AmdSataInitLib, given that the PCD in question is
32-bits and so can only describe 8 ports. I suppose it makes sense to
get to the bottom of that one first, though. Did you simply revert
that change? Or switch to Gen2 or Gen1?
Alan Ott July 31, 2017, 7:59 p.m. UTC | #5
On 07/31/2017 03:30 PM, Ard Biesheuvel wrote:
> On 31 July 2017 at 18:39, Alan Ott <alan@softiron.com> wrote:
>> On 07/29/2017 06:23 AM, Ard Biesheuvel wrote:
>>> On 29 July 2017 at 02:17, Alan Ott <alan@softiron.com> wrote:
>>>> Sorry I'm really late to this thread.
>>>>
>>>> On 06/27/2017 09:21 AM, Ard Biesheuvel wrote:
>>>>> The second SATA port is only available on B1 silicon, but as it turns
>>>>> out, not on /all/ versions of it: the Overdrive 3000 is B1 based as
>>>>> well,
>>>>> but any attempts to use the second SATA controller cause the firmware to
>>>>> crash. So just disable it.
>>>>
>>>> This is not true. The SoftIron OverDrive 3000 has 14 SATA ports that all
>>>> work. Did someone at SoftIron tell you this?
>>>>
>>> Interesting. Do they all work in UEFI as well?
>>
>> Hi Ard,
>>
>> We use the 2nd controller from Linux extensively.
>>
>> Regarding use from within UEFI, this obviously doesn't get as much use by us
>> as does using the drives from Linux (since as you might expect we typically
>> boot from the first port), but I just now booted successfully from all 6
>> drives on the second controller using debug and release builds.
>>
> OK, interesting. I had the same experience on my B1, but flashing this
> one SoftIron 3000 to the open source firmware resulted in the crash I
> mentioned.
>
> What I don't remember exactly is whether I updated the secure part as
> well, or only the EDK2 code and var partitions on the SPI flash.

I'm building OverdriveBoard.dsc configuration in OpenPlatformPkg and 
flashing Build/.../STYX_ROM.fd directly onto the SPI flash. I'm not 
rebuilding the secure part for any of this.


>>> I programmed the open source Overdrive firmware on a SoftIron box at
>>> the ARM office (Punit's), and it crashed in UEFI when trying to
>>> initialize the second SATA controller. The same code works fine on my
>>> non-SoftIron B1 Overdrive, so I wonder what the difference is.
>>
>> I can't say for sure. If you have a bad unit, we'd be happy to help you with
>> that.
>>
> I must admit disabling the second port was also useful in fixing the
> Gen1/2/3 setting in AmdSataInitLib, given that the PCD in question is
> 32-bits and so can only describe 8 ports. I suppose it makes sense to
> get to the bottom of that one first, though.

Are you talking about PcdSataPortMode? That's 16 bits wide, which I 
think is what you meant (8 ports * 2 bits is 16). We should increase the 
size to 32.

> Did you simply revert that change? Or switch to Gen2 or Gen1?

I didn't change it. It works fine with that change, but only because 
0xffff >> n is still 0xffff.

Alan.
Ard Biesheuvel July 31, 2017, 8:01 p.m. UTC | #6
On 31 July 2017 at 20:59, Alan Ott <alan@softiron.com> wrote:
> On 07/31/2017 03:30 PM, Ard Biesheuvel wrote:
>>
>> On 31 July 2017 at 18:39, Alan Ott <alan@softiron.com> wrote:
>>>
>>> On 07/29/2017 06:23 AM, Ard Biesheuvel wrote:
>>>>
>>>> On 29 July 2017 at 02:17, Alan Ott <alan@softiron.com> wrote:
>>>>>
>>>>> Sorry I'm really late to this thread.
>>>>>
>>>>> On 06/27/2017 09:21 AM, Ard Biesheuvel wrote:
>>>>>>
>>>>>> The second SATA port is only available on B1 silicon, but as it turns
>>>>>> out, not on /all/ versions of it: the Overdrive 3000 is B1 based as
>>>>>> well,
>>>>>> but any attempts to use the second SATA controller cause the firmware
>>>>>> to
>>>>>> crash. So just disable it.
>>>>>
>>>>>
>>>>> This is not true. The SoftIron OverDrive 3000 has 14 SATA ports that
>>>>> all
>>>>> work. Did someone at SoftIron tell you this?
>>>>>
>>>> Interesting. Do they all work in UEFI as well?
>>>
>>>
>>> Hi Ard,
>>>
>>> We use the 2nd controller from Linux extensively.
>>>
>>> Regarding use from within UEFI, this obviously doesn't get as much use by
>>> us
>>> as does using the drives from Linux (since as you might expect we
>>> typically
>>> boot from the first port), but I just now booted successfully from all 6
>>> drives on the second controller using debug and release builds.
>>>
>> OK, interesting. I had the same experience on my B1, but flashing this
>> one SoftIron 3000 to the open source firmware resulted in the crash I
>> mentioned.
>>
>> What I don't remember exactly is whether I updated the secure part as
>> well, or only the EDK2 code and var partitions on the SPI flash.
>
>
> I'm building OverdriveBoard.dsc configuration in OpenPlatformPkg and
> flashing Build/.../STYX_ROM.fd directly onto the SPI flash. I'm not
> rebuilding the secure part for any of this.
>

OK. But in my case, I may have flashed the 3000 board with the open
source UEFI only, and kept whatever was in the secure partition.

>>>> I programmed the open source Overdrive firmware on a SoftIron box at
>>>> the ARM office (Punit's), and it crashed in UEFI when trying to
>>>> initialize the second SATA controller. The same code works fine on my
>>>> non-SoftIron B1 Overdrive, so I wonder what the difference is.
>>>
>>>
>>> I can't say for sure. If you have a bad unit, we'd be happy to help you
>>> with
>>> that.
>>>
>> I must admit disabling the second port was also useful in fixing the
>> Gen1/2/3 setting in AmdSataInitLib, given that the PCD in question is
>> 32-bits and so can only describe 8 ports. I suppose it makes sense to
>> get to the bottom of that one first, though.
>
>
> Are you talking about PcdSataPortMode? That's 16 bits wide, which I think is
> what you meant (8 ports * 2 bits is 16). We should increase the size to 32.
>

Indeed.

>> Did you simply revert that change? Or switch to Gen2 or Gen1?
>
>
> I didn't change it. It works fine with that change, but only because 0xffff
>>> n is still 0xffff.
>

Ah ok. But I thought you had identified that change as the source of a problem?
Alan Ott July 31, 2017, 8:27 p.m. UTC | #7
On 07/31/2017 04:01 PM, Ard Biesheuvel wrote:
> On 31 July 2017 at 20:59, Alan Ott <alan@softiron.com> wrote:
>> On 07/31/2017 03:30 PM, Ard Biesheuvel wrote:
>>> On 31 July 2017 at 18:39, Alan Ott <alan@softiron.com> wrote:
>>>> On 07/29/2017 06:23 AM, Ard Biesheuvel wrote:
>>>>> On 29 July 2017 at 02:17, Alan Ott <alan@softiron.com> wrote:
>>>>>> Sorry I'm really late to this thread.
>>>>>>
>>>>>> On 06/27/2017 09:21 AM, Ard Biesheuvel wrote:
>>>>>>> The second SATA port is only available on B1 silicon, but as it turns
>>>>>>> out, not on /all/ versions of it: the Overdrive 3000 is B1 based as
>>>>>>> well,
>>>>>>> but any attempts to use the second SATA controller cause the firmware
>>>>>>> to
>>>>>>> crash. So just disable it.
>>>>>>
>>>>>> This is not true. The SoftIron OverDrive 3000 has 14 SATA ports that
>>>>>> all
>>>>>> work. Did someone at SoftIron tell you this?
>>>>>>
>>>>> Interesting. Do they all work in UEFI as well?
>>>>
>>>> Hi Ard,
>>>>
>>>> We use the 2nd controller from Linux extensively.
>>>>
>>>> Regarding use from within UEFI, this obviously doesn't get as much use by
>>>> us
>>>> as does using the drives from Linux (since as you might expect we
>>>> typically
>>>> boot from the first port), but I just now booted successfully from all 6
>>>> drives on the second controller using debug and release builds.
>>>>
>>> OK, interesting. I had the same experience on my B1, but flashing this
>>> one SoftIron 3000 to the open source firmware resulted in the crash I
>>> mentioned.
>>>
>>> What I don't remember exactly is whether I updated the secure part as
>>> well, or only the EDK2 code and var partitions on the SPI flash.
>>
>> I'm building OverdriveBoard.dsc configuration in OpenPlatformPkg and
>> flashing Build/.../STYX_ROM.fd directly onto the SPI flash. I'm not
>> rebuilding the secure part for any of this.
>>
> OK. But in my case, I may have flashed the 3000 board with the open
> source UEFI only, and kept whatever was in the secure partition.

Ah, I see. I've never done that.

>>>>> I programmed the open source Overdrive firmware on a SoftIron box at
>>>>> the ARM office (Punit's), and it crashed in UEFI when trying to
>>>>> initialize the second SATA controller. The same code works fine on my
>>>>> non-SoftIron B1 Overdrive, so I wonder what the difference is.
>>>>
>>>> I can't say for sure. If you have a bad unit, we'd be happy to help you
>>>> with
>>>> that.
>>>>
>>> I must admit disabling the second port was also useful in fixing the
>>> Gen1/2/3 setting in AmdSataInitLib, given that the PCD in question is
>>> 32-bits and so can only describe 8 ports. I suppose it makes sense to
>>> get to the bottom of that one first, though.
>>
>> Are you talking about PcdSataPortMode? That's 16 bits wide, which I think is
>> what you meant (8 ports * 2 bits is 16). We should increase the size to 32.
>>
> Indeed.
>
>>> Did you simply revert that change? Or switch to Gen2 or Gen1?
>>
>> I didn't change it. It works fine with that change, but only because 0xffff
>>>> n is still 0xffff.
> Ah ok. But I thought you had identified that change as the source of a problem?

If you're referring to a comment I left on IRC, I reverted 
dc07fa34c77cdd and 79aafbadadffb6 (effectively) and my boot stopped 
hanging. I hadn't worked out what the issue was at the time.

What I've determined now is that 
gAmdStyxTokenSpaceGuid.PcdSata1PortCount must be specified in the .DSC. 
It can be zero, but if it's not present it appears to default to 8, and 
the initialization hangs. This causes HEAD to not boot for me. Does HEAD 
boot for you?

Alan.
Ard Biesheuvel July 31, 2017, 8:32 p.m. UTC | #8
On 31 July 2017 at 21:27, Alan Ott <alan@softiron.com> wrote:
> On 07/31/2017 04:01 PM, Ard Biesheuvel wrote:
>>
>> On 31 July 2017 at 20:59, Alan Ott <alan@softiron.com> wrote:
>>>
>>> On 07/31/2017 03:30 PM, Ard Biesheuvel wrote:
>>>>
>>>> On 31 July 2017 at 18:39, Alan Ott <alan@softiron.com> wrote:
>>>>>
>>>>> On 07/29/2017 06:23 AM, Ard Biesheuvel wrote:
>>>>>>
>>>>>> On 29 July 2017 at 02:17, Alan Ott <alan@softiron.com> wrote:
>>>>>>>
>>>>>>> Sorry I'm really late to this thread.
>>>>>>>
>>>>>>> On 06/27/2017 09:21 AM, Ard Biesheuvel wrote:
>>>>>>>>
>>>>>>>> The second SATA port is only available on B1 silicon, but as it
>>>>>>>> turns
>>>>>>>> out, not on /all/ versions of it: the Overdrive 3000 is B1 based as
>>>>>>>> well,
>>>>>>>> but any attempts to use the second SATA controller cause the
>>>>>>>> firmware
>>>>>>>> to
>>>>>>>> crash. So just disable it.
>>>>>>>
>>>>>>>
>>>>>>> This is not true. The SoftIron OverDrive 3000 has 14 SATA ports that
>>>>>>> all
>>>>>>> work. Did someone at SoftIron tell you this?
>>>>>>>
>>>>>> Interesting. Do they all work in UEFI as well?
>>>>>
>>>>>
>>>>> Hi Ard,
>>>>>
>>>>> We use the 2nd controller from Linux extensively.
>>>>>
>>>>> Regarding use from within UEFI, this obviously doesn't get as much use
>>>>> by
>>>>> us
>>>>> as does using the drives from Linux (since as you might expect we
>>>>> typically
>>>>> boot from the first port), but I just now booted successfully from all
>>>>> 6
>>>>> drives on the second controller using debug and release builds.
>>>>>
>>>> OK, interesting. I had the same experience on my B1, but flashing this
>>>> one SoftIron 3000 to the open source firmware resulted in the crash I
>>>> mentioned.
>>>>
>>>> What I don't remember exactly is whether I updated the secure part as
>>>> well, or only the EDK2 code and var partitions on the SPI flash.
>>>
>>>
>>> I'm building OverdriveBoard.dsc configuration in OpenPlatformPkg and
>>> flashing Build/.../STYX_ROM.fd directly onto the SPI flash. I'm not
>>> rebuilding the secure part for any of this.
>>>
>> OK. But in my case, I may have flashed the 3000 board with the open
>> source UEFI only, and kept whatever was in the secure partition.
>
>
> Ah, I see. I've never done that.
>
>>>>>> I programmed the open source Overdrive firmware on a SoftIron box at
>>>>>> the ARM office (Punit's), and it crashed in UEFI when trying to
>>>>>> initialize the second SATA controller. The same code works fine on my
>>>>>> non-SoftIron B1 Overdrive, so I wonder what the difference is.
>>>>>
>>>>>
>>>>> I can't say for sure. If you have a bad unit, we'd be happy to help you
>>>>> with
>>>>> that.
>>>>>
>>>> I must admit disabling the second port was also useful in fixing the
>>>> Gen1/2/3 setting in AmdSataInitLib, given that the PCD in question is
>>>> 32-bits and so can only describe 8 ports. I suppose it makes sense to
>>>> get to the bottom of that one first, though.
>>>
>>>
>>> Are you talking about PcdSataPortMode? That's 16 bits wide, which I think
>>> is
>>> what you meant (8 ports * 2 bits is 16). We should increase the size to
>>> 32.
>>>
>> Indeed.
>>
>>>> Did you simply revert that change? Or switch to Gen2 or Gen1?
>>>
>>>
>>> I didn't change it. It works fine with that change, but only because
>>> 0xffff
>>>>>
>>>>> n is still 0xffff.
>>
>> Ah ok. But I thought you had identified that change as the source of a
>> problem?
>
>
> If you're referring to a comment I left on IRC, I reverted dc07fa34c77cdd
> and 79aafbadadffb6 (effectively) and my boot stopped hanging. I hadn't
> worked out what the issue was at the time.
>
> What I've determined now is that gAmdStyxTokenSpaceGuid.PcdSata1PortCount
> must be specified in the .DSC. It can be zero, but if it's not present it
> appears to default to 8, and the initialization hangs. This causes HEAD to
> not boot for me. Does HEAD boot for you?
>

I am currently running OPP 3c4fa409b6b0ba729161fd4ce4d2ab0dfa036422
but against UDK2017 branch (plus a couple of patches) rather than EDK2
HEAD.
diff mbox series

Patch

diff --git a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc
index 7ac3ce3760fa..9d533149af07 100644
--- a/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc
+++ b/Platforms/AMD/Styx/OverdriveBoard/OverdriveBoard.dsc
@@ -409,10 +409,13 @@  DEFINE DO_KCS       = 1
   gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0xE112F000
 
   #
-  # Overdrive B1 has 14 SATA ports across 2 controllers.
+  # AMD's B1 based Overdrive has 14 SATA ports across 2 controllers. However,
+  # it appears that Softiron's Overdrive 3000, which is also B1 based, does
+  # not have the second SATA controller enabled, and any attempts to use it
+  # will crash the firmware. So use the first controller only.
   #
   gAmdStyxTokenSpaceGuid.PcdSata0PortCount|8
-  gAmdStyxTokenSpaceGuid.PcdSata1PortCount|6
+  gAmdStyxTokenSpaceGuid.PcdSata1PortCount|0
 
   # PCIe Support
   gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xF0000000