diff --git a/BaS_gcc/.gdbinit b/.gdbinit
similarity index 100%
rename from BaS_gcc/.gdbinit
rename to .gdbinit
diff --git a/BaS_gcc/.indent.pro b/.indent.pro
similarity index 100%
rename from BaS_gcc/.indent.pro
rename to .indent.pro
diff --git a/BaS_gcc/BaS_gcc.config b/BaS_gcc.config
similarity index 100%
rename from BaS_gcc/BaS_gcc.config
rename to BaS_gcc.config
diff --git a/BaS_gcc/BaS_gcc.creator b/BaS_gcc.creator
similarity index 100%
rename from BaS_gcc/BaS_gcc.creator
rename to BaS_gcc.creator
diff --git a/BaS_gcc/BaS_gcc.files b/BaS_gcc.files
similarity index 100%
rename from BaS_gcc/BaS_gcc.files
rename to BaS_gcc.files
diff --git a/BaS_gcc/BaS_gcc.includes b/BaS_gcc.includes
similarity index 100%
rename from BaS_gcc/BaS_gcc.includes
rename to BaS_gcc.includes
diff --git a/BaS_gcc/sys/exceptions.S b/BaS_gcc/sys/exceptions.S
deleted file mode 100644
index a9f5af6..0000000
--- a/BaS_gcc/sys/exceptions.S
+++ /dev/null
@@ -1,600 +0,0 @@
-/*
- * initialize exception vectors
- *
- * This file is part of BaS_gcc.
- *
- * BaS_gcc is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * BaS_gcc is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with BaS_gcc. If not, see .
- *
- * Created on: 26.02.2013
- * Author: Markus Fröschle
- */
-
-#include "startcf.h"
-#if MACHINE_FIREBEE
-#include "firebee.h"
-#elif MACHINE_M5484LITE
-#include "m5484l.h"
-#endif /* MACHINE_FIREBEE */
-
- .extern __SUP_SP
- .extern _rom_entry
- .extern __RAMBAR0
- .extern _rt_mod
- .extern _rt_ssp
- .extern _rt_usp
- .extern _rt_vbr
- .extern _mmutr_miss
- .extern __MBAR
- .extern __MMUBAR
- .extern _video_tlb
- .extern _video_sbt
- .extern _flush_and_invalidate_caches
- .extern _get_bas_drivers
-
- /* PCI interrupt handlers */
- .extern _irq5_handler
- .extern _irq6_handler
- .extern _irq7_handler
-
- .global _vec_init
- .global _std_exc_vec /* needed by driver_vec.c */
-
-/* Register read/write equates */
-
- /* MMU */
- .equ MCF_MMU_MMUCR, __MMUBAR
- .equ MCF_MMU_MMUOR, __MMUBAR+0x04
- .equ MCF_MMU_MMUSR, __MMUBAR+0x08
- .equ MCF_MMU_MMUAR, __MMUBAR+0x10
- .equ MCF_MMU_MMUTR, __MMUBAR+0x14
- .equ MCF_MMU_MMUDR, __MMUBAR+0x18
-
- /* EPORT flag register */
- .equ MCF_EPORT_EPFR, __MBAR+0xf0c
-
- /* FEC1 port output data direction register */
- .equ MCF_GPIO_PODR_FEC1L, __MBAR+0xa07
-
- /* PSC0 transmit buffer register */
- .equ MCF_PSC0_PSCTB_8BIT, __MBAR+0x860c
-
- /* GPT mode select register */
- .equ MCF_GPT0_GMS, __MBAR+0x800
-
- /* Slice timer 0 count register */
- .equ MCF_SLT0_SCNT, __MBAR+0x908
-
- // interrupt sources
- .equ INT_SOURCE_EPORT_EPF1,1 // edge port flag 1
- .equ INT_SOURCE_EPORT_EPF2,2 // edge port flag 2
- .equ INT_SOURCE_EPORT_EPF3,3 // edge port flag 3
- .equ INT_SOURCE_EPORT_EPF4,4 // edge port flag 4
- .equ INT_SOURCE_EPORT_EPF5,5 // edge port flag 5
- .equ INT_SOURCE_EPORT_EPF6,6 // edge port flag 6
- .equ INT_SOURCE_EPORT_EPF7,7 // edge port flag 7
- .equ INT_SOURCE_USB_EP0ISR,15 // USB endpoint 0 interrupt
- .equ INT_SOURCE_USB_EP1ISR,16 // USB endpoint 1 interrupt
- .equ INT_SOURCE_USB_EP2ISR,17 // USB endpoint 2 interrupt
- .equ INT_SOURCE_USB_EP3ISR,18 // USB endpoint 3 interrupt
- .equ INT_SOURCE_USB_EP4ISR,19 // USB endpoint 4 interrupt
- .equ INT_SOURCE_USB_EP5ISR,20 // USB endpoint 5 interrupt
- .equ INT_SOURCE_USB_EP6ISR,21 // USB endpoint 6 interrupt
- .equ INT_SOURCE_USB_USBISR,22 // USB general interrupt
- .equ INT_SOURCE_USB_USBAISR,23 // USB core interrupt
- .equ INT_SOURCE_USB_ANY,24 // OR of all USB interrupts
- .equ INT_SOURCE_USB_DSPI_OVF,25 // DSPI overflow or underflow
- .equ INT_SOURCE_USB_DSPI_RFOF,26 // receive FIFO overflow interrupt
- .equ INT_SOURCE_USB_DSPI_RFDF,27 // receive FIFO drain interrupt
- .equ INT_SOURCE_USB_DSPI_TFUF,28 // transmit FIFO underflow interrupt
- .equ INT_SOURCE_USB_DSPI_TCF,29 // transfer complete interrupt
- .equ INT_SOURCE_USB_DSPI_TFFF,30 // transfer FIFO fill interrupt
- .equ INT_SOURCE_USB_DSPI_EOQF,31 // end of queue interrupt
- .equ INT_SOURCE_PSC3,32 // PSC3 interrupt
- .equ INT_SOURCE_PSC2,33 // PSC2 interrupt
- .equ INT_SOURCE_PSC1,34 // PSC1 interrupt
- .equ INT_SOURCE_PSC0,35 // PSC0 interrupt
- .equ INT_SOURCE_CTIMERS,36 // combined source for comm timers
- .equ INT_SOURCE_SEC,37 // SEC interrupt
- .equ INT_SOURCE_FEC1,38 // FEC1 interrupt
- .equ INT_SOURCE_FEC0,39 // FEC0 interrupt
- .equ INT_SOURCE_I2C,40 // I2C interrupt
- .equ INT_SOURCE_PCIARB,41 // PCI arbiter interrupt
- .equ INT_SOURCE_CBPCI,42 // COMM bus PCI interrupt
- .equ INT_SOURCE_XLBPCI,43 // XLB PCI interrupt
- .equ INT_SOURCE_XLBARB,47 // XLBARB to PCI interrupt
- .equ INT_SOURCE_DMA,48 // multichannel DMA interrupt
- .equ INT_SOURCE_CAN0_ERROR,49 // FlexCAN error interrupt
- .equ INT_SOURCE_CAN0_BUSOFF,50 // FlexCAN bus off interrupt
- .equ INT_SOURCE_CAN0_MBOR,51 // message buffer ORed interrupt
- .equ INT_SOURCE_SLT1,53 // slice timer 1 interrupt
- .equ INT_SOURCE_SLT0,54 // slice timer 0 interrupt
- .equ INT_SOURCE_CAN1_ERROR,55 // FlexCAN error interrupt
- .equ INT_SOURCE_CAN1_BUSOFF,56 // FlexCAN bus off interrupt
- .equ INT_SOURCE_CAN1_MBOR,57 // message buffer ORed interrupt
- .equ INT_SOURCE_GPT3,59 // GPT3 timer interrupt
- .equ INT_SOURCE_GPT2,60 // GPT2 timer interrupt
- .equ INT_SOURCE_GPT1,61 // GPT1 timer interrupt
- .equ INT_SOURCE_GPT0,62 // GPT0 timer interrupt
-
-// Atari register equates (provided by FPGA)
- .equ vbasehi, 0xffff8201
-
-/*
- * macros
- */
-
-/*
- * used for "forwarding" interrupt handlers. This just clears the "pending interrupt"
- * flag from the EDGE PORT flag register, set the status register to the appropriate interrupt
- * mask an jump through the corresponging vector
- */
- .macro irq vector,int_mask,clr_int
- move.w #0x2700,sr // disable interrupt
- subq.l #8,sp
- movem.l d0/a5,(sp) // save registers
-
- lea MCF_EPORT_EPFR,a5
- move.b #\clr_int,(a5) // clear int pending
-
- movem.l (sp),d0/a5 // restore registers
- addq.l #8,sp
- move.l \vector,-(sp)
- move #0x2\int_mask\()00,sr
- rts
- .endm
-
- .text
-_vec_init:
- move.l a2,-(sp) // Backup registers
-
- mov3q.l #-1,_rt_mod // rt_mod auf super
- clr.l _rt_ssp
- clr.l _rt_usp
- clr.l _rt_vbr
- move.l #__RAMBAR0,d0 // exception vectors reside in rambar0
- movec d0,VBR
- move.l d0,a0
- move.l a0,a2
-
-/*
- * first, set standard vector for all exceptions
- */
-init_vec:
- move.l #256,d0
- lea std_exc_vec(pc),a1 // standard vector
-init_vec_loop:
- move.l a1,(a2)+ // set standard vector for all exceptions
- subq.l #1,d0
- bne init_vec_loop
-
-// set individual interrupt handler assignments
-
- move.l #__SUP_SP,(a0) // set initial stack pointer at start of exception vector table
-
- lea reset_vector(pc),a1 // set reset vector
- move.l a1,0x04(a0)
-
- lea access(pc),a1 // set illegal access exception handler
- move.l a1,0x08(a0)
-
-// install spurious interrupt handler
- lea _lowlevel_isr_handler,a1
- move.l a1,0x60(a0)
-
-// trap #0 (without any parameters for now) is used to provide BaS' driver addresses to the OS
- lea _get_bas_drivers(pc),a1
- move.l a1,0x80(a0) // trap #0 exception vector
-
-// MFP non-autovector interrupt handlers. Those are just rerouted to their autovector counterparts
-
- lea irq1(pc),a1
- move.l a1,0x104(a0)
-
- lea irq2(pc),a1
- move.l a1,0x108(a0)
-
- lea irq3(pc),a1
- move.l a1,0x10c(a0)
-
- lea irq4(pc),a1
- move.l a1,0x110(a0)
-
- lea irq5(pc),a1
- move.l a1,0x114(a0)
-
- lea irq6(pc),a1
- move.l a1,0x118(a0)
-
- lea irq7(pc),a1
- move.l a1,0x11c(a0)
-
-
-
-// install lowlevel_isr_handler for the three GPT timers
- lea _lowlevel_isr_handler(pc),a1
- move.l a1,(INT_SOURCE_GPT1 + 64) * 4(a0)
- move.l a1,(INT_SOURCE_GPT2 + 64) * 4(a0)
- move.l a1,(INT_SOURCE_GPT3 + 64) * 4(a0)
-
-// install lowlevel_isr_handler for the PSC3 interrupt
- move.l a1,(INT_SOURCE_PSC3 + 64) * 4(a0)
-
-// install lowlevel_isr_handler for Coldfire DMA interrupts
- move.l a1,(INT_SOURCE_DMA + 64) * 4(a0)
-
-// install lowlevel_isr_handler for the XLBPCI interrupt
- move.l a1,(INT_SOURCE_XLBPCI + 64) * 4(a0)
-
-// install lowlevel_isr_handler for the FEC0 interrupt
- move.l a1,(INT_SOURCE_FEC0 + 64) * 4(a0)
-
-#ifndef MACHINE_FIREBEE
-// FEC1 not wired on the FireBee (used for FPGA as GPIO), but available on other machines
- move.l a1,(INT_SOURCE_FEC1 + 64) * 4(a0)
-#endif
-
-#ifdef MACHINE_FIREBEE
-
-// timer vectors (triggers when vbashi gets changed, used for video page copy)
- move.l a1,(INT_SOURCE_GPT0 + 64) * 4(a0)
-#endif /* MACHINE_FIREBEE */
-
- move.l (sp)+,a2 // Restore registers
- rts
-
-
-/*
- * exception vector routines
- */
-vector_table_start:
-std_exc_vec:
-_std_exc_vec:
- //move.w #0x2700,sr // disable interrupt
- subq.l #8,sp
- movem.l d0/a5,(sp) // save registers
- move.w 8(sp),d0 // fetch vector
- and.l #0x3fc,d0 // mask out vector number
-//#define DBG_EXC
-#ifdef DBG_EXC
- // printout vector number of exception
-
- lea -4 * 4(sp),sp // reserve stack space
- movem.l d0-d1/a0-a1,(sp) // save gcc scratch registers
-
- lsr.l #2,d0 // shift vector number in place
- cmp.l #33,d0
- beq noprint
- cmp.l #34,d0
- beq noprint
- cmp.l #45,d0
- beq noprint
- cmp.l #46,d0
- beq noprint
- move.l 4 * 4 + 8 + 4(sp),-(sp) // pc at exception
- move.l d0,-(sp) // provide it to xprintf()
- pea exception_text
- jsr _xprintf // call xprintf()
- add.l #3*4,sp // adjust stack
-noprint:
-
- movem.l (sp),d0-d1/a0-a1 // restore registers
- lea 4 * 4(sp),sp
-#endif /* DBG_EXC */
-
- add.l _rt_vbr,d0 // + VBR
- move.l d0,a5
- move.l (a5),d0 // fetch exception routine address
-
- move.l 4(sp),a5 // restore a5
- move.l d0,4(sp) // store exception routine address
-
- // FIXME: not clear why we would need the following?
- //move.w 10(sp),d0 // restore original SR
- //bset #13,d0 // set supervisor bit
- //move.w d0,sr //
- move.l (sp)+,d0 // restore d0
- rts // jump to exception handler
-
-exception_text:
- .ascii "DEBUG: EXCEPTION %d caught at %p"
- .byte 13, 10, 0
- .align 4
-
-reset_vector:
- move.w #0x2700,sr // disable interrupts
- move.l #0x31415926,d0
- cmp.l 0x426,d0 // _resvalid: reset vector valid?
- beq std_exc_vec // yes->
- jmp _rom_entry // no, cold start machine
-
-access:
- move.w #0x2700,sr // disable interrupts
-
- link a6,#-4 * 4 // make room for gcc scratch registers
- movem.l d0-d1/a0-a1,(sp) // save them
-
- move.l 4(a6),-(sp) // push format_status
- move.l 8(a6),-(sp) // pc at exception
- move.l MCF_MMU_MMUAR,-(sp) // MMU fault address
- move.l MCF_MMU_MMUSR,-(sp) // MMU status regisrter
- move.w #0x2300,sr // can lower interrupt mask now that MMU status is safe
- jsr _mmutr_miss // call C routine
- lea 4 * 4(sp),sp // adjust stack
-
- tst.l d0 // exception handler signals bus error
- bne bus_error
-
- movem.l (sp),d0-d1/a0-a1 // restore registers
- unlk a6
- rte
-
-bus_error:
- movem.l (sp),d0-d1/a0-a1 // restore registers
- unlk a6
- bra std_exc_vec // FIXME: this seems to be bogous...
-
-zero_divide:
- move.w #0x2700,sr // disable interrupt
- move.l a0,-(sp)
- move.l d0,-(sp)
- move.l 12(sp),a0 // pc
- move.w (a0)+,d0 // command word
- btst #7,d0 // long?
- beq zd_word // nein->
- addq.l #2,a0
-
-zd_word:
- and.l 0x3f,d0 // mask out ea field
- cmp.w #0x08,d0 // -(ax) or less?
- ble zd_end
- addq.l #2,a0
- cmp.w #0x39,d0 // xxx.L
- bne zd_nal
- addq.l #2,a0
- bra zd_end
-
-zd_nal: cmp.w #0x3c,d0 // immediate?
- bne zd_end // no->
- btst #7,d0 // long?
- beq zd_end // no
- addq.l #2,a0
-zd_end:
- move.l a0,12(sp)
- move.l (sp)+,d0
- move.l (sp)+,a0
- rte
-
-#ifdef _NOT_USED_
-linea:
- move.w #0x2700,sr // disable interrupt
- halt
- nop
- nop
-linef:
- move.w #0x2700,sr // disable interrupt
- halt
- nop
- nop
-format:
- move.w #0x2700,sr // disable interrupt
- halt
- nop
- nop
-
-//floating point
-flpoow:
- move.w #0x2700,sr // disable interrupt
- halt
- nop
- nop
-#endif /* _NOT_USED */
-
-
-irq1: irq 0x64, 1, 0x02 // Level 1 autovector interrupt (unused)
-irq2: irq 0x68, 2, 0x04 // Level 2 autovector interrupt (horizontal blank)
-irq3: irq 0x6c, 3, 0x08 // Level 3 autovector interrupt (unused)
-irq4: irq 0x70, 4, 0x10 // Level 4 autovector interrupt (vertical blank)
-
-
-
-#if defined(MACHINE_FIREBEE) /* these handlers are only meaningful for the Firebee */
-irq5: //move.w #0x2700,sr // disable interrupts
- subq.l #4,sp // extra space
-
- link a6,#-4 * 4 // save gcc scratch registers
- movem.l d0-d1/a0-a1,(sp)
-
- jsr _irq5_handler // call C handler routine
-
- tst.b d0 // handled?
- beq irq5_forward
-
- movem.l (sp),d0-d1/a0-a1 // restore registers
- unlk a6
- addq.l #4,sp
-
- rte // return from exception
-
-irq5_forward: move.l 0x74,a0 // fetch OS irq5 vector
- add.l _rt_vbr,a0 // add runtime vbr
- move.l a0,4(a6) // put on stack
-
- movem.l (sp),d0-d1/a0-a1 // restore registers
- unlk a6 //
- move.w #0x2500,sr // set interrupt level
- rts // jump through vector
-
-/*
- * irq6 needs special treatment since - because the Coldfire only supports autovector interrupts
- * - the exception vector is provided by the simulated MFP from the FPGA
- */
-irq6: //move.w #0x2700,sr // disable interrupt
- subq.l #4,sp // extra space
-
- link a6,#-4 * 4 // save gcc scratch registers
- movem.l d0-d1/a0-a1,(sp)
-
- move.l 8(a6),-(sp) // format status word
- move.l 12(a6),-(sp) // pc at exception
- jsr _irq6_handler // call C handler
- lea 8(sp),sp // fix stack
-
- tst.b d0 // interrupt handled?
- beq irq6_forward // no, forward to TOS
-
- movem.l (sp),d0-d1/a0-a1 // restore registers
- unlk a6
- addq.l #4,sp // "extra space" not needed in this case
- rte
-
-irq6_forward:
- move.l 0xf0020000,a0 // fetch "MFP interrupt vector" from FPGA
- add.l _rt_vbr,a0 // add runtime VBR
- move.l (a0),4(a6) // fetch handler address and put it on "extra space"
-
- movem.l (sp),d0-d1/a0-a1
- unlk a6
- move.w #0x2600,sr // set interrupt mask to MFP level
-
- rts // jump through vector
-
-/*
- * irq 7 = pseudo bus error
- */
-irq7:
- lea -12(sp),sp
- movem.l d0/a0,(sp)
-
- move.l __RAMBAR0+0x008,a0 // real access error handler
- move.l a0,8(sp) // this will be the return address for rts
-
- move.w 12(sp),d0 // format/vector word
- andi.l #0xf000,d0 // keep only the format
- ori.l #2*4,d0 // simulate vector #2, no fault
- move.w d0,12(sp)
-
- // TODO: Inside an interrupt handler, 16(sp) is the return address.
- // For an Access Error, it should be the address of the fault instruction instead
-
- lea MCF_EPORT_EPFR,a0
- bset #7,(a0) // clear int 7
-
- move.l (sp)+,d0 // restore registers
- move.l (sp)+,a0
- rts // Forward to the Access Error handler
-
-#else // handlers for M5484LITE
-
-irq5: //move.w #0x2700,sr // disable interrupts
- subq.l #4,sp // extra space
-
- link a6,#-4 * 4 // save gcc scratch registers
- movem.l d0-d1/a0-a1,(sp)
-
- jsr _irq5_handler // call C handler routine
-
- tst.b d0 // handled?
- beq irq5_forward
-
- movem.l (sp),d0-d1/a0-a1 // restore registers
- unlk a6
- addq.l #4,sp
-
- rte // return from exception
-
-irq5_forward: move.l 0x74,a0 // fetch OS irq5 vector
- add.l _rt_vbr,a0 // add runtime vbr
- move.l a0,4(a6) // put on stack
-
- movem.l (sp),d0-d1/a0-a1 // restore registers
- unlk a6 //
- move.w #0x2500,sr // set interrupt level
- rts // jump through vector
-
-irq6:
- irq 0x74,5,0x20
-
-irq7: // irq7 is tied to PCI INTA# and PCI INTB# on the M5484LITE
-
- //move.w #0x2700,sr // disable interrupts
-
- lea -4*4(sp),sp // save gcc scratch registers
- movem.l d0-d1/a0-a1,(sp)
-
- jsr _irq7_handler // call C handler routine
-
- movem.l (sp),d0-d1/a0-a1 // restore registers
- lea 4*4(sp),sp
-
- rte // return from exception
-
-irq7text:
- .data
- .ascii "IRQ7!"
- .dc.b 13,10,0
- .text
-#endif /* MACHINE_FIREBEE */
-
-/*
- * low-level interrupt service routine for routines registered with
- * isr_register_handler(int vector). If the higlevel routine (isr_execute_handler())
- * returns != true, the call is forwarded to the OS (through its own vector base).
- */
- .global _lowlevel_isr_handler
- .extern _isr_execute_handler
-
-
-/*
- * stack format (after link instruction) is like this:
- *
- * +12 program counter (return address)
- * +8 format_status
- * +4 save area for rts (if we need to jump through the OS vector)
- * (a6) -> saved a6 (from link)
- * -4
- * -8
- * -12
- * (sp) -> gcc scratch registers save area
- */
-_lowlevel_isr_handler:
- subq.l #4,sp // extra space
- link a6,#-4 * 4 // make room for
- movem.l d0-d1/a0-a1,(sp) // gcc scratch registers and save them,
- // other registers will be taken care of by gcc itself
-
- move.w 8(a6),d0 // fetch vector number from stack
- lsr.l #2,d0 // move it in place
- andi.l #0xff,d0 // mask it out
- move.l d0,-(sp) // push it
- jsr _isr_execute_handler // call the C handler
- addq.l #4,sp // adjust stack
- tst.b d0 // handled?
- beq lowlevel_forward // no, forward it to TOS
-
- movem.l (sp),d0-d1/a0-a1 // restore registers
- unlk a6
- addq.l #4,sp // eliminate extra space
-
- rte
-
-lowlevel_forward:
- move.l 8(a6),d0 // fetch OS irq vector
- lsr.l #2,d0 // move it in place
- andi.l #0xff,d0 // mask out vector number
- add.l _rt_vbr,d0 // add runtime vbr
- move.l d0,4(a6) // put on stack as return address
-
- movem.l (sp),d0-d1/a0-a1 // restore registers
- unlk a6 //
- rts // jump through vector
diff --git a/BaS_gcc/COPYING b/COPYING
similarity index 100%
rename from BaS_gcc/COPYING
rename to COPYING
diff --git a/BaS_gcc/COPYING.LESSER b/COPYING.LESSER
similarity index 100%
rename from BaS_gcc/COPYING.LESSER
rename to COPYING.LESSER
diff --git a/BaS_gcc/Doxyfile b/Doxyfile
similarity index 100%
rename from BaS_gcc/Doxyfile
rename to Doxyfile
diff --git a/BaS_gcc/Makefile b/Makefile
similarity index 100%
rename from BaS_gcc/Makefile
rename to Makefile
diff --git a/BaS_gcc/bas.lk.in b/bas.lk.in
similarity index 100%
rename from BaS_gcc/bas.lk.in
rename to bas.lk.in
diff --git a/BaS_gcc/bas_firebee.bdm b/bas_firebee.bdm
similarity index 100%
rename from BaS_gcc/bas_firebee.bdm
rename to bas_firebee.bdm
diff --git a/BaS_gcc/bas_m5484.bdm b/bas_m5484.bdm
similarity index 100%
rename from BaS_gcc/bas_m5484.bdm
rename to bas_m5484.bdm
diff --git a/BaS_gcc/basflash.lk.in b/basflash.lk.in
similarity index 100%
rename from BaS_gcc/basflash.lk.in
rename to basflash.lk.in
diff --git a/BaS_gcc/check.bdm b/check.bdm
similarity index 100%
rename from BaS_gcc/check.bdm
rename to check.bdm
diff --git a/BaS_gcc/dma/MCD_dmaApi.c b/dma/MCD_dmaApi.c
similarity index 100%
rename from BaS_gcc/dma/MCD_dmaApi.c
rename to dma/MCD_dmaApi.c
diff --git a/BaS_gcc/dma/MCD_tasks.c b/dma/MCD_tasks.c
similarity index 100%
rename from BaS_gcc/dma/MCD_tasks.c
rename to dma/MCD_tasks.c
diff --git a/BaS_gcc/dma/MCD_tasksInit.c b/dma/MCD_tasksInit.c
similarity index 100%
rename from BaS_gcc/dma/MCD_tasksInit.c
rename to dma/MCD_tasksInit.c
diff --git a/BaS_gcc/dma/dma.c b/dma/dma.c
similarity index 100%
rename from BaS_gcc/dma/dma.c
rename to dma/dma.c
diff --git a/BaS_gcc/dump.bdm b/dump.bdm
similarity index 100%
rename from BaS_gcc/dump.bdm
rename to dump.bdm
diff --git a/BaS_gcc/exe/basflash.c b/exe/basflash.c
similarity index 100%
rename from BaS_gcc/exe/basflash.c
rename to exe/basflash.c
diff --git a/BaS_gcc/exe/basflash_start.c b/exe/basflash_start.c
similarity index 100%
rename from BaS_gcc/exe/basflash_start.c
rename to exe/basflash_start.c
diff --git a/BaS_gcc/flash/flash.c b/flash/flash.c
similarity index 100%
rename from BaS_gcc/flash/flash.c
rename to flash/flash.c
diff --git a/BaS_gcc/flash/s19reader.c b/flash/s19reader.c
similarity index 100%
rename from BaS_gcc/flash/s19reader.c
rename to flash/s19reader.c
diff --git a/BaS_gcc/flash_scripts/flash_firebee_bas.bdm b/flash_scripts/flash_firebee_bas.bdm
similarity index 100%
rename from BaS_gcc/flash_scripts/flash_firebee_bas.bdm
rename to flash_scripts/flash_firebee_bas.bdm
diff --git a/BaS_gcc/flash_scripts/flash_firebee_etos.bdm b/flash_scripts/flash_firebee_etos.bdm
similarity index 100%
rename from BaS_gcc/flash_scripts/flash_firebee_etos.bdm
rename to flash_scripts/flash_firebee_etos.bdm
diff --git a/BaS_gcc/flash_scripts/flash_firebee_firetos.bdm b/flash_scripts/flash_firebee_firetos.bdm
similarity index 100%
rename from BaS_gcc/flash_scripts/flash_firebee_firetos.bdm
rename to flash_scripts/flash_firebee_firetos.bdm
diff --git a/BaS_gcc/flash_scripts/flash_firebee_fpga.bdm b/flash_scripts/flash_firebee_fpga.bdm
similarity index 100%
rename from BaS_gcc/flash_scripts/flash_firebee_fpga.bdm
rename to flash_scripts/flash_firebee_fpga.bdm
diff --git a/BaS_gcc/flash_scripts/flash_m548x_bas.bdm b/flash_scripts/flash_m548x_bas.bdm
similarity index 100%
rename from BaS_gcc/flash_scripts/flash_m548x_bas.bdm
rename to flash_scripts/flash_m548x_bas.bdm
diff --git a/BaS_gcc/flash_scripts/flash_m548x_dbug.bdm b/flash_scripts/flash_m548x_dbug.bdm
similarity index 100%
rename from BaS_gcc/flash_scripts/flash_m548x_dbug.bdm
rename to flash_scripts/flash_m548x_dbug.bdm
diff --git a/BaS_gcc/flash_scripts/flash_m548x_etos.bdm b/flash_scripts/flash_m548x_etos.bdm
similarity index 97%
rename from BaS_gcc/flash_scripts/flash_m548x_etos.bdm
rename to flash_scripts/flash_m548x_etos.bdm
index aae9ffc..6f1cbb3 100755
--- a/BaS_gcc/flash_scripts/flash_m548x_etos.bdm
+++ b/flash_scripts/flash_m548x_etos.bdm
@@ -63,4 +63,4 @@ erase 0xe0000000 37
erase 0xe0000000 38
erase 0xe0000000 39
-load ../../emutos/emutos-m548xbas.elf
+load ../../emutos/emutos-m548x-bas_gcc.elf
diff --git a/BaS_gcc/fs/cc932.c b/fs/cc932.c
similarity index 100%
rename from BaS_gcc/fs/cc932.c
rename to fs/cc932.c
diff --git a/BaS_gcc/fs/cc936.c b/fs/cc936.c
similarity index 100%
rename from BaS_gcc/fs/cc936.c
rename to fs/cc936.c
diff --git a/BaS_gcc/fs/cc949.c b/fs/cc949.c
similarity index 100%
rename from BaS_gcc/fs/cc949.c
rename to fs/cc949.c
diff --git a/BaS_gcc/fs/cc950.c b/fs/cc950.c
similarity index 100%
rename from BaS_gcc/fs/cc950.c
rename to fs/cc950.c
diff --git a/BaS_gcc/fs/ccsbcs.c b/fs/ccsbcs.c
similarity index 100%
rename from BaS_gcc/fs/ccsbcs.c
rename to fs/ccsbcs.c
diff --git a/BaS_gcc/fs/ff.c b/fs/ff.c
similarity index 100%
rename from BaS_gcc/fs/ff.c
rename to fs/ff.c
diff --git a/BaS_gcc/fs/unicode.c b/fs/unicode.c
similarity index 100%
rename from BaS_gcc/fs/unicode.c
rename to fs/unicode.c
diff --git a/BaS_gcc/i2c/i2c.c b/i2c/i2c.c
similarity index 100%
rename from BaS_gcc/i2c/i2c.c
rename to i2c/i2c.c
diff --git a/BaS_gcc/if/driver_vec.c b/if/driver_vec.c
similarity index 99%
rename from BaS_gcc/if/driver_vec.c
rename to if/driver_vec.c
index 2ca566d..e036d47 100644
--- a/BaS_gcc/if/driver_vec.c
+++ b/if/driver_vec.c
@@ -243,7 +243,7 @@ void __attribute__((interrupt)) get_bas_drivers(void)
" move.l #%[drivers],d0 \n\t" // return driver struct in d0
" addq.l #4,sp \n\t" // adjust stack
" move.l (sp)+,a0 \n\t" // restore register
- : /* no output */
+ : /* no output */
: [drivers] "o" (bas_drivers) /* input */
: /* clobber */
);
diff --git a/BaS_gcc/include/MCD_dma.h b/include/MCD_dma.h
similarity index 100%
rename from BaS_gcc/include/MCD_dma.h
rename to include/MCD_dma.h
diff --git a/BaS_gcc/include/MCD_progCheck.h b/include/MCD_progCheck.h
similarity index 100%
rename from BaS_gcc/include/MCD_progCheck.h
rename to include/MCD_progCheck.h
diff --git a/BaS_gcc/include/MCD_tasksInit.h b/include/MCD_tasksInit.h
similarity index 100%
rename from BaS_gcc/include/MCD_tasksInit.h
rename to include/MCD_tasksInit.h
diff --git a/BaS_gcc/include/MCF5475.h b/include/MCF5475.h
similarity index 100%
rename from BaS_gcc/include/MCF5475.h
rename to include/MCF5475.h
diff --git a/BaS_gcc/include/MCF5475_CLOCK.h b/include/MCF5475_CLOCK.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_CLOCK.h
rename to include/MCF5475_CLOCK.h
diff --git a/BaS_gcc/include/MCF5475_CTM.h b/include/MCF5475_CTM.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_CTM.h
rename to include/MCF5475_CTM.h
diff --git a/BaS_gcc/include/MCF5475_DMA.h b/include/MCF5475_DMA.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_DMA.h
rename to include/MCF5475_DMA.h
diff --git a/BaS_gcc/include/MCF5475_DSPI.h b/include/MCF5475_DSPI.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_DSPI.h
rename to include/MCF5475_DSPI.h
diff --git a/BaS_gcc/include/MCF5475_EPORT.h b/include/MCF5475_EPORT.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_EPORT.h
rename to include/MCF5475_EPORT.h
diff --git a/BaS_gcc/include/MCF5475_FBCS.h b/include/MCF5475_FBCS.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_FBCS.h
rename to include/MCF5475_FBCS.h
diff --git a/BaS_gcc/include/MCF5475_FEC.h b/include/MCF5475_FEC.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_FEC.h
rename to include/MCF5475_FEC.h
diff --git a/BaS_gcc/include/MCF5475_GPIO.h b/include/MCF5475_GPIO.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_GPIO.h
rename to include/MCF5475_GPIO.h
diff --git a/BaS_gcc/include/MCF5475_GPT.h b/include/MCF5475_GPT.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_GPT.h
rename to include/MCF5475_GPT.h
diff --git a/BaS_gcc/include/MCF5475_I2C.h b/include/MCF5475_I2C.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_I2C.h
rename to include/MCF5475_I2C.h
diff --git a/BaS_gcc/include/MCF5475_INTC.h b/include/MCF5475_INTC.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_INTC.h
rename to include/MCF5475_INTC.h
diff --git a/BaS_gcc/include/MCF5475_MMU.h b/include/MCF5475_MMU.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_MMU.h
rename to include/MCF5475_MMU.h
diff --git a/BaS_gcc/include/MCF5475_PAD.h b/include/MCF5475_PAD.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_PAD.h
rename to include/MCF5475_PAD.h
diff --git a/BaS_gcc/include/MCF5475_PCI.h b/include/MCF5475_PCI.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_PCI.h
rename to include/MCF5475_PCI.h
diff --git a/BaS_gcc/include/MCF5475_PCIARB.h b/include/MCF5475_PCIARB.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_PCIARB.h
rename to include/MCF5475_PCIARB.h
diff --git a/BaS_gcc/include/MCF5475_PSC.h b/include/MCF5475_PSC.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_PSC.h
rename to include/MCF5475_PSC.h
diff --git a/BaS_gcc/include/MCF5475_SDRAMC.h b/include/MCF5475_SDRAMC.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_SDRAMC.h
rename to include/MCF5475_SDRAMC.h
diff --git a/BaS_gcc/include/MCF5475_SEC.h b/include/MCF5475_SEC.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_SEC.h
rename to include/MCF5475_SEC.h
diff --git a/BaS_gcc/include/MCF5475_SIU.h b/include/MCF5475_SIU.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_SIU.h
rename to include/MCF5475_SIU.h
diff --git a/BaS_gcc/include/MCF5475_SLT.h b/include/MCF5475_SLT.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_SLT.h
rename to include/MCF5475_SLT.h
diff --git a/BaS_gcc/include/MCF5475_SRAM.h b/include/MCF5475_SRAM.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_SRAM.h
rename to include/MCF5475_SRAM.h
diff --git a/BaS_gcc/include/MCF5475_USB.h b/include/MCF5475_USB.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_USB.h
rename to include/MCF5475_USB.h
diff --git a/BaS_gcc/include/MCF5475_XLB.h b/include/MCF5475_XLB.h
similarity index 100%
rename from BaS_gcc/include/MCF5475_XLB.h
rename to include/MCF5475_XLB.h
diff --git a/BaS_gcc/include/acia.h b/include/acia.h
similarity index 100%
rename from BaS_gcc/include/acia.h
rename to include/acia.h
diff --git a/BaS_gcc/include/am79c874.h b/include/am79c874.h
similarity index 100%
rename from BaS_gcc/include/am79c874.h
rename to include/am79c874.h
diff --git a/BaS_gcc/include/arp.h b/include/arp.h
similarity index 100%
rename from BaS_gcc/include/arp.h
rename to include/arp.h
diff --git a/BaS_gcc/include/ati_ids.h b/include/ati_ids.h
similarity index 100%
rename from BaS_gcc/include/ati_ids.h
rename to include/ati_ids.h
diff --git a/BaS_gcc/include/bas_printf.h b/include/bas_printf.h
similarity index 100%
rename from BaS_gcc/include/bas_printf.h
rename to include/bas_printf.h
diff --git a/BaS_gcc/include/bas_string.h b/include/bas_string.h
similarity index 100%
rename from BaS_gcc/include/bas_string.h
rename to include/bas_string.h
diff --git a/BaS_gcc/include/bas_types.h b/include/bas_types.h
similarity index 100%
rename from BaS_gcc/include/bas_types.h
rename to include/bas_types.h
diff --git a/BaS_gcc/include/bas_utils.h b/include/bas_utils.h
similarity index 100%
rename from BaS_gcc/include/bas_utils.h
rename to include/bas_utils.h
diff --git a/BaS_gcc/include/bcm5222.h b/include/bcm5222.h
similarity index 100%
rename from BaS_gcc/include/bcm5222.h
rename to include/bcm5222.h
diff --git a/BaS_gcc/include/bootp.h b/include/bootp.h
similarity index 100%
rename from BaS_gcc/include/bootp.h
rename to include/bootp.h
diff --git a/BaS_gcc/include/cache.h b/include/cache.h
similarity index 100%
rename from BaS_gcc/include/cache.h
rename to include/cache.h
diff --git a/BaS_gcc/include/diskio.h b/include/diskio.h
similarity index 100%
rename from BaS_gcc/include/diskio.h
rename to include/diskio.h
diff --git a/BaS_gcc/include/dma.h b/include/dma.h
similarity index 100%
rename from BaS_gcc/include/dma.h
rename to include/dma.h
diff --git a/BaS_gcc/include/driver_mem.h b/include/driver_mem.h
similarity index 100%
rename from BaS_gcc/include/driver_mem.h
rename to include/driver_mem.h
diff --git a/BaS_gcc/include/driver_vec.h b/include/driver_vec.h
similarity index 100%
rename from BaS_gcc/include/driver_vec.h
rename to include/driver_vec.h
diff --git a/BaS_gcc/include/edid.h b/include/edid.h
similarity index 100%
rename from BaS_gcc/include/edid.h
rename to include/edid.h
diff --git a/BaS_gcc/include/ehci.h b/include/ehci.h
similarity index 100%
rename from BaS_gcc/include/ehci.h
rename to include/ehci.h
diff --git a/BaS_gcc/include/eth.h b/include/eth.h
similarity index 100%
rename from BaS_gcc/include/eth.h
rename to include/eth.h
diff --git a/BaS_gcc/include/exceptions.h b/include/exceptions.h
similarity index 100%
rename from BaS_gcc/include/exceptions.h
rename to include/exceptions.h
diff --git a/BaS_gcc/include/fb.h b/include/fb.h
similarity index 100%
rename from BaS_gcc/include/fb.h
rename to include/fb.h
diff --git a/BaS_gcc/include/fec.h b/include/fec.h
similarity index 100%
rename from BaS_gcc/include/fec.h
rename to include/fec.h
diff --git a/BaS_gcc/include/fecbd.h b/include/fecbd.h
similarity index 100%
rename from BaS_gcc/include/fecbd.h
rename to include/fecbd.h
diff --git a/BaS_gcc/include/ff.h b/include/ff.h
similarity index 100%
rename from BaS_gcc/include/ff.h
rename to include/ff.h
diff --git a/BaS_gcc/include/ffconf.h b/include/ffconf.h
similarity index 100%
rename from BaS_gcc/include/ffconf.h
rename to include/ffconf.h
diff --git a/BaS_gcc/include/firebee.h b/include/firebee.h
similarity index 100%
rename from BaS_gcc/include/firebee.h
rename to include/firebee.h
diff --git a/BaS_gcc/include/font.h b/include/font.h
similarity index 100%
rename from BaS_gcc/include/font.h
rename to include/font.h
diff --git a/BaS_gcc/include/i2c-algo-bit.h b/include/i2c-algo-bit.h
similarity index 100%
rename from BaS_gcc/include/i2c-algo-bit.h
rename to include/i2c-algo-bit.h
diff --git a/BaS_gcc/include/i2c.h b/include/i2c.h
similarity index 100%
rename from BaS_gcc/include/i2c.h
rename to include/i2c.h
diff --git a/BaS_gcc/include/icmp.h b/include/icmp.h
similarity index 100%
rename from BaS_gcc/include/icmp.h
rename to include/icmp.h
diff --git a/BaS_gcc/include/ikbd.h b/include/ikbd.h
similarity index 100%
rename from BaS_gcc/include/ikbd.h
rename to include/ikbd.h
diff --git a/BaS_gcc/include/interrupts.h b/include/interrupts.h
similarity index 100%
rename from BaS_gcc/include/interrupts.h
rename to include/interrupts.h
diff --git a/BaS_gcc/include/ip.h b/include/ip.h
similarity index 100%
rename from BaS_gcc/include/ip.h
rename to include/ip.h
diff --git a/BaS_gcc/include/m54455.h b/include/m54455.h
similarity index 100%
rename from BaS_gcc/include/m54455.h
rename to include/m54455.h
diff --git a/BaS_gcc/include/m5484l.h b/include/m5484l.h
similarity index 100%
rename from BaS_gcc/include/m5484l.h
rename to include/m5484l.h
diff --git a/BaS_gcc/include/mcd_initiators.h b/include/mcd_initiators.h
similarity index 100%
rename from BaS_gcc/include/mcd_initiators.h
rename to include/mcd_initiators.h
diff --git a/BaS_gcc/include/mmu.h b/include/mmu.h
similarity index 100%
rename from BaS_gcc/include/mmu.h
rename to include/mmu.h
diff --git a/BaS_gcc/include/mod_devicetable.h b/include/mod_devicetable.h
similarity index 100%
rename from BaS_gcc/include/mod_devicetable.h
rename to include/mod_devicetable.h
diff --git a/BaS_gcc/include/nbuf.h b/include/nbuf.h
similarity index 100%
rename from BaS_gcc/include/nbuf.h
rename to include/nbuf.h
diff --git a/BaS_gcc/include/net.h b/include/net.h
similarity index 100%
rename from BaS_gcc/include/net.h
rename to include/net.h
diff --git a/BaS_gcc/include/net_timer.h b/include/net_timer.h
similarity index 100%
rename from BaS_gcc/include/net_timer.h
rename to include/net_timer.h
diff --git a/BaS_gcc/include/nif.h b/include/nif.h
similarity index 100%
rename from BaS_gcc/include/nif.h
rename to include/nif.h
diff --git a/BaS_gcc/include/ohci.h b/include/ohci.h
similarity index 100%
rename from BaS_gcc/include/ohci.h
rename to include/ohci.h
diff --git a/BaS_gcc/include/part.h b/include/part.h
similarity index 100%
rename from BaS_gcc/include/part.h
rename to include/part.h
diff --git a/BaS_gcc/include/pci.h b/include/pci.h
similarity index 100%
rename from BaS_gcc/include/pci.h
rename to include/pci.h
diff --git a/BaS_gcc/include/pci_ids.h b/include/pci_ids.h
similarity index 100%
rename from BaS_gcc/include/pci_ids.h
rename to include/pci_ids.h
diff --git a/BaS_gcc/include/queue.h b/include/queue.h
similarity index 100%
rename from BaS_gcc/include/queue.h
rename to include/queue.h
diff --git a/BaS_gcc/include/radeon_reg.h b/include/radeon_reg.h
similarity index 100%
rename from BaS_gcc/include/radeon_reg.h
rename to include/radeon_reg.h
diff --git a/BaS_gcc/include/radeonfb.h b/include/radeonfb.h
similarity index 100%
rename from BaS_gcc/include/radeonfb.h
rename to include/radeonfb.h
diff --git a/BaS_gcc/include/s19reader.h b/include/s19reader.h
similarity index 100%
rename from BaS_gcc/include/s19reader.h
rename to include/s19reader.h
diff --git a/BaS_gcc/include/screen.h b/include/screen.h
similarity index 100%
rename from BaS_gcc/include/screen.h
rename to include/screen.h
diff --git a/BaS_gcc/include/sd_card.h b/include/sd_card.h
similarity index 100%
rename from BaS_gcc/include/sd_card.h
rename to include/sd_card.h
diff --git a/BaS_gcc/include/startcf.h b/include/startcf.h
similarity index 100%
rename from BaS_gcc/include/startcf.h
rename to include/startcf.h
diff --git a/BaS_gcc/include/sysinit.h b/include/sysinit.h
similarity index 100%
rename from BaS_gcc/include/sysinit.h
rename to include/sysinit.h
diff --git a/BaS_gcc/include/tftp.h b/include/tftp.h
similarity index 100%
rename from BaS_gcc/include/tftp.h
rename to include/tftp.h
diff --git a/BaS_gcc/include/udp.h b/include/udp.h
similarity index 100%
rename from BaS_gcc/include/udp.h
rename to include/udp.h
diff --git a/BaS_gcc/include/usb.h b/include/usb.h
similarity index 100%
rename from BaS_gcc/include/usb.h
rename to include/usb.h
diff --git a/BaS_gcc/include/usb_defs.h b/include/usb_defs.h
similarity index 100%
rename from BaS_gcc/include/usb_defs.h
rename to include/usb_defs.h
diff --git a/BaS_gcc/include/usb_hub.h b/include/usb_hub.h
similarity index 100%
rename from BaS_gcc/include/usb_hub.h
rename to include/usb_hub.h
diff --git a/BaS_gcc/include/user_io.h b/include/user_io.h
similarity index 100%
rename from BaS_gcc/include/user_io.h
rename to include/user_io.h
diff --git a/BaS_gcc/include/util.h b/include/util.h
similarity index 100%
rename from BaS_gcc/include/util.h
rename to include/util.h
diff --git a/BaS_gcc/include/version.h b/include/version.h
similarity index 100%
rename from BaS_gcc/include/version.h
rename to include/version.h
diff --git a/BaS_gcc/include/videl.h b/include/videl.h
similarity index 100%
rename from BaS_gcc/include/videl.h
rename to include/videl.h
diff --git a/BaS_gcc/include/video.h b/include/video.h
similarity index 100%
rename from BaS_gcc/include/video.h
rename to include/video.h
diff --git a/BaS_gcc/include/wait.h b/include/wait.h
similarity index 100%
rename from BaS_gcc/include/wait.h
rename to include/wait.h
diff --git a/BaS_gcc/include/x86debug.h b/include/x86debug.h
similarity index 100%
rename from BaS_gcc/include/x86debug.h
rename to include/x86debug.h
diff --git a/BaS_gcc/include/x86decode.h b/include/x86decode.h
similarity index 100%
rename from BaS_gcc/include/x86decode.h
rename to include/x86decode.h
diff --git a/BaS_gcc/include/x86emu.h b/include/x86emu.h
similarity index 100%
rename from BaS_gcc/include/x86emu.h
rename to include/x86emu.h
diff --git a/BaS_gcc/include/x86emui.h b/include/x86emui.h
similarity index 100%
rename from BaS_gcc/include/x86emui.h
rename to include/x86emui.h
diff --git a/BaS_gcc/include/x86fpu.h b/include/x86fpu.h
similarity index 100%
rename from BaS_gcc/include/x86fpu.h
rename to include/x86fpu.h
diff --git a/BaS_gcc/include/x86fpu_regs.h b/include/x86fpu_regs.h
similarity index 100%
rename from BaS_gcc/include/x86fpu_regs.h
rename to include/x86fpu_regs.h
diff --git a/BaS_gcc/include/x86ops.h b/include/x86ops.h
similarity index 100%
rename from BaS_gcc/include/x86ops.h
rename to include/x86ops.h
diff --git a/BaS_gcc/include/x86pcibios.h b/include/x86pcibios.h
similarity index 100%
rename from BaS_gcc/include/x86pcibios.h
rename to include/x86pcibios.h
diff --git a/BaS_gcc/include/x86prim_asm.h b/include/x86prim_asm.h
similarity index 100%
rename from BaS_gcc/include/x86prim_asm.h
rename to include/x86prim_asm.h
diff --git a/BaS_gcc/include/x86prim_ops.h b/include/x86prim_ops.h
similarity index 100%
rename from BaS_gcc/include/x86prim_ops.h
rename to include/x86prim_ops.h
diff --git a/BaS_gcc/include/x86regs.h b/include/x86regs.h
similarity index 100%
rename from BaS_gcc/include/x86regs.h
rename to include/x86regs.h
diff --git a/BaS_gcc/include/xhdi_sd.h b/include/xhdi_sd.h
similarity index 100%
rename from BaS_gcc/include/xhdi_sd.h
rename to include/xhdi_sd.h
diff --git a/BaS_gcc/kbd/ikbd.c b/kbd/ikbd.c
similarity index 100%
rename from BaS_gcc/kbd/ikbd.c
rename to kbd/ikbd.c
diff --git a/BaS_gcc/mcf5474.gdb b/mcf5474.gdb
similarity index 98%
rename from BaS_gcc/mcf5474.gdb
rename to mcf5474.gdb
index 08d77f3..976da57 100644
--- a/BaS_gcc/mcf5474.gdb
+++ b/mcf5474.gdb
@@ -65,7 +65,7 @@ define run
continue
end
-tbtr
+tr
ib
add-symbol-file ../emutos/emutos2.img 0xe00000
-#load firebee/ram.elf
+load firebee/ram.elf
diff --git a/BaS_gcc/net/am79c874.c b/net/am79c874.c
similarity index 100%
rename from BaS_gcc/net/am79c874.c
rename to net/am79c874.c
diff --git a/BaS_gcc/net/arp.c b/net/arp.c
similarity index 100%
rename from BaS_gcc/net/arp.c
rename to net/arp.c
diff --git a/BaS_gcc/net/bcm5222.c b/net/bcm5222.c
similarity index 100%
rename from BaS_gcc/net/bcm5222.c
rename to net/bcm5222.c
diff --git a/BaS_gcc/net/bootp.c b/net/bootp.c
similarity index 100%
rename from BaS_gcc/net/bootp.c
rename to net/bootp.c
diff --git a/BaS_gcc/net/fec.c b/net/fec.c
similarity index 100%
rename from BaS_gcc/net/fec.c
rename to net/fec.c
diff --git a/BaS_gcc/net/fecbd.c b/net/fecbd.c
similarity index 100%
rename from BaS_gcc/net/fecbd.c
rename to net/fecbd.c
diff --git a/BaS_gcc/net/ip.c b/net/ip.c
similarity index 100%
rename from BaS_gcc/net/ip.c
rename to net/ip.c
diff --git a/BaS_gcc/net/nbuf.c b/net/nbuf.c
similarity index 100%
rename from BaS_gcc/net/nbuf.c
rename to net/nbuf.c
diff --git a/BaS_gcc/net/net_timer.c b/net/net_timer.c
similarity index 100%
rename from BaS_gcc/net/net_timer.c
rename to net/net_timer.c
diff --git a/BaS_gcc/net/nif.c b/net/nif.c
similarity index 100%
rename from BaS_gcc/net/nif.c
rename to net/nif.c
diff --git a/BaS_gcc/net/queue.c b/net/queue.c
similarity index 100%
rename from BaS_gcc/net/queue.c
rename to net/queue.c
diff --git a/BaS_gcc/net/tftp.c b/net/tftp.c
similarity index 100%
rename from BaS_gcc/net/tftp.c
rename to net/tftp.c
diff --git a/BaS_gcc/net/udp.c b/net/udp.c
similarity index 100%
rename from BaS_gcc/net/udp.c
rename to net/udp.c
diff --git a/BaS_gcc/nutil/s19header.c b/nutil/s19header.c
similarity index 100%
rename from BaS_gcc/nutil/s19header.c
rename to nutil/s19header.c
diff --git a/BaS_gcc/pci/ehci-hcd.c b/pci/ehci-hcd.c
similarity index 100%
rename from BaS_gcc/pci/ehci-hcd.c
rename to pci/ehci-hcd.c
diff --git a/BaS_gcc/pci/ohci-hcd.c b/pci/ohci-hcd.c
similarity index 100%
rename from BaS_gcc/pci/ohci-hcd.c
rename to pci/ohci-hcd.c
diff --git a/BaS_gcc/pci/pci.c b/pci/pci.c
similarity index 100%
rename from BaS_gcc/pci/pci.c
rename to pci/pci.c
diff --git a/BaS_gcc/pci/pci_wrappers.S b/pci/pci_wrappers.S
similarity index 100%
rename from BaS_gcc/pci/pci_wrappers.S
rename to pci/pci_wrappers.S
diff --git a/BaS_gcc/radeon/radeon_accel.c b/radeon/radeon_accel.c
similarity index 100%
rename from BaS_gcc/radeon/radeon_accel.c
rename to radeon/radeon_accel.c
diff --git a/BaS_gcc/radeon/radeon_base.c b/radeon/radeon_base.c
similarity index 100%
rename from BaS_gcc/radeon/radeon_base.c
rename to radeon/radeon_base.c
diff --git a/BaS_gcc/radeon/radeon_cursor.c b/radeon/radeon_cursor.c
similarity index 100%
rename from BaS_gcc/radeon/radeon_cursor.c
rename to radeon/radeon_cursor.c
diff --git a/BaS_gcc/radeon/radeon_monitor.c b/radeon/radeon_monitor.c
similarity index 100%
rename from BaS_gcc/radeon/radeon_monitor.c
rename to radeon/radeon_monitor.c
diff --git a/BaS_gcc/spi/dspi.c b/spi/dspi.c
similarity index 100%
rename from BaS_gcc/spi/dspi.c
rename to spi/dspi.c
diff --git a/BaS_gcc/spi/mmc.c b/spi/mmc.c
similarity index 100%
rename from BaS_gcc/spi/mmc.c
rename to spi/mmc.c
diff --git a/BaS_gcc/spi/sd_card.c b/spi/sd_card.c
similarity index 100%
rename from BaS_gcc/spi/sd_card.c
rename to spi/sd_card.c
diff --git a/BaS_gcc/sys/BaS.c b/sys/BaS.c
similarity index 83%
rename from BaS_gcc/sys/BaS.c
rename to sys/BaS.c
index 3a0c58d..eaed504 100644
--- a/BaS_gcc/sys/BaS.c
+++ b/sys/BaS.c
@@ -195,13 +195,13 @@ void acia_init()
{
xprintf("init ACIA: ");
/* init ACIA */
- KBD_ACIA_CONTROL = 3; /* master reset */
+ KBD_ACIA_CONTROL = 3; /* master reset */
NOP();
- MIDI_ACIA_CONTROL = 3; /* master reset */
+ MIDI_ACIA_CONTROL = 3; /* master reset */
NOP();
- KBD_ACIA_CONTROL = 0x96; /* clock div = 64, 8N1, RTS low, TX int disable, RX int enable */
+ KBD_ACIA_CONTROL = 0x96; /* clock div = 64, 8N1, RTS low, TX int disable, RX int enable */
NOP();
MFP_INTR_IN_SERVICE_A = 0xff;
@@ -217,7 +217,7 @@ void enable_coldfire_interrupts()
{
xprintf("enable interrupts: ");
#if defined(MACHINE_FIREBEE)
- FBEE_INTR_CONTROL = 0L; /* disable all interrupts */
+ FBEE_INTR_CONTROL = 0L; /* disable all interrupts */
#endif /* MACHINE_FIREBEE */
MCF_EPORT_EPPAR = 0xaaa8; /* all interrupts on falling edge */
@@ -237,7 +237,7 @@ void enable_coldfire_interrupts()
MCF_EPORT_EPIER = 0xfe; /* int 1-7 on */
MCF_EPORT_EPFR = 0xff; /* clear all pending interrupts */
MCF_INTC_IMRL = 0xffffff00; /* int 1-7 on */
- //MCF_INTC_IMRH = 0xbffffffe; /* psc3 and timer 0 int on */
+ //MCF_INTC_IMRH = 0xbffffffe; /* psc3 and timer 0 int on */
MCF_INTC_IMRH = 0;
FBEE_INTR_ENABLE = FBEE_INTR_INT_IRQ7 | /* enable pseudo bus error */
FBEE_INTR_INT_MFP_IRQ6 | /* enable MFP interrupts */
@@ -255,7 +255,7 @@ void enable_coldfire_interrupts()
void disable_coldfire_interrupts()
{
#if defined(MACHINE_FIREBEE)
- FBEE_INTR_ENABLE = 0; /* disable all interrupts */
+ FBEE_INTR_ENABLE = 0; /* disable all interrupts */
#endif /* MACHINE_FIREBEE */
MCF_EPORT_EPIER = 0x0;
@@ -270,36 +270,19 @@ NIF nif1;
NIF nif2;
#endif
-bool spurious_interrupt_handler(void *arg1, void *arg2)
-{
- dbg("IMRH=%lx, IMRL=%lx\r\n", MCF_INTC_IMRH, MCF_INTC_IMRL);
- dbg("IPRH=%lx, IPRL=%lx\r\n", MCF_INTC_IPRH, MCF_INTC_IPRL);
- dbg("IRLR=%x\r\n", MCF_INTC_IRLR);
-
- return true;
-}
-
/*
* initialize the interrupt handler tables to dispatch interrupt requests from Coldfire devices
*/
void init_isr(void)
{
- isr_init(); /* need to call that explicitely, otherwise isr table might be full */
-
- /*
- * register spurious interrupt handler
- */
- if (!isr_register_handler(24, 6, 6, spurious_interrupt_handler, NULL, NULL))
- {
- dbg("unable to register spurious interrupt handler\r\n");
- }
+ isr_init(); /* need to call that explicitely, otherwise isr table might be full */
/*
* register the FEC interrupt handler
*/
if (!isr_register_handler(64 + INT_SOURCE_FEC0, 5, 1, fec0_interrupt_handler, NULL, (void *) &nif1))
{
- dbg("unable to register isr for FEC0\r\n");
+ err("unable to register isr for FEC0\r\n");
}
/*
@@ -308,7 +291,7 @@ void init_isr(void)
if (!isr_register_handler(64 + INT_SOURCE_DMA, 5, 3, dma_interrupt_handler, NULL, NULL))
{
- dbg("unable to register isr for DMA\r\n");
+ err("unable to register isr for DMA\r\n");
}
#ifdef MACHINE_FIREBEE
@@ -317,7 +300,7 @@ void init_isr(void)
*/
if (!isr_register_handler(64 + INT_SOURCE_GPT0, 5, 2, gpt0_interrupt_handler, NULL, NULL))
{
- dbg("unable to register isr for GPT0 timer\r\n");
+ err("unable to register isr for GPT0 timer\r\n");
}
/*
@@ -325,7 +308,7 @@ void init_isr(void)
*/
if (!isr_register_handler(64 + INT_SOURCE_PSC3, 5, 5, pic_interrupt_handler, NULL, NULL))
{
- dbg("Error: unable to register ISR for PSC3\r\n");
+ err("Error: unable to register ISR for PSC3\r\n");
}
#endif /* MACHINE_FIREBEE */
@@ -334,20 +317,20 @@ void init_isr(void)
*/
if (!isr_register_handler(64 + INT_SOURCE_XLBPCI, 7, 0, xlbpci_interrupt_handler, NULL, NULL))
{
- dbg("Error: unable to register isr for XLB PCI interrupts\r\n");
+ err("Error: unable to register isr for XLB PCI interrupts\r\n");
}
- MCF_XLB_XARB_IMR = MCF_XLB_XARB_IMR_SEAE | /* slave error acknowledge interrupt */
- MCF_XLB_XARB_IMR_MME | /* multiple master at prio 0 interrupt */
- MCF_XLB_XARB_IMR_TTAE | /* TT address only interrupt */
- MCF_XLB_XARB_IMR_TTRE | /* TT reserved interrupt enable */
- MCF_XLB_XARB_IMR_ECWE | /* external control word interrupt */
- MCF_XLB_XARB_IMR_TTME | /* TBST/TSIZ mismatch interrupt */
- MCF_XLB_XARB_IMR_BAE; /* bus activity tenure timeout interrupt */
+ MCF_XLB_XARB_IMR = MCF_XLB_XARB_IMR_SEAE | /* slave error acknowledge interrupt */
+ MCF_XLB_XARB_IMR_MME | /* multiple master at prio 0 interrupt */
+ MCF_XLB_XARB_IMR_TTAE | /* TT address only interrupt */
+ MCF_XLB_XARB_IMR_TTRE | /* TT reserved interrupt enable */
+ MCF_XLB_XARB_IMR_ECWE | /* external control word interrupt */
+ MCF_XLB_XARB_IMR_TTME | /* TBST/TSIZ mismatch interrupt */
+ MCF_XLB_XARB_IMR_BAE; /* bus activity tenure timeout interrupt */
if (!isr_register_handler(64 + INT_SOURCE_PCIARB, 7, 1, pciarb_interrupt_handler, NULL, NULL))
{
- dbg("Error: unable to register isr for PCIARB interrupts\r\n");
+ err("Error: unable to register isr for PCIARB interrupts\r\n");
return;
}
@@ -390,7 +373,7 @@ void BaS(void)
NOP(); /* force pipeline sync */
xprintf("finished\r\n");
-#ifdef MACHINE_FIREBEE
+ #ifdef MACHINE_FIREBEE
xprintf("IDE reset: ");
/* IDE reset */
* (volatile uint8_t *) (0xffff8802 - 2) = 14;
@@ -459,10 +442,7 @@ void BaS(void)
init_isr();
enable_coldfire_interrupts();
- MCF_INTC_IMRH = 0;
- MCF_INTC_IMRL = 0;
dma_irq_enable();
- fec_irq_enable(0, 5, 1);
init_pci();
// video_init();
diff --git a/BaS_gcc/sys/cache.c b/sys/cache.c
similarity index 100%
rename from BaS_gcc/sys/cache.c
rename to sys/cache.c
diff --git a/BaS_gcc/sys/driver_mem.c b/sys/driver_mem.c
similarity index 100%
rename from BaS_gcc/sys/driver_mem.c
rename to sys/driver_mem.c
diff --git a/sys/exceptions.S b/sys/exceptions.S
new file mode 100644
index 0000000..3cb88d7
--- /dev/null
+++ b/sys/exceptions.S
@@ -0,0 +1,585 @@
+/*
+ * initialize exception vectors
+ *
+ * This file is part of BaS_gcc.
+ *
+ * BaS_gcc is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * BaS_gcc is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with BaS_gcc. If not, see .
+ *
+ * Created on: 26.02.2013
+ * Author: Markus Fröschle
+ */
+
+#include "startcf.h"
+#if MACHINE_FIREBEE
+#include "firebee.h"
+#elif MACHINE_M5484LITE
+#include "m5484l.h"
+#endif /* MACHINE_FIREBEE */
+
+ .extern __SUP_SP
+ .extern _rom_entry
+ .extern __RAMBAR0
+ .extern _rt_mod
+ .extern _rt_ssp
+ .extern _rt_usp
+ .extern _rt_vbr
+ .extern _mmutr_miss
+ .extern __MBAR
+ .extern __MMUBAR
+ .extern _video_tlb
+ .extern _video_sbt
+ .extern _flush_and_invalidate_caches
+ .extern _get_bas_drivers
+
+ /* PCI interrupt handlers */
+ .extern _irq5_handler
+ .extern _irq6_handler
+ .extern _irq7_handler
+
+ .global _vec_init
+ .global _std_exc_vec /* needed by driver_vec.c */
+
+/* Register read/write equates */
+
+ /* MMU */
+ .equ MCF_MMU_MMUCR, __MMUBAR
+ .equ MCF_MMU_MMUOR, __MMUBAR+0x04
+ .equ MCF_MMU_MMUSR, __MMUBAR+0x08
+ .equ MCF_MMU_MMUAR, __MMUBAR+0x10
+ .equ MCF_MMU_MMUTR, __MMUBAR+0x14
+ .equ MCF_MMU_MMUDR, __MMUBAR+0x18
+
+ /* EPORT flag register */
+ .equ MCF_EPORT_EPFR, __MBAR+0xf0c
+
+ /* FEC1 port output data direction register */
+ .equ MCF_GPIO_PODR_FEC1L, __MBAR+0xa07
+
+ /* PSC0 transmit buffer register */
+ .equ MCF_PSC0_PSCTB_8BIT, __MBAR+0x860c
+
+ /* GPT mode select register */
+ .equ MCF_GPT0_GMS, __MBAR+0x800
+
+ /* Slice timer 0 count register */
+ .equ MCF_SLT0_SCNT, __MBAR+0x908
+
+ // interrupt sources
+ .equ INT_SOURCE_EPORT_EPF1,1 // edge port flag 1
+ .equ INT_SOURCE_EPORT_EPF2,2 // edge port flag 2
+ .equ INT_SOURCE_EPORT_EPF3,3 // edge port flag 3
+ .equ INT_SOURCE_EPORT_EPF4,4 // edge port flag 4
+ .equ INT_SOURCE_EPORT_EPF5,5 // edge port flag 5
+ .equ INT_SOURCE_EPORT_EPF6,6 // edge port flag 6
+ .equ INT_SOURCE_EPORT_EPF7,7 // edge port flag 7
+ .equ INT_SOURCE_USB_EP0ISR,15 // USB endpoint 0 interrupt
+ .equ INT_SOURCE_USB_EP1ISR,16 // USB endpoint 1 interrupt
+ .equ INT_SOURCE_USB_EP2ISR,17 // USB endpoint 2 interrupt
+ .equ INT_SOURCE_USB_EP3ISR,18 // USB endpoint 3 interrupt
+ .equ INT_SOURCE_USB_EP4ISR,19 // USB endpoint 4 interrupt
+ .equ INT_SOURCE_USB_EP5ISR,20 // USB endpoint 5 interrupt
+ .equ INT_SOURCE_USB_EP6ISR,21 // USB endpoint 6 interrupt
+ .equ INT_SOURCE_USB_USBISR,22 // USB general interrupt
+ .equ INT_SOURCE_USB_USBAISR,23 // USB core interrupt
+ .equ INT_SOURCE_USB_ANY,24 // OR of all USB interrupts
+ .equ INT_SOURCE_USB_DSPI_OVF,25 // DSPI overflow or underflow
+ .equ INT_SOURCE_USB_DSPI_RFOF,26 // receive FIFO overflow interrupt
+ .equ INT_SOURCE_USB_DSPI_RFDF,27 // receive FIFO drain interrupt
+ .equ INT_SOURCE_USB_DSPI_TFUF,28 // transmit FIFO underflow interrupt
+ .equ INT_SOURCE_USB_DSPI_TCF,29 // transfer complete interrupt
+ .equ INT_SOURCE_USB_DSPI_TFFF,30 // transfer FIFO fill interrupt
+ .equ INT_SOURCE_USB_DSPI_EOQF,31 // end of queue interrupt
+ .equ INT_SOURCE_PSC3,32 // PSC3 interrupt
+ .equ INT_SOURCE_PSC2,33 // PSC2 interrupt
+ .equ INT_SOURCE_PSC1,34 // PSC1 interrupt
+ .equ INT_SOURCE_PSC0,35 // PSC0 interrupt
+ .equ INT_SOURCE_CTIMERS,36 // combined source for comm timers
+ .equ INT_SOURCE_SEC,37 // SEC interrupt
+ .equ INT_SOURCE_FEC1,38 // FEC1 interrupt
+ .equ INT_SOURCE_FEC0,39 // FEC0 interrupt
+ .equ INT_SOURCE_I2C,40 // I2C interrupt
+ .equ INT_SOURCE_PCIARB,41 // PCI arbiter interrupt
+ .equ INT_SOURCE_CBPCI,42 // COMM bus PCI interrupt
+ .equ INT_SOURCE_XLBPCI,43 // XLB PCI interrupt
+ .equ INT_SOURCE_XLBARB,47 // XLBARB to PCI interrupt
+ .equ INT_SOURCE_DMA,48 // multichannel DMA interrupt
+ .equ INT_SOURCE_CAN0_ERROR,49 // FlexCAN error interrupt
+ .equ INT_SOURCE_CAN0_BUSOFF,50 // FlexCAN bus off interrupt
+ .equ INT_SOURCE_CAN0_MBOR,51 // message buffer ORed interrupt
+ .equ INT_SOURCE_SLT1,53 // slice timer 1 interrupt
+ .equ INT_SOURCE_SLT0,54 // slice timer 0 interrupt
+ .equ INT_SOURCE_CAN1_ERROR,55 // FlexCAN error interrupt
+ .equ INT_SOURCE_CAN1_BUSOFF,56 // FlexCAN bus off interrupt
+ .equ INT_SOURCE_CAN1_MBOR,57 // message buffer ORed interrupt
+ .equ INT_SOURCE_GPT3,59 // GPT3 timer interrupt
+ .equ INT_SOURCE_GPT2,60 // GPT2 timer interrupt
+ .equ INT_SOURCE_GPT1,61 // GPT1 timer interrupt
+ .equ INT_SOURCE_GPT0,62 // GPT0 timer interrupt
+
+// Atari register equates (provided by FPGA)
+ .equ vbasehi, 0xffff8201
+
+/*
+ * macros
+ */
+
+/*
+ * used for "forwarding" interrupt handlers. This just clears the "pending interrupt"
+ * flag from the EDGE PORT flag register, set the status register to the appropriate interrupt
+ * mask an jump through the corresponging vector
+ */
+ .macro irq vector,int_mask,clr_int
+ move.w #0x2700,sr // disable interrupt
+ subq.l #8,sp
+ movem.l d0/a5,(sp) // save registers
+
+ lea MCF_EPORT_EPFR,a5
+ move.b #\clr_int,(a5) // clear int pending
+
+ movem.l (sp),d0/a5 // restore registers
+ addq.l #8,sp
+ move.l \vector,-(sp)
+ move #0x2\int_mask\()00,sr
+ rts
+ .endm
+
+ .text
+_vec_init:
+ move.l a2,-(sp) // Backup registers
+
+ mov3q.l #-1,_rt_mod // rt_mod auf super
+ clr.l _rt_ssp
+ clr.l _rt_usp
+ clr.l _rt_vbr
+ move.l #__RAMBAR0,d0 // exception vectors reside in rambar0
+ movec d0,VBR
+ move.l d0,a0
+ move.l a0,a2
+
+/*
+ * first, set standard vector for all exceptions
+ */
+init_vec:
+ move.l #256,d0
+ lea std_exc_vec(pc),a1 // standard vector
+init_vec_loop:
+ move.l a1,(a2)+ // set standard vector for all exceptions
+ subq.l #1,d0
+ bne init_vec_loop
+
+ move.l #__SUP_SP,(a0) // set initial stack pointer at start of exception vector table
+
+ lea reset_vector(pc),a1 // set reset vector
+ move.l a1,0x04(a0)
+
+ lea access(pc),a1 // set illegal access exception handler
+ move.l a1,0x08(a0)
+
+// trap #0 (without any parameters for now) is used to provide BaS' driver addresses to the OS
+ lea _get_bas_drivers(pc),a1
+ move.l a1,0x80(a0) // trap #0 exception vector
+
+// MFP non-autovector interrupt handlers. Those are just rerouted to their autovector counterparts
+
+ lea irq1(pc),a1
+ move.l a1,0x104(a0)
+
+ lea irq2(pc),a1
+ move.l a1,0x108(a0)
+
+ lea irq3(pc),a1
+ move.l a1,0x10c(a0)
+
+ lea irq4(pc),a1
+ move.l a1,0x110(a0)
+
+ lea irq5(pc),a1
+ move.l a1,0x114(a0)
+
+ lea irq6(pc),a1
+ move.l a1,0x118(a0)
+
+ lea irq7(pc),a1
+ move.l a1,0x11c(a0)
+
+
+
+// install lowlevel_isr_handler for the three GPT timers
+ lea _lowlevel_isr_handler(pc),a1
+ move.l a1,(INT_SOURCE_GPT1 + 64) * 4(a0)
+ move.l a1,(INT_SOURCE_GPT2 + 64) * 4(a0)
+ move.l a1,(INT_SOURCE_GPT3 + 64) * 4(a0)
+
+// install lowlevel_isr_handler for the PSC3 interrupt
+ move.l a1,(INT_SOURCE_PSC3 + 64) * 4(a0)
+
+// install lowlevel_isr_handler for Coldfire DMA interrupts
+ move.l a1,(INT_SOURCE_DMA + 64) * 4(a0)
+
+// install lowlevel_isr_handler for the XLBPCI interrupt
+ move.l a1,(INT_SOURCE_XLBPCI + 64) * 4(a0)
+
+// install lowlevel_isr_handler for the FEC0 interrupt
+ move.l a1,(INT_SOURCE_FEC0 + 64) * 4(a0)
+
+#ifndef MACHINE_FIREBEE
+// FEC1 not wired on the FireBee (used for FPGA as GPIO), but available on other machines
+ move.l a1,(INT_SOURCE_FEC1 + 64) * 4(a0)
+#endif
+
+#ifdef MACHINE_FIREBEE
+
+// timer vectors (triggers when vbashi gets changed, used for video page copy)
+ move.l a1,(INT_SOURCE_GPT0 + 64) * 4(a0)
+#endif /* MACHINE_FIREBEE */
+
+ move.l (sp)+,a2 // Restore registers
+ rts
+
+
+/*
+ * exception vector routines
+ */
+vector_table_start:
+std_exc_vec:
+_std_exc_vec:
+ //move.w #0x2700,sr // disable interrupt
+ subq.l #8,sp
+ movem.l d0/a5,(sp) // save registers
+ move.w 8(sp),d0 // fetch vector
+ and.l #0x3fc,d0 // mask out vector number
+
+#ifdef DBG_EXC
+ // printout vector number of exception
+
+ lea -4 * 4(sp),sp // reserve stack space
+ movem.l d0-d1/a0-a1,(sp) // save gcc scratch registers
+
+ lsr.l #2,d0 // shift vector number in place
+ cmp.l #33,d0
+ beq noprint
+ cmp.l #34,d0
+ beq n oprint
+ cmp.l #45,d0
+ beq noprint
+ cmp.l #46,d0
+ beq noprint
+ move.l 4 * 4 + 8 + 4(sp),-(sp) // pc at exception
+ move.l d0,-(sp) // provide it to xprintf()
+ pea exception_text
+ jsr _xprintf // call xprintf()
+ add.l #3*4,sp // adjust stack
+noprint:
+
+ movem.l (sp),d0-d1/a0-a1 // restore registers
+ lea 4 * 4(sp),sp
+#endif /* DBG_EXC */
+
+ add.l _rt_vbr,d0 // + VBR
+ move.l d0,a5
+ move.l (a5),d0 // fetch exception routine address
+
+ move.l 4(sp),a5 // restore a5
+ move.l d0,4(sp) // store exception routine address
+
+ // FIXME: not clear why we would need the following?
+ //move.w 10(sp),d0 // restore original SR
+ //bset #13,d0 // set supervisor bit
+ //move.w d0,sr //
+ move.l (sp)+,d0 // restore d0
+ rts // jump to exception handler
+
+exception_text:
+ .ascii "DEBUG: EXCEPTION %d caught at %p"
+ .byte 13, 10, 0
+ .align 4
+
+reset_vector:
+ move.w #0x2700,sr // disable interrupts
+ move.l #0x31415926,d0
+ cmp.l 0x426,d0 // _resvalid: reset vector valid?
+ beq std_exc_vec // yes->
+ jmp _rom_entry // no, cold start machine
+
+access:
+ move.w #0x2700,sr // disable interrupts
+
+ link a6,#-4 * 4 // make room for gcc scratch registers
+ movem.l d0-d1/a0-a1,(sp) // save them
+
+ move.l 4(a6),-(sp) // push format_status
+ move.l 8(a6),-(sp) // pc at exception
+ move.l MCF_MMU_MMUAR,-(sp) // MMU fault address
+ move.l MCF_MMU_MMUSR,-(sp) // MMU status regisrter
+ move.w #0x2300,sr // can lower interrupt mask now that MMU status is safe
+ jsr _mmutr_miss // call C routine
+ lea 4 * 4(sp),sp // adjust stack
+
+ tst.l d0 // exception handler signals bus error
+ bne bus_error
+
+ movem.l (sp),d0-d1/a0-a1 // restore registers
+ unlk a6
+ rte
+
+bus_error:
+ movem.l (sp),d0-d1/a0-a1 // restore registers
+ unlk a6
+ bra std_exc_vec // FIXME: this seems to be bogous...
+
+zero_divide:
+ move.w #0x2700,sr // disable interrupt
+ move.l a0,-(sp)
+ move.l d0,-(sp)
+ move.l 12(sp),a0 // pc
+ move.w (a0)+,d0 // command word
+ btst #7,d0 // long?
+ beq zd_word // nein->
+ addq.l #2,a0
+
+zd_word:
+ and.l 0x3f,d0 // mask out ea field
+ cmp.w #0x08,d0 // -(ax) or less?
+ ble zd_end
+ addq.l #2,a0
+ cmp.w #0x39,d0 // xxx.L
+ bne zd_nal
+ addq.l #2,a0
+ bra zd_end
+
+zd_nal: cmp.w #0x3c,d0 // immediate?
+ bne zd_end // no->
+ btst #7,d0 // long?
+ beq zd_end // no
+ addq.l #2,a0
+zd_end:
+ move.l a0,12(sp)
+ move.l (sp)+,d0
+ move.l (sp)+,a0
+ rte
+
+#ifdef _NOT_USED_
+linea:
+ move.w #0x2700,sr // disable interrupt
+ halt
+ nop
+ nop
+linef:
+ move.w #0x2700,sr // disable interrupt
+ halt
+ nop
+ nop
+format:
+ move.w #0x2700,sr // disable interrupt
+ halt
+ nop
+ nop
+
+//floating point
+flpoow:
+ move.w #0x2700,sr // disable interrupt
+ halt
+ nop
+ nop
+#endif /* _NOT_USED */
+
+
+irq1: irq 0x64, 1, 0x02 // Level 1 autovector interrupt (unused)
+irq2: irq 0x68, 2, 0x04 // Level 2 autovector interrupt (horizontal blank)
+irq3: irq 0x6c, 3, 0x08 // Level 3 autovector interrupt (unused)
+irq4: irq 0x70, 4, 0x10 // Level 4 autovector interrupt (vertical blank)
+
+
+
+#if defined(MACHINE_FIREBEE) /* these handlers are only meaningful for the Firebee */
+irq5: //move.w #0x2700,sr // disable interrupts
+ subq.l #4,sp // extra space
+
+ link a6,#-4 * 4 // save gcc scratch registers
+ movem.l d0-d1/a0-a1,(sp)
+
+ jsr _irq5_handler // call C handler routine
+
+ tst.b d0 // handled?
+ beq irq5_forward
+
+ movem.l (sp),d0-d1/a0-a1 // restore registers
+ unlk a6
+ addq.l #4,sp
+
+ rte // return from exception
+
+irq5_forward: move.l 0x74,a0 // fetch OS irq5 vector
+ add.l _rt_vbr,a0 // add runtime vbr
+ move.l a0,4(a6) // put on stack
+
+ movem.l (sp),d0-d1/a0-a1 // restore registers
+ unlk a6 //
+ move.w #0x2500,sr // set interrupt level
+ rts // jump through vector
+
+/*
+ * irq6 needs special treatment since - because the Coldfire only supports autovector interrupts
+ * - the exception vector is provided by the simulated MFP from the FPGA
+ */
+irq6: //move.w #0x2700,sr // disable interrupt
+ subq.l #4,sp // extra space
+
+ link a6,#-4 * 4 // save gcc scratch registers
+ movem.l d0-d1/a0-a1,(sp)
+
+ move.l 8(a6),-(sp) // format status word
+ move.l 12(a6),-(sp) // pc at exception
+ jsr _irq6_handler // call C handler
+ lea 8(sp),sp // fix stack
+
+ tst.b d0 // interrupt handled?
+ beq irq6_forward // no, forward to TOS
+
+ movem.l (sp),d0-d1/a0-a1 // restore registers
+ unlk a6
+ addq.l #4,sp // "extra space" not needed in this case
+ rte
+
+irq6_forward:
+ move.l 0xf0020000,a0 // fetch "MFP interrupt vector" from FPGA
+ add.l _rt_vbr,a0 // add runtime VBR
+ move.l (a0),4(a6) // fetch handler address and put it on "extra space"
+
+ movem.l (sp),d0-d1/a0-a1
+ unlk a6
+ move.w #0x2600,sr // set interrupt mask to MFP level
+
+ rts // jump through vector
+
+/*
+ * irq 7 = pseudo bus error
+ */
+irq7:
+ lea -12(sp),sp
+ movem.l d0/a0,(sp)
+
+ move.l __RAMBAR0+0x008,a0 // real access error handler
+ move.l a0,8(sp) // this will be the return address for rts
+
+ move.w 12(sp),d0 // format/vector word
+ andi.l #0xf000,d0 // keep only the format
+ ori.l #2*4,d0 // simulate vector #2, no fault
+ move.w d0,12(sp)
+
+ // TODO: Inside an interrupt handler, 16(sp) is the return address.
+ // For an Access Error, it should be the address of the fault instruction instead
+
+ lea MCF_EPORT_EPFR,a0
+ bset #7,(a0) // clear int 7
+
+ move.l (sp)+,d0 // restore registers
+ move.l (sp)+,a0
+ rts // Forward to the Access Error handler
+
+#else // handlers for M5484LITE
+
+irq5: // irq5 is tied to PCI INTC# and PCI INTD# on the M5484LITE
+ //move.w #0x2700,sr // disable interrupts
+
+ lea -4*4(sp),sp // save gcc scratch registers
+ movem.l d0-d1/a0-a1,(sp)
+
+ jsr _irq5_handler // call C handler routine
+
+ movem.l (sp),d0-d1/a0-a1 // restore registers
+ lea 4*4(sp),sp
+
+ rte // return from exception
+
+irq5text:
+ .ascii "IRQ5!"
+ .dc.b 13,10,0
+
+irq6:
+ irq 0x74,5,0x20
+
+irq7: // irq7 is tied to PCI INTA# and PCI INTB# on the M5484LITE
+
+ //move.w #0x2700,sr // disable interrupts
+
+ lea -4*4(sp),sp // save gcc scratch registers
+ movem.l d0-d1/a0-a1,(sp)
+
+ jsr _irq7_handler // call C handler routine
+
+ movem.l (sp),d0-d1/a0-a1 // restore registers
+ lea 4*4(sp),sp
+
+ rte // return from exception
+
+irq7text:
+ .data
+ .ascii "IRQ7!"
+ .dc.b 13,10,0
+ .text
+#endif /* MACHINE_FIREBEE */
+
+/*
+ * low-level interrupt service routine for routines registered with
+ * isr_register_handler(int vector). If the higlevel routine (isr_execute_handler())
+ * returns != true, the call is forwarded to the OS (through its own vector base).
+ */
+ .global _lowlevel_isr_handler
+ .extern _isr_execute_handler
+
+
+/*
+ * stack format (after link instruction) is like this:
+ *
+ * +12 program counter (return address)
+ * +8 format_status
+ * +4 save area for rts (if we need to jump through the OS vector)
+ * (a6) -> saved a6 (from link)
+ * -4
+ * -8
+ * -12
+ * (sp) -> gcc scratch registers save area
+ */
+_lowlevel_isr_handler:
+ subq.l #4,sp // extra space
+ link a6,#-4 * 4 // make room for
+ movem.l d0-d1/a0-a1,(sp) // gcc scratch registers and save them,
+ // other registers will be taken care of by gcc itself
+
+ move.w 8(a6),d0 // fetch vector number from stack
+ lsr.l #2,d0 // move it in place
+ andi.l #0xff,d0 // mask it out
+ move.l d0,-(sp) // push it
+ jsr _isr_execute_handler // call the C handler
+ addq.l #4,sp // adjust stack
+ tst.b d0 // handled?
+ beq lowlevel_forward // no, forward it to TOS
+
+ movem.l (sp),d0-d1/a0-a1 // restore registers
+ unlk a6
+ addq.l #4,sp // eliminate extra space
+
+ rte
+
+lowlevel_forward:
+ move.l 8(a6),d0 // fetch OS irq vector
+ lsr.l #2,d0 // move it in place
+ andi.l #0xff,d0 // mask out vector number
+ add.l _rt_vbr,d0 // add runtime vbr
+ move.l d0,4(a6) // put on stack as return address
+
+ movem.l (sp),d0-d1/a0-a1 // restore registers
+ unlk a6 //
+ rts // jump through vector
diff --git a/BaS_gcc/sys/fault_vectors.c b/sys/fault_vectors.c
similarity index 54%
rename from BaS_gcc/sys/fault_vectors.c
rename to sys/fault_vectors.c
index c4ad5de..8e8c552 100644
--- a/BaS_gcc/sys/fault_vectors.c
+++ b/sys/fault_vectors.c
@@ -52,134 +52,109 @@ void fault_handler(uint32_t pc, uint32_t format_status)
xprintf("fault_status: %x (", fault_status);
switch (fault_status)
{
- case 0:
- xprintf("not an access or address error nor an interrupted debug service routine");
- break;
-
- case 1:
- case 3:
- case 11:
- xprintf("reserved");
- break;
-
- case 2:
- xprintf("interrupt during a debug service routine for faults other than access errors");
- break;
-
- case 4:
- xprintf("error (for example, protection fault) on instruction fetch");
- break;
-
- case 5:
- xprintf("TLB miss on opword or instruction fetch");
- break;
-
- case 6:
- xprintf("TLB miss on extension word of instruction fetch");
- break;
-
- case 7:
- xprintf("IFP access error while executing in emulator mode");
- break;
-
- case 8:
- xprintf("error on data write");
- break;
-
- case 9:
- xprintf("error on attempted write to write-protected space");
- break;
-
- case 10:
- xprintf("TLB miss on data write");
- break;
-
- case 12:
- xprintf("error on data read");
- break;
-
- case 13:
- xprintf("attempted read, read-modify-write of protected space");
- break;
-
- case 14:
- xprintf("TLB miss on data read or read-modify-write");
- break;
-
- case 15:
- xprintf("OEP access error while executing in emulator mode");
+ case 0:
+ xprintf("not an access or address error nor an interrupted debug service routine");
+ break;
+ case 1:
+ case 3:
+ case 11:
+ xprintf("reserved");
+ break;
+ case 2:
+ xprintf("interrupt during a debug service routine for faults other than access errors");
+ break;
+ case 4:
+ xprintf("error (for example, protection fault) on instruction fetch");
+ break;
+ case 5:
+ xprintf("TLB miss on opword or instruction fetch");
+ break;
+ case 6:
+ xprintf("TLB miss on extension word of instruction fetch");
+ break;
+ case 7:
+ xprintf("IFP access error while executing in emulator mode");
+ break;
+ case 8:
+ xprintf("error on data write");
+ break;
+ case 9:
+ xprintf("error on attempted write to write-protected space");
+ break;
+ case 10:
+ xprintf("TLB miss on data write");
+ break;
+ case 12:
+ xprintf("error on data read");
+ break;
+ case 13:
+ xprintf("attempted read, read-modify-write of protected space");
+ break;
+ case 14:
+ xprintf("TLB miss on data read or read-modify-write");
+ break;
+ case 15:
+ xprintf("OEP access error while executing in emulator mode");
}
xprintf(")\r\n");
- xprintf("vector = %d (", vector);
+ xprintf("vector = %02x (", vector);
switch (vector)
{
- case 2:
- xprintf("access error");
- break;
-
- case 3:
- xprintf("address error");
- break;
-
- case 4:
- xprintf("illegal instruction");
- break;
-
- case 5:
- xprintf("divide by zero");
- break;
-
- case 8:
- xprintf("privilege violation");
- break;
-
- case 9:
- xprintf("trace");
- break;
-
- case 10:
- xprintf("unimplemented line-a opcode");
- break;
-
- case 11:
- xprintf("unimplemented line-f opcode");
- break;
-
- case 12:
- xprintf("non-PC breakpoint debug interrupt");
- break;
-
- case 13:
- xprintf("PC breakpoint debug interrupt");
- break;
-
- case 14:
- xprintf("format error");
- break;
-
- case 24:
- xprintf("spurious interrupt");
- break;
-
- default:
- if ( ((vector >= 6) && (vector <= 7)) ||
- ((vector >= 16) && (vector <= 23)))
- {
- xprintf("reserved");
- }
- else if ((vector >= 25) && (vector <= 31))
- {
- xprintf("level %d autovectored interrupt", fault_status - 24);
- }
- else if ((vector >= 32) && (vector <= 47))
- {
- xprintf("trap #%d", vector - 32);
- }
- else
- {
- xprintf("unknown vector\r\n");
- }
+ case 2:
+ xprintf("access error");
+ break;
+ case 3:
+ xprintf("address error");
+ break;
+ case 4:
+ xprintf("illegal instruction");
+ break;
+ case 5:
+ xprintf("divide by zero");
+ break;
+ case 8:
+ xprintf("privilege violation");
+ break;
+ case 9:
+ xprintf("trace");
+ break;
+ case 10:
+ xprintf("unimplemented line-a opcode");
+ break;
+ case 11:
+ xprintf("unimplemented line-f opcode");
+ break;
+ case 12:
+ xprintf("non-PC breakpoint debug interrupt");
+ break;
+ case 13:
+ xprintf("PC breakpoint debug interrupt");
+ break;
+ case 14:
+ xprintf("format error");
+ break;
+ case 24:
+ xprintf("spurious interrupt");
+ break;
+ default:
+ if ( ((vector >= 6) && (vector <= 7)) ||
+ ((vector >= 16) && (vector <= 23)))
+ {
+ xprintf("reserved");
+ }
+ else if ((vector >= 25) && (vector <= 31))
+ {
+ xprintf("level %d autovectored interrupt", fault_status - 24);
+ }
+ else if ((vector >= 32) && (vector <= 47))
+ {
+ xprintf("trap #%d", vector - 32);
+ }
+ else
+ {
+ xprintf("unknown vector\r\n");
+ }
}
xprintf(")\r\n");
xprintf("sr=%4x\r\n", sr);
diff --git a/BaS_gcc/sys/init_fpga.c b/sys/init_fpga.c
similarity index 100%
rename from BaS_gcc/sys/init_fpga.c
rename to sys/init_fpga.c
diff --git a/BaS_gcc/sys/interrupts.c b/sys/interrupts.c
similarity index 96%
rename from BaS_gcc/sys/interrupts.c
rename to sys/interrupts.c
index d8e328b..31b7cd2 100644
--- a/BaS_gcc/sys/interrupts.c
+++ b/sys/interrupts.c
@@ -117,7 +117,7 @@ bool isr_enable_int_source(int int_source)
}
else
{
- dbg("vector %d does not correspond to an internal interrupt source\r\n");
+ err("vector %d does not correspond to an internal interrupt source\r\n");
return false;
}
@@ -165,13 +165,13 @@ bool isr_register_handler(int vector, int level, int priority, bool (*handler)(v
if (!isr_enable_int_source(int_source))
{
- dbg("failed to enable internal interrupt souce %d in IMRL/IMRH\r\n", int_source);
+ err("failed to enable internal interrupt souce %d in IMRL/IMRH\r\n", int_source);
return false;
}
if (!isr_set_prio_and_level(int_source, priority, level))
{
- dbg("failed to set priority and level for interrupt source %d\r\n", int_source);
+ err("failed to set priority and level for interrupt source %d\r\n", int_source);
return false;
}
@@ -345,6 +345,14 @@ bool irq5_handler(void *arg1, void *arg2)
FBEE_INTR_CLEAR = FBEE_INTR_DSP;
}
+ if (pending_interrupts & FBEE_INTR_VSYNC || pending_interrupts & FBEE_INTR_HSYNC)
+ {
+ dbg("vsync or hsync interrupt!\r\n");
+ FBEE_INTR_CLEAR = FBEE_INTR_VSYNC | FBEE_INTR_HSYNC;
+ /* hsync and vsync should go to TOS unhandled */
+ return false;
+ }
+
MCF_EPORT_EPFR |= (1 << 5); /* clear interrupt from edge port */
return true;
diff --git a/BaS_gcc/sys/mmu.c b/sys/mmu.c
similarity index 97%
rename from BaS_gcc/sys/mmu.c
rename to sys/mmu.c
index 34d2849..859a15a 100644
--- a/BaS_gcc/sys/mmu.c
+++ b/sys/mmu.c
@@ -229,6 +229,8 @@ static struct virt_to_phys translation[] =
{ 0x00000000, 0x00e00000, 0x00000000 }, /* map first 14 MByte to first 14 Mb of SD ram */
{ 0x00e00000, 0x00100000, 0x00000000 }, /* map TOS to SDRAM */
{ 0x01000000, 0x04000000, 0x00000000 }, /* map rest of ram virt = phys */
+ { 0x60000000, 0x10000000, 0x00000000 }, /* map CPLD CF card I/O area */
+
};
#elif defined(MACHINE_M54455)
/* FIXME: this is not determined yet! */
@@ -526,15 +528,17 @@ void mmu_init(void)
if (addr >= 0x60000000UL && addr < 0x70000000UL) /* Compact Flash on the m5484lite */
{
pages[i].cache_mode = CACHE_NOCACHE_PRECISE;
- pages[i].supervisor_protect = 0;
+ pages[i].execute = 0;
pages[i].read = 1;
pages[i].write = 1;
- pages[i].execute = 1;
+ pages[i].execute = 0;
pages[i].global = 1;
+ pages[i].supervisor_protect = 1;
}
else if (addr >= 0x0UL && addr < 0x00e00000UL) /* ST-RAM, potential video memory */
{
pages[i].cache_mode = CACHE_WRITETHROUGH;
+ pages[i].execute = 1;
pages[i].supervisor_protect = 0;
pages[i].read = 1;
pages[i].write = 1;
@@ -690,6 +694,23 @@ void mmu_init(void)
/* 0x00000000 - 0x00100000 (first MB of physical memory) locked virt = phys */
mmu_map_page(0x0, 0x0, MMU_PAGE_SIZE_1M, 0, &flags);
+#ifdef _NOT_USED_
+#if defined(MACHINE_FIREBEE)
+ /*
+ * 0x00d00000 - 0x00e00000 (last megabyte of ST RAM = Falcon video memory) locked ID = 6
+ * mapped to physical address 0x60d0'0000 (FPGA video memory)
+ * video RAM: read write execute normal write true
+ */
+ flags.cache_mode = CACHE_WRITETHROUGH;
+ flags.supervisor_protect = 0;
+ flags.read = 1;
+ flags.write = 1;
+ flags.execute = 1;
+ flags.locked = true;
+ mmu_map_page(0x00d00000, 0x60d00000, MMU_PAGE_SIZE_1M, SCA_PAGE_ID, &flags);
+#endif /* MACHINE_FIREBEE */
+#endif
+
/*
* Make the TOS (in SDRAM) read-only
* This maps virtual 0x00e0'0000 - 0x00ef'ffff to the same virtual address
@@ -714,17 +735,6 @@ void mmu_init(void)
flags.execute = 0;
flags.locked = 1;
mmu_map_page(0x00f00000, 0xfff00000, MMU_PAGE_SIZE_1M, 0, &flags);
-#elif defined(MACHINE_M5484LITE)
- /*
- * Map m5484LITE CPLD access
- */
- flags.cache_mode = CACHE_NOCACHE_PRECISE;
- flags.supervisor_protect = 1;
- flags.read = 1;
- flags.write = 1;
- flags.execute = 0;
- flags.locked = 1;
- mmu_map_page(0x6a000000, 0x6a000000, MMU_PAGE_SIZE_1M, 0, &flags);
#endif /* MACHINE_FIREBEE */
/*
@@ -753,11 +763,12 @@ void mmu_init(void)
}
-uint32_t mmutr_miss(uint32_t mmu_sr, uint32_t fault_address, uint32_t pc, uint32_t format_status)
+uint32_t mmutr_miss(uint32_t mmu_sr, uint32_t fault_address, uint32_t pc,
+ uint32_t format_status)
{
uint32_t fault = format_status & 0xc030000;
- //dbg("MMU TLB MISS accessing 0x%08x\r\nFS = 0x%08x\r\nPC = 0x%08x\r\n", fault_address, format_status, pc);
+ dbg("MMU TLB MISS accessing 0x%08x\r\nFS = 0x%08x\r\nPC = 0x%08x\r\n", fault_address, format_status, pc);
// flush_and_invalidate_caches();
switch (fault)
diff --git a/BaS_gcc/sys/startcf.S b/sys/startcf.S
similarity index 100%
rename from BaS_gcc/sys/startcf.S
rename to sys/startcf.S
diff --git a/BaS_gcc/sys/sysinit.c b/sys/sysinit.c
similarity index 94%
rename from BaS_gcc/sys/sysinit.c
rename to sys/sysinit.c
index 5f09984..d955c73 100644
--- a/BaS_gcc/sys/sysinit.c
+++ b/sys/sysinit.c
@@ -406,52 +406,43 @@ void init_fbcs()
xprintf("FlexBus chip select registers initialization: ");
/* Flash */
- MCF_FBCS0_CSAR = MCF_FBCS_CSAR_BA(BOOTFLASH_BASE_ADDRESS); /* flash base address */
- MCF_FBCS0_CSCR = MCF_FBCS_CSCR_PS_16 | /* 16 bit word access */
+ MCF_FBCS0_CSAR = BOOTFLASH_BASE_ADDRESS; /* flash base address */
+ MCF_FBCS0_CSCR = MCF_FBCS_CSCR_PS_16 | /* 16 bit word access */
MCF_FBCS_CSCR_WS(6)| /* 6 Waitstates */
MCF_FBCS_CSCR_AA |
MCF_FBCS_CSCR_ASET(1) |
- MCF_FBCS_CSCR_RDAH(1); /* chip errata SECF077 */
+ MCF_FBCS_CSCR_RDAH(1); /* chip errata SECF077 */
MCF_FBCS0_CSMR = BOOTFLASH_BAM |
MCF_FBCS_CSMR_V; /* enable */
-#if defined(MACHINE_FIREBEE) /* FBC setup for FireBee */
- MCF_FBCS1_CSAR = MCF_FBCS_CSAR_BA(0xFFF00000); /* ATARI I/O ADRESS */
+#if MACHINE_FIREBEE /* FBC setup for FireBee */
+ MCF_FBCS1_CSAR = 0xFFF00000; /* ATARI I/O ADRESS */
MCF_FBCS1_CSCR = MCF_FBCS_CSCR_PS_16 /* 16BIT PORT */
| MCF_FBCS_CSCR_WS(8) /* DEFAULT 8WS */
| MCF_FBCS_CSCR_AA; /* AA */
MCF_FBCS1_CSMR = MCF_FBCS_CSMR_BAM_1M | MCF_FBCS_CSMR_V;
- MCF_FBCS2_CSAR = MCF_FBCS_CSAR_BA(0xF0000000); /* Firebee new I/O address range */
+ MCF_FBCS2_CSAR = 0xF0000000; /* Firebee new I/O address range */
MCF_FBCS2_CSCR = MCF_FBCS_CSCR_PS_32 /* 32BIT PORT */
| MCF_FBCS_CSCR_WS(8) /* DEFAULT 4WS */
| MCF_FBCS_CSCR_AA; /* AA */
MCF_FBCS2_CSMR = (MCF_FBCS_CSMR_BAM_128M /* F000'0000-F7FF'FFFF */
| MCF_FBCS_CSMR_V);
- MCF_FBCS3_CSAR = MCF_FBCS_CSAR_BA(0xF8000000); /* Firebee new I/O address range */
+ MCF_FBCS3_CSAR = 0xF8000000; /* Firebee new I/O address range */
MCF_FBCS3_CSCR = MCF_FBCS_CSCR_PS_16 /* 16BIT PORT */
| MCF_FBCS_CSCR_AA; // AA
MCF_FBCS3_CSMR = (MCF_FBCS_CSMR_BAM_64M /* F800'0000-FBFF'FFFF */
| MCF_FBCS_CSMR_V);
- MCF_FBCS4_CSAR = MCF_FBCS_CSAR_BA(0x40000000); /* video ram area, FB_CS3 not used, decoded on FPGA */
+ MCF_FBCS4_CSAR = 0x40000000; /* video ram area, FB_CS3 not used, decoded on FPGA */
MCF_FBCS4_CSCR = MCF_FBCS_CSCR_PS_32 /* 32BIT PORT */
| MCF_FBCS_CSCR_BSTR /* burst read enable */
| MCF_FBCS_CSCR_BSTW; /* burst write enable */
MCF_FBCS4_CSMR = MCF_FBCS_CSMR_BAM_1G /* 4000'0000-7FFF'FFFF */
| MCF_FBCS_CSMR_V;
-
- /* disable FBCS5 on Firebee */
- MCF_FBCS5_CSAR = 0x0;
- MCF_FBCS5_CSCR = MCF_FBCS_CSCR_PS_8
- | MCF_FBCS_CSCR_BSTR
- | MCF_FBCS_CSCR_BSTW
- | MCF_FBCS_CSCR_RDAH(1); /* chip errata SECF077 */
- MCF_FBCS5_CSMR = MCF_FBCS_CSMR_BAM_1G;
- //| MCF_FBCS_CSMR_V;
-#elif defined(MACHINE_M5484LITE)
+#elif MACHINE_M5484LITE
/* disable other FBCS for now */
MCF_FBCS1_CSMR = 0;
MCF_FBCS2_CSMR = 0;
@@ -459,14 +450,25 @@ void init_fbcs()
MCF_FBCS4_CSMR = 0;
MCF_FBCS5_CSAR = MCF_FBCS_CSAR_BA(0x60000000);
- MCF_FBCS5_CSCR = MCF_FBCS_CSCR_PS_16 | /* CPLD access 16 bit wide */
- MCF_FBCS_CSCR_WS(32) | /* 32 wait states */
- MCF_FBCS_CSCR_ASET(1) | /* chip select on rising clock edge */
- MCF_FBCS_CSCR_AA; /* auto acknowledge */
- MCF_FBCS5_CSMR = MCF_FBCS_CSMR_BAM_256M | /* maps 0x60000000 to 0x68000000 */
- MCF_FBCS_CSMR_V;
+ MCF_FBCS5_CSCR = MCF_FBCS_CSCR_PS_16 /* CPLD access */
+ | MCF_FBCS_CSCR_WS(32)
+ | MCF_FBCS_CSCR_ASET(1)
+ | MCF_FBCS_CSCR_AA;
+ MCF_FBCS5_CSMR = MCF_FBCS_CSMR_BAM_256M
+ | MCF_FBCS_CSMR_V;
#endif /* MACHINE_FIREBEE */
+
+#ifndef MACHINE_M5484LITE
+ MCF_FBCS5_CSAR = 0x0;
+ MCF_FBCS5_CSCR = MCF_FBCS_CSCR_PS_8
+ | MCF_FBCS_CSCR_BSTR
+ | MCF_FBCS_CSCR_BSTW
+ | MCF_FBCS_CSCR_RDAH(1); /* chip errata SECF077 */
+ MCF_FBCS5_CSMR = MCF_FBCS_CSMR_BAM_1G;
+ //| MCF_FBCS_CSMR_V;
+#endif /* MACHINE_M5484LITE */
+
xprintf("finished\r\n");
}
@@ -1045,34 +1047,19 @@ void initialize_hardware(void)
break;
}
+ /* make sure MMU is disabled */
+ MCF_MMU_MMUCR = 0; /* MMU off */
+ NOP(); /* force pipeline sync */
+
/*
* Determine the processor revision
*/
xprintf(" (revision %d)\r\n", ((MCF_SIU_JTAGID & MCF_SIU_JTAGID_REV) >> 28));
- /* make sure MMU is disabled */
- MCF_MMU_MMUCR = 0; /* MMU off */
- NOP(); /* force pipeline sync */
-
init_slt();
init_fbcs();
coldboot = init_ddram();
-#if defined(MACHINE_M5484LITE)
- xprintf("Fire Engine Control register: %02x\r\n", * (uint8_t *) 0x61000000);
- xprintf("Fire Engine interrupt register: %02x\r\n", * (uint8_t *) 0x62000000);
- xprintf("Fire Engine interrupt mask register: %02x\r\n", * (uint8_t *) 0x63000000);
- xprintf("Fire Engine power management register: %02x\r\n", * (uint8_t *) 0x64000000);
- xprintf("Fire Engine EEPROM SPI register: %02x\r\n", * (uint8_t *) 0x65000000);
- xprintf("Fire Engine Flash register: %02x\r\n", * (uint8_t *) 0x66000000);
- xprintf("Fire Engine CPLD revision register: %02x\r\n", * (uint8_t *) 0x67000000);
- xprintf("Fire Engine Hardware revision register:%02x\r\n", * (uint8_t *) 0x68000000);
-
- xprintf("write control register 0x%02x\r\n", 1 << 7);
- * (uint8_t *) 0x61000000 = 1 << 7;
- xprintf("Fire Engine Control register: %02x\r\n", * (uint8_t *) 0x61000000);
-#endif /* MACHINE_M5484LITE */
-
/*
* install (preliminary) exception vectors
*/
diff --git a/BaS_gcc/tos/Makefile b/tos/Makefile
similarity index 100%
rename from BaS_gcc/tos/Makefile
rename to tos/Makefile
diff --git a/BaS_gcc/tos/bascook/Makefile b/tos/bascook/Makefile
similarity index 100%
rename from BaS_gcc/tos/bascook/Makefile
rename to tos/bascook/Makefile
diff --git a/BaS_gcc/tos/bascook/sources/bascook.c b/tos/bascook/sources/bascook.c
similarity index 100%
rename from BaS_gcc/tos/bascook/sources/bascook.c
rename to tos/bascook/sources/bascook.c
diff --git a/BaS_gcc/tos/jtagwait/Makefile b/tos/jtagwait/Makefile
similarity index 100%
rename from BaS_gcc/tos/jtagwait/Makefile
rename to tos/jtagwait/Makefile
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475.h b/tos/jtagwait/include/MCF5475.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475.h
rename to tos/jtagwait/include/MCF5475.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_CLOCK.h b/tos/jtagwait/include/MCF5475_CLOCK.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_CLOCK.h
rename to tos/jtagwait/include/MCF5475_CLOCK.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_CTM.h b/tos/jtagwait/include/MCF5475_CTM.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_CTM.h
rename to tos/jtagwait/include/MCF5475_CTM.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_DMA.h b/tos/jtagwait/include/MCF5475_DMA.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_DMA.h
rename to tos/jtagwait/include/MCF5475_DMA.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_DSPI.h b/tos/jtagwait/include/MCF5475_DSPI.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_DSPI.h
rename to tos/jtagwait/include/MCF5475_DSPI.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_EPORT.h b/tos/jtagwait/include/MCF5475_EPORT.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_EPORT.h
rename to tos/jtagwait/include/MCF5475_EPORT.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_FBCS.h b/tos/jtagwait/include/MCF5475_FBCS.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_FBCS.h
rename to tos/jtagwait/include/MCF5475_FBCS.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_FEC.h b/tos/jtagwait/include/MCF5475_FEC.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_FEC.h
rename to tos/jtagwait/include/MCF5475_FEC.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_GPIO.h b/tos/jtagwait/include/MCF5475_GPIO.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_GPIO.h
rename to tos/jtagwait/include/MCF5475_GPIO.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_GPT.h b/tos/jtagwait/include/MCF5475_GPT.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_GPT.h
rename to tos/jtagwait/include/MCF5475_GPT.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_I2C.h b/tos/jtagwait/include/MCF5475_I2C.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_I2C.h
rename to tos/jtagwait/include/MCF5475_I2C.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_INTC.h b/tos/jtagwait/include/MCF5475_INTC.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_INTC.h
rename to tos/jtagwait/include/MCF5475_INTC.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_MMU.h b/tos/jtagwait/include/MCF5475_MMU.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_MMU.h
rename to tos/jtagwait/include/MCF5475_MMU.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_PAD.h b/tos/jtagwait/include/MCF5475_PAD.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_PAD.h
rename to tos/jtagwait/include/MCF5475_PAD.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_PCI.h b/tos/jtagwait/include/MCF5475_PCI.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_PCI.h
rename to tos/jtagwait/include/MCF5475_PCI.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_PCIARB.h b/tos/jtagwait/include/MCF5475_PCIARB.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_PCIARB.h
rename to tos/jtagwait/include/MCF5475_PCIARB.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_PSC.h b/tos/jtagwait/include/MCF5475_PSC.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_PSC.h
rename to tos/jtagwait/include/MCF5475_PSC.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_SDRAMC.h b/tos/jtagwait/include/MCF5475_SDRAMC.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_SDRAMC.h
rename to tos/jtagwait/include/MCF5475_SDRAMC.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_SEC.h b/tos/jtagwait/include/MCF5475_SEC.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_SEC.h
rename to tos/jtagwait/include/MCF5475_SEC.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_SIU.h b/tos/jtagwait/include/MCF5475_SIU.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_SIU.h
rename to tos/jtagwait/include/MCF5475_SIU.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_SLT.h b/tos/jtagwait/include/MCF5475_SLT.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_SLT.h
rename to tos/jtagwait/include/MCF5475_SLT.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_SRAM.h b/tos/jtagwait/include/MCF5475_SRAM.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_SRAM.h
rename to tos/jtagwait/include/MCF5475_SRAM.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_USB.h b/tos/jtagwait/include/MCF5475_USB.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_USB.h
rename to tos/jtagwait/include/MCF5475_USB.h
diff --git a/BaS_gcc/tos/jtagwait/include/MCF5475_XLB.h b/tos/jtagwait/include/MCF5475_XLB.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/MCF5475_XLB.h
rename to tos/jtagwait/include/MCF5475_XLB.h
diff --git a/BaS_gcc/tos/jtagwait/include/bas_printf.h b/tos/jtagwait/include/bas_printf.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/bas_printf.h
rename to tos/jtagwait/include/bas_printf.h
diff --git a/BaS_gcc/tos/jtagwait/include/bas_string.h b/tos/jtagwait/include/bas_string.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/bas_string.h
rename to tos/jtagwait/include/bas_string.h
diff --git a/BaS_gcc/tos/jtagwait/include/driver_vec.h b/tos/jtagwait/include/driver_vec.h
similarity index 100%
rename from BaS_gcc/tos/jtagwait/include/driver_vec.h
rename to tos/jtagwait/include/driver_vec.h
diff --git a/BaS_gcc/tos/jtagwait/jtagwait.config b/tos/jtagwait/jtagwait.config
similarity index 100%
rename from BaS_gcc/tos/jtagwait/jtagwait.config
rename to tos/jtagwait/jtagwait.config
diff --git a/BaS_gcc/tos/jtagwait/jtagwait.creator b/tos/jtagwait/jtagwait.creator
similarity index 100%
rename from BaS_gcc/tos/jtagwait/jtagwait.creator
rename to tos/jtagwait/jtagwait.creator
diff --git a/BaS_gcc/tos/jtagwait/jtagwait.creator.user b/tos/jtagwait/jtagwait.creator.user
similarity index 100%
rename from BaS_gcc/tos/jtagwait/jtagwait.creator.user
rename to tos/jtagwait/jtagwait.creator.user
diff --git a/BaS_gcc/tos/jtagwait/jtagwait.files b/tos/jtagwait/jtagwait.files
similarity index 100%
rename from BaS_gcc/tos/jtagwait/jtagwait.files
rename to tos/jtagwait/jtagwait.files
diff --git a/BaS_gcc/tos/jtagwait/jtagwait.includes b/tos/jtagwait/jtagwait.includes
similarity index 100%
rename from BaS_gcc/tos/jtagwait/jtagwait.includes
rename to tos/jtagwait/jtagwait.includes
diff --git a/BaS_gcc/tos/jtagwait/sources/bas_printf.c b/tos/jtagwait/sources/bas_printf.c
similarity index 100%
rename from BaS_gcc/tos/jtagwait/sources/bas_printf.c
rename to tos/jtagwait/sources/bas_printf.c
diff --git a/BaS_gcc/tos/jtagwait/sources/bas_string.c b/tos/jtagwait/sources/bas_string.c
similarity index 100%
rename from BaS_gcc/tos/jtagwait/sources/bas_string.c
rename to tos/jtagwait/sources/bas_string.c
diff --git a/BaS_gcc/tos/jtagwait/sources/jtagwait.c b/tos/jtagwait/sources/jtagwait.c
similarity index 100%
rename from BaS_gcc/tos/jtagwait/sources/jtagwait.c
rename to tos/jtagwait/sources/jtagwait.c
diff --git a/BaS_gcc/tos/jtagwait/sources/printf_helper.S b/tos/jtagwait/sources/printf_helper.S
similarity index 100%
rename from BaS_gcc/tos/jtagwait/sources/printf_helper.S
rename to tos/jtagwait/sources/printf_helper.S
diff --git a/BaS_gcc/tos/vmem_test/Makefile b/tos/vmem_test/Makefile
similarity index 100%
rename from BaS_gcc/tos/vmem_test/Makefile
rename to tos/vmem_test/Makefile
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475.h b/tos/vmem_test/include/MCF5475.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475.h
rename to tos/vmem_test/include/MCF5475.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_CLOCK.h b/tos/vmem_test/include/MCF5475_CLOCK.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_CLOCK.h
rename to tos/vmem_test/include/MCF5475_CLOCK.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_CTM.h b/tos/vmem_test/include/MCF5475_CTM.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_CTM.h
rename to tos/vmem_test/include/MCF5475_CTM.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_DMA.h b/tos/vmem_test/include/MCF5475_DMA.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_DMA.h
rename to tos/vmem_test/include/MCF5475_DMA.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_DSPI.h b/tos/vmem_test/include/MCF5475_DSPI.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_DSPI.h
rename to tos/vmem_test/include/MCF5475_DSPI.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_EPORT.h b/tos/vmem_test/include/MCF5475_EPORT.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_EPORT.h
rename to tos/vmem_test/include/MCF5475_EPORT.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_FBCS.h b/tos/vmem_test/include/MCF5475_FBCS.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_FBCS.h
rename to tos/vmem_test/include/MCF5475_FBCS.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_FEC.h b/tos/vmem_test/include/MCF5475_FEC.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_FEC.h
rename to tos/vmem_test/include/MCF5475_FEC.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_GPIO.h b/tos/vmem_test/include/MCF5475_GPIO.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_GPIO.h
rename to tos/vmem_test/include/MCF5475_GPIO.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_GPT.h b/tos/vmem_test/include/MCF5475_GPT.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_GPT.h
rename to tos/vmem_test/include/MCF5475_GPT.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_I2C.h b/tos/vmem_test/include/MCF5475_I2C.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_I2C.h
rename to tos/vmem_test/include/MCF5475_I2C.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_INTC.h b/tos/vmem_test/include/MCF5475_INTC.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_INTC.h
rename to tos/vmem_test/include/MCF5475_INTC.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_MMU.h b/tos/vmem_test/include/MCF5475_MMU.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_MMU.h
rename to tos/vmem_test/include/MCF5475_MMU.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_PAD.h b/tos/vmem_test/include/MCF5475_PAD.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_PAD.h
rename to tos/vmem_test/include/MCF5475_PAD.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_PCI.h b/tos/vmem_test/include/MCF5475_PCI.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_PCI.h
rename to tos/vmem_test/include/MCF5475_PCI.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_PCIARB.h b/tos/vmem_test/include/MCF5475_PCIARB.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_PCIARB.h
rename to tos/vmem_test/include/MCF5475_PCIARB.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_PSC.h b/tos/vmem_test/include/MCF5475_PSC.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_PSC.h
rename to tos/vmem_test/include/MCF5475_PSC.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_SDRAMC.h b/tos/vmem_test/include/MCF5475_SDRAMC.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_SDRAMC.h
rename to tos/vmem_test/include/MCF5475_SDRAMC.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_SEC.h b/tos/vmem_test/include/MCF5475_SEC.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_SEC.h
rename to tos/vmem_test/include/MCF5475_SEC.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_SIU.h b/tos/vmem_test/include/MCF5475_SIU.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_SIU.h
rename to tos/vmem_test/include/MCF5475_SIU.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_SLT.h b/tos/vmem_test/include/MCF5475_SLT.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_SLT.h
rename to tos/vmem_test/include/MCF5475_SLT.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_SRAM.h b/tos/vmem_test/include/MCF5475_SRAM.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_SRAM.h
rename to tos/vmem_test/include/MCF5475_SRAM.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_USB.h b/tos/vmem_test/include/MCF5475_USB.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_USB.h
rename to tos/vmem_test/include/MCF5475_USB.h
diff --git a/BaS_gcc/tos/vmem_test/include/MCF5475_XLB.h b/tos/vmem_test/include/MCF5475_XLB.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/MCF5475_XLB.h
rename to tos/vmem_test/include/MCF5475_XLB.h
diff --git a/BaS_gcc/tos/vmem_test/include/bas_printf.h b/tos/vmem_test/include/bas_printf.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/bas_printf.h
rename to tos/vmem_test/include/bas_printf.h
diff --git a/BaS_gcc/tos/vmem_test/include/bas_string.h b/tos/vmem_test/include/bas_string.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/bas_string.h
rename to tos/vmem_test/include/bas_string.h
diff --git a/BaS_gcc/tos/vmem_test/include/driver_vec.h b/tos/vmem_test/include/driver_vec.h
similarity index 100%
rename from BaS_gcc/tos/vmem_test/include/driver_vec.h
rename to tos/vmem_test/include/driver_vec.h
diff --git a/BaS_gcc/tos/vmem_test/sources/bas_printf.c b/tos/vmem_test/sources/bas_printf.c
similarity index 100%
rename from BaS_gcc/tos/vmem_test/sources/bas_printf.c
rename to tos/vmem_test/sources/bas_printf.c
diff --git a/BaS_gcc/tos/vmem_test/sources/bas_string.c b/tos/vmem_test/sources/bas_string.c
similarity index 100%
rename from BaS_gcc/tos/vmem_test/sources/bas_string.c
rename to tos/vmem_test/sources/bas_string.c
diff --git a/BaS_gcc/tos/vmem_test/sources/printf_helper.S b/tos/vmem_test/sources/printf_helper.S
similarity index 100%
rename from BaS_gcc/tos/vmem_test/sources/printf_helper.S
rename to tos/vmem_test/sources/printf_helper.S
diff --git a/BaS_gcc/tos/vmem_test/sources/vmem_test.c b/tos/vmem_test/sources/vmem_test.c
similarity index 100%
rename from BaS_gcc/tos/vmem_test/sources/vmem_test.c
rename to tos/vmem_test/sources/vmem_test.c
diff --git a/BaS_gcc/tos/vmem_test/vmem_test.config b/tos/vmem_test/vmem_test.config
similarity index 100%
rename from BaS_gcc/tos/vmem_test/vmem_test.config
rename to tos/vmem_test/vmem_test.config
diff --git a/BaS_gcc/tos/vmem_test/vmem_test.creator b/tos/vmem_test/vmem_test.creator
similarity index 100%
rename from BaS_gcc/tos/vmem_test/vmem_test.creator
rename to tos/vmem_test/vmem_test.creator
diff --git a/BaS_gcc/tos/vmem_test/vmem_test.files b/tos/vmem_test/vmem_test.files
similarity index 100%
rename from BaS_gcc/tos/vmem_test/vmem_test.files
rename to tos/vmem_test/vmem_test.files
diff --git a/BaS_gcc/tos/vmem_test/vmem_test.includes b/tos/vmem_test/vmem_test.includes
similarity index 100%
rename from BaS_gcc/tos/vmem_test/vmem_test.includes
rename to tos/vmem_test/vmem_test.includes
diff --git a/BaS_gcc/usb/usb.c b/usb/usb.c
similarity index 100%
rename from BaS_gcc/usb/usb.c
rename to usb/usb.c
diff --git a/BaS_gcc/usb/usb_hub.c b/usb/usb_hub.c
similarity index 100%
rename from BaS_gcc/usb/usb_hub.c
rename to usb/usb_hub.c
diff --git a/BaS_gcc/usb/usb_kbd.c b/usb/usb_kbd.c
similarity index 100%
rename from BaS_gcc/usb/usb_kbd.c
rename to usb/usb_kbd.c
diff --git a/BaS_gcc/usb/usb_mouse.c b/usb/usb_mouse.c
similarity index 100%
rename from BaS_gcc/usb/usb_mouse.c
rename to usb/usb_mouse.c
diff --git a/BaS_gcc/util/bas_printf.c b/util/bas_printf.c
similarity index 100%
rename from BaS_gcc/util/bas_printf.c
rename to util/bas_printf.c
diff --git a/BaS_gcc/util/bas_string.c b/util/bas_string.c
similarity index 100%
rename from BaS_gcc/util/bas_string.c
rename to util/bas_string.c
diff --git a/BaS_gcc/util/printf_helper.S b/util/printf_helper.S
similarity index 100%
rename from BaS_gcc/util/printf_helper.S
rename to util/printf_helper.S
diff --git a/BaS_gcc/util/wait.c b/util/wait.c
similarity index 100%
rename from BaS_gcc/util/wait.c
rename to util/wait.c
diff --git a/BaS_gcc/video/fbmem.c b/video/fbmem.c
similarity index 100%
rename from BaS_gcc/video/fbmem.c
rename to video/fbmem.c
diff --git a/BaS_gcc/video/fbmodedb.c b/video/fbmodedb.c
similarity index 100%
rename from BaS_gcc/video/fbmodedb.c
rename to video/fbmodedb.c
diff --git a/BaS_gcc/video/fbmon.c b/video/fbmon.c
similarity index 100%
rename from BaS_gcc/video/fbmon.c
rename to video/fbmon.c
diff --git a/BaS_gcc/video/fnt_st_8x16.c b/video/fnt_st_8x16.c
similarity index 100%
rename from BaS_gcc/video/fnt_st_8x16.c
rename to video/fnt_st_8x16.c
diff --git a/BaS_gcc/video/offscreen.c b/video/offscreen.c
similarity index 100%
rename from BaS_gcc/video/offscreen.c
rename to video/offscreen.c
diff --git a/BaS_gcc/video/vdi_fill.c b/video/vdi_fill.c
similarity index 100%
rename from BaS_gcc/video/vdi_fill.c
rename to video/vdi_fill.c
diff --git a/BaS_gcc/video/videl.c b/video/videl.c
similarity index 100%
rename from BaS_gcc/video/videl.c
rename to video/videl.c
diff --git a/BaS_gcc/video/video.c b/video/video.c
similarity index 100%
rename from BaS_gcc/video/video.c
rename to video/video.c
diff --git a/BaS_gcc/x86emu/x86biosemu.c b/x86emu/x86biosemu.c
similarity index 100%
rename from BaS_gcc/x86emu/x86biosemu.c
rename to x86emu/x86biosemu.c
diff --git a/BaS_gcc/x86emu/x86debug.c b/x86emu/x86debug.c
similarity index 100%
rename from BaS_gcc/x86emu/x86debug.c
rename to x86emu/x86debug.c
diff --git a/BaS_gcc/x86emu/x86decode.c b/x86emu/x86decode.c
similarity index 100%
rename from BaS_gcc/x86emu/x86decode.c
rename to x86emu/x86decode.c
diff --git a/BaS_gcc/x86emu/x86fpu.c b/x86emu/x86fpu.c
similarity index 100%
rename from BaS_gcc/x86emu/x86fpu.c
rename to x86emu/x86fpu.c
diff --git a/BaS_gcc/x86emu/x86ops.c b/x86emu/x86ops.c
similarity index 100%
rename from BaS_gcc/x86emu/x86ops.c
rename to x86emu/x86ops.c
diff --git a/BaS_gcc/x86emu/x86ops2.c b/x86emu/x86ops2.c
similarity index 100%
rename from BaS_gcc/x86emu/x86ops2.c
rename to x86emu/x86ops2.c
diff --git a/BaS_gcc/x86emu/x86pcibios.c b/x86emu/x86pcibios.c
similarity index 100%
rename from BaS_gcc/x86emu/x86pcibios.c
rename to x86emu/x86pcibios.c
diff --git a/BaS_gcc/x86emu/x86prim_ops.c b/x86emu/x86prim_ops.c
similarity index 100%
rename from BaS_gcc/x86emu/x86prim_ops.c
rename to x86emu/x86prim_ops.c
diff --git a/BaS_gcc/x86emu/x86sys.c b/x86emu/x86sys.c
similarity index 100%
rename from BaS_gcc/x86emu/x86sys.c
rename to x86emu/x86sys.c
diff --git a/BaS_gcc/xhdi/xhdi_interface.c b/xhdi/xhdi_interface.c
similarity index 100%
rename from BaS_gcc/xhdi/xhdi_interface.c
rename to xhdi/xhdi_interface.c
diff --git a/BaS_gcc/xhdi/xhdi_sd.c b/xhdi/xhdi_sd.c
similarity index 100%
rename from BaS_gcc/xhdi/xhdi_sd.c
rename to xhdi/xhdi_sd.c
diff --git a/BaS_gcc/xhdi/xhdi_vec.S b/xhdi/xhdi_vec.S
similarity index 100%
rename from BaS_gcc/xhdi/xhdi_vec.S
rename to xhdi/xhdi_vec.S