[coreboot-gerrit] Patch set updated for coreboot: bb1ccb3 usbdebug: Drop obsolete ehci_debug_info relocation

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Thu Jun 13 08:01:38 CEST 2013


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3423

-gerrit

commit bb1ccb324efe8af9d314da7ce38afd6ef0cfc553
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Sat Jun 8 15:48:14 2013 +0300

    usbdebug: Drop obsolete ehci_debug_info relocation
    
    With this patch, output on usbdebug also includes the section of
    MTRR setups for every CPU. This makes usbdebug output almost identical
    with that of serial port and CBMEM console.
    
    Code removed here appear to be a remainder of days from when ehci_debug_info
    was kept in CAR. MTRR setup would certainly have messed it back then.
    
    Tested with model_206ax. Also tested previously on model_f2x which does
    not have these relocation calls in model_f2x_init() without detected issues.
    
    Change-Id: Idfd0e93439907b17255633658195d698feab3895
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 src/cpu/amd/model_fxx/model_fxx_init.c       | 14 --------------
 src/cpu/intel/haswell/haswell_init.c         | 15 ---------------
 src/cpu/intel/model_1067x/model_1067x_init.c | 11 -----------
 src/cpu/intel/model_106cx/model_106cx_init.c | 15 ---------------
 src/cpu/intel/model_206ax/model_206ax_init.c | 15 ---------------
 src/cpu/intel/model_68x/model_68x_init.c     | 15 ---------------
 src/cpu/intel/model_6bx/model_6bx_init.c     | 15 ---------------
 src/cpu/intel/model_6ex/model_6ex_init.c     | 11 -----------
 src/cpu/intel/model_6fx/model_6fx_init.c     | 15 ---------------
 9 files changed, 126 deletions(-)

diff --git a/src/cpu/amd/model_fxx/model_fxx_init.c b/src/cpu/amd/model_fxx/model_fxx_init.c
index d053894..a18b982 100644
--- a/src/cpu/amd/model_fxx/model_fxx_init.c
+++ b/src/cpu/amd/model_fxx/model_fxx_init.c
@@ -456,31 +456,17 @@ static inline void k8_errata(void)
 
 }
 
-#if CONFIG_USBDEBUG
-static unsigned ehci_debug_addr;
-#endif
-
 static void model_fxx_init(device_t dev)
 {
 	unsigned long i;
 	msr_t msr;
 	struct node_core_id id;
 
-#if CONFIG_USBDEBUG
-	if (!ehci_debug_addr)
-		ehci_debug_addr = get_ehci_debug();
-	set_ehci_debug(0);
-#endif
-
 	/* Turn on caching if we haven't already */
 	x86_enable_cache();
 	amd_setup_mtrrs();
 	x86_mtrr_check();
 
-#if CONFIG_USBDEBUG
-	set_ehci_debug(ehci_debug_addr);
-#endif
-
 	/* Update the microcode */
 	model_fxx_update_microcode(dev->device);
 
diff --git a/src/cpu/intel/haswell/haswell_init.c b/src/cpu/intel/haswell/haswell_init.c
index 18636b0..0bf98ec 100644
--- a/src/cpu/intel/haswell/haswell_init.c
+++ b/src/cpu/intel/haswell/haswell_init.c
@@ -438,10 +438,6 @@ static void configure_mca(void)
 		wrmsr(IA32_MC0_STATUS + (i * 4), msr);
 }
 
-#if CONFIG_USBDEBUG
-static unsigned ehci_debug_addr;
-#endif
-
 static void bsp_init_before_ap_bringup(struct bus *cpu_bus)
 {
 	struct device_path cpu_path;
@@ -466,22 +462,11 @@ static void bsp_init_before_ap_bringup(struct bus *cpu_bus)
 	if (info->index != 0)
 		printk(BIOS_CRIT, "BSP index(%d) != 0!\n", info->index);
 
-#if CONFIG_USBDEBUG
-	// Is this caution really needed?
-	if(!ehci_debug_addr)
-		ehci_debug_addr = get_ehci_debug();
-	set_ehci_debug(0);
-#endif
-
 	/* Setup MTRRs based on physical address size. */
 	x86_setup_fixed_mtrrs();
 	x86_setup_var_mtrrs(cpuid_eax(0x80000008) & 0xff, 2);
 	x86_mtrr_check();
 
-#if CONFIG_USBDEBUG
-	set_ehci_debug(ehci_debug_addr);
-#endif
-
 	/* Call through the cpu driver's initialization. */
 	cpu_initialize(0);
 }
diff --git a/src/cpu/intel/model_1067x/model_1067x_init.c b/src/cpu/intel/model_1067x/model_1067x_init.c
index deb05c0..ff4083f 100644
--- a/src/cpu/intel/model_1067x/model_1067x_init.c
+++ b/src/cpu/intel/model_1067x/model_1067x_init.c
@@ -345,21 +345,10 @@ static void model_1067x_init(device_t cpu)
 	fill_processor_name(processor_name);
 	printk(BIOS_INFO, "CPU: %s.\n", processor_name);
 
-#if CONFIG_USBDEBUG
-	// Is this caution really needed?
-	if(!ehci_debug_addr)
-		ehci_debug_addr = get_ehci_debug();
-	set_ehci_debug(0);
-#endif
-
 	/* Setup MTRRs */
 	x86_setup_mtrrs();
 	x86_mtrr_check();
 
-#if CONFIG_USBDEBUG
-	set_ehci_debug(ehci_debug_addr);
-#endif
-
 	/* Enable the local cpu apics */
 	setup_lapic();
 
diff --git a/src/cpu/intel/model_106cx/model_106cx_init.c b/src/cpu/intel/model_106cx/model_106cx_init.c
index 050c3d1..9304b58 100644
--- a/src/cpu/intel/model_106cx/model_106cx_init.c
+++ b/src/cpu/intel/model_106cx/model_106cx_init.c
@@ -128,10 +128,6 @@ static void configure_misc(void)
 	wrmsr(IA32_MISC_ENABLE, msr);
 }
 
-#if CONFIG_USBDEBUG
-static unsigned ehci_debug_addr;
-#endif
-
 static void model_106cx_init(device_t cpu)
 {
 	char processor_name[49];
@@ -146,21 +142,10 @@ static void model_106cx_init(device_t cpu)
 	fill_processor_name(processor_name);
 	printk(BIOS_INFO, "CPU: %s.\n", processor_name);
 
-#if CONFIG_USBDEBUG
-	// Is this caution really needed?
-	if(!ehci_debug_addr)
-		ehci_debug_addr = get_ehci_debug();
-	set_ehci_debug(0);
-#endif
-
 	/* Setup MTRRs */
 	x86_setup_mtrrs();
 	x86_mtrr_check();
 
-#if CONFIG_USBDEBUG
-	set_ehci_debug(ehci_debug_addr);
-#endif
-
 	/* Enable the local cpu apics */
 	setup_lapic();
 
diff --git a/src/cpu/intel/model_206ax/model_206ax_init.c b/src/cpu/intel/model_206ax/model_206ax_init.c
index d1f9277..6bf158e 100644
--- a/src/cpu/intel/model_206ax/model_206ax_init.c
+++ b/src/cpu/intel/model_206ax/model_206ax_init.c
@@ -476,10 +476,6 @@ static void configure_mca(void)
 		wrmsr(IA32_MC0_STATUS + (i * 4), msr);
 }
 
-#if CONFIG_USBDEBUG
-static unsigned ehci_debug_addr;
-#endif
-
 /*
  * Initialize any extra cores/threads in this package.
  */
@@ -554,13 +550,6 @@ static void model_206ax_init(device_t cpu)
 	fill_processor_name(processor_name);
 	printk(BIOS_INFO, "CPU: %s.\n", processor_name);
 
-#if CONFIG_USBDEBUG
-	// Is this caution really needed?
-	if(!ehci_debug_addr)
-		ehci_debug_addr = get_ehci_debug();
-	set_ehci_debug(0);
-#endif
-
 	/* Setup MTRRs based on physical address size */
 	cpuid_regs = cpuid(0x80000008);
 	x86_setup_fixed_mtrrs();
@@ -570,10 +559,6 @@ static void model_206ax_init(device_t cpu)
 	/* Setup Page Attribute Tables (PAT) */
 	// TODO set up PAT
 
-#if CONFIG_USBDEBUG
-	set_ehci_debug(ehci_debug_addr);
-#endif
-
 	/* Enable the local cpu apics */
 	enable_lapic_tpr();
 	setup_lapic();
diff --git a/src/cpu/intel/model_68x/model_68x_init.c b/src/cpu/intel/model_68x/model_68x_init.c
index fa35e55..37145f1 100644
--- a/src/cpu/intel/model_68x/model_68x_init.c
+++ b/src/cpu/intel/model_68x/model_68x_init.c
@@ -59,10 +59,6 @@ static const uint32_t microcode_updates[] = {
         0x0, 0x0, 0x0, 0x0,
 };
 
-#if CONFIG_USBDEBUG
-static unsigned ehci_debug_addr;
-#endif
-
 static void model_68x_init(device_t cpu)
 {
 	char processor_name[49];
@@ -77,21 +73,10 @@ static void model_68x_init(device_t cpu)
 	fill_processor_name(processor_name);
 	printk(BIOS_INFO, "CPU: %s.\n", processor_name);
 
-#if CONFIG_USBDEBUG
-	// Is this caution really needed?
-	if(!ehci_debug_addr)
-		ehci_debug_addr = get_ehci_debug();
-	set_ehci_debug(0);
-#endif
-
 	/* Setup MTRRs */
 	x86_setup_mtrrs();
 	x86_mtrr_check();
 
-#if CONFIG_USBDEBUG
-	set_ehci_debug(ehci_debug_addr);
-#endif
-
 	/* Enable the local cpu apics */
 	setup_lapic();
 }
diff --git a/src/cpu/intel/model_6bx/model_6bx_init.c b/src/cpu/intel/model_6bx/model_6bx_init.c
index a06d7fb..2076274 100644
--- a/src/cpu/intel/model_6bx/model_6bx_init.c
+++ b/src/cpu/intel/model_6bx/model_6bx_init.c
@@ -45,10 +45,6 @@ static const uint32_t microcode_updates[] = {
         0x0, 0x0, 0x0, 0x0,
 };
 
-#if CONFIG_USBDEBUG
-static unsigned ehci_debug_addr;
-#endif
-
 static void model_6bx_init(device_t cpu)
 {
 	char processor_name[49];
@@ -63,21 +59,10 @@ static void model_6bx_init(device_t cpu)
 	fill_processor_name(processor_name);
 	printk(BIOS_INFO, "CPU: %s.\n", processor_name);
 
-#if CONFIG_USBDEBUG
-	// Is this caution really needed?
-	if(!ehci_debug_addr)
-		ehci_debug_addr = get_ehci_debug();
-	set_ehci_debug(0);
-#endif
-
 	/* Setup MTRRs */
 	x86_setup_mtrrs();
 	x86_mtrr_check();
 
-#if CONFIG_USBDEBUG
-	set_ehci_debug(ehci_debug_addr);
-#endif
-
 	/* Enable the local cpu apics */
 	setup_lapic();
 }
diff --git a/src/cpu/intel/model_6ex/model_6ex_init.c b/src/cpu/intel/model_6ex/model_6ex_init.c
index 2e25553..cfe0922 100644
--- a/src/cpu/intel/model_6ex/model_6ex_init.c
+++ b/src/cpu/intel/model_6ex/model_6ex_init.c
@@ -171,21 +171,10 @@ static void model_6ex_init(device_t cpu)
 	fill_processor_name(processor_name);
 	printk(BIOS_INFO, "CPU: %s.\n", processor_name);
 
-#if CONFIG_USBDEBUG
-	// Is this caution really needed?
-	if(!ehci_debug_addr)
-		ehci_debug_addr = get_ehci_debug();
-	set_ehci_debug(0);
-#endif
-
 	/* Setup MTRRs */
 	x86_setup_mtrrs();
 	x86_mtrr_check();
 
-#if CONFIG_USBDEBUG
-	set_ehci_debug(ehci_debug_addr);
-#endif
-
 	/* Enable the local cpu apics */
 	setup_lapic();
 
diff --git a/src/cpu/intel/model_6fx/model_6fx_init.c b/src/cpu/intel/model_6fx/model_6fx_init.c
index 5d5b956..31ba53a 100644
--- a/src/cpu/intel/model_6fx/model_6fx_init.c
+++ b/src/cpu/intel/model_6fx/model_6fx_init.c
@@ -190,10 +190,6 @@ static void configure_pic_thermal_sensors(void)
 	wrmsr(PIC_SENS_CFG, msr);
 }
 
-#if CONFIG_USBDEBUG
-static unsigned ehci_debug_addr;
-#endif
-
 static void model_6fx_init(device_t cpu)
 {
 	char processor_name[49];
@@ -208,13 +204,6 @@ static void model_6fx_init(device_t cpu)
 	fill_processor_name(processor_name);
 	printk(BIOS_INFO, "CPU: %s.\n", processor_name);
 
-#if CONFIG_USBDEBUG
-	// Is this caution really needed?
-	if(!ehci_debug_addr)
-		ehci_debug_addr = get_ehci_debug();
-	set_ehci_debug(0);
-#endif
-
 	/* Setup MTRRs */
 	x86_setup_mtrrs();
 	x86_mtrr_check();
@@ -222,10 +211,6 @@ static void model_6fx_init(device_t cpu)
 	/* Setup Page Attribute Tables (PAT) */
 	// TODO set up PAT
 
-#if CONFIG_USBDEBUG
-	set_ehci_debug(ehci_debug_addr);
-#endif
-
 	/* Enable the local cpu apics */
 	setup_lapic();
 



More information about the coreboot-gerrit mailing list