From fe32cf225278997f25fb79e47472644979723e1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Fr=C3=B6schle?= Date: Mon, 4 Apr 2016 09:31:25 +0000 Subject: [PATCH] fix failed alignment of pci_errata_xxx() functions which caused the code to hang when compiled with m68k-atari-mint-gcc --- BaS_gcc/BaS_gcc.files | 1226 +++++++++++++++++----------------- BaS_gcc/BaS_gcc.includes | 90 +-- BaS_gcc/Makefile | 5 +- BaS_gcc/bas.lk.in | 2 + BaS_gcc/include/pci_errata.h | 11 + BaS_gcc/pci/pci.c | 60 +- BaS_gcc/pci/pci_errata.c | 64 ++ 7 files changed, 741 insertions(+), 717 deletions(-) create mode 100755 BaS_gcc/include/pci_errata.h create mode 100755 BaS_gcc/pci/pci_errata.c diff --git a/BaS_gcc/BaS_gcc.files b/BaS_gcc/BaS_gcc.files index 00dfc0c..7ac09c3 100644 --- a/BaS_gcc/BaS_gcc.files +++ b/BaS_gcc/BaS_gcc.files @@ -1,612 +1,614 @@ -dma/dma.c -dma/MCD_dmaApi.c -dma/MCD_tasks.c -dma/MCD_tasksInit.c -exe/basflash.c -exe/basflash_start.c -flash/flash.c -flash/s19reader.c -fs/cc932.c -fs/cc936.c -fs/cc949.c -fs/cc950.c -fs/ccsbcs.c -fs/ff.c -fs/unicode.c -if/driver_vec.c -include/acia.h -include/am79c874.h -include/arp.h -include/ati_ids.h -include/bas_printf.h -include/bas_string.h -include/bas_types.h -include/bas_utils.h -include/bcm5222.h -include/bootp.h -include/cache.h -include/diskio.h -include/dma.h -include/driver_mem.h -include/driver_vec.h -include/edid.h -include/ehci.h -include/eth.h -include/exceptions.h -include/fb.h -include/fec.h -include/fecbd.h -include/ff.h -include/ffconf.h -include/firebee.h -include/font.h -include/i2c-algo-bit.h -include/i2c.h -include/icmp.h -include/ikbd.h -include/interrupts.h -include/ip.h -include/m54455.h -include/m5484l.h -include/MCD_dma.h -include/mcd_initiators.h -include/MCD_progCheck.h -include/MCD_tasksInit.h -include/MCF5475.h -include/MCF5475_CLOCK.h -include/MCF5475_CTM.h -include/MCF5475_DMA.h -include/MCF5475_DSPI.h -include/MCF5475_EPORT.h -include/MCF5475_FBCS.h -include/MCF5475_FEC.h -include/MCF5475_GPIO.h -include/MCF5475_GPT.h -include/MCF5475_I2C.h -include/MCF5475_INTC.h -include/MCF5475_MMU.h -include/MCF5475_PAD.h -include/MCF5475_PCI.h -include/MCF5475_PCIARB.h -include/MCF5475_PSC.h -include/MCF5475_SDRAMC.h -include/MCF5475_SEC.h -include/MCF5475_SIU.h -include/MCF5475_SLT.h -include/MCF5475_SRAM.h -include/MCF5475_USB.h -include/MCF5475_XLB.h -include/mmu.h -include/mod_devicetable.h -include/nbuf.h -include/net.h -include/net_timer.h -include/nif.h -include/ohci.h -include/part.h -include/pci.h -include/pci_ids.h -include/queue.h -include/radeon_reg.h -include/radeonfb.h -include/s19reader.h -include/screen.h -include/sd_card.h -include/startcf.h -include/sysinit.h -include/tftp.h -include/udp.h -include/usb.h -include/usb_defs.h -include/usb_hub.h -include/user_io.h -include/util.h -include/version.h -include/videl.h -include/video.h -include/wait.h -include/x86debug.h -include/x86decode.h -include/x86emu.h -include/x86emui.h -include/x86fpu.h -include/x86fpu_regs.h -include/x86ops.h -include/x86pcibios.h -include/x86prim_asm.h -include/x86prim_ops.h -include/x86regs.h -include/xhdi_sd.h -kbd/ikbd.c -net/am79c874.c -net/arp.c -net/bcm5222.c -net/bootp.c -net/fec.c -net/fecbd.c -net/ip.c -net/nbuf.c -net/net_timer.c -net/nif.c -net/queue.c -net/tftp.c -net/udp.c -nutil/s19header.c -pci/ehci-hcd.c -pci/ohci-hcd.c -pci/pci.c -radeon/radeon_accel.c -radeon/radeon_base.c -radeon/radeon_cursor.c -radeon/radeon_monitor.c -spi/dspi.c -spi/mmc.c -spi/sd_card.c -sys/BaS.c -sys/cache.c -sys/driver_mem.c -sys/fault_vectors.c -sys/init_fpga.c -sys/interrupts.c -sys/mmu.c -sys/sysinit.c -tos/bascook/sources/bascook.c -tos/jtagwait/include/bas_printf.h -tos/jtagwait/include/bas_string.h -tos/jtagwait/include/driver_vec.h -tos/jtagwait/include/MCF5475.h -tos/jtagwait/include/MCF5475_CLOCK.h -tos/jtagwait/include/MCF5475_CTM.h -tos/jtagwait/include/MCF5475_DMA.h -tos/jtagwait/include/MCF5475_DSPI.h -tos/jtagwait/include/MCF5475_EPORT.h -tos/jtagwait/include/MCF5475_FBCS.h -tos/jtagwait/include/MCF5475_FEC.h -tos/jtagwait/include/MCF5475_GPIO.h -tos/jtagwait/include/MCF5475_GPT.h -tos/jtagwait/include/MCF5475_I2C.h -tos/jtagwait/include/MCF5475_INTC.h -tos/jtagwait/include/MCF5475_MMU.h -tos/jtagwait/include/MCF5475_PAD.h -tos/jtagwait/include/MCF5475_PCI.h -tos/jtagwait/include/MCF5475_PCIARB.h -tos/jtagwait/include/MCF5475_PSC.h -tos/jtagwait/include/MCF5475_SDRAMC.h -tos/jtagwait/include/MCF5475_SEC.h -tos/jtagwait/include/MCF5475_SIU.h -tos/jtagwait/include/MCF5475_SLT.h -tos/jtagwait/include/MCF5475_SRAM.h -tos/jtagwait/include/MCF5475_USB.h -tos/jtagwait/include/MCF5475_XLB.h -tos/jtagwait/sources/jtagwait.c -usb/usb.c -usb/usb_hub.c -usb/usb_kbd.c -tos/jtagwait/sources/bas_printf.c -tos/jtagwait/sources/bas_string.c -tos/vmem_test/Makefile -tos/vmem_test/sources/bas_printf.c -tos/vmem_test/sources/bas_string.c -tos/vmem_test/sources/printf_helper.S -tos/vmem_test/sources/vmem_test.c -sys/startcf.S -sys/exceptions.S -util/bas_printf.c -util/bas_string.c -util/printf_helper.S -util/wait.c -bas.lk.in -i2c/i2c.c -Makefile -x86emu/x86biosemu.c -x86emu/x86emu.c -x86emu/x86pcibios.c -util/libgcc_helper.S -util/setjmp.c -util/setjmp.S -include/x86emu_regs.h -x86emu/x86emu_util.c -include/setjmp.h -video/video.c -video/fbmem.c -video/fbmodedb.c -video/fbmon.c -video/fnt_st_8x16.c -video/offscreen.c -video/vdi_fill.c -video/videl.c -video/video.c -tos/jtagwait/Makefile -tos/Makefile -dma/dma.c -dma/MCD_dmaApi.c -dma/MCD_tasks.c -dma/MCD_tasksInit.c -exe/basflash.c -exe/basflash_start.c -firebee/bas.elf -firebee/bas.lk -firebee/bas.map -firebee/bas.s19 -firebee/basflash.elf -firebee/basflash.map -firebee/basflash.s19 -firebee/bashflash.lk -firebee/depend -firebee/ram.elf -firebee/ram.lk -firebee/ram.s19 -flash/flash.c -flash/s19reader.c -flash_scripts/flash_firebee_bas.bdm -flash_scripts/flash_firebee_etos.bdm -flash_scripts/flash_firebee_firetos.bdm -flash_scripts/flash_firebee_fpga.bdm -flash_scripts/flash_m548x_bas.bdm -flash_scripts/flash_m548x_dbug.bdm -flash_scripts/flash_m548x_etos.bdm -fs/cc932.c -fs/cc936.c -fs/cc949.c -fs/cc950.c -fs/ccsbcs.c -fs/ff.c -fs/unicode.c -i2c/i2c.c -if/driver_vec.c -include/acia.h -include/am79c874.h -include/arp.h -include/ati_ids.h -include/bas_printf.h -include/bas_string.h -include/bas_types.h -include/bas_utils.h -include/bcm5222.h -include/bootp.h -include/cache.h -include/diskio.h -include/dma.h -include/driver_mem.h -include/driver_vec.h -include/edid.h -include/ehci.h -include/eth.h -include/exceptions.h -include/fb.h -include/fec.h -include/fecbd.h -include/ff.h -include/ffconf.h -include/firebee.h -include/font.h -include/i2c-algo-bit.h -include/i2c.h -include/icmp.h -include/ikbd.h -include/interrupts.h -include/ip.h -include/m54455.h -include/m5484l.h -include/MCD_dma.h -include/mcd_initiators.h -include/MCD_progCheck.h -include/MCD_tasksInit.h -include/MCF5475.h -include/MCF5475_CLOCK.h -include/MCF5475_CTM.h -include/MCF5475_DMA.h -include/MCF5475_DSPI.h -include/MCF5475_EPORT.h -include/MCF5475_FBCS.h -include/MCF5475_FEC.h -include/MCF5475_GPIO.h -include/MCF5475_GPT.h -include/MCF5475_I2C.h -include/MCF5475_INTC.h -include/MCF5475_MMU.h -include/MCF5475_PAD.h -include/MCF5475_PCI.h -include/MCF5475_PCIARB.h -include/MCF5475_PSC.h -include/MCF5475_SDRAMC.h -include/MCF5475_SEC.h -include/MCF5475_SIU.h -include/MCF5475_SLT.h -include/MCF5475_SRAM.h -include/MCF5475_USB.h -include/MCF5475_XLB.h -include/mmu.h -include/mod_devicetable.h -include/nbuf.h -include/net.h -include/net_timer.h -include/nif.h -include/ohci.h -include/part.h -include/pci.h -include/pci_ids.h -include/queue.h -include/radeon_reg.h -include/radeonfb.h -include/s19reader.h -include/screen.h -include/sd_card.h -include/setjmp.h -include/startcf.h -include/sysinit.h -include/tftp.h -include/udp.h -include/usb.h -include/usb_defs.h -include/usb_hub.h -include/user_io.h -include/util.h -include/version.h -include/videl.h -include/video.h -include/wait.h -include/x86emu.h -include/x86emu_regs.h -include/x86pcibios.h -include/xhdi_sd.h -kbd/ikbd.c -m54455/bas.elf -m54455/bas.lk -m54455/bas.map -m54455/bas.s19 -m54455/basflash.elf -m54455/basflash.map -m54455/basflash.s19 -m54455/bashflash.lk -m54455/depend -m54455/ram.elf -m54455/ram.lk -m54455/ram.s19 -m5484lite/bas.elf -m5484lite/bas.lk -m5484lite/bas.map -m5484lite/bas.s19 -m5484lite/basflash.elf -m5484lite/basflash.map -m5484lite/basflash.s19 -m5484lite/bashflash.lk -m5484lite/depend -m5484lite/ram.elf -m5484lite/ram.lk -m5484lite/ram.s19 -net/am79c874.c -net/arp.c -net/bcm5222.c -net/bootp.c -net/fec.c -net/fecbd.c -net/ip.c -net/nbuf.c -net/net_timer.c -net/nif.c -net/queue.c -net/tftp.c -net/udp.c -nutil/s19header.c -pci/ehci-hcd.c -pci/ohci-hcd.c -pci/pci.c -pci/pci_wrappers.S -radeon/radeon_accel.c -radeon/radeon_base.c -radeon/radeon_cursor.c -radeon/radeon_monitor.c -spi/dspi.c -spi/mmc.c -spi/sd_card.c -sys/BaS.c -sys/cache.c -sys/driver_mem.c -sys/exceptions.S -sys/fault_vectors.c -sys/init_fpga.c -sys/interrupts.c -sys/mmu.c -sys/startcf.S -sys/sysinit.c -tos/bascook/sources/bascook.c -tos/bascook/bascook.prg -tos/bascook/depend -tos/bascook/Makefile -tos/bascook/mapfile -tos/jtagwait/include/bas_printf.h -tos/jtagwait/include/bas_string.h -tos/jtagwait/include/driver_vec.h -tos/jtagwait/include/MCF5475.h -tos/jtagwait/include/MCF5475_CLOCK.h -tos/jtagwait/include/MCF5475_CTM.h -tos/jtagwait/include/MCF5475_DMA.h -tos/jtagwait/include/MCF5475_DSPI.h -tos/jtagwait/include/MCF5475_EPORT.h -tos/jtagwait/include/MCF5475_FBCS.h -tos/jtagwait/include/MCF5475_FEC.h -tos/jtagwait/include/MCF5475_GPIO.h -tos/jtagwait/include/MCF5475_GPT.h -tos/jtagwait/include/MCF5475_I2C.h -tos/jtagwait/include/MCF5475_INTC.h -tos/jtagwait/include/MCF5475_MMU.h -tos/jtagwait/include/MCF5475_PAD.h -tos/jtagwait/include/MCF5475_PCI.h -tos/jtagwait/include/MCF5475_PCIARB.h -tos/jtagwait/include/MCF5475_PSC.h -tos/jtagwait/include/MCF5475_SDRAMC.h -tos/jtagwait/include/MCF5475_SEC.h -tos/jtagwait/include/MCF5475_SIU.h -tos/jtagwait/include/MCF5475_SLT.h -tos/jtagwait/include/MCF5475_SRAM.h -tos/jtagwait/include/MCF5475_USB.h -tos/jtagwait/include/MCF5475_XLB.h -tos/jtagwait/m5475/mshort/jtagwait.prg -tos/jtagwait/m5475/jtagwait.prg -tos/jtagwait/sources/bas_printf.c -tos/jtagwait/sources/bas_string.c -tos/jtagwait/sources/jtagwait.c -tos/jtagwait/sources/printf_helper.S -tos/jtagwait/depend -tos/jtagwait/jtagwait.config -tos/jtagwait/jtagwait.creator -tos/jtagwait/jtagwait.creator.user -tos/jtagwait/jtagwait.files -tos/jtagwait/jtagwait.includes -tos/jtagwait/Makefile -tos/jtagwait/mapfile -tos/pci_test/include/bas_printf.h -tos/pci_test/include/bas_string.h -tos/pci_test/include/driver_vec.h -tos/pci_test/include/MCF5475.h -tos/pci_test/include/MCF5475_CLOCK.h -tos/pci_test/include/MCF5475_CTM.h -tos/pci_test/include/MCF5475_DMA.h -tos/pci_test/include/MCF5475_DSPI.h -tos/pci_test/include/MCF5475_EPORT.h -tos/pci_test/include/MCF5475_FBCS.h -tos/pci_test/include/MCF5475_FEC.h -tos/pci_test/include/MCF5475_GPIO.h -tos/pci_test/include/MCF5475_GPT.h -tos/pci_test/include/MCF5475_I2C.h -tos/pci_test/include/MCF5475_INTC.h -tos/pci_test/include/MCF5475_MMU.h -tos/pci_test/include/MCF5475_PAD.h -tos/pci_test/include/MCF5475_PCI.h -tos/pci_test/include/MCF5475_PCIARB.h -tos/pci_test/include/MCF5475_PSC.h -tos/pci_test/include/MCF5475_SDRAMC.h -tos/pci_test/include/MCF5475_SEC.h -tos/pci_test/include/MCF5475_SIU.h -tos/pci_test/include/MCF5475_SLT.h -tos/pci_test/include/MCF5475_SRAM.h -tos/pci_test/include/MCF5475_USB.h -tos/pci_test/include/MCF5475_XLB.h -tos/pci_test/m5475/mshort/pci_test.prg -tos/pci_test/m5475/pci_test.prg -tos/pci_test/sources/bas_printf.c -tos/pci_test/sources/bas_string.c -tos/pci_test/sources/pci_test.c -tos/pci_test/sources/printf_helper.S -tos/pci_test/depend -tos/pci_test/Makefile -tos/pci_test/mapfile -tos/pci_test/pci_test.config -tos/pci_test/pci_test.creator -tos/pci_test/pci_test.files -tos/pci_test/pci_test.includes -tos/vmem_test/include/bas_printf.h -tos/vmem_test/include/bas_string.h -tos/vmem_test/include/driver_vec.h -tos/vmem_test/include/MCF5475.h -tos/vmem_test/include/MCF5475_CLOCK.h -tos/vmem_test/include/MCF5475_CTM.h -tos/vmem_test/include/MCF5475_DMA.h -tos/vmem_test/include/MCF5475_DSPI.h -tos/vmem_test/include/MCF5475_EPORT.h -tos/vmem_test/include/MCF5475_FBCS.h -tos/vmem_test/include/MCF5475_FEC.h -tos/vmem_test/include/MCF5475_GPIO.h -tos/vmem_test/include/MCF5475_GPT.h -tos/vmem_test/include/MCF5475_I2C.h -tos/vmem_test/include/MCF5475_INTC.h -tos/vmem_test/include/MCF5475_MMU.h -tos/vmem_test/include/MCF5475_PAD.h -tos/vmem_test/include/MCF5475_PCI.h -tos/vmem_test/include/MCF5475_PCIARB.h -tos/vmem_test/include/MCF5475_PSC.h -tos/vmem_test/include/MCF5475_SDRAMC.h -tos/vmem_test/include/MCF5475_SEC.h -tos/vmem_test/include/MCF5475_SIU.h -tos/vmem_test/include/MCF5475_SLT.h -tos/vmem_test/include/MCF5475_SRAM.h -tos/vmem_test/include/MCF5475_USB.h -tos/vmem_test/include/MCF5475_XLB.h -tos/vmem_test/m5475/mshort/vmem_test.prg -tos/vmem_test/m5475/vmem_test.prg -tos/vmem_test/sources/bas_printf.c -tos/vmem_test/sources/bas_string.c -tos/vmem_test/sources/printf_helper.S -tos/vmem_test/sources/vmem_test.c -tos/vmem_test/depend -tos/vmem_test/Makefile -tos/vmem_test/mapfile -tos/vmem_test/vmem_test.config -tos/vmem_test/vmem_test.creator -tos/vmem_test/vmem_test.files -tos/vmem_test/vmem_test.includes -tos/Makefile -usb/usb.c -usb/usb_hub.c -usb/usb_kbd.c -usb/usb_mouse.c -util/bas_printf.c -util/bas_string.c -util/libgcc_helper.S -util/printf_helper.S -util/setjmp.S -util/wait.c -video/fbmem.c -video/fbmodedb.c -video/fbmon.c -video/fnt_st_8x16.c -video/offscreen.c -video/vdi_fill.c -video/videl.c -video/video.c -x86emu/x86biosemu.c -x86emu/x86emu.c -x86emu/x86emu_util.c -x86emu/x86pcibios.c -xhdi/xhdi_interface.c -xhdi/xhdi_sd.c -xhdi/xhdi_vec.S -bas.lk.in -bas_firebee.bdm -BaS_gcc.config -BaS_gcc.creator -BaS_gcc.creator.user -BaS_gcc.creator.user.3.2-pre1 -BaS_gcc.creator.user.ori -BaS_gcc.files -BaS_gcc.includes -bas_m5484.bdm -basflash.lk.in -check.bdm -COPYING -COPYING.LESSER -Doxyfile -dump.bdm -Makefile -mcf5474.gdb -svn-commit.tmp -tos/pci_test/include/bas_printf.h -tos/pci_test/include/bas_string.h -tos/pci_test/include/driver_vec.h -tos/pci_test/include/MCF5475_CLOCK.h -tos/pci_test/include/MCF5475_CTM.h -tos/pci_test/include/MCF5475_DMA.h -tos/pci_test/include/MCF5475_DSPI.h -tos/pci_test/include/MCF5475_EPORT.h -tos/pci_test/include/MCF5475_FBCS.h -tos/pci_test/include/MCF5475_FEC.h -tos/pci_test/include/MCF5475_GPIO.h -tos/pci_test/include/MCF5475_GPT.h -tos/pci_test/include/MCF5475_I2C.h -tos/pci_test/include/MCF5475_INTC.h -tos/pci_test/include/MCF5475_MMU.h -tos/pci_test/include/MCF5475_PAD.h -tos/pci_test/include/MCF5475_PCI.h -tos/pci_test/include/MCF5475_PCIARB.h -tos/pci_test/include/MCF5475_PSC.h -tos/pci_test/include/MCF5475_SDRAMC.h -tos/pci_test/include/MCF5475_SEC.h -tos/pci_test/include/MCF5475_SIU.h -tos/pci_test/include/MCF5475_SLT.h -tos/pci_test/include/MCF5475_SRAM.h -tos/pci_test/include/MCF5475_USB.h -tos/pci_test/include/MCF5475_XLB.h -tos/pci_test/include/MCF5475.h -tos/pci_test/include/pci.h -memory_map.txt +dma/dma.c +dma/MCD_dmaApi.c +dma/MCD_tasks.c +dma/MCD_tasksInit.c +exe/basflash.c +exe/basflash_start.c +flash/flash.c +flash/s19reader.c +fs/cc932.c +fs/cc936.c +fs/cc949.c +fs/cc950.c +fs/ccsbcs.c +fs/ff.c +fs/unicode.c +if/driver_vec.c +include/acia.h +include/am79c874.h +include/arp.h +include/ati_ids.h +include/bas_printf.h +include/bas_string.h +include/bas_types.h +include/bas_utils.h +include/bcm5222.h +include/bootp.h +include/cache.h +include/diskio.h +include/dma.h +include/driver_mem.h +include/driver_vec.h +include/edid.h +include/ehci.h +include/eth.h +include/exceptions.h +include/fb.h +include/fec.h +include/fecbd.h +include/ff.h +include/ffconf.h +include/firebee.h +include/font.h +include/i2c-algo-bit.h +include/i2c.h +include/icmp.h +include/ikbd.h +include/interrupts.h +include/ip.h +include/m54455.h +include/m5484l.h +include/MCD_dma.h +include/mcd_initiators.h +include/MCD_progCheck.h +include/MCD_tasksInit.h +include/MCF5475.h +include/MCF5475_CLOCK.h +include/MCF5475_CTM.h +include/MCF5475_DMA.h +include/MCF5475_DSPI.h +include/MCF5475_EPORT.h +include/MCF5475_FBCS.h +include/MCF5475_FEC.h +include/MCF5475_GPIO.h +include/MCF5475_GPT.h +include/MCF5475_I2C.h +include/MCF5475_INTC.h +include/MCF5475_MMU.h +include/MCF5475_PAD.h +include/MCF5475_PCI.h +include/MCF5475_PCIARB.h +include/MCF5475_PSC.h +include/MCF5475_SDRAMC.h +include/MCF5475_SEC.h +include/MCF5475_SIU.h +include/MCF5475_SLT.h +include/MCF5475_SRAM.h +include/MCF5475_USB.h +include/MCF5475_XLB.h +include/mmu.h +include/mod_devicetable.h +include/nbuf.h +include/net.h +include/net_timer.h +include/nif.h +include/ohci.h +include/part.h +include/pci.h +include/pci_ids.h +include/queue.h +include/radeon_reg.h +include/radeonfb.h +include/s19reader.h +include/screen.h +include/sd_card.h +include/startcf.h +include/sysinit.h +include/tftp.h +include/udp.h +include/usb.h +include/usb_defs.h +include/usb_hub.h +include/user_io.h +include/util.h +include/version.h +include/videl.h +include/video.h +include/wait.h +include/x86debug.h +include/x86decode.h +include/x86emu.h +include/x86emui.h +include/x86fpu.h +include/x86fpu_regs.h +include/x86ops.h +include/x86pcibios.h +include/x86prim_asm.h +include/x86prim_ops.h +include/x86regs.h +include/xhdi_sd.h +kbd/ikbd.c +net/am79c874.c +net/arp.c +net/bcm5222.c +net/bootp.c +net/fec.c +net/fecbd.c +net/ip.c +net/nbuf.c +net/net_timer.c +net/nif.c +net/queue.c +net/tftp.c +net/udp.c +nutil/s19header.c +pci/ehci-hcd.c +pci/ohci-hcd.c +pci/pci.c +radeon/radeon_accel.c +radeon/radeon_base.c +radeon/radeon_cursor.c +radeon/radeon_monitor.c +spi/dspi.c +spi/mmc.c +spi/sd_card.c +sys/BaS.c +sys/cache.c +sys/driver_mem.c +sys/fault_vectors.c +sys/init_fpga.c +sys/interrupts.c +sys/mmu.c +sys/sysinit.c +tos/bascook/sources/bascook.c +tos/jtagwait/include/bas_printf.h +tos/jtagwait/include/bas_string.h +tos/jtagwait/include/driver_vec.h +tos/jtagwait/include/MCF5475.h +tos/jtagwait/include/MCF5475_CLOCK.h +tos/jtagwait/include/MCF5475_CTM.h +tos/jtagwait/include/MCF5475_DMA.h +tos/jtagwait/include/MCF5475_DSPI.h +tos/jtagwait/include/MCF5475_EPORT.h +tos/jtagwait/include/MCF5475_FBCS.h +tos/jtagwait/include/MCF5475_FEC.h +tos/jtagwait/include/MCF5475_GPIO.h +tos/jtagwait/include/MCF5475_GPT.h +tos/jtagwait/include/MCF5475_I2C.h +tos/jtagwait/include/MCF5475_INTC.h +tos/jtagwait/include/MCF5475_MMU.h +tos/jtagwait/include/MCF5475_PAD.h +tos/jtagwait/include/MCF5475_PCI.h +tos/jtagwait/include/MCF5475_PCIARB.h +tos/jtagwait/include/MCF5475_PSC.h +tos/jtagwait/include/MCF5475_SDRAMC.h +tos/jtagwait/include/MCF5475_SEC.h +tos/jtagwait/include/MCF5475_SIU.h +tos/jtagwait/include/MCF5475_SLT.h +tos/jtagwait/include/MCF5475_SRAM.h +tos/jtagwait/include/MCF5475_USB.h +tos/jtagwait/include/MCF5475_XLB.h +tos/jtagwait/sources/jtagwait.c +usb/usb.c +usb/usb_hub.c +usb/usb_kbd.c +tos/jtagwait/sources/bas_printf.c +tos/jtagwait/sources/bas_string.c +tos/vmem_test/Makefile +tos/vmem_test/sources/bas_printf.c +tos/vmem_test/sources/bas_string.c +tos/vmem_test/sources/printf_helper.S +tos/vmem_test/sources/vmem_test.c +sys/startcf.S +sys/exceptions.S +util/bas_printf.c +util/bas_string.c +util/printf_helper.S +util/wait.c +bas.lk.in +i2c/i2c.c +Makefile +x86emu/x86biosemu.c +x86emu/x86emu.c +x86emu/x86pcibios.c +util/libgcc_helper.S +util/setjmp.c +util/setjmp.S +include/x86emu_regs.h +x86emu/x86emu_util.c +include/setjmp.h +video/video.c +video/fbmem.c +video/fbmodedb.c +video/fbmon.c +video/fnt_st_8x16.c +video/offscreen.c +video/vdi_fill.c +video/videl.c +video/video.c +tos/jtagwait/Makefile +tos/Makefile +dma/dma.c +dma/MCD_dmaApi.c +dma/MCD_tasks.c +dma/MCD_tasksInit.c +exe/basflash.c +exe/basflash_start.c +firebee/bas.elf +firebee/bas.lk +firebee/bas.map +firebee/bas.s19 +firebee/basflash.elf +firebee/basflash.map +firebee/basflash.s19 +firebee/bashflash.lk +firebee/depend +firebee/ram.elf +firebee/ram.lk +firebee/ram.s19 +flash/flash.c +flash/s19reader.c +flash_scripts/flash_firebee_bas.bdm +flash_scripts/flash_firebee_etos.bdm +flash_scripts/flash_firebee_firetos.bdm +flash_scripts/flash_firebee_fpga.bdm +flash_scripts/flash_m548x_bas.bdm +flash_scripts/flash_m548x_dbug.bdm +flash_scripts/flash_m548x_etos.bdm +fs/cc932.c +fs/cc936.c +fs/cc949.c +fs/cc950.c +fs/ccsbcs.c +fs/ff.c +fs/unicode.c +i2c/i2c.c +if/driver_vec.c +include/acia.h +include/am79c874.h +include/arp.h +include/ati_ids.h +include/bas_printf.h +include/bas_string.h +include/bas_types.h +include/bas_utils.h +include/bcm5222.h +include/bootp.h +include/cache.h +include/diskio.h +include/dma.h +include/driver_mem.h +include/driver_vec.h +include/edid.h +include/ehci.h +include/eth.h +include/exceptions.h +include/fb.h +include/fec.h +include/fecbd.h +include/ff.h +include/ffconf.h +include/firebee.h +include/font.h +include/i2c-algo-bit.h +include/i2c.h +include/icmp.h +include/ikbd.h +include/interrupts.h +include/ip.h +include/m54455.h +include/m5484l.h +include/MCD_dma.h +include/mcd_initiators.h +include/MCD_progCheck.h +include/MCD_tasksInit.h +include/MCF5475.h +include/MCF5475_CLOCK.h +include/MCF5475_CTM.h +include/MCF5475_DMA.h +include/MCF5475_DSPI.h +include/MCF5475_EPORT.h +include/MCF5475_FBCS.h +include/MCF5475_FEC.h +include/MCF5475_GPIO.h +include/MCF5475_GPT.h +include/MCF5475_I2C.h +include/MCF5475_INTC.h +include/MCF5475_MMU.h +include/MCF5475_PAD.h +include/MCF5475_PCI.h +include/MCF5475_PCIARB.h +include/MCF5475_PSC.h +include/MCF5475_SDRAMC.h +include/MCF5475_SEC.h +include/MCF5475_SIU.h +include/MCF5475_SLT.h +include/MCF5475_SRAM.h +include/MCF5475_USB.h +include/MCF5475_XLB.h +include/mmu.h +include/mod_devicetable.h +include/nbuf.h +include/net.h +include/net_timer.h +include/nif.h +include/ohci.h +include/part.h +include/pci.h +include/pci_ids.h +include/queue.h +include/radeon_reg.h +include/radeonfb.h +include/s19reader.h +include/screen.h +include/sd_card.h +include/setjmp.h +include/startcf.h +include/sysinit.h +include/tftp.h +include/udp.h +include/usb.h +include/usb_defs.h +include/usb_hub.h +include/user_io.h +include/util.h +include/version.h +include/videl.h +include/video.h +include/wait.h +include/x86emu.h +include/x86emu_regs.h +include/x86pcibios.h +include/xhdi_sd.h +kbd/ikbd.c +m54455/bas.elf +m54455/bas.lk +m54455/bas.map +m54455/bas.s19 +m54455/basflash.elf +m54455/basflash.map +m54455/basflash.s19 +m54455/bashflash.lk +m54455/depend +m54455/ram.elf +m54455/ram.lk +m54455/ram.s19 +m5484lite/bas.elf +m5484lite/bas.lk +m5484lite/bas.map +m5484lite/bas.s19 +m5484lite/basflash.elf +m5484lite/basflash.map +m5484lite/basflash.s19 +m5484lite/bashflash.lk +m5484lite/depend +m5484lite/ram.elf +m5484lite/ram.lk +m5484lite/ram.s19 +net/am79c874.c +net/arp.c +net/bcm5222.c +net/bootp.c +net/fec.c +net/fecbd.c +net/ip.c +net/nbuf.c +net/net_timer.c +net/nif.c +net/queue.c +net/tftp.c +net/udp.c +nutil/s19header.c +pci/ehci-hcd.c +pci/ohci-hcd.c +pci/pci.c +pci/pci_wrappers.S +radeon/radeon_accel.c +radeon/radeon_base.c +radeon/radeon_cursor.c +radeon/radeon_monitor.c +spi/dspi.c +spi/mmc.c +spi/sd_card.c +sys/BaS.c +sys/cache.c +sys/driver_mem.c +sys/exceptions.S +sys/fault_vectors.c +sys/init_fpga.c +sys/interrupts.c +sys/mmu.c +sys/startcf.S +sys/sysinit.c +tos/bascook/sources/bascook.c +tos/bascook/bascook.prg +tos/bascook/depend +tos/bascook/Makefile +tos/bascook/mapfile +tos/jtagwait/include/bas_printf.h +tos/jtagwait/include/bas_string.h +tos/jtagwait/include/driver_vec.h +tos/jtagwait/include/MCF5475.h +tos/jtagwait/include/MCF5475_CLOCK.h +tos/jtagwait/include/MCF5475_CTM.h +tos/jtagwait/include/MCF5475_DMA.h +tos/jtagwait/include/MCF5475_DSPI.h +tos/jtagwait/include/MCF5475_EPORT.h +tos/jtagwait/include/MCF5475_FBCS.h +tos/jtagwait/include/MCF5475_FEC.h +tos/jtagwait/include/MCF5475_GPIO.h +tos/jtagwait/include/MCF5475_GPT.h +tos/jtagwait/include/MCF5475_I2C.h +tos/jtagwait/include/MCF5475_INTC.h +tos/jtagwait/include/MCF5475_MMU.h +tos/jtagwait/include/MCF5475_PAD.h +tos/jtagwait/include/MCF5475_PCI.h +tos/jtagwait/include/MCF5475_PCIARB.h +tos/jtagwait/include/MCF5475_PSC.h +tos/jtagwait/include/MCF5475_SDRAMC.h +tos/jtagwait/include/MCF5475_SEC.h +tos/jtagwait/include/MCF5475_SIU.h +tos/jtagwait/include/MCF5475_SLT.h +tos/jtagwait/include/MCF5475_SRAM.h +tos/jtagwait/include/MCF5475_USB.h +tos/jtagwait/include/MCF5475_XLB.h +tos/jtagwait/m5475/mshort/jtagwait.prg +tos/jtagwait/m5475/jtagwait.prg +tos/jtagwait/sources/bas_printf.c +tos/jtagwait/sources/bas_string.c +tos/jtagwait/sources/jtagwait.c +tos/jtagwait/sources/printf_helper.S +tos/jtagwait/depend +tos/jtagwait/jtagwait.config +tos/jtagwait/jtagwait.creator +tos/jtagwait/jtagwait.creator.user +tos/jtagwait/jtagwait.files +tos/jtagwait/jtagwait.includes +tos/jtagwait/Makefile +tos/jtagwait/mapfile +tos/pci_test/include/bas_printf.h +tos/pci_test/include/bas_string.h +tos/pci_test/include/driver_vec.h +tos/pci_test/include/MCF5475.h +tos/pci_test/include/MCF5475_CLOCK.h +tos/pci_test/include/MCF5475_CTM.h +tos/pci_test/include/MCF5475_DMA.h +tos/pci_test/include/MCF5475_DSPI.h +tos/pci_test/include/MCF5475_EPORT.h +tos/pci_test/include/MCF5475_FBCS.h +tos/pci_test/include/MCF5475_FEC.h +tos/pci_test/include/MCF5475_GPIO.h +tos/pci_test/include/MCF5475_GPT.h +tos/pci_test/include/MCF5475_I2C.h +tos/pci_test/include/MCF5475_INTC.h +tos/pci_test/include/MCF5475_MMU.h +tos/pci_test/include/MCF5475_PAD.h +tos/pci_test/include/MCF5475_PCI.h +tos/pci_test/include/MCF5475_PCIARB.h +tos/pci_test/include/MCF5475_PSC.h +tos/pci_test/include/MCF5475_SDRAMC.h +tos/pci_test/include/MCF5475_SEC.h +tos/pci_test/include/MCF5475_SIU.h +tos/pci_test/include/MCF5475_SLT.h +tos/pci_test/include/MCF5475_SRAM.h +tos/pci_test/include/MCF5475_USB.h +tos/pci_test/include/MCF5475_XLB.h +tos/pci_test/m5475/mshort/pci_test.prg +tos/pci_test/m5475/pci_test.prg +tos/pci_test/sources/bas_printf.c +tos/pci_test/sources/bas_string.c +tos/pci_test/sources/pci_test.c +tos/pci_test/sources/printf_helper.S +tos/pci_test/depend +tos/pci_test/Makefile +tos/pci_test/mapfile +tos/pci_test/pci_test.config +tos/pci_test/pci_test.creator +tos/pci_test/pci_test.files +tos/pci_test/pci_test.includes +tos/vmem_test/include/bas_printf.h +tos/vmem_test/include/bas_string.h +tos/vmem_test/include/driver_vec.h +tos/vmem_test/include/MCF5475.h +tos/vmem_test/include/MCF5475_CLOCK.h +tos/vmem_test/include/MCF5475_CTM.h +tos/vmem_test/include/MCF5475_DMA.h +tos/vmem_test/include/MCF5475_DSPI.h +tos/vmem_test/include/MCF5475_EPORT.h +tos/vmem_test/include/MCF5475_FBCS.h +tos/vmem_test/include/MCF5475_FEC.h +tos/vmem_test/include/MCF5475_GPIO.h +tos/vmem_test/include/MCF5475_GPT.h +tos/vmem_test/include/MCF5475_I2C.h +tos/vmem_test/include/MCF5475_INTC.h +tos/vmem_test/include/MCF5475_MMU.h +tos/vmem_test/include/MCF5475_PAD.h +tos/vmem_test/include/MCF5475_PCI.h +tos/vmem_test/include/MCF5475_PCIARB.h +tos/vmem_test/include/MCF5475_PSC.h +tos/vmem_test/include/MCF5475_SDRAMC.h +tos/vmem_test/include/MCF5475_SEC.h +tos/vmem_test/include/MCF5475_SIU.h +tos/vmem_test/include/MCF5475_SLT.h +tos/vmem_test/include/MCF5475_SRAM.h +tos/vmem_test/include/MCF5475_USB.h +tos/vmem_test/include/MCF5475_XLB.h +tos/vmem_test/m5475/mshort/vmem_test.prg +tos/vmem_test/m5475/vmem_test.prg +tos/vmem_test/sources/bas_printf.c +tos/vmem_test/sources/bas_string.c +tos/vmem_test/sources/printf_helper.S +tos/vmem_test/sources/vmem_test.c +tos/vmem_test/depend +tos/vmem_test/Makefile +tos/vmem_test/mapfile +tos/vmem_test/vmem_test.config +tos/vmem_test/vmem_test.creator +tos/vmem_test/vmem_test.files +tos/vmem_test/vmem_test.includes +tos/Makefile +usb/usb.c +usb/usb_hub.c +usb/usb_kbd.c +usb/usb_mouse.c +util/bas_printf.c +util/bas_string.c +util/libgcc_helper.S +util/printf_helper.S +util/setjmp.S +util/wait.c +video/fbmem.c +video/fbmodedb.c +video/fbmon.c +video/fnt_st_8x16.c +video/offscreen.c +video/vdi_fill.c +video/videl.c +video/video.c +x86emu/x86biosemu.c +x86emu/x86emu.c +x86emu/x86emu_util.c +x86emu/x86pcibios.c +xhdi/xhdi_interface.c +xhdi/xhdi_sd.c +xhdi/xhdi_vec.S +bas.lk.in +bas_firebee.bdm +BaS_gcc.config +BaS_gcc.creator +BaS_gcc.creator.user +BaS_gcc.creator.user.3.2-pre1 +BaS_gcc.creator.user.ori +BaS_gcc.files +BaS_gcc.includes +bas_m5484.bdm +basflash.lk.in +check.bdm +COPYING +COPYING.LESSER +Doxyfile +dump.bdm +Makefile +mcf5474.gdb +svn-commit.tmp +tos/pci_test/include/bas_printf.h +tos/pci_test/include/bas_string.h +tos/pci_test/include/driver_vec.h +tos/pci_test/include/MCF5475_CLOCK.h +tos/pci_test/include/MCF5475_CTM.h +tos/pci_test/include/MCF5475_DMA.h +tos/pci_test/include/MCF5475_DSPI.h +tos/pci_test/include/MCF5475_EPORT.h +tos/pci_test/include/MCF5475_FBCS.h +tos/pci_test/include/MCF5475_FEC.h +tos/pci_test/include/MCF5475_GPIO.h +tos/pci_test/include/MCF5475_GPT.h +tos/pci_test/include/MCF5475_I2C.h +tos/pci_test/include/MCF5475_INTC.h +tos/pci_test/include/MCF5475_MMU.h +tos/pci_test/include/MCF5475_PAD.h +tos/pci_test/include/MCF5475_PCI.h +tos/pci_test/include/MCF5475_PCIARB.h +tos/pci_test/include/MCF5475_PSC.h +tos/pci_test/include/MCF5475_SDRAMC.h +tos/pci_test/include/MCF5475_SEC.h +tos/pci_test/include/MCF5475_SIU.h +tos/pci_test/include/MCF5475_SLT.h +tos/pci_test/include/MCF5475_SRAM.h +tos/pci_test/include/MCF5475_USB.h +tos/pci_test/include/MCF5475_XLB.h +tos/pci_test/include/MCF5475.h +tos/pci_test/include/pci.h +memory_map.txt +pci/pci_errata.c +include/pci_errata.h diff --git a/BaS_gcc/BaS_gcc.includes b/BaS_gcc/BaS_gcc.includes index 3beba8b..93dce2c 100644 --- a/BaS_gcc/BaS_gcc.includes +++ b/BaS_gcc/BaS_gcc.includes @@ -1,44 +1,46 @@ -include -tos/jtagwait/include -tos/pci_test/include -/usr/m68k-atari-mint/include -dma -m54455 -sys -pci -tos/pci_test -tos/jtagwait/m5475/mshort -m5484lite -tos/pci_test/include -tos/bascook -tos/vmem_test/m5475/mshort -i2c -fs -tos/vmem_test/m5475 -tos/pci_test/m5475 -spi -if -tos/jtagwait/m5475 -util -kbd -flash_scripts -video -usb -exe -tos/vmem_test/sources -tos -nutil -tos/jtagwait/sources -x86emu -flash -tos/vmem_test/include -tos/bascook/sources -tos/pci_test/m5475/mshort -. -radeon -net -xhdi -tos/vmem_test -tos/pci_test/sources -firebee -tos/jtagwait +include +tos/jtagwait/include +tos/pci_test/include +/usr/m68k-atari-mint/include +/opt/cross-mint/m68k-atari-mint/include +/opt/gygwin/opt/cross-mint/m68k-atari-mint/include +dma +m54455 +sys +pci +tos/pci_test +tos/jtagwait/m5475/mshort +m5484lite +tos/pci_test/include +tos/bascook +tos/vmem_test/m5475/mshort +i2c +fs +tos/vmem_test/m5475 +tos/pci_test/m5475 +spi +if +tos/jtagwait/m5475 +util +kbd +flash_scripts +video +usb +exe +tos/vmem_test/sources +tos +nutil +tos/jtagwait/sources +x86emu +flash +tos/vmem_test/include +tos/bascook/sources +tos/pci_test/m5475/mshort +. +radeon +net +xhdi +tos/vmem_test +tos/pci_test/sources +firebee +tos/jtagwait diff --git a/BaS_gcc/Makefile b/BaS_gcc/Makefile index 4ad50d8..d27d97e 100644 --- a/BaS_gcc/Makefile +++ b/BaS_gcc/Makefile @@ -10,7 +10,7 @@ # can be either "Y" or "N" (without quotes). "Y" for using the m68k-elf-, "N" for using the m68k-atari-mint # toolchain -COMPILE_ELF=Y +COMPILE_ELF=N ifeq (Y,$(COMPILE_ELF)) TCPREFIX=m68k-elf- @@ -52,7 +52,7 @@ CFLAGS_OPTIMIZED = -mcpu=5474 \ -Wa,--register-prefix-optional LDFLAGS= -TRGTDIRS= ./firebee ./m5484lite +TRGTDIRS= ./firebee ./m54455 ./m5484lite OBJDIRS=$(patsubst %, %/objs,$(TRGTDIRS)) TOOLDIR=util @@ -93,6 +93,7 @@ CSRCS= \ xhdi_sd.c \ xhdi_interface.c \ pci.c \ + pci_errata.c \ dspi.c \ driver_vec.c \ driver_mem.c \ diff --git a/BaS_gcc/bas.lk.in b/BaS_gcc/bas.lk.in index 40be566..342b704 100644 --- a/BaS_gcc/bas.lk.in +++ b/BaS_gcc/bas.lk.in @@ -49,6 +49,8 @@ SECTIONS OBJDIR/BaS.o(.text) OBJDIR/pci.o(.text) + . = ALIGN(16); + OBJDIR/pci_errata.o(.text) OBJDIR/pci_wrappers.o(.text) OBJDIR/usb.o(.text) OBJDIR/driver_mem.o(.text) diff --git a/BaS_gcc/include/pci_errata.h b/BaS_gcc/include/pci_errata.h new file mode 100755 index 0000000..b8ac603 --- /dev/null +++ b/BaS_gcc/include/pci_errata.h @@ -0,0 +1,11 @@ +#ifndef PCI_ERRATA_H +#define PCI_ERRATA_H + +#include + + +extern void chip_errata_135(void); +extern void chip_errata_055(int32_t handle); + +#endif // PCI_ERRATA_H + diff --git a/BaS_gcc/pci/pci.c b/BaS_gcc/pci/pci.c index aa0dbae..39dc6de 100644 --- a/BaS_gcc/pci/pci.c +++ b/BaS_gcc/pci/pci.c @@ -98,65 +98,6 @@ struct pci_interrupt #define MAX_INTERRUPTS (NUM_CARDS * 3) static struct pci_interrupt interrupts[MAX_INTERRUPTS]; -static inline __attribute__((aligned(16))) void chip_errata_135(void) -{ - /* - * Errata type: Silicon - * Affected component: PCI - * Description: When core PCI transactions that involve writes to configuration or I/O space - * are followed by a core line access to line addresses 0x4 and 0xC, core access - * to the XL bus can hang. - * Workaround: Prevent PCI configuration and I/O writes from being followed by the described - * line access by the core by generating a known good XL bus transaction after - * the PCI transaction. - * Create a dummy function which is called immediately after each of the affected - * transactions. There are three requirements for this dummy function. - * 1. The function must be aligned to a 16-byte boundary. - * 2. The function must contain a dummy write to a location on the XL bus, - * preferably one with no side effects. - * 3. The function must be longer than 32 bytes. If it is not, the function should - * be padded with 16- or 48-bit TPF instructions placed after the end of - * the function (after the RTS instruction) such that the length is longer - * than 32 bytes. - */ - - __asm__ __volatile( - " .extern __MBAR \n\t" - " clr.l d0 \n\t" - " move.l d0,__MBAR+0xF0C \n\t" /* Must use direct addressing. write to EPORT module */ - /* xlbus -> slavebus -> eport, writing '0' to register */ - /* has no effect */ - " rts \n\t" - " tpf.l #0x0 \n\t" - " tpf.l #0x0 \n\t" - " tpf.l #0x0 \n\t" - " tpf.l #0x0 \n\t" - " tpf.l #0x0 \n\t" - ::: "d0", "memory"); -} - -static inline void chip_errata_055(int32_t handle) -{ - uint32_t dummy; - - return; /* test */ - - /* initiate PCI configuration access to device */ - MCF_PCI_PCICAR = MCF_PCI_PCICAR_E | /* enable configuration access special cycle */ - MCF_PCI_PCICAR_BUSNUM(3) | /* note: invalid bus number */ - MCF_PCI_PCICAR_DEVNUM(PCI_DEVICE_FROM_HANDLE(handle)) | /* device number, devices 0 - 9 are reserved */ - MCF_PCI_PCICAR_FUNCNUM(PCI_FUNCTION_FROM_HANDLE(handle)) | /* function number */ - MCF_PCI_PCICAR_DWORD(0); - - /* issue a dummy read to an unsupported bus number (will fail) */ - dummy = * (volatile uint32_t *) PCI_IO_OFFSET; /* access device */ - - /* silently clear the PCI errors we produced just now */ - MCF_PCI_PCIISR = 0xffffffff; /* clear all errors */ - MCF_PCI_PCIGSCR = MCF_PCI_PCIGSCR_PE | MCF_PCI_PCIGSCR_SE; - - (void) dummy; -} /* * Although this pragma stuff should work according to the GCC docs, it doesn't seem to @@ -472,6 +413,7 @@ int32_t pci_write_config_byte(int32_t handle, int offset, uint8_t value) return PCI_SUCCESSFUL; } + /* * pci_get_resource * diff --git a/BaS_gcc/pci/pci_errata.c b/BaS_gcc/pci/pci_errata.c new file mode 100755 index 0000000..7f21311 --- /dev/null +++ b/BaS_gcc/pci/pci_errata.c @@ -0,0 +1,64 @@ +#include "pci_errata.h" +#include "pci.h" +#include + +__attribute__((aligned(16))) void chip_errata_135(void) +{ + /* + * Errata type: Silicon + * Affected component: PCI + * Description: When core PCI transactions that involve writes to configuration or I/O space + * are followed by a core line access to line addresses 0x4 and 0xC, core access + * to the XL bus can hang. + * Workaround: Prevent PCI configuration and I/O writes from being followed by the described + * line access by the core by generating a known good XL bus transaction after + * the PCI transaction. + * Create a dummy function which is called immediately after each of the affected + * transactions. There are three requirements for this dummy function. + * 1. The function must be aligned to a 16-byte boundary. + * 2. The function must contain a dummy write to a location on the XL bus, + * preferably one with no side effects. + * 3. The function must be longer than 32 bytes. If it is not, the function should + * be padded with 16- or 48-bit TPF instructions placed after the end of + * the function (after the RTS instruction) such that the length is longer + * than 32 bytes. + */ + + __asm__ __volatile( + " .extern __MBAR \n\t" + " clr.l d0 \n\t" + " move.l d0,__MBAR+0xF0C \n\t" /* Must use direct addressing. write to EPORT module */ + /* xlbus -> slavebus -> eport, writing '0' to register */ + /* has no effect */ + " rts \n\t" + " tpf.l #0x0 \n\t" + " tpf.l #0x0 \n\t" + " tpf.l #0x0 \n\t" + " tpf.l #0x0 \n\t" + " tpf.l #0x0 \n\t" + ::: "d0", "memory"); +} + +void chip_errata_055(int32_t handle) +{ + uint32_t dummy; + + return; /* test */ + + /* initiate PCI configuration access to device */ + MCF_PCI_PCICAR = MCF_PCI_PCICAR_E | /* enable configuration access special cycle */ + MCF_PCI_PCICAR_BUSNUM(3) | /* note: invalid bus number */ + MCF_PCI_PCICAR_DEVNUM(PCI_DEVICE_FROM_HANDLE(handle)) | /* device number, devices 0 - 9 are reserved */ + MCF_PCI_PCICAR_FUNCNUM(PCI_FUNCTION_FROM_HANDLE(handle)) | /* function number */ + MCF_PCI_PCICAR_DWORD(0); + + /* issue a dummy read to an unsupported bus number (will fail) */ + dummy = * (volatile uint32_t *) PCI_IO_OFFSET; /* access device */ + + /* silently clear the PCI errors we produced just now */ + MCF_PCI_PCIISR = 0xffffffff; /* clear all errors */ + MCF_PCI_PCIGSCR = MCF_PCI_PCIGSCR_PE | MCF_PCI_PCIGSCR_SE; + + (void) dummy; +} +