Michał Żygowski has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37999 )
Change subject: nb/amd/pi/00730F01/state_machine: Add lost options ......................................................................
nb/amd/pi/00730F01/state_machine: Add lost options
Add back options that were lost on postcar migration back. Some of them seem to be required for IOMMU initialization.
Signed-off-by: Michał Żygowski michal.zygowski@3mdeb.com Change-Id: Ie9cc772d7fcbefded8bab88f9960fef663dc7217 --- M src/northbridge/amd/pi/00730F01/state_machine.c 1 file changed, 24 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/37999/1
diff --git a/src/northbridge/amd/pi/00730F01/state_machine.c b/src/northbridge/amd/pi/00730F01/state_machine.c index 7e5ca5b..b0bf951 100644 --- a/src/northbridge/amd/pi/00730F01/state_machine.c +++ b/src/northbridge/amd/pi/00730F01/state_machine.c @@ -17,6 +17,7 @@ #include "AGESA.h"
#include <cbmem.h> +#include <device/device.h> #include <northbridge/amd/agesa/state_machine.h> #include <northbridge/amd/agesa/agesa_helper.h>
@@ -26,10 +27,14 @@
void platform_BeforeInitEarly(struct sysinfo *cb, AMD_EARLY_PARAMS *Early) { + Early->GnbConfig.PsppPolicy = PsppDisabled; }
void platform_BeforeInitPost(struct sysinfo *cb, AMD_POST_PARAMS *Post) { + Post->MemConfig.UmaMode = CONFIG(GFXUMA) ? UMA_AUTO : UMA_NONE; + Post->MemConfig.UmaSize = 0; + Post->MemConfig.BottomIo = (UINT16)(CONFIG_BOTTOMIO_POSITION >> 24); }
void platform_AfterInitPost(struct sysinfo *cb, AMD_POST_PARAMS *Post) @@ -56,10 +61,29 @@ void platform_BeforeInitMid(struct sysinfo *cb, AMD_MID_PARAMS *Mid) { amd_initcpuio(); + + /* 0 iGpuVgaAdapter, 1 iGpuVgaNonAdapter; */ + Mid->GnbMidConfiguration.iGpuVgaMode = 0; + Mid->GnbMidConfiguration.GnbIoapicAddress = 0xFEC20000; }
void platform_BeforeInitLate(struct sysinfo *cb, AMD_LATE_PARAMS *Late) { + struct device *iommu_dev = pcidev_on_root(0, 2); + + if(iommu_dev && iommu_dev->enabled) { + /* According to AGESA headers these must be set to sane values + * when IOMMU build config is enabled otherwise AGESA will skip + * it during IOMMU init and IVRS generation. + */ + Late->GnbLateConfiguration.GnbIoapicId = CONFIG_MAX_CPUS + 1; + Late->GnbLateConfiguration.FchIoapicId = CONFIG_MAX_CPUS; + } + + /* Code for creating CDIT requires hop count table. If it is not + * present AGESA_ERROR is returned, which confuses users. CDIT is not + * written to the ACPI tables anyway. */ + Late->PlatformConfig.UserOptionCdit = 0; }
void platform_AfterInitLate(struct sysinfo *cb, AMD_LATE_PARAMS *Late)
build bot (Jenkins) has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37999 )
Change subject: nb/amd/pi/00730F01/state_machine: Add lost options ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37999/1/src/northbridge/amd/pi/0073... File src/northbridge/amd/pi/00730F01/state_machine.c:
https://review.coreboot.org/c/coreboot/+/37999/1/src/northbridge/amd/pi/0073... PS1, Line 74: if(iommu_dev && iommu_dev->enabled) { space required before the open parenthesis '('
Hello Kyösti Mälkki,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37999
to look at the new patch set (#2).
Change subject: nb/amd/pi/00730F01/state_machine: Add lost options ......................................................................
nb/amd/pi/00730F01/state_machine: Add lost options
Add back options that were lost on postcar migration back. Some of them seem to be required for IOMMU initialization.
Signed-off-by: Michał Żygowski michal.zygowski@3mdeb.com Change-Id: Ie9cc772d7fcbefded8bab88f9960fef663dc7217 --- M src/northbridge/amd/pi/00730F01/state_machine.c 1 file changed, 24 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/37999/2
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37999 )
Change subject: nb/amd/pi/00730F01/state_machine: Add lost options ......................................................................
Patch Set 2:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37999/2/src/northbridge/amd/pi/0073... File src/northbridge/amd/pi/00730F01/state_machine.c:
https://review.coreboot.org/c/coreboot/+/37999/2/src/northbridge/amd/pi/0073... PS2, Line 72: struct device *iommu_dev = pcidev_on_root(0, 2); const struct
Hello Kyösti Mälkki, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37999
to look at the new patch set (#3).
Change subject: nb/amd/pi/00730F01/state_machine: Add lost options ......................................................................
nb/amd/pi/00730F01/state_machine: Add lost options
Add back options that were lost on postcar migration back. Some of them seem to be required for IOMMU initialization.
Signed-off-by: Michał Żygowski michal.zygowski@3mdeb.com Change-Id: Ie9cc772d7fcbefded8bab88f9960fef663dc7217 --- M src/northbridge/amd/pi/00730F01/state_machine.c 1 file changed, 24 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/37999/3
Hello Kyösti Mälkki, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/37999
to look at the new patch set (#4).
Change subject: nb/amd/pi/00730F01/state_machine: Add lost options ......................................................................
nb/amd/pi/00730F01/state_machine: Add lost options
Add back options that were lost on postcar migration. Some of them seem to be required for IOMMU initialization.
Signed-off-by: Michał Żygowski michal.zygowski@3mdeb.com Change-Id: Ie9cc772d7fcbefded8bab88f9960fef663dc7217 --- M src/northbridge/amd/pi/00730F01/state_machine.c 1 file changed, 24 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/37999/4
Michał Żygowski has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37999 )
Change subject: nb/amd/pi/00730F01/state_machine: Add lost options ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37999/2/src/northbridge/amd/pi/0073... File src/northbridge/amd/pi/00730F01/state_machine.c:
https://review.coreboot.org/c/coreboot/+/37999/2/src/northbridge/amd/pi/0073... PS2, Line 72: struct device *iommu_dev = pcidev_on_root(0, 2);
const struct
Done
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37999 )
Change subject: nb/amd/pi/00730F01/state_machine: Add lost options ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/37999/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/37999/4//COMMIT_MSG@11 PS4, Line 11: Tested how?
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/37999 )
Change subject: nb/amd/pi/00730F01/state_machine: Add lost options ......................................................................
Patch Set 4: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/37999/4//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/37999/4//COMMIT_MSG@11 PS4, Line 11:
Tested how?
Ack
Kyösti Mälkki has submitted this change. ( https://review.coreboot.org/c/coreboot/+/37999 )
Change subject: nb/amd/pi/00730F01/state_machine: Add lost options ......................................................................
nb/amd/pi/00730F01/state_machine: Add lost options
Add back options that were lost on postcar migration. Some of them seem to be required for IOMMU initialization.
Signed-off-by: Michał Żygowski michal.zygowski@3mdeb.com Change-Id: Ie9cc772d7fcbefded8bab88f9960fef663dc7217 Reviewed-on: https://review.coreboot.org/c/coreboot/+/37999 Reviewed-by: Kyösti Mälkki kyosti.malkki@gmail.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/northbridge/amd/pi/00730F01/state_machine.c 1 file changed, 24 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Kyösti Mälkki: Looks good to me, approved
diff --git a/src/northbridge/amd/pi/00730F01/state_machine.c b/src/northbridge/amd/pi/00730F01/state_machine.c index 7e5ca5b..5cb77fc 100644 --- a/src/northbridge/amd/pi/00730F01/state_machine.c +++ b/src/northbridge/amd/pi/00730F01/state_machine.c @@ -17,6 +17,7 @@ #include "AGESA.h"
#include <cbmem.h> +#include <device/device.h> #include <northbridge/amd/agesa/state_machine.h> #include <northbridge/amd/agesa/agesa_helper.h>
@@ -26,10 +27,14 @@
void platform_BeforeInitEarly(struct sysinfo *cb, AMD_EARLY_PARAMS *Early) { + Early->GnbConfig.PsppPolicy = PsppDisabled; }
void platform_BeforeInitPost(struct sysinfo *cb, AMD_POST_PARAMS *Post) { + Post->MemConfig.UmaMode = CONFIG(GFXUMA) ? UMA_AUTO : UMA_NONE; + Post->MemConfig.UmaSize = 0; + Post->MemConfig.BottomIo = (UINT16)(CONFIG_BOTTOMIO_POSITION >> 24); }
void platform_AfterInitPost(struct sysinfo *cb, AMD_POST_PARAMS *Post) @@ -56,10 +61,29 @@ void platform_BeforeInitMid(struct sysinfo *cb, AMD_MID_PARAMS *Mid) { amd_initcpuio(); + + /* 0 iGpuVgaAdapter, 1 iGpuVgaNonAdapter; */ + Mid->GnbMidConfiguration.iGpuVgaMode = 0; + Mid->GnbMidConfiguration.GnbIoapicAddress = 0xFEC20000; }
void platform_BeforeInitLate(struct sysinfo *cb, AMD_LATE_PARAMS *Late) { + const struct device *iommu_dev = pcidev_on_root(0, 2); + + if (iommu_dev && iommu_dev->enabled) { + /* According to AGESA headers these must be set to sane values + * when IOMMU build config is enabled otherwise AGESA will skip + * it during IOMMU init and IVRS generation. + */ + Late->GnbLateConfiguration.GnbIoapicId = CONFIG_MAX_CPUS + 1; + Late->GnbLateConfiguration.FchIoapicId = CONFIG_MAX_CPUS; + } + + /* Code for creating CDIT requires hop count table. If it is not + * present AGESA_ERROR is returned, which confuses users. CDIT is not + * written to the ACPI tables anyway. */ + Late->PlatformConfig.UserOptionCdit = 0; }
void platform_AfterInitLate(struct sysinfo *cb, AMD_LATE_PARAMS *Late)