Re: [U-Boot] About PCI of U-BOOT of CANYONLANDS

Kazuaki Ichinohe wrote:
Hi Anatolij, Stefan,
The memory space is displayed in BAR2 of the PCI configuration space. The video driver accesses this memory space and the exception is generated.
driver source: u-boot/drivers/video/ati_radeon_fb.c function name: void *video_hw_init(void) line : 760line
it seems that the driver is able to access memory space (registers, e.g. in radeon_identify_vram() ) but cannot access framebuffer?
Please replace '#undef DEBUG' in drivers/video/ati_radeon_fb.c with '#define DEBUG' and also enable CONFIG_VIDEO and use #define VIDEO_IO_OFFSET 0xD0800000 and post the boot log again.
Thanks!
Best regards, Anatolij
I attach the log where the exception is generated. I confirmed it by the source of the following patches. #undef CONFIG_VIDEO #ifdef CONFIG_VIDEO #define CONFIG_BIOSEMU #define CONFIG_ATI_RADEON_FB #define VIDEO_IO_OFFSET 0xD8000000 #define CONFIG_SYS_ISA_IO_BASE_ADDRESS VIDEO_IO_OFFSET #define CONFIG_VIDEO_SW_CURSOR #define CONFIG_VIDEO_LOGO #define CONFIG_CFB_CONSOLE #define CONFIG_SPLASH_SCREEN #define CONFIG_VGA_AS_SINGLE_DEVICE #define CONFIG_CMD_BMP #endif /* #ifdef CONFIG_VIDEO */
Regards, Kazuaki Ichinohe

Hi Anatolij,
This is a problem that the memory space of BAR2 is inaccessible. Even if the value of VIDEO_IO_OFFSET is changed, the problem is not solved.
It is a log that you demanded as follows. ------------------------------------------------- U-Boot 2009.01 ( 3月 19 2009 - 11:17:08)
CPU: AMCC PowerPC 460EX Rev. A at 800 MHz (PLB=200, OPB=100, EBC=100 MHz) Security/Kasumi support Bootstrap Option H - Boot ROM Location I2C (Addr 0x52) Internal PCI arbiter disabled 32 kB I-Cache 32 kB D-Cache Board: Canyonlands - AMCC PPC460EX Evaluation Board, 1*PCIe/1*SATA, Rev. 14 I2C: ready DTT: 1 is 41 C DRAM: 512 MB (ECC not enabled, 400 MHz, CL3) FLASH: 64 MB NAND: 128 MiB PCI: Bus Dev VenId DevId Class Int 00 06 1002 5960 0300 ff 00 06 1002 5940 0380 ff PCIE1: link is not up. PCIE1: initialization as root-complex failed Video: ATI Radeon video card (1002, 5960) found @(0:6:0) rinfo->mmio_base = 0x88000000 Machine Check Exception. Caused by (from msr): regs 1fe3ac30 Data Read PLB Error NIP: 1FF82B1C XER: 00000000 LR: 1FF82B0C REGS: 1fe3ac30 TRAP: 0200 DEAR: 00000000 MSR: 00021000 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00
GPR00: 1FF82B0C 1FE3AD20 1FE3AF20 EF600300 00000000 00000000 00000000 1CB844A4 GPR08: 1FF43408 88000000 05F5E101 2FAF080A 00000008 055671DE 1FFABF00 1FFBF000 GPR16: 00000023 003F0000 00000001 00000001 10000020 00000000 0000023A E3000CC0 GPR24: 00000001 1FE3AF20 1FE3AF08 1FE3AE88 1FE3AE80 00003000 1FFAE120 1FE40198 Call backtrace: 1FF82B0C 1FF834A8 1FF82498 1FF5FCDC 1FF42EF0 1FF41710 machine check
Regards, Kazuaki Ichinohe
Anatolij Gustschin さんは書きました:
Kazuaki Ichinohe wrote:
Hi Anatolij, Stefan,
The memory space is displayed in BAR2 of the PCI configuration space. The video driver accesses this memory space and the exception is generated.
driver source: u-boot/drivers/video/ati_radeon_fb.c function name: void *video_hw_init(void) line : 760line
it seems that the driver is able to access memory space (registers, e.g. in radeon_identify_vram() ) but cannot access framebuffer?
Please replace '#undef DEBUG' in drivers/video/ati_radeon_fb.c with '#define DEBUG' and also enable CONFIG_VIDEO and use #define VIDEO_IO_OFFSET 0xD0800000 and post the boot log again.
Thanks!
Best regards, Anatolij
I attach the log where the exception is generated. I confirmed it by the source of the following patches. #undef CONFIG_VIDEO #ifdef CONFIG_VIDEO #define CONFIG_BIOSEMU #define CONFIG_ATI_RADEON_FB #define VIDEO_IO_OFFSET 0xD8000000 #define CONFIG_SYS_ISA_IO_BASE_ADDRESS VIDEO_IO_OFFSET #define CONFIG_VIDEO_SW_CURSOR #define CONFIG_VIDEO_LOGO #define CONFIG_CFB_CONSOLE #define CONFIG_SPLASH_SCREEN #define CONFIG_VGA_AS_SINGLE_DEVICE #define CONFIG_CMD_BMP #endif /* #ifdef CONFIG_VIDEO */
Regards, Kazuaki Ichinohe

Hi Kazuaki, Stefan,
Kazuaki Ichinohe wrote:
This is a problem that the memory space of BAR2 is inaccessible. Even if the value of VIDEO_IO_OFFSET is changed, the problem is not solved.
It is a log that you demanded as follows.
Thanks! Now I see this too. Previously you have mentioned that the driver crashed in u-boot/drivers/video/ati_radeon_fb.c, line 760. But before this, a bunch of pci register accesses should be done already. I only wanted to make sure that the driver really crashes while first ATI register access.
Please, try the inlined patch below and see if BAR2 memory space works with it. Thanks!
<snip>
The memory space is displayed in BAR2 of the PCI configuration space. The video driver accesses this memory space and the exception is generated.
driver source: u-boot/drivers/video/ati_radeon_fb.c function name: void *video_hw_init(void) line : 760line
it seems that the driver is able to access memory space (registers, e.g. in radeon_identify_vram() ) but cannot access framebuffer?
Please replace '#undef DEBUG' in drivers/video/ati_radeon_fb.c with '#define DEBUG' and also enable CONFIG_VIDEO and use #define VIDEO_IO_OFFSET 0xD0800000 and post the boot log again.
diff --git a/cpu/ppc4xx/4xx_pci.c b/cpu/ppc4xx/4xx_pci.c index e8871fc..9639547 100644 --- a/cpu/ppc4xx/4xx_pci.c +++ b/cpu/ppc4xx/4xx_pci.c @@ -550,10 +550,12 @@ int pci_440_init (struct pci_controller *hose) out32r( PCIX0_POM0SA, 0 ); /* disable */ out32r( PCIX0_POM1SA, 0 ); /* disable */ out32r( PCIX0_POM2SA, 0 ); /* disable */ -#if defined(CONFIG_440SPE) || \ - defined(CONFIG_460EX) || defined(CONFIG_460GT) +#if defined(CONFIG_440SPE) out32r( PCIX0_POM0LAL, 0x10000000 ); out32r( PCIX0_POM0LAH, 0x0000000c ); +#elif defined(CONFIG_460EX) || defined(CONFIG_460GT) + out32r( PCIX0_POM0LAL, 0x20000000 ); + out32r( PCIX0_POM0LAH, 0x0000000c ); #else out32r( PCIX0_POM0LAL, 0x00000000 ); out32r( PCIX0_POM0LAH, 0x00000003 );
Best regards, Anatolij
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de

Hi Anatolij, Stefan,
Thank you for the reply. I confirmed your patch source. However, the exception was generated.
------------------------------------------------ U-Boot 2009.01 ( 3月 19 2009 - 18:41:36)
CPU: AMCC PowerPC 460EX Rev. A at 800 MHz (PLB=200, OPB=100, EBC=100 MHz) Security/Kasumi support Bootstrap Option H - Boot ROM Location I2C (Addr 0x52) Internal PCI arbiter disabled 32 kB I-Cache 32 kB D-Cache Board: Canyonlands - AMCC PPC460EX Evaluation Board, 1*PCIe/1*SATA, Rev. 14 I2C: ready DTT: 1 is 39 C DRAM: 512 MB (ECC not enabled, 400 MHz, CL3) FLASH: 64 MB NAND: 128 MiB PCI: Bus Dev VenId DevId Class Int 00 06 1002 5960 0300 ff 00 06 1002 5940 0380 ff PCIE1: link is not up. PCIE1: initialization as root-complex failed Video: ATI Radeon video card (1002, 5960) found @(0:6:0) rinfo->mmio_base = 0x88000000 rinfo->fb_local_base = 0x59c00000 videoboot: Booting PCI video card bus 0, function 0, device 6 Machine Check Exception. Caused by (from msr): regs 1fe3ab50 Data Write PLB Error NIP: 1FF859E0 XER: 00000000 LR: 1FF87848 REGS: 1fe3ab50 TRAP: 0200 DEAR: 00000000 MSR: 00021000 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00
GPR00: 1FF87848 1FE3AC40 1FE3AF20 D0801014 0000C000 1FE3AC4C 00000000 00000001 GPR08: 00000000 1FF8595C 000006BD 00000000 00000006 055671DE 1FFABF00 1FFBF000 GPR16: 1FF91D3C 1FFCC999 1FE37D40 1FE37D44 00000000 00000000 1FE401E0 1FFFF890 GPR24: 1FFAAF88 1FFA6420 1FFFFC90 1FFFFC90 1FFFFC90 00001014 1FFAE314 0000C000 Call backtrace: 1FF860E0 1FF87848 1FF8712C 1FF84AD0 1FF84644 1FF82B44 1FF834A8 1FF82498 1FF5FCDC 1FF42EF0 1FF41710 machine check
Regards, Kazuaki Ichinohe
Anatolij Gustschin wrote:
Hi Kazuaki, Stefan,
Kazuaki Ichinohe wrote:
This is a problem that the memory space of BAR2 is inaccessible. Even if the value of VIDEO_IO_OFFSET is changed, the problem is not solved.
It is a log that you demanded as follows.
Thanks! Now I see this too. Previously you have mentioned that the driver crashed in u-boot/drivers/video/ati_radeon_fb.c, line 760. But before this, a bunch of pci register accesses should be done already. I only wanted to make sure that the driver really crashes while first ATI register access.
Please, try the inlined patch below and see if BAR2 memory space works with it. Thanks!
<snip>
The memory space is displayed in BAR2 of the PCI configuration space. The video driver accesses this memory space and the exception is generated.
driver source: u-boot/drivers/video/ati_radeon_fb.c function name: void *video_hw_init(void) line : 760line
it seems that the driver is able to access memory space (registers, e.g. in radeon_identify_vram() ) but cannot access framebuffer?
Please replace '#undef DEBUG' in drivers/video/ati_radeon_fb.c with '#define DEBUG' and also enable CONFIG_VIDEO and use #define VIDEO_IO_OFFSET 0xD0800000 and post the boot log again.
diff --git a/cpu/ppc4xx/4xx_pci.c b/cpu/ppc4xx/4xx_pci.c index e8871fc..9639547 100644 --- a/cpu/ppc4xx/4xx_pci.c +++ b/cpu/ppc4xx/4xx_pci.c @@ -550,10 +550,12 @@ int pci_440_init (struct pci_controller *hose) out32r( PCIX0_POM0SA, 0 ); /* disable */ out32r( PCIX0_POM1SA, 0 ); /* disable */ out32r( PCIX0_POM2SA, 0 ); /* disable */ -#if defined(CONFIG_440SPE) || \
- defined(CONFIG_460EX) || defined(CONFIG_460GT)
+#if defined(CONFIG_440SPE) out32r( PCIX0_POM0LAL, 0x10000000 ); out32r( PCIX0_POM0LAH, 0x0000000c ); +#elif defined(CONFIG_460EX) || defined(CONFIG_460GT)
- out32r( PCIX0_POM0LAL, 0x20000000 );
- out32r( PCIX0_POM0LAH, 0x0000000c );
#else out32r( PCIX0_POM0LAL, 0x00000000 ); out32r( PCIX0_POM0LAH, 0x00000003 );
Best regards, Anatolij
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de

Kazuaki Ichinohe wrote:
Hi Anatolij, Stefan,
Thank you for the reply. I confirmed your patch source. However, the exception was generated.
U-Boot 2009.01 ( 3月 19 2009 - 18:41:36)
CPU: AMCC PowerPC 460EX Rev. A at 800 MHz (PLB=200, OPB=100, EBC=100 MHz) Security/Kasumi support Bootstrap Option H - Boot ROM Location I2C (Addr 0x52) Internal PCI arbiter disabled 32 kB I-Cache 32 kB D-Cache Board: Canyonlands - AMCC PPC460EX Evaluation Board, 1*PCIe/1*SATA, Rev. 14 I2C: ready DTT: 1 is 39 C DRAM: 512 MB (ECC not enabled, 400 MHz, CL3) FLASH: 64 MB NAND: 128 MiB PCI: Bus Dev VenId DevId Class Int 00 06 1002 5960 0300 ff 00 06 1002 5940 0380 ff PCIE1: link is not up. PCIE1: initialization as root-complex failed Video: ATI Radeon video card (1002, 5960) found @(0:6:0) rinfo->mmio_base = 0x88000000 rinfo->fb_local_base = 0x59c00000 videoboot: Booting PCI video card bus 0, function 0, device 6 Machine Check Exception.
Now register access to BAR2 seems to work. What was the value of VIDEO_IO_OFFSET used with this latest test?
Best regards, Anatolij

Now register access to BAR2 seems to work. What was the value of VIDEO_IO_OFFSET used with this latest test?
VIDEO_IO_OFFSET is 0xD0800000
Regards, Kazuaki Ichinohe
Anatolij Gustschin wrote:
Kazuaki Ichinohe wrote:
Hi Anatolij, Stefan,
Thank you for the reply. I confirmed your patch source. However, the exception was generated.
U-Boot 2009.01 ( 3月 19 2009 - 18:41:36)
CPU: AMCC PowerPC 460EX Rev. A at 800 MHz (PLB=200, OPB=100, EBC=100 MHz) Security/Kasumi support Bootstrap Option H - Boot ROM Location I2C (Addr 0x52) Internal PCI arbiter disabled 32 kB I-Cache 32 kB D-Cache Board: Canyonlands - AMCC PPC460EX Evaluation Board, 1*PCIe/1*SATA, Rev. 14 I2C: ready DTT: 1 is 39 C DRAM: 512 MB (ECC not enabled, 400 MHz, CL3) FLASH: 64 MB NAND: 128 MiB PCI: Bus Dev VenId DevId Class Int 00 06 1002 5960 0300 ff 00 06 1002 5940 0380 ff PCIE1: link is not up. PCIE1: initialization as root-complex failed Video: ATI Radeon video card (1002, 5960) found @(0:6:0) rinfo->mmio_base = 0x88000000 rinfo->fb_local_base = 0x59c00000 videoboot: Booting PCI video card bus 0, function 0, device 6 Machine Check Exception.
Now register access to BAR2 seems to work. What was the value of VIDEO_IO_OFFSET used with this latest test?
Best regards, Anatolij

Kazuaki Ichinohe wrote:
Now register access to BAR2 seems to work. What was the value of VIDEO_IO_OFFSET used with this latest test?
VIDEO_IO_OFFSET is 0xD0800000
Try to set VIDEO_IO_OFFSET to 0xD8000000, it should work. The value of 0xD0800000 is wrong, now I see it after double-checking the PCI/IO map in the PPC460EX manual. Sorry, my fault.
Best regards, Anatolij

Try to set VIDEO_IO_OFFSET to 0xD8000000, it should work. The value of 0xD0800000 is wrong, now I see it after double-checking the PCI/IO map in the PPC460EX manual. Sorry, my fault.
The PCI memory space is accessible. However, the video output cannot be confirmed. Why ?
Regards, Kazuaki Ichinohe
Anatolij Gustschin さんは書きました:
Kazuaki Ichinohe wrote:
Now register access to BAR2 seems to work. What was the value of VIDEO_IO_OFFSET used with this latest test?
VIDEO_IO_OFFSET is 0xD0800000
Try to set VIDEO_IO_OFFSET to 0xD8000000, it should work. The value of 0xD0800000 is wrong, now I see it after double-checking the PCI/IO map in the PPC460EX manual. Sorry, my fault.
Best regards, Anatolij

Kazuaki Ichinohe wrote:
Try to set VIDEO_IO_OFFSET to 0xD8000000, it should work. The value of 0xD0800000 is wrong, now I see it after double-checking the PCI/IO map in the PPC460EX manual. Sorry, my fault.
The PCI memory space is accessible. However, the video output cannot be confirmed. Why ?
It is hard to guess. Does the driver recognize video RAM size correctly? Is the video RAM accessible? You can test it using 'md 0x80000000', 'mw 0x80000000 0xaa55aa55 1', 'md 0x80000000' commands. If the video RAM access doesn't work, than the VGA BIOS boot failed for some reason. Does your ATI card have two display output connectors? Are these DVI or VGA output connectors? Try to connect the display to another VGA connector if any.
Best regards, Anatolij

Hi Anatolij, Stefan,
I confirmed the video output.
However, the video output cannot be confirmed.
Sorry, my fault. We wish to express our gratitude.
Regards, Kazuaki Ichinohe
Anatolij Gustschin さんは書きました:
Kazuaki Ichinohe wrote:
Try to set VIDEO_IO_OFFSET to 0xD8000000, it should work. The value of 0xD0800000 is wrong, now I see it after double-checking the PCI/IO map in the PPC460EX manual. Sorry, my fault.
The PCI memory space is accessible. However, the video output cannot be confirmed. Why ?
It is hard to guess. Does the driver recognize video RAM size correctly? Is the video RAM accessible? You can test it using 'md 0x80000000', 'mw 0x80000000 0xaa55aa55 1', 'md 0x80000000' commands. If the video RAM access doesn't work, than the VGA BIOS boot failed for some reason. Does your ATI card have two display output connectors? Are these DVI or VGA output connectors? Try to connect the display to another VGA connector if any.
Best regards, Anatolij
participants (2)
-
Anatolij Gustschin
-
Kazuaki Ichinohe