Bruce Griffith (Bruce.Griffith(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3823
-gerrit
commit e18ab68ba589be8077070a2d3f58dee15c5d6e14
Author: Mike Loptien <mike.loptien(a)se-eng.com>
Date: Thu Jul 18 10:30:47 2013 -0600
AMD Fam16: Add OSC method to PCI0
The _OSC method is used to tell the OS what capabilities it can
take control over from the firmware. This method is described
in chapter 6.2.9 of the ACPI spec v3.0. The method takes 4
inputs (UUID, Rev ID, Input Count, and Capabilities Buffer) and
returns a Capabilites Buffer the same size as the input Buffer.
This Buffer is generally 3 Dwords long consisting of an Errors
Dword, a Supported Capabilities Dword, and a Control Dword.
The OS will request control of certain capabilities and the
firmware must grant or deny control of those features. We do not
want to have control over anything so let the OS control as much
as it can.
The _OSC method is required for PCIe devices. During Linux boot,
an error is logged to dmesg if _OSC is not found.
Change-Id: Icf6e7a82284d03d23fd30ee7b7db17754e988c9a
Signed-off-by: Mike Loptien <mike.loptien(a)se-eng.com>
---
src/southbridge/amd/agesa/hudson/acpi/fch.asl | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/southbridge/amd/agesa/hudson/acpi/fch.asl b/src/southbridge/amd/agesa/hudson/acpi/fch.asl
index 5d3a29c..06b4fe7 100755
--- a/src/southbridge/amd/agesa/hudson/acpi/fch.asl
+++ b/src/southbridge/amd/agesa/hudson/acpi/fch.asl
@@ -21,6 +21,25 @@
/* South Bridge */
/* _SB.PCI0 */
+/* Operating System Capabilities Method */
+Method(_OSC,4)
+{
+ // Create DWord-addressable fields from the Capabilities Buffer
+ CreateDWordField(Arg3,0,CDW1)
+ CreateDWordField(Arg3,4,CDW2)
+ CreateDWordField(Arg3,8,CDW3)
+
+ /* Check for proper PCI/PCIe UUID */
+ If(LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766")))
+ {
+ /* Let OS control everything */
+ Return (Arg3)
+ } Else {
+ Or(CDW1,4,CDW1) // Unrecognized UUID
+ Return(Arg3)
+ }
+}
+
/* Describe the Southbridge devices */
/* 0:11.0 - SATA */
Bruce Griffith (Bruce.Griffith(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3822
-gerrit
commit 37aaee4a6d1eb8f8784ce31a6da790fdba12a171
Author: Mike Loptien <mike.loptien(a)se-eng.com>
Date: Thu Jul 18 10:16:31 2013 -0600
AMD Fam16: Add secondary bus number to CRES method
Adding the 'WordBusNumber' macro to the PCI0
CRES ResourceTemplate in the AMD FCH ACPI code.
This sets up the bus number for the PCI0 device
and the secondary bus number in the CRS method.
This change came in response to a 'dmesg' error
which states:
'[FIRMWARE BUG]: ACPI: no secondary bus range in _CRS'
By adding the 'WordBusNumber' macro, ACPI can set
up a valid range for the PCIe downstream busses,
thereby relieving the Linux kernel from "guessing"
the valid range based off _BBN or assuming [0-0xFF].
The Linux kernel code that checks this bus range is
in `drivers/acpi/pci_root.c`. PCI busses can have
up to 256 secondary busses connected to them via
a PCI-PCI bridge. However, these busses do not
have to be sequentially numbered, so leaving out a
section of the range (eg. allowing [0-0x7F]) will
unnecessarily restrict the downstream busses.
Change-Id: Ib2d36f69a26b715798ef1ea17deb0905fa0cad87
Signed-off-by: Mike Loptien <mike.loptien(a)se-eng.com>
---
src/southbridge/amd/agesa/hudson/acpi/fch.asl | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/southbridge/amd/agesa/hudson/acpi/fch.asl b/src/southbridge/amd/agesa/hudson/acpi/fch.asl
index 4fbf853..5d3a29c 100755
--- a/src/southbridge/amd/agesa/hudson/acpi/fch.asl
+++ b/src/southbridge/amd/agesa/hudson/acpi/fch.asl
@@ -71,6 +71,22 @@ Device(ACMD) {
#endif
Name(CRES, ResourceTemplate() {
+ /* Set the Bus number and Secondary Bus number for the PCI0 device
+ * The Secondary bus range for PCI0 lets the system
+ * know what bus values are allowed on the downstream
+ * side of this PCI bus if there is a PCI-PCI bridge.
+ * PCI busses can have 256 secondary busses which
+ * range from [0-0xFF] but they do not need to be
+ * sequential.
+ */
+ WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode,
+ 0x0000, /* address granularity */
+ 0x0000, /* range minimum */
+ 0x00FF, /* range maximum */
+ 0x0000, /* translation */
+ 0x0100, /* length */
+ ,, PSB0) /* ResourceSourceIndex, ResourceSource, DescriptorName */
+
IO(Decode16, 0x0CF8, 0x0CF8, 1, 8)
WORDIO(ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
Bruce Griffith (Bruce.Griffith(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3852
-gerrit
commit ed567cfc0d50dd12d9f7e401d204db0f21117bf6
Author: Bruce Griffith <bruce.griffith(a)se-eng.com>
Date: Mon Aug 12 01:53:13 2013 -0600
AMD AGESA: Remove INVD instruction when transitioning from CAR
The AMD AGESA function to move the stack from cache-as-ram to
actual RAM doesn't need any help. The current implementation has
an INVD instruction just before cache-as-RAM is torn down. It isn't
needed for Trinity processors and makes Kabini boot unreliable.
Change-Id: Ibe9e4105eee032471ccbb2d537471d5fa5847d22
Signed-off-by: Bruce Griffith <bruce.griffith(a)se-eng.com>
---
src/cpu/amd/agesa/cache_as_ram.inc | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/cpu/amd/agesa/cache_as_ram.inc b/src/cpu/amd/agesa/cache_as_ram.inc
index c645a1e..449cf69 100755
--- a/src/cpu/amd/agesa/cache_as_ram.inc
+++ b/src/cpu/amd/agesa/cache_as_ram.inc
@@ -85,6 +85,7 @@ stop:
disable_cache_as_ram:
/* Save return stack */
+ movd 0(%esp), %xmm1
movd %esp, %xmm0
/* Disable cache */
@@ -92,8 +93,6 @@ disable_cache_as_ram:
orl $CR0_CacheDisable, %eax
movl %eax, %cr0
- invd
-
AMD_DISABLE_STACK
/* enable cache */
@@ -103,7 +102,9 @@ disable_cache_as_ram:
xorl %eax, %eax
/* Restore the return stack */
+ wbinvd
movd %xmm0, %esp
+ movd %xmm1, (%esp)
ret
cache_as_ram_setup_out:
Bruce Griffith (Bruce.Griffith(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3857
-gerrit
commit 684dcf5460d3d1cf5e5251047ecd859a882d27bc
Author: Bruce Griffith <Bruce.Griffith(a)se-eng.com>
Date: Mon Jul 8 18:19:08 2013 -0600
AMD Richland: Add new graphics device IDs to Family 15, Models 10-1F
Change-Id: Ic7fdedc0a22e7664f14b105f2f7cecd8f55980be
Signed-off-by: Bruce Griffith <Bruce.Griffith(a)se-eng.com>
---
src/northbridge/amd/agesa/family15tn/northbridge.c | 55 +++++++++++++---------
1 file changed, 34 insertions(+), 21 deletions(-)
diff --git a/src/northbridge/amd/agesa/family15tn/northbridge.c b/src/northbridge/amd/agesa/family15tn/northbridge.c
index 5eccf43..0a69ad8 100644
--- a/src/northbridge/amd/agesa/family15tn/northbridge.c
+++ b/src/northbridge/amd/agesa/family15tn/northbridge.c
@@ -1135,27 +1135,40 @@ u32 map_oprom_vendev(u32 vendev)
u32 new_vendev=vendev;
switch(vendev) {
- //case 0x10029900: //FS1r2
- case 0x10029901: //FM2
- case 0x10029903: //FS1r2
- case 0x10029904: //FM2
- case 0x10029906: //FM2
- case 0x10029907: //FP2
- case 0x10029908: //FP2
- case 0x1002990A: //FP2
- case 0x10029910: //FS1r2
- case 0x10029913: //FS1r2
- case 0x10029917: //FP2
- case 0x10029918: //FP2
- case 0x10029919: //FP2
- case 0x10029990: //FS1r2
- case 0x10029991: //FM2
- case 0x10029992: //FS1r2
- case 0x10029993: //FM2
- case 0x10029994: //FP2
- case 0x100299A0: //FS1r2
- case 0x100299A2: //FS1r2
- case 0x100299A4: //FP2
+ case 0x10029900: /* AMD Radeon HD 7660G (Trinity) */
+ case 0x10029901: /* AMD Radeon HD 7660D (Trinity) */
+ case 0x10029903: /* AMD Radeon HD 7640G (Trinity) */
+ case 0x10029904: /* AMD Radeon HD 7560D (Trinity) */
+ case 0x10029907: /* AMD Radeon HD 7620G (Trinity) */
+ case 0x10029908: /* AMD Radeon HD 7600G (Trinity) */
+ case 0x1002990A: /* AMD Radeon HD 7500G (Trinity) */
+ case 0x1002990B: /* AMD Radeon HD 8650G (Richland) */
+ case 0x1002990C: /* AMD Radeon HD 8670D (Richland) */
+ case 0x1002990D: /* AMD Radeon HD 8550G (Richland) */
+ case 0x1002990E: /* AMD Radeon HD 8570D (Richland) */
+ case 0x1002990F: /* AMD Radeon HD 8610G (Richland) */
+ case 0x10029910: /* AMD Radeon HD 7660G (Trinity) */
+ case 0x10029913: /* AMD Radeon HD 7640G (Trinity) */
+ case 0x10029917: /* AMD Radeon HD 7620G (Trinity) */
+ case 0x10029918: /* AMD Radeon HD 7600G (Trinity) */
+ case 0x10029919: /* AMD Radeon HD 7500G (Trinity) */
+ case 0x10029990: /* AMD Radeon HD 7520G (Trinity) */
+ case 0x10029991: /* AMD Radeon HD 7540D (Trinity) */
+ case 0x10029992: /* AMD Radeon HD 7420G (Trinity) */
+ case 0x10029993: /* AMD Radeon HD 7480D (Trinity) */
+ case 0x10029994: /* AMD Radeon HD 7400G (Trinity) */
+ case 0x10029995: /* AMD Radeon HD 8450G (Richland) */
+ case 0x10029996: /* AMD Radeon HD 8470D (Richland) */
+ case 0x10029997: /* AMD Radeon HD 8350G (Richland) */
+ case 0x10029998: /* AMD Radeon HD 8370D (Richland) */
+ case 0x10029999: /* AMD Radeon HD 8510G (Richland) */
+ case 0x1002999A: /* AMD Radeon HD 8410G (Richland) */
+ case 0x1002999B: /* AMD Radeon HD 8310G (Richland) */
+ case 0x1002999C: /* AMD Radeon HD 8650D (Richland) */
+ case 0x1002999D: /* AMD Radeon HD 8550D (Richland) */
+ case 0x100299A0: /* AMD Radeon HD 7520G (Trinity) */
+ case 0x100299A2: /* AMD Radeon HD 7420G (Trinity) */
+ case 0x100299A4: /* AMD Radeon HD 7400G (Trinity) */
new_vendev=0x10029900;
break;
}
Bruce Griffith (Bruce.Griffith(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3823
-gerrit
commit e87ff5d56bd9e3becee0360fe1444a27d2a13126
Author: Mike Loptien <mike.loptien(a)se-eng.com>
Date: Thu Jul 18 10:30:47 2013 -0600
AMD Fam16: Add OSC method to PCI0
The _OSC method is used to tell the OS what capabilities it can
take control over from the firmware. This method is described
in chapter 6.2.9 of the ACPI spec v3.0. The method takes 4
inputs (UUID, Rev ID, Input Count, and Capabilities Buffer) and
returns a Capabilites Buffer the same size as the input Buffer.
This Buffer is generally 3 Dwords long consisting of an Errors
Dword, a Supported Capabilities Dword, and a Control Dword.
The OS will request control of certain capabilities and the
firmware must grant or deny control of those features. We do not
want to have control over anything so let the OS control as much
as it can.
The _OSC method is required for PCIe devices. During Linux boot,
an error is logged to dmesg if _OSC is not found.
Change-Id: Icf6e7a82284d03d23fd30ee7b7db17754e988c9a
Signed-off-by: Mike Loptien <mike.loptien(a)se-eng.com>
Reviewed-by: Marc Jones <marc.jones(a)se-eng.com>
---
src/southbridge/amd/agesa/hudson/acpi/fch.asl | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/src/southbridge/amd/agesa/hudson/acpi/fch.asl b/src/southbridge/amd/agesa/hudson/acpi/fch.asl
index 5d3a29c..06b4fe7 100755
--- a/src/southbridge/amd/agesa/hudson/acpi/fch.asl
+++ b/src/southbridge/amd/agesa/hudson/acpi/fch.asl
@@ -21,6 +21,25 @@
/* South Bridge */
/* _SB.PCI0 */
+/* Operating System Capabilities Method */
+Method(_OSC,4)
+{
+ // Create DWord-addressable fields from the Capabilities Buffer
+ CreateDWordField(Arg3,0,CDW1)
+ CreateDWordField(Arg3,4,CDW2)
+ CreateDWordField(Arg3,8,CDW3)
+
+ /* Check for proper PCI/PCIe UUID */
+ If(LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766")))
+ {
+ /* Let OS control everything */
+ Return (Arg3)
+ } Else {
+ Or(CDW1,4,CDW1) // Unrecognized UUID
+ Return(Arg3)
+ }
+}
+
/* Describe the Southbridge devices */
/* 0:11.0 - SATA */
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3854
-gerrit
commit 0deabe2e57e3f13fcc46654bf5af30627cea1a12
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Mon Aug 12 23:29:57 2013 +0300
console: Squelch console output from AP CPUs in romstage
Add Kconfig option SQUELCH_EARLY_SMP and have it enabled by
default.
Console drivers have unpredictable results if multiple threads
attempt to share same resources without spinlock. Serial UARTs
have not had huge problems, only distorted output, but those
relying on cache-as-ram (CBMEM and usbdebug) may require this.
Change-Id: I7f406fdea7b6dc6a341c4da2fab56f7b7ff568b4
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/arch/x86/lib/romstage_console.c | 9 ++++++++-
src/console/Kconfig | 12 ++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/src/arch/x86/lib/romstage_console.c b/src/arch/x86/lib/romstage_console.c
index 2e743ad..1c3141c 100644
--- a/src/arch/x86/lib/romstage_console.c
+++ b/src/arch/x86/lib/romstage_console.c
@@ -31,7 +31,9 @@
#if CONFIG_SPKMODEM
#include <console/spkmodem.h>
#endif
-
+#if CONFIG_SQUELCH_EARLY_SMP
+#include <cpu/x86/lapic.h>
+#endif
void console_tx_byte(unsigned char byte)
{
@@ -86,6 +88,11 @@ int do_printk(int msg_level, const char *fmt, ...)
return 0;
}
+#if CONFIG_SQUELCH_EARLY_SMP
+ if (!boot_cpu())
+ return 0;
+#endif
+
va_start(args, fmt);
i = vtxprintf(console_tx_byte, fmt, args);
va_end(args);
diff --git a/src/console/Kconfig b/src/console/Kconfig
index 1d050f7..c5e5f28 100644
--- a/src/console/Kconfig
+++ b/src/console/Kconfig
@@ -14,6 +14,18 @@ config EARLY_CONSOLE
help
Use console during early (pre-RAM) boot stages
+config SQUELCH_EARLY_SMP
+ bool "Squelch AP CPUs from early console."
+ default y
+ depends on EARLY_CONSOLE
+ help
+ When selected only the BSP CPU will output to early console.
+
+ Console drivers have unpredictable behaviour if multiple threads
+ attempt to share the same resources without a spinlock.
+
+ If unsure, say Y.
+
config CONSOLE_SERIAL
bool "Serial port console output"
default y
Kyösti Mälkki (kyosti.malkki(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3854
-gerrit
commit a818b10616c9a3513afd374008c5b197a2a15b17
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Mon Aug 12 23:29:57 2013 +0300
console: Squelch console output from AP CPUs in romstage
Add Kconfig option SQUELCH_EARLY_SMP and have it enabled by
default.
Console drivers have unpredictable results if multiple threads
attempt to share same resources without spinlock. Serial UARTs
have not had huge problems, only distorted output, but those
relying on cache-as-ram (CBMEM and usbdebug) may require this.
Change-Id: I7f406fdea7b6dc6a341c4da2fab56f7b7ff568b4
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
src/arch/x86/lib/romstage_console.c | 9 ++++++++-
src/console/Kconfig | 12 ++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/src/arch/x86/lib/romstage_console.c b/src/arch/x86/lib/romstage_console.c
index 2e743ad..1c3141c 100644
--- a/src/arch/x86/lib/romstage_console.c
+++ b/src/arch/x86/lib/romstage_console.c
@@ -31,7 +31,9 @@
#if CONFIG_SPKMODEM
#include <console/spkmodem.h>
#endif
-
+#if CONFIG_SQUELCH_EARLY_SMP
+#include <cpu/x86/lapic.h>
+#endif
void console_tx_byte(unsigned char byte)
{
@@ -86,6 +88,11 @@ int do_printk(int msg_level, const char *fmt, ...)
return 0;
}
+#if CONFIG_SQUELCH_EARLY_SMP
+ if (!boot_cpu())
+ return 0;
+#endif
+
va_start(args, fmt);
i = vtxprintf(console_tx_byte, fmt, args);
va_end(args);
diff --git a/src/console/Kconfig b/src/console/Kconfig
index 1d050f7..13d4433 100644
--- a/src/console/Kconfig
+++ b/src/console/Kconfig
@@ -14,6 +14,18 @@ config EARLY_CONSOLE
help
Use console during early (pre-RAM) boot stages
+config SQUELCH_EARLY_SMP
+ bool "Squelch AP CPUs from early console."
+ default y
+ depends on EARLY_CONSOLE
+ help
+ When selected only the BSP CPU will output to early console.
+
+ Console drivers have unpredictable behavious if multiple threads
+ attempt to share the same resources without a spinlock.
+
+ If unsure, say Y.
+
config CONSOLE_SERIAL
bool "Serial port console output"
default y