From a8fa51e6bf51791272a0a65a69e029aa9eb8d1ba Mon Sep 17 00:00:00 2001 From: zhangyuan21 Date: Thu, 17 Nov 2022 18:17:40 +0800 Subject: [PATCH] arch: rename arch special function name --- .../src/tlsr82/tc32/tc32_saveusercontext.S | 4 +- arch/arm64/include/syscall.h | 2 +- arch/avr/src/at32uc3/Make.defs | 20 +-- arch/avr/src/at32uc3/at32uc3_clkinit.c | 2 +- arch/avr/src/at32uc3/at32uc3_gpio.c | 2 +- arch/avr/src/at32uc3/at32uc3_gpioirq.c | 2 +- arch/avr/src/at32uc3/at32uc3_irq.c | 2 +- arch/avr/src/at32uc3/at32uc3_lowconsole.c | 8 +- arch/avr/src/at32uc3/at32uc3_lowinit.c | 8 +- arch/avr/src/at32uc3/at32uc3_serial.c | 22 +-- arch/avr/src/at32uc3/at32uc3_timerisr.c | 2 +- arch/avr/src/at90usb/Make.defs | 24 +-- arch/avr/src/at90usb/at90usb_exceptions.S | 12 +- arch/avr/src/at90usb/at90usb_head.S | 4 +- arch/avr/src/at90usb/at90usb_lowconsole.c | 6 +- arch/avr/src/at90usb/at90usb_lowinit.c | 8 +- arch/avr/src/at90usb/at90usb_serial.c | 22 +-- arch/avr/src/at90usb/at90usb_timerisr.c | 2 +- arch/avr/src/at90usb/at90usb_usbdev.c | 12 +- arch/avr/src/atmega/Make.defs | 24 +-- arch/avr/src/atmega/atmega_exceptions.S | 12 +- arch/avr/src/atmega/atmega_head.S | 4 +- arch/avr/src/atmega/atmega_lowconsole.c | 6 +- arch/avr/src/atmega/atmega_lowinit.c | 8 +- arch/avr/src/atmega/atmega_serial.c | 22 +-- arch/avr/src/atmega/atmega_timerisr.c | 2 +- arch/avr/src/avr/avr.h | 20 +-- .../avr/{up_blocktask.c => avr_blocktask.c} | 12 +- .../avr/{up_checkstack.c => avr_checkstack.c} | 4 +- .../avr/{up_copystate.c => avr_copystate.c} | 8 +- .../{up_createstack.c => avr_createstack.c} | 4 +- arch/avr/src/avr/{up_doirq.c => avr_doirq.c} | 6 +- .../avr/{up_dumpstate.c => avr_dumpstate.c} | 8 +- .../{up_initialstate.c => avr_initialstate.c} | 4 +- arch/avr/src/avr/{up_irq.c => avr_irq.c} | 4 +- ..._releasepending.c => avr_releasepending.c} | 12 +- .../src/avr/{up_romgetc.c => avr_romgetc.c} | 2 +- ...ulesigaction.c => avr_schedulesigaction.c} | 8 +- .../avr/{up_sigdeliver.c => avr_sigdeliver.c} | 18 +- arch/avr/src/avr/{up_spi.c => avr_spi.c} | 4 +- .../avr/{up_stackframe.c => avr_stackframe.c} | 4 +- ...up_switchcontext.S => avr_switchcontext.S} | 26 +-- .../{up_unblocktask.c => avr_unblocktask.c} | 12 +- .../src/avr/{up_usestack.c => avr_usestack.c} | 4 +- arch/avr/src/avr/excptmacros.h | 2 +- arch/avr/src/avr32/avr32.h | 20 +-- .../avr32/{up_blocktask.c => avr_blocktask.c} | 12 +- .../avr32/{up_copystate.c => avr_copystate.c} | 8 +- .../{up_createstack.c => avr_createstack.c} | 4 +- .../avr/src/avr32/{up_doirq.c => avr_doirq.c} | 6 +- .../avr32/{up_dumpstate.c => avr_dumpstate.c} | 8 +- .../{up_exceptions.S => avr_exceptions.S} | 16 +- ...textrestore.S => avr_fullcontextrestore.S} | 18 +- .../{up_initialstate.c => avr_initialstate.c} | 4 +- .../avr32/{up_nommuhead.S => avr_nommuhead.S} | 12 +- ..._releasepending.c => avr_releasepending.c} | 12 +- ...ulesigaction.c => avr_schedulesigaction.c} | 10 +- .../{up_sigdeliver.c => avr_sigdeliver.c} | 18 +- .../src/avr32/avr_stackframe.c} | 4 +- ...up_switchcontext.S => avr_switchcontext.S} | 26 +-- .../avr32/{up_syscall6.S => avr_syscall6.S} | 2 +- .../{up_unblocktask.c => avr_unblocktask.c} | 12 +- .../avr32/{up_usestack.c => avr_usestack.c} | 4 +- .../{up_allocateheap.c => avr_allocateheap.c} | 4 +- .../src/common/{up_assert.c => avr_assert.c} | 6 +- arch/avr/src/common/{up_exit.c => avr_exit.c} | 6 +- arch/avr/src/common/{up_idle.c => avr_idle.c} | 4 +- .../{up_initialize.c => avr_initialize.c} | 20 +-- .../common/{up_internal.h => avr_internal.h} | 36 ++-- .../src/common/avr_lowputs.c} | 11 +- .../src/common/{up_mdelay.c => avr_mdelay.c} | 2 +- .../{up_modifyreg16.c => avr_modifyreg16.c} | 4 +- .../{up_modifyreg32.c => avr_modifyreg32.c} | 4 +- .../{up_modifyreg8.c => avr_modifyreg8.c} | 4 +- .../src/common/{up_nputs.c => avr_nputs.c} | 2 +- .../{up_releasestack.c => avr_releasestack.c} | 4 +- .../src/common/avr_udelay.c} | 2 +- arch/ceva/include/syscall.h | 4 +- .../src/common/{up_assert.c => ceva_assert.c} | 4 +- .../{up_blocktask.c => ceva_blocktask.c} | 8 +- .../src/common/{up_board.c => ceva_board.c} | 14 +- .../{up_checkstack.c => ceva_checkstack.c} | 4 +- .../{up_createstack.c => ceva_createstack.c} | 10 +- .../src/common/{up_doirq.c => ceva_doirq.c} | 6 +- .../src/common/{up_exit.c => ceva_exit.c} | 6 +- ...extrestore.c => ceva_fullcontextrestore.c} | 10 +- .../src/common/{up_heap.c => ceva_heap.c} | 10 +- .../src/common/{up_idle.c => ceva_idle.c} | 22 +-- .../{up_initialize.c => ceva_initialize.c} | 20 +-- .../common/{up_internal.h => ceva_internal.h} | 70 ++++---- .../{up_modifyreg16.c => ceva_modifyreg16.c} | 4 +- .../{up_modifyreg32.c => ceva_modifyreg32.c} | 4 +- .../{up_modifyreg8.c => ceva_modifyreg8.c} | 4 +- .../src/common/{up_nputs.c => ceva_nputs.c} | 2 +- ...p_pthread_start.c => ceva_pthread_start.c} | 2 +- ...releasepending.c => ceva_releasepending.c} | 8 +- ...{up_releasestack.c => ceva_releasestack.c} | 4 +- ...veusercontext.c => ceva_saveusercontext.c} | 4 +- ...lesigaction.c => ceva_schedulesigaction.c} | 8 +- .../{up_sigdeliver.c => ceva_sigdeliver.c} | 10 +- ...gnal_dispatch.c => ceva_signal_dispatch.c} | 4 +- .../{up_stackframe.c => ceva_stackframe.c} | 4 +- .../src/common/{up_start.c => ceva_start.c} | 8 +- .../src/common/{up_svcall.c => ceva_svcall.c} | 19 +- ...p_switchcontext.c => ceva_switchcontext.c} | 10 +- .../{up_task_start.c => ceva_task_start.c} | 2 +- .../{up_unblocktask.c => ceva_unblocktask.c} | 8 +- .../{up_userspace.c => ceva_userspace.c} | 4 +- .../common/{up_usestack.c => ceva_usestack.c} | 6 +- .../src/common/{up_vfork.c => ceva_vfork.c} | 2 +- .../xc5/{up_hardfault.c => xc5_hardfault.c} | 8 +- arch/ceva/src/xc5/{up_head.S => xc5_head.S} | 12 +- .../src/xc5/{up_icache.c => xc5_icache.c} | 2 +- .../{up_initialstate.c => xc5_initialstate.c} | 6 +- arch/ceva/src/xc5/{up_intc.c => xc5_intc.c} | 8 +- arch/ceva/src/xc5/{up_mpu.c => xc5_mpu.c} | 2 +- arch/ceva/src/xc5/{up_psu.c => xc5_psu.c} | 4 +- .../src/xc5/{up_relocate.c => xc5_relocate.c} | 2 +- ..._signal_handler.S => xc5_signal_handler.S} | 4 +- ..._svcall_handler.S => xc5_svcall_handler.S} | 18 +- .../xm6/{up_hardfault.c => xm6_hardfault.c} | 8 +- arch/ceva/src/xm6/{up_head.S => xm6_head.S} | 12 +- .../src/xm6/{up_icache.c => xm6_icache.c} | 2 +- .../{up_initialstate.c => xm6_initialstate.c} | 6 +- arch/ceva/src/xm6/{up_intc.c => xm6_intc.c} | 8 +- arch/ceva/src/xm6/{up_mpu.c => xm6_mpu.c} | 2 +- arch/ceva/src/xm6/{up_psu.c => xm6_psu.c} | 8 +- ..._signal_handler.S => xm6_signal_handler.S} | 4 +- ..._svcall_handler.S => xm6_svcall_handler.S} | 18 +- .../{up_allocateheap.c => hc_allocateheap.c} | 4 +- .../common/{up_blocktask.c => hc_blocktask.c} | 10 +- .../common/{up_copystate.c => hc_copystate.c} | 6 +- .../{up_createstack.c => hc_createstack.c} | 4 +- arch/hc/src/common/{up_doirq.c => hc_doirq.c} | 6 +- arch/hc/src/common/{up_exit.c => hc_exit.c} | 6 +- arch/hc/src/common/{up_idle.c => hc_idle.c} | 4 +- .../{up_initialize.c => hc_initialize.c} | 18 +- .../common/{up_internal.h => hc_internal.h} | 44 ++--- .../src/common/{up_mdelay.c => hc_mdelay.c} | 2 +- .../{up_modifyreg16.c => hc_modifyreg16.c} | 4 +- .../{up_modifyreg32.c => hc_modifyreg32.c} | 4 +- .../{up_modifyreg8.c => hc_modifyreg8.c} | 4 +- arch/hc/src/common/{up_nputs.c => hc_nputs.c} | 2 +- ...p_releasepending.c => hc_releasepending.c} | 10 +- .../{up_releasestack.c => hc_releasestack.c} | 4 +- .../src/common/hc_stackframe.c} | 4 +- .../src/common/{up_udelay.c => hc_udelay.c} | 2 +- .../{up_unblocktask.c => hc_unblocktask.c} | 10 +- .../common/{up_usestack.c => hc_usestack.c} | 4 +- arch/hc/src/m9s12/Make.defs | 10 +- arch/hc/src/m9s12/m9s12.h | 4 +- arch/hc/src/m9s12/m9s12_assert.c | 2 +- arch/hc/src/m9s12/m9s12_dumpgpio.c | 2 +- arch/hc/src/m9s12/m9s12_gpio.c | 2 +- arch/hc/src/m9s12/m9s12_gpioirq.c | 2 +- arch/hc/src/m9s12/m9s12_initialstate.c | 2 +- arch/hc/src/m9s12/m9s12_irq.c | 2 +- arch/hc/src/m9s12/m9s12_lowputc.S | 12 +- arch/hc/src/m9s12/m9s12_saveusercontext.S | 2 +- arch/hc/src/m9s12/m9s12_serial.c | 18 +- arch/hc/src/m9s12/m9s12_start.S | 2 +- arch/hc/src/m9s12/m9s12_timerisr.c | 2 +- arch/hc/src/m9s12/m9s12_vectors.S | 18 +- arch/mips/include/syscall.h | 4 +- arch/mips/src/common/mips_etherstub.c | 10 +- arch/mips/src/common/mips_initialize.c | 16 +- arch/mips/src/common/mips_internal.h | 50 +++--- arch/mips/src/common/mips_lowputs.c | 6 +- arch/mips/src/mips32/mips_assert.c | 2 +- arch/mips/src/mips32/mips_blocktask.c | 8 +- arch/mips/src/mips32/mips_copystate.c | 4 +- arch/mips/src/mips32/mips_doirq.c | 2 +- arch/mips/src/mips32/mips_dumpstate.c | 4 +- arch/mips/src/mips32/mips_releasepending.c | 8 +- arch/mips/src/mips32/mips_schedulesigaction.c | 6 +- arch/mips/src/mips32/mips_sigdeliver.c | 6 +- arch/mips/src/mips32/mips_swint0.c | 11 +- arch/mips/src/mips32/mips_unblocktask.c | 8 +- arch/mips/src/pic32mx/Make.defs | 4 +- arch/mips/src/pic32mx/pic32mx_ethernet.c | 12 +- arch/mips/src/pic32mx/pic32mx_gpioirq.c | 2 +- arch/mips/src/pic32mx/pic32mx_irq.c | 16 +- arch/mips/src/pic32mx/pic32mx_lowconsole.c | 4 +- arch/mips/src/pic32mx/pic32mx_lowinit.c | 2 +- arch/mips/src/pic32mx/pic32mx_serial.c | 42 ++--- arch/mips/src/pic32mx/pic32mx_timerisr.c | 2 +- arch/mips/src/pic32mx/pic32mx_usbdev.c | 12 +- arch/mips/src/pic32mz/Make.defs | 4 +- arch/mips/src/pic32mz/pic32mz_dma.c | 12 +- arch/mips/src/pic32mz/pic32mz_ethernet.c | 12 +- arch/mips/src/pic32mz/pic32mz_gpioirq.c | 4 +- arch/mips/src/pic32mz/pic32mz_head.S | 4 +- arch/mips/src/pic32mz/pic32mz_i2c.c | 12 +- arch/mips/src/pic32mz/pic32mz_irq.c | 16 +- arch/mips/src/pic32mz/pic32mz_lowconsole.c | 4 +- arch/mips/src/pic32mz/pic32mz_lowinit.c | 2 +- arch/mips/src/pic32mz/pic32mz_serial.c | 42 ++--- arch/mips/src/pic32mz/pic32mz_timer.c | 8 +- arch/mips/src/pic32mz/pic32mz_timerisr.c | 4 +- arch/misoc/include/syscall.h | 4 +- arch/misoc/src/common/misoc.h | 4 +- arch/misoc/src/lm32/lm32.h | 4 +- arch/misoc/src/lm32/lm32_blocktask.c | 8 +- arch/misoc/src/lm32/lm32_releasepending.c | 8 +- arch/misoc/src/lm32/lm32_schedulesigaction.c | 2 +- arch/misoc/src/lm32/lm32_swint.c | 3 +- arch/misoc/src/lm32/lm32_unblocktask.c | 8 +- arch/misoc/src/minerva/minerva.h | 4 +- arch/misoc/src/minerva/minerva_blocktask.c | 8 +- .../src/minerva/minerva_releasepending.c | 14 +- .../src/minerva/minerva_schedulesigaction.c | 2 +- arch/misoc/src/minerva/minerva_swint.c | 4 +- arch/misoc/src/minerva/minerva_unblocktask.c | 8 +- ...{up_allocateheap.c => or1k_allocateheap.c} | 6 +- .../src/common/{up_assert.c => or1k_assert.c} | 4 +- .../{up_blocktask.c => or1k_blocktask.c} | 10 +- .../{up_checkstack.c => or1k_checkstack.c} | 4 +- ...p_copyfullstate.c => or1k_copyfullstate.c} | 8 +- .../common/{up_cpuinfo.c => or1k_cpuinfo.c} | 2 +- .../{up_createstack.c => or1k_createstack.c} | 10 +- .../src/common/{up_doirq.c => or1k_doirq.c} | 8 +- .../{up_etherstub.c => or1k_etherstub.c} | 14 +- .../src/common/{up_exit.c => or1k_exit.c} | 6 +- ...extrestore.S => or1k_fullcontextrestore.S} | 14 +- .../src/common/{up_idle.c => or1k_idle.c} | 4 +- .../{up_initialize.c => or1k_initialize.c} | 24 +-- ...{up_initialstate.c => or1k_initialstate.c} | 6 +- .../common/{up_internal.h => or1k_internal.h} | 68 +++---- .../common/{up_lowputs.c => or1k_lowputs.c} | 10 +- .../src/common/{up_mdelay.c => or1k_mdelay.c} | 2 +- .../{up_modifyreg16.c => or1k_modifyreg16.c} | 4 +- .../{up_modifyreg32.c => or1k_modifyreg32.c} | 4 +- .../{up_modifyreg8.c => or1k_modifyreg8.c} | 4 +- .../src/common/{up_nputs.c => or1k_nputs.c} | 2 +- ...p_pthread_start.c => or1k_pthread_start.c} | 4 +- ...releasepending.c => or1k_releasepending.c} | 10 +- ...{up_releasestack.c => or1k_releasestack.c} | 4 +- ...veusercontext.S => or1k_saveusercontext.S} | 4 +- ...lesigaction.c => or1k_schedulesigaction.c} | 10 +- .../{up_stackframe.c => or1k_stackframe.c} | 4 +- .../{up_task_start.c => or1k_task_start.c} | 4 +- .../src/common/{up_timer.c => or1k_timer.c} | 4 +- .../src/common/{up_uart.c => or1k_uart.c} | 4 +- .../src/common/{up_udelay.c => or1k_udelay.c} | 2 +- .../{up_unblocktask.c => or1k_unblocktask.c} | 10 +- .../common/{up_usestack.c => or1k_usestack.c} | 4 +- arch/or1k/src/mor1kx/Make.defs | 62 +++---- arch/or1k/src/mor1kx/mor1kx_serial.c | 10 +- arch/or1k/src/mor1kx/mor1kx_start.c | 4 +- arch/or1k/src/mor1kx/{up_irq.c => or1k_irq.c} | 8 +- .../{up_vectortab.S => or1k_vectortab.S} | 4 +- ..._allocateheap.c => renesas_allocateheap.c} | 4 +- .../common/{up_assert.c => renesas_assert.c} | 6 +- .../{up_blocktask.c => renesas_blocktask.c} | 8 +- ...up_createstack.c => renesas_createstack.c} | 4 +- .../common/{up_doirq.c => renesas_doirq.c} | 6 +- .../src/common/{up_exit.c => renesas_exit.c} | 6 +- .../src/common/{up_idle.c => renesas_idle.c} | 4 +- .../{up_initialize.c => renesas_initialize.c} | 10 +- .../{up_internal.h => renesas_internal.h} | 70 ++++---- arch/renesas/src/common/renesas_lowputs.c | 59 ++++++ arch/renesas/src/common/renesas_mdelay.c | 75 ++++++++ arch/renesas/src/common/renesas_nputs.c | 58 ++++++ ...easepending.c => renesas_releasepending.c} | 8 +- ..._releasestack.c => renesas_releasestack.c} | 4 +- .../{up_stackframe.c => renesas_stackframe.c} | 4 +- .../common/{up_udelay.c => renesas_udelay.c} | 2 +- .../src/common/renesas_unblocktask.c} | 14 +- .../{up_usestack.c => renesas_usestack.c} | 4 +- arch/renesas/src/m16c/Make.defs | 10 +- arch/renesas/src/m16c/m16c_copystate.c | 6 +- arch/renesas/src/m16c/m16c_dumpstate.c | 6 +- arch/renesas/src/m16c/m16c_head.S | 10 +- arch/renesas/src/m16c/m16c_initialstate.c | 2 +- arch/renesas/src/m16c/m16c_irq.c | 2 +- arch/renesas/src/m16c/m16c_lowputc.c | 8 +- .../renesas/src/m16c/m16c_schedulesigaction.c | 12 +- arch/renesas/src/m16c/m16c_serial.c | 18 +- arch/renesas/src/m16c/m16c_sigdeliver.c | 10 +- arch/renesas/src/m16c/m16c_timerisr.c | 2 +- arch/renesas/src/m16c/m16c_vectors.S | 14 +- arch/renesas/src/rx65n/Make.defs | 10 +- arch/renesas/src/rx65n/rx65n_copystate.c | 6 +- arch/renesas/src/rx65n/rx65n_dtc.c | 2 +- arch/renesas/src/rx65n/rx65n_dumpstate.c | 6 +- arch/renesas/src/rx65n/rx65n_eth.c | 8 +- arch/renesas/src/rx65n/rx65n_hardware_setup.c | 2 +- arch/renesas/src/rx65n/rx65n_head.S | 12 +- arch/renesas/src/rx65n/rx65n_initialstate.c | 2 +- arch/renesas/src/rx65n/rx65n_irq.c | 2 +- arch/renesas/src/rx65n/rx65n_lowputc.c | 6 +- arch/renesas/src/rx65n/rx65n_riic.c | 2 +- arch/renesas/src/rx65n/rx65n_rspi.c | 2 +- arch/renesas/src/rx65n/rx65n_rspi_sw.c | 2 +- arch/renesas/src/rx65n/rx65n_rtc.c | 2 +- arch/renesas/src/rx65n/rx65n_rtc_lowerhalf.c | 2 +- .../src/rx65n/rx65n_schedulesigaction.c | 8 +- arch/renesas/src/rx65n/rx65n_sci.c | 2 +- arch/renesas/src/rx65n/rx65n_serial.c | 18 +- arch/renesas/src/rx65n/rx65n_sigdeliver.c | 10 +- arch/renesas/src/rx65n/rx65n_timerisr.c | 2 +- arch/renesas/src/rx65n/rx65n_usbdev.c | 10 +- arch/renesas/src/rx65n/rx65n_usbhost.c | 2 +- arch/renesas/src/rx65n/rx65n_vector.S | 18 +- arch/renesas/src/sh1/Make.defs | 12 +- arch/renesas/src/sh1/sh1_copystate.c | 6 +- arch/renesas/src/sh1/sh1_dumpstate.c | 6 +- arch/renesas/src/sh1/sh1_head.S | 14 +- arch/renesas/src/sh1/sh1_initialstate.c | 2 +- arch/renesas/src/sh1/sh1_irq.c | 2 +- arch/renesas/src/sh1/sh1_lowputc.c | 6 +- arch/renesas/src/sh1/sh1_saveusercontext.S | 2 +- arch/renesas/src/sh1/sh1_schedulesigaction.c | 8 +- arch/renesas/src/sh1/sh1_serial.c | 18 +- arch/renesas/src/sh1/sh1_sigdeliver.c | 10 +- arch/renesas/src/sh1/sh1_timerisr.c | 2 +- arch/renesas/src/sh1/sh1_vector.S | 16 +- arch/risc-v/src/c906/c906_allocateheap.c | 6 +- arch/risc-v/src/mpfs/mpfs_allocateheap.c | 6 +- .../risc-v/src/qemu-rv/qemu_rv_allocateheap.c | 6 +- arch/sim/src/Makefile | 110 ++++++------ ..._hcisocket_host.c => sim_hcisocket_host.c} | 26 +-- .../sim/posix/{up_hostfs.c => sim_hostfs.c} | 2 +- .../sim/posix/{up_hostirq.c => sim_hostirq.c} | 8 +- .../{up_hostmemory.c => sim_hostmemory.c} | 34 ++-- .../posix/{up_hostmisc.c => sim_hostmisc.c} | 10 +- .../posix/{up_hosttime.c => sim_hosttime.c} | 22 +-- .../sim/posix/{up_i2cbus.h => sim_i2cbus.h} | 8 +- .../{up_i2cbuslinux.c => sim_i2cbuslinux.c} | 8 +- .../sim/posix/{up_simsmp.c => sim_simsmp.c} | 10 +- .../sim/posix/{up_simuart.c => sim_simuart.c} | 4 +- .../sim/src/sim/posix/{up_spi.h => sim_spi.h} | 8 +- .../posix/{up_spilinux.c => sim_spilinux.c} | 8 +- .../sim/posix/{up_tapdev.c => sim_tapdev.c} | 27 +-- .../sim/posix/{up_testset.c => sim_testset.c} | 4 +- .../{up_usrsock_host.c => sim_usrsock_host.c} | 4 +- .../sim/posix/{up_vpnkit.c => sim_vpnkit.c} | 34 ++-- .../src/sim/posix/{up_wpcap.c => sim_wpcap.c} | 18 +- .../{up_x11eventloop.c => sim_x11eventloop.c} | 26 +-- ..._x11framebuffer.c => sim_x11framebuffer.c} | 90 +++++----- .../sim/{up_ajoystick.c => sim_ajoystick.c} | 8 +- arch/sim/src/sim/{up_alsa.c => sim_alsa.c} | 2 +- .../sim/src/sim/{up_assert.c => sim_assert.c} | 6 +- .../sim/{up_backtrace.c => sim_backtrace.c} | 6 +- .../{up_blockdevice.c => sim_blockdevice.c} | 10 +- .../sim/{up_blocktask.c => sim_blocktask.c} | 4 +- .../sim/{up_checkstack.c => sim_checkstack.c} | 4 +- ...up_copyfullstate.c => sim_copyfullstate.c} | 8 +- .../{up_cpuidlestack.c => sim_cpuidlestack.c} | 2 +- .../{up_createstack.c => sim_createstack.c} | 10 +- .../{up_deviceimage.c => sim_deviceimage.c} | 12 +- arch/sim/src/sim/{up_exit.c => sim_exit.c} | 2 +- .../{up_framebuffer.c => sim_framebuffer.c} | 66 +++---- .../sim/{up_hcisocket.c => sim_hcisocket.c} | 24 +-- ..._hcisocket_host.h => sim_hcisocket_host.h} | 18 +- arch/sim/src/sim/{up_head.c => sim_head.c} | 6 +- arch/sim/src/sim/{up_heap.c => sim_heap.c} | 18 +- arch/sim/src/sim/{up_idle.c => sim_idle.c} | 6 +- .../sim/{up_initialize.c => sim_initialize.c} | 36 ++-- .../{up_initialstate.c => sim_initialstate.c} | 6 +- .../src/sim/{up_internal.h => sim_internal.h} | 170 +++++++++--------- ...erruptcontext.c => sim_interruptcontext.c} | 8 +- .../src/sim/{up_keyboard.c => sim_keyboard.c} | 16 +- arch/sim/src/sim/{up_lcd.c => sim_lcd.c} | 16 +- .../sim/{up_macho_init.c => sim_macho_init.c} | 2 +- .../sim/{up_netdriver.c => sim_netdriver.c} | 32 ++-- arch/sim/src/sim/{up_nputs.c => sim_nputs.c} | 2 +- .../src/sim/{up_oneshot.c => sim_oneshot.c} | 22 +-- ..._releasepending.c => sim_releasepending.c} | 4 +- .../{up_releasestack.c => sim_releasestack.c} | 2 +- .../src/sim/{up_romgetc.c => sim_romgetc.c} | 2 +- arch/sim/src/sim/{up_rptun.c => sim_rptun.c} | 13 +- arch/sim/src/sim/{up_rtc.c => sim_rtc.c} | 8 +- ...ulesigaction.c => sim_schedulesigaction.c} | 2 +- .../sim/{up_sigdeliver.c => sim_sigdeliver.c} | 4 +- .../sim/{up_smpsignal.c => sim_smpsignal.c} | 16 +- .../sim/{up_stackframe.c => sim_stackframe.c} | 4 +- .../{up_touchscreen.c => sim_touchscreen.c} | 20 +-- arch/sim/src/sim/{up_uart.c => sim_uart.c} | 12 +- .../{up_unblocktask.c => sim_unblocktask.c} | 8 +- .../src/sim/{up_usestack.c => sim_usestack.c} | 6 +- .../src/sim/{up_usrsock.c => sim_usrsock.c} | 4 +- .../{up_usrsock_host.h => sim_usrsock_host.h} | 8 +- arch/sim/src/sim/{up_vfork.c => sim_vfork.c} | 2 +- .../sim/{up_vfork_arm.S => sim_vfork_arm.S} | 2 +- .../{up_vfork_arm64.S => sim_vfork_arm64.S} | 2 +- .../sim/{up_vfork_x86.S => sim_vfork_x86.S} | 2 +- .../{up_vfork_x86_64.S => sim_vfork_x86_64.S} | 2 +- .../vpnkit/{negotiate.c => sim_negotiate.c} | 8 +- .../sim/vpnkit/{protocol.c => sim_protocol.c} | 6 +- .../sim/vpnkit/{protocol.h => sim_protocol.h} | 2 +- .../sim/win/{up_hostirq.c => sim_hostirq.c} | 4 +- .../win/{up_hostmemory.c => sim_hostmemory.c} | 20 +-- .../sim/win/{up_hostmisc.c => sim_hostmisc.c} | 8 +- .../sim/win/{up_hosttime.c => sim_hosttime.c} | 22 +-- .../sim/win/{up_simuart.c => sim_simuart.c} | 2 +- arch/sparc/include/syscall.h | 24 +-- arch/sparc/src/bm3803/Make.defs | 2 +- arch/sparc/src/bm3803/bm3803-irq.c | 14 +- arch/sparc/src/bm3803/bm3803-lowconsole.c | 10 +- arch/sparc/src/bm3803/bm3803-lowinit.c | 8 +- arch/sparc/src/bm3803/bm3803-serial.c | 36 ++-- arch/sparc/src/bm3803/bm3803-timerisr.c | 6 +- arch/sparc/src/bm3803/bm3803.h | 6 +- arch/sparc/src/bm3803/bm3803_exceptions.S | 4 +- arch/sparc/src/bm3803/bm3803_exti_gpio.c | 10 +- arch/sparc/src/bm3803/bm3803_tim.c | 6 +- arch/sparc/src/bm3803/bm3803_wdg.c | 2 +- arch/sparc/src/bm3823/Make.defs | 12 +- arch/sparc/src/bm3823/bm3823-irq.c | 14 +- arch/sparc/src/bm3823/bm3823-lowconsole.c | 10 +- arch/sparc/src/bm3823/bm3823-lowinit.c | 8 +- arch/sparc/src/bm3823/bm3823-serial.c | 36 ++-- arch/sparc/src/bm3823/bm3823-timerisr.c | 6 +- arch/sparc/src/bm3823/bm3823.h | 6 +- arch/sparc/src/bm3823/bm3823_exceptions.S | 4 +- arch/sparc/src/common/Make.defs | 22 +-- ...up_allocateheap.c => sparc_allocateheap.c} | 4 +- .../common/{up_assert.c => sparc_assert.c} | 6 +- .../{up_checkstack.c => sparc_checkstack.c} | 10 +- .../{up_createstack.c => sparc_createstack.c} | 6 +- .../src/common/{up_exit.c => sparc_exit.c} | 8 +- .../src/common/{up_idle.c => sparc_idle.c} | 4 +- .../{up_initialize.c => sparc_initialize.c} | 24 +-- .../{up_internal.h => sparc_internal.h} | 50 +++--- .../src/common/sparc_lowputs.c} | 11 +- .../common/{up_mdelay.c => sparc_mdelay.c} | 2 +- .../{up_modifyreg16.c => sparc_modifyreg16.c} | 4 +- .../{up_modifyreg32.c => sparc_modifyreg32.c} | 4 +- .../{up_modifyreg8.c => sparc_modifyreg8.c} | 4 +- .../src/common/sparc_nputs.c} | 2 +- ...up_releasestack.c => sparc_releasestack.c} | 4 +- .../{up_stackframe.c => sparc_stackframe.c} | 4 +- .../common/{up_testset.c => sparc_testset.c} | 2 +- .../common/{up_udelay.c => sparc_udelay.c} | 2 +- .../{up_usestack.c => sparc_usestack.c} | 6 +- arch/sparc/src/common/up_nputs.c | 58 ------ arch/sparc/src/s698pm/Make.defs | 2 +- arch/sparc/src/s698pm/s698pm-irq.c | 18 +- arch/sparc/src/s698pm/s698pm-lowconsole.c | 6 +- arch/sparc/src/s698pm/s698pm-lowinit.c | 6 +- arch/sparc/src/s698pm/s698pm-serial.c | 36 ++-- arch/sparc/src/s698pm/s698pm-timerisr.c | 6 +- arch/sparc/src/s698pm/s698pm_cpuidlestack.c | 2 +- arch/sparc/src/s698pm/s698pm_cpuindex.c | 2 +- arch/sparc/src/s698pm/s698pm_cpupause.c | 6 +- arch/sparc/src/s698pm/s698pm_cpustart.c | 2 +- arch/sparc/src/s698pm/s698pm_exceptions.S | 4 +- arch/sparc/src/s698pm/s698pm_tim.c | 6 +- arch/sparc/src/sparc_v8/Make.defs | 36 ++++ arch/sparc/src/sparc_v8/sparc_v8.h | 12 +- .../{up_blocktask.c => sparc_v8_blocktask.c} | 12 +- .../{up_copystate.c => sparc_v8_copystate.c} | 8 +- .../sparc_v8/{up_doirq.c => sparc_v8_doirq.c} | 6 +- .../{up_dumpstate.c => sparc_v8_dumpstate.c} | 10 +- ...initialstate.c => sparc_v8_initialstate.c} | 6 +- .../src/sparc_v8/{up_irq.c => sparc_v8_irq.c} | 2 +- ...asepending.c => sparc_v8_releasepending.c} | 12 +- .../{up_romgetc.c => sparc_v8_romgetc.c} | 2 +- ...gaction.c => sparc_v8_schedulesigaction.c} | 28 +-- ...{up_sigdeliver.c => sparc_v8_sigdeliver.c} | 20 +-- .../{up_swint1.c => sparc_v8_swint1.c} | 14 +- .../{up_syscall.S => sparc_v8_syscall.S} | 26 +-- ...p_systemreset.c => sparc_v8_systemreset.c} | 4 +- ...p_unblocktask.c => sparc_v8_unblocktask.c} | 12 +- .../{up_allocateheap.c => x86_allocateheap.c} | 4 +- .../src/common/{up_assert.c => x86_assert.c} | 16 +- .../{up_blocktask.c => x86_blocktask.c} | 10 +- .../{up_copystate.c => x86_copystate.c} | 8 +- arch/x86/src/common/{up_exit.c => x86_exit.c} | 6 +- .../{up_initialize.c => x86_initialize.c} | 18 +- .../common/{up_internal.h => x86_internal.h} | 49 +++-- .../src/common/x86_lowputs.c} | 10 +- .../src/common/{up_mdelay.c => x86_mdelay.c} | 2 +- .../{up_modifyreg16.c => x86_modifyreg16.c} | 4 +- .../{up_modifyreg32.c => x86_modifyreg32.c} | 4 +- .../{up_modifyreg8.c => x86_modifyreg8.c} | 4 +- .../src/common/{up_nputs.c => x86_nputs.c} | 2 +- ..._releasepending.c => x86_releasepending.c} | 10 +- .../src/common/x86_udelay.c} | 2 +- .../src/common/x86_unblocktask.c} | 10 +- .../{up_createstack.c => i486_createstack.c} | 4 +- ...{up_initialstate.c => i486_initialstate.c} | 4 +- arch/x86/src/i486/{up_irq.c => i486_irq.c} | 4 +- .../src/i486/{up_regdump.c => i486_regdump.c} | 8 +- ...{up_releasestack.c => i486_releasestack.c} | 4 +- .../i486/{up_savestate.c => i486_savestate.c} | 12 +- ...lesigaction.c => i486_schedulesigaction.c} | 10 +- .../{up_sigdeliver.c => i486_sigdeliver.c} | 12 +- .../{up_stackframe.c => i486_stackframe.c} | 4 +- .../i486/{up_syscall6.S => i486_syscall6.S} | 4 +- .../i486/{up_usestack.c => i486_usestack.c} | 4 +- arch/x86/src/qemu/Make.defs | 20 ++- arch/x86/src/qemu/chip.h | 3 + arch/x86/src/qemu/qemu.h | 2 +- arch/x86/src/qemu/qemu_fullcontextrestore.S | 14 +- arch/x86/src/qemu/qemu_handlers.c | 2 +- arch/x86/src/qemu/qemu_idle.c | 2 +- arch/x86/src/qemu/qemu_lowputc.c | 6 +- arch/x86/src/qemu/qemu_lowsetup.c | 4 +- arch/x86/src/qemu/qemu_saveusercontext.S | 4 +- arch/x86/src/qemu/qemu_serial.c | 21 ++- arch/x86/src/qemu/qemu_timerisr.c | 2 +- arch/x86/src/qemu/qemu_vectors.S | 6 +- arch/x86_64/src/common/up_lowputs.c | 59 ------ arch/x86_64/src/common/up_mdelay.c | 75 -------- arch/x86_64/src/common/up_nputs.c | 58 ------ ...p_allocateheap.c => x86_64_allocateheap.c} | 4 +- .../common/{up_assert.c => x86_64_assert.c} | 14 +- .../{up_blocktask.c => x86_64_blocktask.c} | 14 +- .../{up_copystate.c => x86_64_copystate.c} | 8 +- .../src/common/{up_exit.c => x86_64_exit.c} | 8 +- .../{up_initialize.c => x86_64_initialize.c} | 18 +- .../{up_internal.h => x86_64_internal.h} | 52 +++--- .../src/common/x86_64_lowputs.c} | 10 +- .../src/common/x86_64_mdelay.c} | 2 +- ...{up_modifyreg16.c => x86_64_modifyreg16.c} | 4 +- ...{up_modifyreg32.c => x86_64_modifyreg32.c} | 4 +- .../{up_modifyreg8.c => x86_64_modifyreg8.c} | 4 +- arch/x86_64/src/common/x86_64_nputs.c | 58 ++++++ ...leasepending.c => x86_64_releasepending.c} | 14 +- .../common/{up_udelay.c => x86_64_udelay.c} | 2 +- ...{up_unblocktask.c => x86_64_unblocktask.c} | 14 +- arch/x86_64/src/intel64/Make.defs | 19 +- arch/x86_64/src/intel64/chip.h | 5 + arch/x86_64/src/intel64/intel64.h | 2 +- .../src/intel64/intel64_check_capability.c | 2 +- ...up_createstack.c => intel64_createstack.c} | 4 +- .../src/intel64/intel64_fullcontextrestore.S | 14 +- arch/x86_64/src/intel64/intel64_handlers.c | 4 +- arch/x86_64/src/intel64/intel64_idle.c | 2 +- ..._initialstate.c => intel64_initialstate.c} | 4 +- .../src/intel64/{up_irq.c => intel64_irq.c} | 4 +- arch/x86_64/src/intel64/intel64_lowsetup.c | 4 +- .../{up_map_region.c => intel64_map_region.c} | 4 +- .../{up_regdump.c => intel64_regdump.c} | 8 +- ..._releasestack.c => intel64_releasestack.c} | 4 +- ..._auxstate.c => intel64_restore_auxstate.c} | 8 +- arch/x86_64/src/intel64/intel64_rng.c | 2 +- .../src/intel64/{up_rtc.c => intel64_rtc.c} | 4 +- .../{up_savestate.c => intel64_savestate.c} | 12 +- .../src/intel64/intel64_saveusercontext.S | 2 +- ...igaction.c => intel64_schedulesigaction.c} | 10 +- arch/x86_64/src/intel64/intel64_serial.c | 17 +- .../{up_sigdeliver.c => intel64_sigdeliver.c} | 12 +- .../{up_stackframe.c => intel64_stackframe.c} | 4 +- arch/x86_64/src/intel64/intel64_timerisr.c | 2 +- .../{up_usestack.c => intel64_usestack.c} | 4 +- arch/x86_64/src/intel64/intel64_vectors.S | 6 +- arch/xtensa/src/common/xtensa.h | 16 +- arch/xtensa/src/common/xtensa_initialize.c | 4 +- arch/xtensa/src/common/xtensa_lowputs.c | 6 +- arch/xtensa/src/common/xtensa_swint.c | 4 +- arch/xtensa/src/esp32/esp32_emac.c | 4 +- arch/xtensa/src/esp32/esp32_serial.c | 4 +- arch/xtensa/src/esp32s2/esp32s2_lowputc.c | 4 +- arch/xtensa/src/esp32s2/esp32s2_serial.c | 6 +- arch/xtensa/src/esp32s2/esp32s2_start.c | 2 +- arch/xtensa/src/esp32s3/esp32s3_lowputc.c | 4 +- arch/xtensa/src/esp32s3/esp32s3_serial.c | 10 +- arch/xtensa/src/esp32s3/esp32s3_start.c | 2 +- arch/z16/src/common/z16_internal.h | 3 +- arch/z16/src/common/z16_registerdump.c | 2 +- arch/z16/src/z16f/z16f_saveusercontext.S | 6 +- arch/z80/src/common/z80_allocateheap.c | 4 +- arch/z80/src/common/z80_initialize.c | 4 +- arch/z80/src/common/z80_internal.h | 16 +- arch/z80/src/ez80/ez80_emac.c | 12 +- arch/z80/src/ez80/ez80_registerdump.c | 2 +- arch/z80/src/ez80/ez80_saveusercontext.asm | 6 +- arch/z80/src/ez80/ez80_timerisr.c | 2 +- arch/z80/src/ez80/switch.h | 4 +- arch/z80/src/z180/switch.h | 4 +- arch/z80/src/z180/z180_lowserial.c | 4 +- arch/z80/src/z180/z180_registerdump.c | 2 +- arch/z80/src/z180/z180_saveusercontext.asm | 4 +- arch/z80/src/z180/z180_scc.c | 2 +- arch/z80/src/z180/z180_serial.h | 6 +- arch/z80/src/z8/switch.h | 4 +- arch/z80/src/z8/z8_registerdump.c | 2 +- arch/z80/src/z8/z8_restorecontext.S | 4 +- arch/z80/src/z8/z8_saveusercontext.S | 6 +- arch/z80/src/z80/switch.h | 4 +- arch/z80/src/z80/z80_registerdump.c | 2 +- arch/z80/src/z80/z80_saveusercontext.asm | 4 +- boards/avr/at32uc3/avr32dev1/src/avr32_boot.c | 2 +- .../at90usb/micropendous3/src/at90usb_boot.c | 2 +- .../avr/at90usb/teensy-2.0/src/at90usb_boot.c | 2 +- .../avr/at90usb/teensy-2.0/src/at90usb_leds.c | 2 +- .../avr/at90usb/teensy-2.0/src/at90usb_spi.c | 2 +- boards/avr/atmega/amber/src/atmega_boot.c | 2 +- .../atmega/arduino-mega2560/src/avr_boot.c | 2 +- .../atmega/arduino-mega2560/src/avr_leds.c | 2 +- boards/avr/atmega/moteino-mega/src/avr_boot.c | 2 +- boards/avr/atmega/moteino-mega/src/avr_leds.c | 2 +- boards/or1k/mor1kx/or1k/src/or1k_autoled.c | 2 +- .../renesas/m16c/skp16c26/src/m16c_buttons.c | 2 +- boards/renesas/m16c/skp16c26/src/m16c_lcd.c | 2 +- .../m16c/skp16c26/src/m16c_lcdconsole.c | 2 +- boards/renesas/m16c/skp16c26/src/m16c_leds.c | 2 +- .../rx65n/rx65n-grrose/src/rx65n_sbram.c | 2 +- .../rx65n/rx65n-rsk2mb/src/rx65n_sbram.c | 2 +- boards/renesas/sh1/us7032evb1/src/sh1_leds.c | 2 +- boards/sim/sim/sim/src/sim_bringup.c | 10 +- boards/sim/sim/sim/src/sim_buttons.c | 2 +- boards/sparc/bm3803/xx3803/src/bm3803_boot.c | 2 +- boards/sparc/bm3823/xx3823/src/bm3823_boot.c | 2 +- boards/sparc/bm3823/xx3823/src/bm3823_leds.c | 2 +- boards/x86/qemu/qemu-i486/src/qemu_appinit.c | 2 +- boards/x86/qemu/qemu-i486/src/qemu_boot.c | 2 +- .../intel64/qemu-intel64/src/qemu_appinit.c | 2 +- .../intel64/qemu-intel64/src/qemu_boot.c | 2 +- .../intel64/qemu-intel64/src/qemu_net.c | 2 +- 613 files changed, 3023 insertions(+), 2957 deletions(-) rename arch/avr/src/avr/{up_blocktask.c => avr_blocktask.c} (92%) rename arch/avr/src/avr/{up_checkstack.c => avr_checkstack.c} (98%) rename arch/avr/src/avr/{up_copystate.c => avr_copystate.c} (94%) rename arch/avr/src/avr/{up_createstack.c => avr_createstack.c} (98%) rename arch/avr/src/avr/{up_doirq.c => avr_doirq.c} (97%) rename arch/avr/src/avr/{up_dumpstate.c => avr_dumpstate.c} (98%) rename arch/avr/src/avr/{up_initialstate.c => avr_initialstate.c} (98%) rename arch/avr/src/avr/{up_irq.c => avr_irq.c} (97%) rename arch/avr/src/avr/{up_releasepending.c => avr_releasepending.c} (91%) rename arch/avr/src/avr/{up_romgetc.c => avr_romgetc.c} (99%) rename arch/avr/src/avr/{up_schedulesigaction.c => avr_schedulesigaction.c} (97%) rename arch/avr/src/avr/{up_sigdeliver.c => avr_sigdeliver.c} (91%) rename arch/avr/src/avr/{up_spi.c => avr_spi.c} (99%) rename arch/avr/src/avr/{up_stackframe.c => avr_stackframe.c} (98%) rename arch/avr/src/avr/{up_switchcontext.S => avr_switchcontext.S} (88%) rename arch/avr/src/avr/{up_unblocktask.c => avr_unblocktask.c} (91%) rename arch/avr/src/avr/{up_usestack.c => avr_usestack.c} (98%) rename arch/avr/src/avr32/{up_blocktask.c => avr_blocktask.c} (93%) rename arch/avr/src/avr32/{up_copystate.c => avr_copystate.c} (94%) rename arch/avr/src/avr32/{up_createstack.c => avr_createstack.c} (99%) rename arch/avr/src/avr32/{up_doirq.c => avr_doirq.c} (97%) rename arch/avr/src/avr32/{up_dumpstate.c => avr_dumpstate.c} (98%) rename arch/avr/src/avr32/{up_exceptions.S => avr_exceptions.S} (97%) rename arch/avr/src/avr32/{up_fullcontextrestore.S => avr_fullcontextrestore.S} (93%) rename arch/avr/src/avr32/{up_initialstate.c => avr_initialstate.c} (98%) rename arch/avr/src/avr32/{up_nommuhead.S => avr_nommuhead.S} (95%) rename arch/avr/src/avr32/{up_releasepending.c => avr_releasepending.c} (93%) rename arch/avr/src/avr32/{up_schedulesigaction.c => avr_schedulesigaction.c} (96%) rename arch/avr/src/avr32/{up_sigdeliver.c => avr_sigdeliver.c} (91%) rename arch/{hc/src/common/up_stackframe.c => avr/src/avr32/avr_stackframe.c} (98%) rename arch/avr/src/avr32/{up_switchcontext.S => avr_switchcontext.S} (87%) rename arch/avr/src/avr32/{up_syscall6.S => avr_syscall6.S} (98%) rename arch/avr/src/avr32/{up_unblocktask.c => avr_unblocktask.c} (92%) rename arch/avr/src/avr32/{up_usestack.c => avr_usestack.c} (98%) rename arch/avr/src/common/{up_allocateheap.c => avr_allocateheap.c} (97%) rename arch/avr/src/common/{up_assert.c => avr_assert.c} (98%) rename arch/avr/src/common/{up_exit.c => avr_exit.c} (97%) rename arch/avr/src/common/{up_idle.c => avr_idle.c} (97%) rename arch/avr/src/common/{up_initialize.c => avr_initialize.c} (93%) rename arch/avr/src/common/{up_internal.h => avr_internal.h} (89%) rename arch/{sparc/src/common/up_lowputs.c => avr/src/common/avr_lowputs.c} (93%) rename arch/avr/src/common/{up_mdelay.c => avr_mdelay.c} (98%) rename arch/avr/src/common/{up_modifyreg16.c => avr_modifyreg16.c} (97%) rename arch/avr/src/common/{up_modifyreg32.c => avr_modifyreg32.c} (97%) rename arch/avr/src/common/{up_modifyreg8.c => avr_modifyreg8.c} (97%) rename arch/avr/src/common/{up_nputs.c => avr_nputs.c} (98%) rename arch/avr/src/common/{up_releasestack.c => avr_releasestack.c} (98%) rename arch/{x86/src/common/up_udelay.c => avr/src/common/avr_udelay.c} (99%) rename arch/ceva/src/common/{up_assert.c => ceva_assert.c} (99%) rename arch/ceva/src/common/{up_blocktask.c => ceva_blocktask.c} (93%) rename arch/ceva/src/common/{up_board.c => ceva_board.c} (97%) rename arch/ceva/src/common/{up_checkstack.c => ceva_checkstack.c} (98%) rename arch/ceva/src/common/{up_createstack.c => ceva_createstack.c} (97%) rename arch/ceva/src/common/{up_doirq.c => ceva_doirq.c} (96%) rename arch/ceva/src/common/{up_exit.c => ceva_exit.c} (96%) rename arch/ceva/src/common/{up_fullcontextrestore.c => ceva_fullcontextrestore.c} (88%) rename arch/ceva/src/common/{up_heap.c => ceva_heap.c} (97%) rename arch/ceva/src/common/{up_idle.c => ceva_idle.c} (93%) rename arch/ceva/src/common/{up_initialize.c => ceva_initialize.c} (92%) rename arch/ceva/src/common/{up_internal.h => ceva_internal.h} (85%) rename arch/ceva/src/common/{up_modifyreg16.c => ceva_modifyreg16.c} (96%) rename arch/ceva/src/common/{up_modifyreg32.c => ceva_modifyreg32.c} (96%) rename arch/ceva/src/common/{up_modifyreg8.c => ceva_modifyreg8.c} (96%) rename arch/ceva/src/common/{up_nputs.c => ceva_nputs.c} (97%) rename arch/ceva/src/common/{up_pthread_start.c => ceva_pthread_start.c} (98%) rename arch/ceva/src/common/{up_releasepending.c => ceva_releasepending.c} (94%) rename arch/ceva/src/common/{up_releasestack.c => ceva_releasestack.c} (98%) rename arch/ceva/src/common/{up_saveusercontext.c => ceva_saveusercontext.c} (96%) rename arch/ceva/src/common/{up_schedulesigaction.c => ceva_schedulesigaction.c} (97%) rename arch/ceva/src/common/{up_sigdeliver.c => ceva_sigdeliver.c} (95%) rename arch/ceva/src/common/{up_signal_dispatch.c => ceva_signal_dispatch.c} (96%) rename arch/ceva/src/common/{up_stackframe.c => ceva_stackframe.c} (98%) rename arch/ceva/src/common/{up_start.c => ceva_start.c} (98%) rename arch/ceva/src/common/{up_svcall.c => ceva_svcall.c} (95%) rename arch/ceva/src/common/{up_switchcontext.c => ceva_switchcontext.c} (87%) rename arch/ceva/src/common/{up_task_start.c => ceva_task_start.c} (98%) rename arch/ceva/src/common/{up_unblocktask.c => ceva_unblocktask.c} (93%) rename arch/ceva/src/common/{up_userspace.c => ceva_userspace.c} (98%) rename arch/ceva/src/common/{up_usestack.c => ceva_usestack.c} (96%) rename arch/ceva/src/common/{up_vfork.c => ceva_vfork.c} (99%) rename arch/ceva/src/xc5/{up_hardfault.c => xc5_hardfault.c} (95%) rename arch/ceva/src/xc5/{up_head.S => xc5_head.S} (96%) rename arch/ceva/src/xc5/{up_icache.c => xc5_icache.c} (99%) rename arch/ceva/src/xc5/{up_initialstate.c => xc5_initialstate.c} (96%) rename arch/ceva/src/xc5/{up_intc.c => xc5_intc.c} (97%) rename arch/ceva/src/xc5/{up_mpu.c => xc5_mpu.c} (99%) rename arch/ceva/src/xc5/{up_psu.c => xc5_psu.c} (97%) rename arch/ceva/src/xc5/{up_relocate.c => xc5_relocate.c} (98%) rename arch/ceva/src/xc5/{up_signal_handler.S => xc5_signal_handler.S} (97%) rename arch/ceva/src/xc5/{up_svcall_handler.S => xc5_svcall_handler.S} (89%) rename arch/ceva/src/xm6/{up_hardfault.c => xm6_hardfault.c} (96%) rename arch/ceva/src/xm6/{up_head.S => xm6_head.S} (95%) rename arch/ceva/src/xm6/{up_icache.c => xm6_icache.c} (99%) rename arch/ceva/src/xm6/{up_initialstate.c => xm6_initialstate.c} (97%) rename arch/ceva/src/xm6/{up_intc.c => xm6_intc.c} (97%) rename arch/ceva/src/xm6/{up_mpu.c => xm6_mpu.c} (99%) rename arch/ceva/src/xm6/{up_psu.c => xm6_psu.c} (95%) rename arch/ceva/src/xm6/{up_signal_handler.S => xm6_signal_handler.S} (97%) rename arch/ceva/src/xm6/{up_svcall_handler.S => xm6_svcall_handler.S} (89%) rename arch/hc/src/common/{up_allocateheap.c => hc_allocateheap.c} (97%) rename arch/hc/src/common/{up_blocktask.c => hc_blocktask.c} (95%) rename arch/hc/src/common/{up_copystate.c => hc_copystate.c} (95%) rename arch/hc/src/common/{up_createstack.c => hc_createstack.c} (99%) rename arch/hc/src/common/{up_doirq.c => hc_doirq.c} (97%) rename arch/hc/src/common/{up_exit.c => hc_exit.c} (97%) rename arch/hc/src/common/{up_idle.c => hc_idle.c} (97%) rename arch/hc/src/common/{up_initialize.c => hc_initialize.c} (92%) rename arch/hc/src/common/{up_internal.h => hc_internal.h} (86%) rename arch/hc/src/common/{up_mdelay.c => hc_mdelay.c} (98%) rename arch/hc/src/common/{up_modifyreg16.c => hc_modifyreg16.c} (97%) rename arch/hc/src/common/{up_modifyreg32.c => hc_modifyreg32.c} (97%) rename arch/hc/src/common/{up_modifyreg8.c => hc_modifyreg8.c} (97%) rename arch/hc/src/common/{up_nputs.c => hc_nputs.c} (98%) rename arch/hc/src/common/{up_releasepending.c => hc_releasepending.c} (95%) rename arch/hc/src/common/{up_releasestack.c => hc_releasestack.c} (98%) rename arch/{avr/src/avr32/up_stackframe.c => hc/src/common/hc_stackframe.c} (98%) rename arch/hc/src/common/{up_udelay.c => hc_udelay.c} (99%) rename arch/hc/src/common/{up_unblocktask.c => hc_unblocktask.c} (94%) rename arch/hc/src/common/{up_usestack.c => hc_usestack.c} (98%) rename arch/or1k/src/common/{up_allocateheap.c => or1k_allocateheap.c} (98%) rename arch/or1k/src/common/{up_assert.c => or1k_assert.c} (99%) rename arch/or1k/src/common/{up_blocktask.c => or1k_blocktask.c} (94%) rename arch/or1k/src/common/{up_checkstack.c => or1k_checkstack.c} (98%) rename arch/or1k/src/common/{up_copyfullstate.c => or1k_copyfullstate.c} (91%) rename arch/or1k/src/common/{up_cpuinfo.c => or1k_cpuinfo.c} (99%) rename arch/or1k/src/common/{up_createstack.c => or1k_createstack.c} (97%) rename arch/or1k/src/common/{up_doirq.c => or1k_doirq.c} (95%) rename arch/or1k/src/common/{up_etherstub.c => or1k_etherstub.c} (85%) rename arch/or1k/src/common/{up_exit.c => or1k_exit.c} (97%) rename arch/or1k/src/common/{up_fullcontextrestore.S => or1k_fullcontextrestore.S} (90%) rename arch/or1k/src/common/{up_idle.c => or1k_idle.c} (97%) rename arch/or1k/src/common/{up_initialize.c => or1k_initialize.c} (94%) rename arch/or1k/src/common/{up_initialstate.c => or1k_initialstate.c} (97%) rename arch/or1k/src/common/{up_internal.h => or1k_internal.h} (85%) rename arch/or1k/src/common/{up_lowputs.c => or1k_lowputs.c} (91%) rename arch/or1k/src/common/{up_mdelay.c => or1k_mdelay.c} (98%) rename arch/or1k/src/common/{up_modifyreg16.c => or1k_modifyreg16.c} (96%) rename arch/or1k/src/common/{up_modifyreg32.c => or1k_modifyreg32.c} (96%) rename arch/or1k/src/common/{up_modifyreg8.c => or1k_modifyreg8.c} (96%) rename arch/or1k/src/common/{up_nputs.c => or1k_nputs.c} (97%) rename arch/or1k/src/common/{up_pthread_start.c => or1k_pthread_start.c} (97%) rename arch/or1k/src/common/{up_releasepending.c => or1k_releasepending.c} (94%) rename arch/or1k/src/common/{up_releasestack.c => or1k_releasestack.c} (98%) rename arch/or1k/src/common/{up_saveusercontext.S => or1k_saveusercontext.S} (97%) rename arch/or1k/src/common/{up_schedulesigaction.c => or1k_schedulesigaction.c} (95%) rename arch/or1k/src/common/{up_stackframe.c => or1k_stackframe.c} (97%) rename arch/or1k/src/common/{up_task_start.c => or1k_task_start.c} (97%) rename arch/or1k/src/common/{up_timer.c => or1k_timer.c} (98%) rename arch/or1k/src/common/{up_uart.c => or1k_uart.c} (96%) rename arch/or1k/src/common/{up_udelay.c => or1k_udelay.c} (98%) rename arch/or1k/src/common/{up_unblocktask.c => or1k_unblocktask.c} (94%) rename arch/or1k/src/common/{up_usestack.c => or1k_usestack.c} (98%) rename arch/or1k/src/mor1kx/{up_irq.c => or1k_irq.c} (97%) rename arch/or1k/src/mor1kx/{up_vectortab.S => or1k_vectortab.S} (99%) rename arch/renesas/src/common/{up_allocateheap.c => renesas_allocateheap.c} (97%) rename arch/renesas/src/common/{up_assert.c => renesas_assert.c} (97%) rename arch/renesas/src/common/{up_blocktask.c => renesas_blocktask.c} (95%) rename arch/renesas/src/common/{up_createstack.c => renesas_createstack.c} (98%) rename arch/renesas/src/common/{up_doirq.c => renesas_doirq.c} (97%) rename arch/renesas/src/common/{up_exit.c => renesas_exit.c} (97%) rename arch/renesas/src/common/{up_idle.c => renesas_idle.c} (97%) rename arch/renesas/src/common/{up_initialize.c => renesas_initialize.c} (95%) rename arch/renesas/src/common/{up_internal.h => renesas_internal.h} (79%) create mode 100644 arch/renesas/src/common/renesas_lowputs.c create mode 100644 arch/renesas/src/common/renesas_mdelay.c create mode 100644 arch/renesas/src/common/renesas_nputs.c rename arch/renesas/src/common/{up_releasepending.c => renesas_releasepending.c} (95%) rename arch/renesas/src/common/{up_releasestack.c => renesas_releasestack.c} (97%) rename arch/renesas/src/common/{up_stackframe.c => renesas_stackframe.c} (97%) rename arch/renesas/src/common/{up_udelay.c => renesas_udelay.c} (98%) rename arch/{x86/src/common/up_unblocktask.c => renesas/src/common/renesas_unblocktask.c} (90%) rename arch/renesas/src/common/{up_usestack.c => renesas_usestack.c} (98%) rename arch/sim/src/sim/posix/{up_hcisocket_host.c => sim_hcisocket_host.c} (92%) rename arch/sim/src/sim/posix/{up_hostfs.c => sim_hostfs.c} (99%) rename arch/sim/src/sim/posix/{up_hostirq.c => sim_hostirq.c} (97%) rename arch/sim/src/sim/posix/{up_hostmemory.c => sim_hostmemory.c} (84%) rename arch/sim/src/sim/posix/{up_hostmisc.c => sim_hostmisc.c} (92%) rename arch/sim/src/sim/posix/{up_hosttime.c => sim_hosttime.c} (89%) rename arch/sim/src/sim/posix/{up_i2cbus.h => sim_i2cbus.h} (94%) rename arch/sim/src/sim/posix/{up_i2cbuslinux.c => sim_i2cbuslinux.c} (97%) rename arch/sim/src/sim/posix/{up_simsmp.c => sim_simsmp.c} (97%) rename arch/sim/src/sim/posix/{up_simuart.c => sim_simuart.c} (98%) rename arch/sim/src/sim/posix/{up_spi.h => sim_spi.h} (97%) rename arch/sim/src/sim/posix/{up_spilinux.c => sim_spilinux.c} (99%) rename arch/sim/src/sim/posix/{up_tapdev.c => sim_tapdev.c} (94%) rename arch/sim/src/sim/posix/{up_testset.c => sim_testset.c} (97%) rename arch/sim/src/sim/posix/{up_usrsock_host.c => sim_usrsock_host.c} (99%) rename arch/sim/src/sim/posix/{up_vpnkit.c => sim_vpnkit.c} (89%) rename arch/sim/src/sim/posix/{up_wpcap.c => sim_wpcap.c} (95%) rename arch/sim/src/sim/posix/{up_x11eventloop.c => sim_x11eventloop.c} (85%) rename arch/sim/src/sim/posix/{up_x11framebuffer.c => sim_x11framebuffer.c} (86%) rename arch/sim/src/sim/{up_ajoystick.c => sim_ajoystick.c} (98%) rename arch/sim/src/sim/{up_alsa.c => sim_alsa.c} (99%) rename arch/sim/src/sim/{up_assert.c => sim_assert.c} (97%) rename arch/sim/src/sim/{up_backtrace.c => sim_backtrace.c} (93%) rename arch/sim/src/sim/{up_blockdevice.c => sim_blockdevice.c} (91%) rename arch/sim/src/sim/{up_blocktask.c => sim_blocktask.c} (98%) rename arch/sim/src/sim/{up_checkstack.c => sim_checkstack.c} (98%) rename arch/sim/src/sim/{up_copyfullstate.c => sim_copyfullstate.c} (92%) rename arch/sim/src/sim/{up_cpuidlestack.c => sim_cpuidlestack.c} (98%) rename arch/sim/src/sim/{up_createstack.c => sim_createstack.c} (96%) rename arch/sim/src/sim/{up_deviceimage.c => sim_deviceimage.c} (98%) rename arch/sim/src/sim/{up_exit.c => sim_exit.c} (98%) rename arch/sim/src/sim/{up_framebuffer.c => sim_framebuffer.c} (88%) rename arch/sim/src/sim/{up_hcisocket.c => sim_hcisocket.c} (94%) rename arch/sim/src/sim/{up_hcisocket_host.h => sim_hcisocket_host.h} (76%) rename arch/sim/src/sim/{up_head.c => sim_head.c} (98%) rename arch/sim/src/sim/{up_heap.c => sim_heap.c} (97%) rename arch/sim/src/sim/{up_idle.c => sim_idle.c} (97%) rename arch/sim/src/sim/{up_initialize.c => sim_initialize.c} (92%) rename arch/sim/src/sim/{up_initialstate.c => sim_initialstate.c} (96%) rename arch/sim/src/sim/{up_internal.h => sim_internal.h} (65%) rename arch/sim/src/sim/{up_interruptcontext.c => sim_interruptcontext.c} (95%) rename arch/sim/src/sim/{up_keyboard.c => sim_keyboard.c} (91%) rename arch/sim/src/sim/{up_lcd.c => sim_lcd.c} (97%) rename arch/sim/src/sim/{up_macho_init.c => sim_macho_init.c} (99%) rename arch/sim/src/sim/{up_netdriver.c => sim_netdriver.c} (94%) rename arch/sim/src/sim/{up_nputs.c => sim_nputs.c} (98%) rename arch/sim/src/sim/{up_oneshot.c => sim_oneshot.c} (97%) rename arch/sim/src/sim/{up_releasepending.c => sim_releasepending.c} (98%) rename arch/sim/src/sim/{up_releasestack.c => sim_releasestack.c} (98%) rename arch/sim/src/sim/{up_romgetc.c => sim_romgetc.c} (98%) rename arch/sim/src/sim/{up_rptun.c => sim_rptun.c} (95%) rename arch/sim/src/sim/{up_rtc.c => sim_rtc.c} (97%) rename arch/sim/src/sim/{up_schedulesigaction.c => sim_schedulesigaction.c} (98%) rename arch/sim/src/sim/{up_sigdeliver.c => sim_sigdeliver.c} (98%) rename arch/sim/src/sim/{up_smpsignal.c => sim_smpsignal.c} (98%) rename arch/sim/src/sim/{up_stackframe.c => sim_stackframe.c} (98%) rename arch/sim/src/sim/{up_touchscreen.c => sim_touchscreen.c} (94%) rename arch/sim/src/sim/{up_uart.c => sim_uart.c} (99%) rename arch/sim/src/sim/{up_unblocktask.c => sim_unblocktask.c} (95%) rename arch/sim/src/sim/{up_usestack.c => sim_usestack.c} (97%) rename arch/sim/src/sim/{up_usrsock.c => sim_usrsock.c} (99%) rename arch/sim/src/sim/{up_usrsock_host.h => sim_usrsock_host.h} (98%) rename arch/sim/src/sim/{up_vfork.c => sim_vfork.c} (99%) rename arch/sim/src/sim/{up_vfork_arm.S => sim_vfork_arm.S} (99%) rename arch/sim/src/sim/{up_vfork_arm64.S => sim_vfork_arm64.S} (99%) rename arch/sim/src/sim/{up_vfork_x86.S => sim_vfork_x86.S} (99%) rename arch/sim/src/sim/{up_vfork_x86_64.S => sim_vfork_x86_64.S} (99%) rename arch/sim/src/sim/vpnkit/{negotiate.c => sim_negotiate.c} (94%) rename arch/sim/src/sim/vpnkit/{protocol.c => sim_protocol.c} (98%) rename arch/sim/src/sim/vpnkit/{protocol.h => sim_protocol.h} (99%) rename arch/sim/src/sim/win/{up_hostirq.c => sim_hostirq.c} (97%) rename arch/sim/src/sim/win/{up_hostmemory.c => sim_hostmemory.c} (82%) rename arch/sim/src/sim/win/{up_hostmisc.c => sim_hostmisc.c} (92%) rename arch/sim/src/sim/win/{up_hosttime.c => sim_hosttime.c} (91%) rename arch/sim/src/sim/win/{up_simuart.c => sim_simuart.c} (99%) rename arch/sparc/src/common/{up_allocateheap.c => sparc_allocateheap.c} (97%) rename arch/sparc/src/common/{up_assert.c => sparc_assert.c} (98%) rename arch/sparc/src/common/{up_checkstack.c => sparc_checkstack.c} (96%) rename arch/sparc/src/common/{up_createstack.c => sparc_createstack.c} (97%) rename arch/sparc/src/common/{up_exit.c => sparc_exit.c} (96%) rename arch/sparc/src/common/{up_idle.c => sparc_idle.c} (97%) rename arch/sparc/src/common/{up_initialize.c => sparc_initialize.c} (91%) rename arch/sparc/src/common/{up_internal.h => sparc_internal.h} (88%) rename arch/{renesas/src/common/up_lowputs.c => sparc/src/common/sparc_lowputs.c} (93%) rename arch/sparc/src/common/{up_mdelay.c => sparc_mdelay.c} (98%) rename arch/sparc/src/common/{up_modifyreg16.c => sparc_modifyreg16.c} (97%) rename arch/sparc/src/common/{up_modifyreg32.c => sparc_modifyreg32.c} (97%) rename arch/sparc/src/common/{up_modifyreg8.c => sparc_modifyreg8.c} (97%) rename arch/{renesas/src/common/up_nputs.c => sparc/src/common/sparc_nputs.c} (98%) rename arch/sparc/src/common/{up_releasestack.c => sparc_releasestack.c} (98%) rename arch/sparc/src/common/{up_stackframe.c => sparc_stackframe.c} (97%) rename arch/sparc/src/common/{up_testset.c => sparc_testset.c} (99%) rename arch/sparc/src/common/{up_udelay.c => sparc_udelay.c} (99%) rename arch/sparc/src/common/{up_usestack.c => sparc_usestack.c} (96%) delete mode 100644 arch/sparc/src/common/up_nputs.c create mode 100644 arch/sparc/src/sparc_v8/Make.defs rename arch/sparc/src/sparc_v8/{up_blocktask.c => sparc_v8_blocktask.c} (91%) rename arch/sparc/src/sparc_v8/{up_copystate.c => sparc_v8_copystate.c} (94%) rename arch/sparc/src/sparc_v8/{up_doirq.c => sparc_v8_doirq.c} (97%) rename arch/sparc/src/sparc_v8/{up_dumpstate.c => sparc_v8_dumpstate.c} (97%) rename arch/sparc/src/sparc_v8/{up_initialstate.c => sparc_v8_initialstate.c} (97%) rename arch/sparc/src/sparc_v8/{up_irq.c => sparc_v8_irq.c} (98%) rename arch/sparc/src/sparc_v8/{up_releasepending.c => sparc_v8_releasepending.c} (91%) rename arch/sparc/src/sparc_v8/{up_romgetc.c => sparc_v8_romgetc.c} (98%) rename arch/sparc/src/sparc_v8/{up_schedulesigaction.c => sparc_v8_schedulesigaction.c} (93%) rename arch/sparc/src/sparc_v8/{up_sigdeliver.c => sparc_v8_sigdeliver.c} (92%) rename arch/sparc/src/sparc_v8/{up_swint1.c => sparc_v8_swint1.c} (95%) rename arch/sparc/src/sparc_v8/{up_syscall.S => sparc_v8_syscall.S} (86%) rename arch/sparc/src/sparc_v8/{up_systemreset.c => sparc_v8_systemreset.c} (96%) rename arch/sparc/src/sparc_v8/{up_unblocktask.c => sparc_v8_unblocktask.c} (91%) rename arch/x86/src/common/{up_allocateheap.c => x86_allocateheap.c} (97%) rename arch/x86/src/common/{up_assert.c => x86_assert.c} (96%) rename arch/x86/src/common/{up_blocktask.c => x86_blocktask.c} (95%) rename arch/x86/src/common/{up_copystate.c => x86_copystate.c} (94%) rename arch/x86/src/common/{up_exit.c => x86_exit.c} (97%) rename arch/x86/src/common/{up_initialize.c => x86_initialize.c} (91%) rename arch/x86/src/common/{up_internal.h => x86_internal.h} (87%) rename arch/{avr/src/common/up_lowputs.c => x86/src/common/x86_lowputs.c} (93%) rename arch/x86/src/common/{up_mdelay.c => x86_mdelay.c} (98%) rename arch/x86/src/common/{up_modifyreg16.c => x86_modifyreg16.c} (97%) rename arch/x86/src/common/{up_modifyreg32.c => x86_modifyreg32.c} (97%) rename arch/x86/src/common/{up_modifyreg8.c => x86_modifyreg8.c} (97%) rename arch/x86/src/common/{up_nputs.c => x86_nputs.c} (98%) rename arch/x86/src/common/{up_releasepending.c => x86_releasepending.c} (94%) rename arch/{avr/src/common/up_udelay.c => x86/src/common/x86_udelay.c} (99%) rename arch/{renesas/src/common/up_unblocktask.c => x86/src/common/x86_unblocktask.c} (94%) rename arch/x86/src/i486/{up_createstack.c => i486_createstack.c} (99%) rename arch/x86/src/i486/{up_initialstate.c => i486_initialstate.c} (98%) rename arch/x86/src/i486/{up_irq.c => i486_irq.c} (99%) rename arch/x86/src/i486/{up_regdump.c => i486_regdump.c} (94%) rename arch/x86/src/i486/{up_releasestack.c => i486_releasestack.c} (98%) rename arch/x86/src/i486/{up_savestate.c => i486_savestate.c} (93%) rename arch/x86/src/i486/{up_schedulesigaction.c => i486_schedulesigaction.c} (95%) rename arch/x86/src/i486/{up_sigdeliver.c => i486_sigdeliver.c} (94%) rename arch/x86/src/i486/{up_stackframe.c => i486_stackframe.c} (98%) rename arch/x86/src/i486/{up_syscall6.S => i486_syscall6.S} (97%) rename arch/x86/src/i486/{up_usestack.c => i486_usestack.c} (98%) delete mode 100644 arch/x86_64/src/common/up_lowputs.c delete mode 100644 arch/x86_64/src/common/up_mdelay.c delete mode 100644 arch/x86_64/src/common/up_nputs.c rename arch/x86_64/src/common/{up_allocateheap.c => x86_64_allocateheap.c} (97%) rename arch/x86_64/src/common/{up_assert.c => x86_64_assert.c} (96%) rename arch/x86_64/src/common/{up_blocktask.c => x86_64_blocktask.c} (92%) rename arch/x86_64/src/common/{up_copystate.c => x86_64_copystate.c} (93%) rename arch/x86_64/src/common/{up_exit.c => x86_64_exit.c} (97%) rename arch/x86_64/src/common/{up_initialize.c => x86_64_initialize.c} (92%) rename arch/x86_64/src/common/{up_internal.h => x86_64_internal.h} (86%) rename arch/{x86/src/common/up_lowputs.c => x86_64/src/common/x86_64_lowputs.c} (92%) rename arch/{renesas/src/common/up_mdelay.c => x86_64/src/common/x86_64_mdelay.c} (98%) rename arch/x86_64/src/common/{up_modifyreg16.c => x86_64_modifyreg16.c} (97%) rename arch/x86_64/src/common/{up_modifyreg32.c => x86_64_modifyreg32.c} (97%) rename arch/x86_64/src/common/{up_modifyreg8.c => x86_64_modifyreg8.c} (97%) create mode 100644 arch/x86_64/src/common/x86_64_nputs.c rename arch/x86_64/src/common/{up_releasepending.c => x86_64_releasepending.c} (92%) rename arch/x86_64/src/common/{up_udelay.c => x86_64_udelay.c} (98%) rename arch/x86_64/src/common/{up_unblocktask.c => x86_64_unblocktask.c} (92%) rename arch/x86_64/src/intel64/{up_createstack.c => intel64_createstack.c} (98%) rename arch/x86_64/src/intel64/{up_initialstate.c => intel64_initialstate.c} (98%) rename arch/x86_64/src/intel64/{up_irq.c => intel64_irq.c} (99%) rename arch/x86_64/src/intel64/{up_map_region.c => intel64_map_region.c} (96%) rename arch/x86_64/src/intel64/{up_regdump.c => intel64_regdump.c} (97%) rename arch/x86_64/src/intel64/{up_releasestack.c => intel64_releasestack.c} (97%) rename arch/x86_64/src/intel64/{up_restore_auxstate.c => intel64_restore_auxstate.c} (91%) rename arch/x86_64/src/intel64/{up_rtc.c => intel64_rtc.c} (98%) rename arch/x86_64/src/intel64/{up_savestate.c => intel64_savestate.c} (87%) rename arch/x86_64/src/intel64/{up_schedulesigaction.c => intel64_schedulesigaction.c} (95%) rename arch/x86_64/src/intel64/{up_sigdeliver.c => intel64_sigdeliver.c} (95%) rename arch/x86_64/src/intel64/{up_stackframe.c => intel64_stackframe.c} (97%) rename arch/x86_64/src/intel64/{up_usestack.c => intel64_usestack.c} (98%) diff --git a/arch/arm/src/tlsr82/tc32/tc32_saveusercontext.S b/arch/arm/src/tlsr82/tc32/tc32_saveusercontext.S index d98120c8867..e2750ae7a8c 100644 --- a/arch/arm/src/tlsr82/tc32/tc32_saveusercontext.S +++ b/arch/arm/src/tlsr82/tc32/tc32_saveusercontext.S @@ -41,12 +41,12 @@ ****************************************************************************/ /**************************************************************************** - * Name: arm_saveusercontext + * Name: up_saveusercontext * * Description: * Restore the current thread context. Full prototype is: * - * int arm_saveusercontext(uint32_t *saveregs); + * int up_saveusercontext(uint32_t *saveregs); * * R0 = saveregs = pinter saved array * diff --git a/arch/arm64/include/syscall.h b/arch/arm64/include/syscall.h index 7a3e6f1822b..3d019b1f4ad 100644 --- a/arch/arm64/include/syscall.h +++ b/arch/arm64/include/syscall.h @@ -61,7 +61,7 @@ /* SYS call 0: * - * int arm64_saveusercontext(void *saveregs); + * int up_saveusercontext(void *saveregs); */ #define SYS_save_context (0) diff --git a/arch/avr/src/at32uc3/Make.defs b/arch/avr/src/at32uc3/Make.defs index 3455bdc9a72..111569f5c09 100644 --- a/arch/avr/src/at32uc3/Make.defs +++ b/arch/avr/src/at32uc3/Make.defs @@ -20,23 +20,23 @@ # The start-up, "head", file -HEAD_ASRC = up_nommuhead.S +HEAD_ASRC = avr_nommuhead.S # Common AVR/AVR32 files -CMN_ASRCS = up_exceptions.S up_fullcontextrestore.S up_switchcontext.S -CMN_CSRCS = up_assert.c up_allocateheap.c up_blocktask.c up_copystate.c -CMN_CSRCS += up_createstack.c up_mdelay.c up_udelay.c up_exit.c up_idle.c -CMN_CSRCS += up_initialize.c up_initialstate.c -CMN_CSRCS += up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c -CMN_CSRCS += up_releasepending.c up_releasestack.c -CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c up_stackframe.c -CMN_CSRCS += up_unblocktask.c up_usestack.c up_doirq.c up_nputs.c +CMN_ASRCS = avr_exceptions.S avr_fullcontextrestore.S avr_switchcontext.S +CMN_CSRCS = avr_assert.c avr_allocateheap.c avr_blocktask.c avr_copystate.c +CMN_CSRCS += avr_createstack.c avr_mdelay.c avr_udelay.c avr_exit.c avr_idle.c +CMN_CSRCS += avr_initialize.c avr_initialstate.c +CMN_CSRCS += avr_modifyreg8.c avr_modifyreg16.c avr_modifyreg32.c +CMN_CSRCS += avr_releasepending.c avr_releasestack.c +CMN_CSRCS += avr_schedulesigaction.c avr_sigdeliver.c avr_stackframe.c +CMN_CSRCS += avr_unblocktask.c avr_usestack.c avr_doirq.c avr_nputs.c # Configuration-dependent common files ifeq ($(CONFIG_ARCH_STACKDUMP),y) -CMN_CSRCS += up_dumpstate.c +CMN_CSRCS += avr_dumpstate.c endif # Required AT32UC3 files diff --git a/arch/avr/src/at32uc3/at32uc3_clkinit.c b/arch/avr/src/at32uc3/at32uc3_clkinit.c index db62c3436c0..c15dc627e15 100644 --- a/arch/avr/src/at32uc3/at32uc3_clkinit.c +++ b/arch/avr/src/at32uc3/at32uc3_clkinit.c @@ -27,7 +27,7 @@ #include #include "at32uc3_config.h" -#include "up_internal.h" +#include "avr_internal.h" #include "at32uc3.h" #include "at32uc3_pm.h" #include "at32uc3_flashc.h" diff --git a/arch/avr/src/at32uc3/at32uc3_gpio.c b/arch/avr/src/at32uc3/at32uc3_gpio.c index 7eaed32fe8f..79bdca4d582 100644 --- a/arch/avr/src/at32uc3/at32uc3_gpio.c +++ b/arch/avr/src/at32uc3/at32uc3_gpio.c @@ -28,7 +28,7 @@ #include #include "at32uc3_config.h" -#include "up_internal.h" +#include "avr_internal.h" #include "at32uc3.h" #include "chip.h" diff --git a/arch/avr/src/at32uc3/at32uc3_gpioirq.c b/arch/avr/src/at32uc3/at32uc3_gpioirq.c index 0fcdb3a6205..207ab7fc61e 100644 --- a/arch/avr/src/at32uc3/at32uc3_gpioirq.c +++ b/arch/avr/src/at32uc3/at32uc3_gpioirq.c @@ -33,7 +33,7 @@ #include -#include "up_internal.h" +#include "avr_internal.h" #include "irq/irq.h" #include "at32uc3.h" #include "at32uc3_gpio.h" diff --git a/arch/avr/src/at32uc3/at32uc3_irq.c b/arch/avr/src/at32uc3/at32uc3_irq.c index 76dbde5d8cd..f68954163c1 100644 --- a/arch/avr/src/at32uc3/at32uc3_irq.c +++ b/arch/avr/src/at32uc3/at32uc3_irq.c @@ -34,7 +34,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" #include "at32uc3.h" #include "chip.h" diff --git a/arch/avr/src/at32uc3/at32uc3_lowconsole.c b/arch/avr/src/at32uc3/at32uc3_lowconsole.c index b7fbf50d439..f8d24748714 100644 --- a/arch/avr/src/at32uc3/at32uc3_lowconsole.c +++ b/arch/avr/src/at32uc3/at32uc3_lowconsole.c @@ -31,7 +31,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" #include "at32uc3.h" #include "at32uc3_pm.h" #include "at32uc3_usart.h" @@ -356,7 +356,7 @@ void up_consoleinit(void) putreg32(regval, AVR32_PM_PBAMASK); /* Then configure the console here (if it is not going to be configured - * by up_earlyserialinit()). + * by avr_earlyserialinit()). */ #if defined(HAVE_SERIAL_CONSOLE) && !defined(USE_EARLYSERIALINIT) @@ -367,14 +367,14 @@ void up_consoleinit(void) } /**************************************************************************** - * Name: up_lowputc + * Name: avr_lowputc * * Description: * Output one byte on the serial console * ****************************************************************************/ -void up_lowputc(char ch) +void avr_lowputc(char ch) { #ifdef HAVE_SERIAL_CONSOLE /* Wait until the TX to become ready */ diff --git a/arch/avr/src/at32uc3/at32uc3_lowinit.c b/arch/avr/src/at32uc3/at32uc3_lowinit.c index 4fbef8922a1..75fa4daf3b4 100644 --- a/arch/avr/src/at32uc3/at32uc3_lowinit.c +++ b/arch/avr/src/at32uc3/at32uc3_lowinit.c @@ -25,7 +25,7 @@ #include #include "at32uc3_config.h" -#include "up_internal.h" +#include "avr_internal.h" #include "at32uc3.h" /**************************************************************************** @@ -57,7 +57,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_lowinit + * Name: avr_lowinit * * Description: * This performs basic initialization of the USART used for the serial @@ -66,7 +66,7 @@ * ****************************************************************************/ -void up_lowinit(void) +void avr_lowinit(void) { /* Initialize MCU clocking */ @@ -81,7 +81,7 @@ void up_lowinit(void) */ #ifdef USE_EARLYSERIALINIT - up_earlyserialinit(); + avr_earlyserialinit(); #endif /* Perform board-level initialization */ diff --git a/arch/avr/src/at32uc3/at32uc3_serial.c b/arch/avr/src/at32uc3/at32uc3_serial.c index cf0007ff131..c6a2141f01a 100644 --- a/arch/avr/src/at32uc3/at32uc3_serial.c +++ b/arch/avr/src/at32uc3/at32uc3_serial.c @@ -42,7 +42,7 @@ #include "at32uc3_config.h" #include "chip.h" #include "at32uc3_usart.h" -#include "up_internal.h" +#include "avr_internal.h" #include "at32uc3.h" /**************************************************************************** @@ -687,18 +687,18 @@ static bool up_txready(struct uart_dev_s *dev) #ifdef USE_EARLYSERIALINIT /**************************************************************************** - * Name: up_earlyserialinit + * Name: avr_earlyserialinit * * Description: * Performs the low level USART initialization early in debug so that the * serial console will be available during bootup. This must be called - * before up_serialinit. NOTE: This function depends on GPIO pin + * before avr_serialinit. NOTE: This function depends on GPIO pin * configuration performed in up_consoleinit() and main clock * initialization performed in up_clkinitialize(). * ****************************************************************************/ -void up_earlyserialinit(void) +void avr_earlyserialinit(void) { /* Disable all USARTS */ @@ -720,15 +720,15 @@ void up_earlyserialinit(void) #endif /**************************************************************************** - * Name: up_serialinit + * Name: avr_serialinit * * Description: * Register serial console and serial ports. This assumes - * that up_earlyserialinit was called previously. + * that avr_earlyserialinit was called previously. * ****************************************************************************/ -void up_serialinit(void) +void avr_serialinit(void) { /* Register the console */ @@ -769,10 +769,10 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + avr_lowputc('\r'); } - up_lowputc(ch); + avr_lowputc(ch); up_restoreusartint(priv, imr); #endif return ch; @@ -797,10 +797,10 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + avr_lowputc('\r'); } - up_lowputc(ch); + avr_lowputc(ch); #endif return ch; } diff --git a/arch/avr/src/at32uc3/at32uc3_timerisr.c b/arch/avr/src/at32uc3/at32uc3_timerisr.c index f08c9fb83d3..e6844a248c9 100644 --- a/arch/avr/src/at32uc3/at32uc3_timerisr.c +++ b/arch/avr/src/at32uc3/at32uc3_timerisr.c @@ -29,7 +29,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" #include "chip.h" #include "at32uc3.h" #include "at32uc3_pm.h" diff --git a/arch/avr/src/at90usb/Make.defs b/arch/avr/src/at90usb/Make.defs index 31ae54b553d..5045f3bb33e 100644 --- a/arch/avr/src/at90usb/Make.defs +++ b/arch/avr/src/at90usb/Make.defs @@ -24,31 +24,31 @@ HEAD_ASRC = at90usb_head.S # Common AVR files -CMN_ASRCS = up_switchcontext.S -CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c -CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c -CMN_CSRCS += up_initialstate.c up_irq.c up_lowputs.c -CMN_CSRCS += up_mdelay.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c -CMN_CSRCS += up_nputs.c up_releasepending.c up_releasestack.c -CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c -CMN_CSRCS += up_stackframe.c up_udelay.c up_unblocktask.c up_usestack.c +CMN_ASRCS = avr_switchcontext.S +CMN_CSRCS = avr_allocateheap.c avr_assert.c avr_blocktask.c avr_copystate.c +CMN_CSRCS += avr_createstack.c avr_doirq.c avr_exit.c avr_idle.c avr_initialize.c +CMN_CSRCS += avr_initialstate.c avr_irq.c avr_lowputs.c +CMN_CSRCS += avr_mdelay.c avr_modifyreg8.c avr_modifyreg16.c avr_modifyreg32.c +CMN_CSRCS += avr_nputs.c avr_releasepending.c avr_releasestack.c +CMN_CSRCS += avr_schedulesigaction.c avr_sigdeliver.c +CMN_CSRCS += avr_stackframe.c avr_udelay.c avr_unblocktask.c avr_usestack.c # Configuration-dependent common files ifeq ($(CONFIG_ARCH_STACKDUMP),y) -CMN_CSRCS += up_dumpstate.c +CMN_CSRCS += avr_dumpstate.c endif ifeq ($(CONFIG_AVR_SPI),y) -CMN_CSRCS += up_spi.c +CMN_CSRCS += avr_spi.c endif ifeq ($(CONFIG_STACK_COLORATION),y) -CMN_CSRCS += up_checkstack.c +CMN_CSRCS += avr_checkstack.c endif ifeq ($(CONFIG_ARCH_ROMGETC),y) -CMN_CSRCS += up_romgetc.c +CMN_CSRCS += avr_romgetc.c endif # Required AT90USB files diff --git a/arch/avr/src/at90usb/at90usb_exceptions.S b/arch/avr/src/at90usb/at90usb_exceptions.S index 89a86fd5641..adef3a52c8d 100644 --- a/arch/avr/src/at90usb/at90usb_exceptions.S +++ b/arch/avr/src/at90usb/at90usb_exceptions.S @@ -37,8 +37,8 @@ ********************************************************************************************/ .file "at90usb_exceptions.S" - .global up_doirq - .global up_fullcontextrestore + .global avr_doirq + .global avr_fullcontextrestore /******************************************************************************************** * Macros @@ -109,7 +109,7 @@ excpt_common: EXCPT_PROLOGUE - /* Call up_doirq with r24 = IRQ number, r22-23 = Pointer to the save structure. The stack + /* Call avr_doirq with r24 = IRQ number, r22-23 = Pointer to the save structure. The stack * pointer currently points to the save structure (or maybe the save structure -1 since * the push operation post-decrements -- need to REVISIT this). */ @@ -119,7 +119,7 @@ excpt_common: adiw r28, 1 /* Remembering that push post-decrements */ movw r22, r28 /* Pass register save structure as the parameter 2 */ USE_INTSTACK rx, ry, rz /* Switch to the interrupt stack */ - call up_doirq /* Dispatch the interrupt */ + call avr_doirq /* Dispatch the interrupt */ RESTORE_STACK rx, ry /* Undo the operations of USE_INTSTACK */ /* up_doiq returns with r24-r25 equal to the new save structure. If no context @@ -132,11 +132,11 @@ excpt_common: cpc r29, r25 breq .Lnoswitch - /* A context switch has occurred, jump to up_fullcontextrestore with r24, r25 + /* A context switch has occurred, jump to avr_fullcontextrestore with r24, r25 * equal to the address of the new register save area. */ - jmp up_fullcontextrestore + jmp avr_fullcontextrestore /* No context switch occurred.. just return off the stack */ diff --git a/arch/avr/src/at90usb/at90usb_head.S b/arch/avr/src/at90usb/at90usb_head.S index c87a3ac209e..8f93c171773 100644 --- a/arch/avr/src/at90usb/at90usb_head.S +++ b/arch/avr/src/at90usb/at90usb_head.S @@ -58,7 +58,7 @@ .global _edata /* End of .data section in RAM */ .global _eronly /* Start of .data section in FLASH */ .global _enoinit /* End of uninitialized data. Defined by ld.script */ - .global up_lowinit /* Perform low level initialization */ + .global avr_lowinit /* Perform low level initialization */ .global nx_start /* NuttX entry point */ .global vectortab @@ -239,7 +239,7 @@ __do_clear_bss: /* Perform any low-level initialization */ - call up_lowinit + call avr_lowinit /* Now start NuttX */ diff --git a/arch/avr/src/at90usb/at90usb_lowconsole.c b/arch/avr/src/at90usb/at90usb_lowconsole.c index d896f4e3c70..e5a3fe73bd3 100644 --- a/arch/avr/src/at90usb/at90usb_lowconsole.c +++ b/arch/avr/src/at90usb/at90usb_lowconsole.c @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" #include "at90usb.h" /**************************************************************************** @@ -251,14 +251,14 @@ void up_consoleinit(void) } /**************************************************************************** - * Name: up_lowputc + * Name: avr_lowputc * * Description: * Output one byte on the serial console * ****************************************************************************/ -void up_lowputc(char ch) +void avr_lowputc(char ch) { #ifdef HAVE_SERIAL_CONSOLE while ((UCSR1A & (1 << UDRE1)) == 0); diff --git a/arch/avr/src/at90usb/at90usb_lowinit.c b/arch/avr/src/at90usb/at90usb_lowinit.c index d4031fe3555..33ba00dc79b 100644 --- a/arch/avr/src/at90usb/at90usb_lowinit.c +++ b/arch/avr/src/at90usb/at90usb_lowinit.c @@ -27,7 +27,7 @@ #include #include "at90usb_config.h" -#include "up_internal.h" +#include "avr_internal.h" #include "at90usb.h" /**************************************************************************** @@ -96,7 +96,7 @@ static inline void up_wdtinit(void) ****************************************************************************/ /**************************************************************************** - * Name: up_lowinit + * Name: avr_lowinit * * Description: * This performs basic initialization of the USART used for the serial @@ -105,7 +105,7 @@ static inline void up_wdtinit(void) * ****************************************************************************/ -void up_lowinit(void) +void avr_lowinit(void) { /* Disable the watchdog timer */ @@ -128,7 +128,7 @@ void up_lowinit(void) */ #ifdef USE_EARLYSERIALINIT - up_earlyserialinit(); + avr_earlyserialinit(); #endif /* Perform board-level initialization */ diff --git a/arch/avr/src/at90usb/at90usb_serial.c b/arch/avr/src/at90usb/at90usb_serial.c index 44b353297b4..3518bf35f1a 100644 --- a/arch/avr/src/at90usb/at90usb_serial.c +++ b/arch/avr/src/at90usb/at90usb_serial.c @@ -40,7 +40,7 @@ #include -#include "up_internal.h" +#include "avr_internal.h" #include "at90usb.h" /**************************************************************************** @@ -507,16 +507,16 @@ static bool usart1_txempty(struct uart_dev_s *dev) #ifdef USE_EARLYSERIALINIT /**************************************************************************** - * Name: up_earlyserialinit + * Name: avr_earlyserialinit * * Description: * Performs the low level USART initialization early in debug so that the * serial console will be available during bootup. This must be called - * before up_serialinit. + * before avr_serialinit. * ****************************************************************************/ -void up_earlyserialinit(void) +void avr_earlyserialinit(void) { /* Disable all USARTS */ @@ -532,15 +532,15 @@ void up_earlyserialinit(void) #endif /**************************************************************************** - * Name: up_serialinit + * Name: avr_serialinit * * Description: * Register serial console and serial ports. This assumes - * that up_earlyserialinit was called previously. + * that avr_earlyserialinit was called previously. * ****************************************************************************/ -void up_serialinit(void) +void avr_serialinit(void) { /* Register the console */ @@ -574,10 +574,10 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + avr_lowputc('\r'); } - up_lowputc(ch); + avr_lowputc(ch); usart1_restoreusartint(imr); #endif return ch; @@ -602,10 +602,10 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + avr_lowputc('\r'); } - up_lowputc(ch); + avr_lowputc(ch); #endif return ch; } diff --git a/arch/avr/src/at90usb/at90usb_timerisr.c b/arch/avr/src/at90usb/at90usb_timerisr.c index 5859d4c17e7..b92d931fbec 100644 --- a/arch/avr/src/at90usb/at90usb_timerisr.c +++ b/arch/avr/src/at90usb/at90usb_timerisr.c @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" #include "at90usb.h" /**************************************************************************** diff --git a/arch/avr/src/at90usb/at90usb_usbdev.c b/arch/avr/src/at90usb/at90usb_usbdev.c index 42239889c59..1f9f734947c 100644 --- a/arch/avr/src/at90usb/at90usb_usbdev.c +++ b/arch/avr/src/at90usb/at90usb_usbdev.c @@ -46,7 +46,7 @@ #include #include "chip.h" -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -2801,7 +2801,7 @@ static int avr_pullup(struct usbdev_s *dev, bool enable) ****************************************************************************/ /**************************************************************************** - * Name: up_usbinitialize + * Name: avr_usbinitialize * * Description: * Initialize USB hardware. @@ -2815,7 +2815,7 @@ static int avr_pullup(struct usbdev_s *dev, bool enable) * ****************************************************************************/ -void up_usbinitialize(void) +void avr_usbinitialize(void) { usbtrace(TRACE_DEVINIT, 0); @@ -2868,14 +2868,14 @@ void up_usbinitialize(void) return; errout: - up_usbuninitialize(); + avr_usbuninitialize(); } /**************************************************************************** - * Name: up_usbuninitialize + * Name: avr_usbuninitialize ****************************************************************************/ -void up_usbuninitialize(void) +void avr_usbuninitialize(void) { irqstate_t flags; diff --git a/arch/avr/src/atmega/Make.defs b/arch/avr/src/atmega/Make.defs index 5e43e2c028a..35890bf7e45 100644 --- a/arch/avr/src/atmega/Make.defs +++ b/arch/avr/src/atmega/Make.defs @@ -24,31 +24,31 @@ HEAD_ASRC = atmega_head.S # Common AVR files -CMN_ASRCS = up_switchcontext.S -CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c -CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c -CMN_CSRCS += up_initialstate.c up_irq.c up_lowputs.c -CMN_CSRCS += up_mdelay.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c -CMN_CSRCS += up_nputs.c up_releasepending.c up_releasestack.c -CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c -CMN_CSRCS += up_stackframe.c up_udelay.c up_unblocktask.c up_usestack.c +CMN_ASRCS = avr_switchcontext.S +CMN_CSRCS = avr_allocateheap.c avr_assert.c avr_blocktask.c avr_copystate.c +CMN_CSRCS += avr_createstack.c avr_doirq.c avr_exit.c avr_idle.c avr_initialize.c +CMN_CSRCS += avr_initialstate.c avr_irq.c avr_lowputs.c +CMN_CSRCS += avr_mdelay.c avr_modifyreg8.c avr_modifyreg16.c avr_modifyreg32.c +CMN_CSRCS += avr_nputs.c avr_releasepending.c avr_releasestack.c +CMN_CSRCS += avr_schedulesigaction.c avr_sigdeliver.c +CMN_CSRCS += avr_stackframe.c avr_udelay.c avr_unblocktask.c avr_usestack.c # Configuration-dependent common files ifeq ($(CONFIG_ARCH_STACKDUMP),y) -CMN_CSRCS += up_dumpstate.c +CMN_CSRCS += avr_dumpstate.c endif ifeq ($(CONFIG_AVR_SPI),y) -CMN_CSRCS += up_spi.c +CMN_CSRCS += avr_spi.c endif ifeq ($(CONFIG_STACK_COLORATION),y) -CMN_CSRCS += up_checkstack.c +CMN_CSRCS += avr_checkstack.c endif ifeq ($(CONFIG_ARCH_ROMGETC),y) -CMN_CSRCS += up_romgetc.c +CMN_CSRCS += avr_romgetc.c endif # Required ATMEGA files diff --git a/arch/avr/src/atmega/atmega_exceptions.S b/arch/avr/src/atmega/atmega_exceptions.S index faa9e5e7c9c..514c61870f1 100644 --- a/arch/avr/src/atmega/atmega_exceptions.S +++ b/arch/avr/src/atmega/atmega_exceptions.S @@ -33,8 +33,8 @@ ********************************************************************************************/ .file "atmega_exceptions.S" - .global up_doirq - .global up_fullcontextrestore + .global avr_doirq + .global avr_fullcontextrestore /******************************************************************************************** * Macros @@ -198,7 +198,7 @@ excpt_common: EXCPT_PROLOGUE - /* Call up_doirq with r24 = IRQ number, r22-23 = Pointer to the save structure. The stack + /* Call avr_doirq with r24 = IRQ number, r22-23 = Pointer to the save structure. The stack * pointer currently points to the save structure (or maybe the save structure -1 since * the push operation post-decrements -- need to REVISIT this). */ @@ -208,7 +208,7 @@ excpt_common: adiw r28, 1 /* Remembering that push post-decrements */ movw r22, r28 /* Pass register save structure as the parameter 2 */ USE_INTSTACK rx, ry, rz /* Switch to the interrupt stack */ - call up_doirq /* Dispatch the interrupt */ + call avr_doirq /* Dispatch the interrupt */ RESTORE_STACK rx, ry /* Undo the operations of USE_INTSTACK */ /* up_doiq returns with r24-r25 equal to the new save structure. If no context @@ -221,11 +221,11 @@ excpt_common: cpc r29, r25 breq .Lnoswitch - /* A context switch has occurred, jump to up_fullcontextrestore with r24, r25 + /* A context switch has occurred, jump to avr_fullcontextrestore with r24, r25 * equal to the address of the new register save ared. */ - jmp up_fullcontextrestore + jmp avr_fullcontextrestore /* No context switch occurred.. just return off the stack */ diff --git a/arch/avr/src/atmega/atmega_head.S b/arch/avr/src/atmega/atmega_head.S index d9afcdb2ce1..9ab077557ae 100644 --- a/arch/avr/src/atmega/atmega_head.S +++ b/arch/avr/src/atmega/atmega_head.S @@ -60,7 +60,7 @@ .global _edata /* End of .data section in RAM */ .global _eronly /* Start of .data section in FLASH */ .global _enoinit /* End of uninitilized data. Defined by ld.script */ - .global up_lowinit /* Perform low level initialization */ + .global avr_lowinit /* Perform low level initialization */ .global nx_start /* NuttX entry point */ .global vectortab @@ -435,7 +435,7 @@ __do_clear_bss: /* Perform any low-level initialization */ - call up_lowinit + call avr_lowinit /* Now start NuttX */ diff --git a/arch/avr/src/atmega/atmega_lowconsole.c b/arch/avr/src/atmega/atmega_lowconsole.c index 36c7edc33a1..8c024d4ee02 100644 --- a/arch/avr/src/atmega/atmega_lowconsole.c +++ b/arch/avr/src/atmega/atmega_lowconsole.c @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" #include "atmega.h" /**************************************************************************** @@ -442,14 +442,14 @@ void up_consoleinit(void) } /**************************************************************************** - * Name: up_lowputc + * Name: avr_lowputc * * Description: * Output one byte on the serial console * ****************************************************************************/ -void up_lowputc(char ch) +void avr_lowputc(char ch) { #ifdef HAVE_SERIAL_CONSOLE # if defined(CONFIG_USART0_SERIAL_CONSOLE) diff --git a/arch/avr/src/atmega/atmega_lowinit.c b/arch/avr/src/atmega/atmega_lowinit.c index 8be8881b85d..477954535bd 100644 --- a/arch/avr/src/atmega/atmega_lowinit.c +++ b/arch/avr/src/atmega/atmega_lowinit.c @@ -27,7 +27,7 @@ #include #include "atmega_config.h" -#include "up_internal.h" +#include "avr_internal.h" #include "atmega.h" /**************************************************************************** @@ -96,7 +96,7 @@ static inline void up_wdtinit(void) ****************************************************************************/ /**************************************************************************** - * Name: up_lowinit + * Name: avr_lowinit * * Description: * This performs basic initialization of the USART used for the serial @@ -105,7 +105,7 @@ static inline void up_wdtinit(void) * ****************************************************************************/ -void up_lowinit(void) +void avr_lowinit(void) { /* Disable the watchdog timer */ @@ -133,7 +133,7 @@ void up_lowinit(void) */ #ifdef USE_EARLYSERIALINIT - up_earlyserialinit(); + avr_earlyserialinit(); #endif /* Perform board-level initialization */ diff --git a/arch/avr/src/atmega/atmega_serial.c b/arch/avr/src/atmega/atmega_serial.c index 94ff3dc955d..8525de510d9 100644 --- a/arch/avr/src/atmega/atmega_serial.c +++ b/arch/avr/src/atmega/atmega_serial.c @@ -40,7 +40,7 @@ #include -#include "up_internal.h" +#include "avr_internal.h" #include "atmega.h" /**************************************************************************** @@ -823,16 +823,16 @@ static bool usart1_txempty(struct uart_dev_s *dev) #ifdef USE_EARLYSERIALINIT /**************************************************************************** - * Name: up_earlyserialinit + * Name: avr_earlyserialinit * * Description: * Performs the low level USART initialization early in debug so that the * serial console will be available during bootup. This must be called - * before up_serialinit. + * before avr_serialinit. * ****************************************************************************/ -void up_earlyserialinit(void) +void avr_earlyserialinit(void) { /* Disable all USARTS */ @@ -857,15 +857,15 @@ void up_earlyserialinit(void) #endif /**************************************************************************** - * Name: up_serialinit + * Name: avr_serialinit * * Description: * Register serial console and serial ports. This assumes - * that up_earlyserialinit was called previously. + * that avr_earlyserialinit was called previously. * ****************************************************************************/ -void up_serialinit(void) +void avr_serialinit(void) { /* Register the console */ @@ -906,10 +906,10 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + avr_lowputc('\r'); } - up_lowputc(ch); + avr_lowputc(ch); #if defined(CONFIG_USART0_SERIAL_CONSOLE) usart0_restoreusartint(imr); @@ -940,10 +940,10 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + avr_lowputc('\r'); } - up_lowputc(ch); + avr_lowputc(ch); #endif return ch; } diff --git a/arch/avr/src/atmega/atmega_timerisr.c b/arch/avr/src/atmega/atmega_timerisr.c index bc7e4f58b69..2c082d5ebac 100644 --- a/arch/avr/src/atmega/atmega_timerisr.c +++ b/arch/avr/src/atmega/atmega_timerisr.c @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" #include "atmega.h" /**************************************************************************** diff --git a/arch/avr/src/avr/avr.h b/arch/avr/src/avr/avr.h index 32cfb6ca492..28ee9de3d53 100644 --- a/arch/avr/src/avr/avr.h +++ b/arch/avr/src/avr/avr.h @@ -43,8 +43,8 @@ * state from the TCB. */ -#define up_savestate(regs) up_copystate(regs, (uint8_t*)g_current_regs) -#define up_restorestate(regs) (g_current_regs = regs) +#define avr_savestate(regs) avr_copystate(regs, (uint8_t*)g_current_regs) +#define avr_restorestate(regs) (g_current_regs = regs) /**************************************************************************** * Public Types @@ -77,7 +77,7 @@ extern uint16_t g_idle_topstack; struct spi_dev_s; /* Forward references */ /**************************************************************************** - * Name: up_copystate + * Name: avr_copystate * * Description: * Copy the contents of a register state save structure from one location @@ -85,37 +85,37 @@ struct spi_dev_s; /* Forward references */ * ****************************************************************************/ -void up_copystate(uint8_t *dest, uint8_t *src); +void avr_copystate(uint8_t *dest, uint8_t *src); /**************************************************************************** - * Name: up_fullcontextrestore + * Name: avr_fullcontextrestore * * Description: * Restore the full context of a saved thread/task. * ****************************************************************************/ -void up_fullcontextrestore(uint8_t *restoreregs) noreturn_function; +void avr_fullcontextrestore(uint8_t *restoreregs) noreturn_function; /**************************************************************************** - * Name: up_switchcontext + * Name: avr_switchcontext * * Description: * Switch from one thread/task context to another. * ****************************************************************************/ -void up_switchcontext(uint8_t *saveregs, uint8_t *restoreregs); +void avr_switchcontext(uint8_t *saveregs, uint8_t *restoreregs); /**************************************************************************** - * Name: up_doirq + * Name: avr_doirq * * Description: * Dispatch an interrupt. * ****************************************************************************/ -uint8_t *up_doirq(uint8_t irq, uint8_t *regs); +uint8_t *avr_doirq(uint8_t irq, uint8_t *regs); /**************************************************************************** * Name: avr_spibus_initialize diff --git a/arch/avr/src/avr/up_blocktask.c b/arch/avr/src/avr/avr_blocktask.c similarity index 92% rename from arch/avr/src/avr/up_blocktask.c rename to arch/avr/src/avr/avr_blocktask.c index 02d3a5b8778..344b271ac85 100644 --- a/arch/avr/src/avr/up_blocktask.c +++ b/arch/avr/src/avr/avr_blocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr/up_blocktask.c + * arch/avr/src/avr/avr_blocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Public Functions @@ -67,7 +67,7 @@ void up_block_task(struct tcb_s *rtcb) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + avr_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. @@ -81,7 +81,7 @@ void up_block_task(struct tcb_s *rtcb) /* Then switch contexts */ - up_restorestate(rtcb->xcp.regs); + avr_restorestate(rtcb->xcp.regs); } /* No, then we will need to perform the user context switch */ @@ -98,9 +98,9 @@ void up_block_task(struct tcb_s *rtcb) * ready to run list. */ - up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); + avr_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the + /* avr_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. diff --git a/arch/avr/src/avr/up_checkstack.c b/arch/avr/src/avr/avr_checkstack.c similarity index 98% rename from arch/avr/src/avr/up_checkstack.c rename to arch/avr/src/avr/avr_checkstack.c index b54421773b0..d7e54d68a7e 100644 --- a/arch/avr/src/avr/up_checkstack.c +++ b/arch/avr/src/avr/avr_checkstack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr/up_checkstack.c + * arch/avr/src/avr/avr_checkstack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" #include "sched/sched.h" #ifdef CONFIG_STACK_COLORATION diff --git a/arch/avr/src/avr/up_copystate.c b/arch/avr/src/avr/avr_copystate.c similarity index 94% rename from arch/avr/src/avr/up_copystate.c rename to arch/avr/src/avr/avr_copystate.c index acbc924fb71..1c44e51727e 100644 --- a/arch/avr/src/avr/up_copystate.c +++ b/arch/avr/src/avr/avr_copystate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr/up_copystate.c + * arch/avr/src/avr/avr_copystate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -27,7 +27,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -46,12 +46,12 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_copystate + * Name: avr_copystate ****************************************************************************/ /* Really just a memcpy */ -void up_copystate(uint8_t *dest, uint8_t *src) +void avr_copystate(uint8_t *dest, uint8_t *src) { int i; diff --git a/arch/avr/src/avr/up_createstack.c b/arch/avr/src/avr/avr_createstack.c similarity index 98% rename from arch/avr/src/avr/up_createstack.c rename to arch/avr/src/avr/avr_createstack.c index 24b83de6c64..a1d158829a5 100644 --- a/arch/avr/src/avr/up_createstack.c +++ b/arch/avr/src/avr/avr_createstack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr/up_createstack.c + * arch/avr/src/avr/avr_createstack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -38,7 +38,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Private Types diff --git a/arch/avr/src/avr/up_doirq.c b/arch/avr/src/avr/avr_doirq.c similarity index 97% rename from arch/avr/src/avr/up_doirq.c rename to arch/avr/src/avr/avr_doirq.c index ce412ea1040..9ec194a34e7 100644 --- a/arch/avr/src/avr/up_doirq.c +++ b/arch/avr/src/avr/avr_doirq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr/up_doirq.c + * arch/avr/src/avr/avr_doirq.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -54,7 +54,7 @@ * Public Functions ****************************************************************************/ -uint8_t *up_doirq(uint8_t irq, uint8_t *regs) +uint8_t *avr_doirq(uint8_t irq, uint8_t *regs) { board_autoled_on(LED_INIRQ); #ifdef CONFIG_SUPPRESS_INTERRUPTS diff --git a/arch/avr/src/avr/up_dumpstate.c b/arch/avr/src/avr/avr_dumpstate.c similarity index 98% rename from arch/avr/src/avr/up_dumpstate.c rename to arch/avr/src/avr/avr_dumpstate.c index 542da5c6117..fce35f03691 100644 --- a/arch/avr/src/avr/up_dumpstate.c +++ b/arch/avr/src/avr/avr_dumpstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr/up_dumpstate.c + * arch/avr/src/avr/avr_dumpstate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -35,7 +35,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "avr_internal.h" #ifdef CONFIG_ARCH_STACKDUMP @@ -121,10 +121,10 @@ static inline void avr_registerdump(void) ****************************************************************************/ /**************************************************************************** - * Name: up_dumpstate + * Name: avr_dumpstate ****************************************************************************/ -void up_dumpstate(void) +void avr_dumpstate(void) { FAR struct tcb_s *rtcb = running_task(); uint16_t sp = up_getsp(); diff --git a/arch/avr/src/avr/up_initialstate.c b/arch/avr/src/avr/avr_initialstate.c similarity index 98% rename from arch/avr/src/avr/up_initialstate.c rename to arch/avr/src/avr/avr_initialstate.c index 84de3f08378..d77ebeab36f 100644 --- a/arch/avr/src/avr/up_initialstate.c +++ b/arch/avr/src/avr/avr_initialstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr/up_initialstate.c + * arch/avr/src/avr/avr_initialstate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/avr/src/avr/up_irq.c b/arch/avr/src/avr/avr_irq.c similarity index 97% rename from arch/avr/src/avr/up_irq.c rename to arch/avr/src/avr/avr_irq.c index eac64ba8e67..64f4fc5aa26 100644 --- a/arch/avr/src/avr/up_irq.c +++ b/arch/avr/src/avr/avr_irq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr/up_irq.c + * arch/avr/src/avr/avr_irq.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/avr/src/avr/up_releasepending.c b/arch/avr/src/avr/avr_releasepending.c similarity index 91% rename from arch/avr/src/avr/up_releasepending.c rename to arch/avr/src/avr/avr_releasepending.c index 10e47b17ecb..7caf24a87e6 100644 --- a/arch/avr/src/avr/up_releasepending.c +++ b/arch/avr/src/avr/avr_releasepending.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr/up_releasepending.c + * arch/avr/src/avr/avr_releasepending.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Public Functions @@ -71,7 +71,7 @@ void up_release_pending(void) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + avr_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. @@ -85,7 +85,7 @@ void up_release_pending(void) /* Then switch contexts */ - up_restorestate(rtcb->xcp.regs); + avr_restorestate(rtcb->xcp.regs); } /* No, then we will need to perform the user context switch */ @@ -102,9 +102,9 @@ void up_release_pending(void) * ready to run list. */ - up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); + avr_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the + /* avr_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. diff --git a/arch/avr/src/avr/up_romgetc.c b/arch/avr/src/avr/avr_romgetc.c similarity index 99% rename from arch/avr/src/avr/up_romgetc.c rename to arch/avr/src/avr/avr_romgetc.c index 8304c9efa87..88bd368c2a5 100644 --- a/arch/avr/src/avr/up_romgetc.c +++ b/arch/avr/src/avr/avr_romgetc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr/up_romgetc.c + * arch/avr/src/avr/avr_romgetc.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/avr/src/avr/up_schedulesigaction.c b/arch/avr/src/avr/avr_schedulesigaction.c similarity index 97% rename from arch/avr/src/avr/up_schedulesigaction.c rename to arch/avr/src/avr/avr_schedulesigaction.c index 28556bdb477..ce2a803fe88 100644 --- a/arch/avr/src/avr/up_schedulesigaction.c +++ b/arch/avr/src/avr/avr_schedulesigaction.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr/up_schedulesigaction.c + * arch/avr/src/avr/avr_schedulesigaction.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Public Functions @@ -77,7 +77,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) { - uintptr_t reg_ptr = (uintptr_t)up_sigdeliver; + uintptr_t reg_ptr = (uintptr_t)avr_sigdeliver; sinfo("tcb=%p sigdeliver=%p\n", tcb, sigdeliver); @@ -150,7 +150,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * is the same as the interrupt return context. */ - up_savestate(tcb->xcp.regs); + avr_savestate(tcb->xcp.regs); } } diff --git a/arch/avr/src/avr/up_sigdeliver.c b/arch/avr/src/avr/avr_sigdeliver.c similarity index 91% rename from arch/avr/src/avr/up_sigdeliver.c rename to arch/avr/src/avr/avr_sigdeliver.c index 36d6c456e76..24b56fc8ee0 100644 --- a/arch/avr/src/avr/up_sigdeliver.c +++ b/arch/avr/src/avr/avr_sigdeliver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr/up_sigdeliver.c + * arch/avr/src/avr/avr_sigdeliver.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -35,14 +35,14 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_sigdeliver + * Name: avr_sigdeliver * * Description: * This is the a signal handling trampoline. When a signal action was @@ -51,7 +51,7 @@ * ****************************************************************************/ -void up_sigdeliver(void) +void avr_sigdeliver(void) { struct tcb_s *rtcb = this_task(); uint8_t regs[XCPTCONTEXT_REGS]; @@ -64,7 +64,7 @@ void up_sigdeliver(void) /* Save the return state on the stack. */ - up_copystate(regs, rtcb->xcp.regs); + avr_copystate(regs, rtcb->xcp.regs); #ifndef CONFIG_SUPPRESS_INTERRUPTS /* Then make sure that interrupts are enabled. Signal handlers must always @@ -109,13 +109,13 @@ void up_sigdeliver(void) * unusual in two ways: * * 1. It is not a context switch between threads. Rather, - * up_fullcontextrestore must behave more it more like a longjmp + * avr_fullcontextrestore must behave more it more like a longjmp * within the same task, using the same stack. - * 2. In this case, up_fullcontextrestore is called with r12 pointing to + * 2. In this case, avr_fullcontextrestore is called with r12 pointing to * a register save area on the stack to be destroyed. This is * dangerous because there is the very real possibility that the new * stack pointer might overlap with the register save area and that - * stack usage in up_fullcontextrestore might corrupt the register + * stack usage in avr_fullcontextrestore might corrupt the register * save data before the state is restored. At present, there does * not appear to be any stack overlap problems. If there were, then * adding 3 words to the size of register save structure size will @@ -123,5 +123,5 @@ void up_sigdeliver(void) */ board_autoled_off(LED_SIGNAL); - up_fullcontextrestore(regs); + avr_fullcontextrestore(regs); } diff --git a/arch/avr/src/avr/up_spi.c b/arch/avr/src/avr/avr_spi.c similarity index 99% rename from arch/avr/src/avr/up_spi.c rename to arch/avr/src/avr/avr_spi.c index 55b50b4c59a..83da03248cf 100644 --- a/arch/avr/src/avr/up_spi.c +++ b/arch/avr/src/avr/avr_spi.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr/up_spi.c + * arch/avr/src/avr/avr_spi.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -41,7 +41,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" #include "chip.h" #include "avr.h" diff --git a/arch/avr/src/avr/up_stackframe.c b/arch/avr/src/avr/avr_stackframe.c similarity index 98% rename from arch/avr/src/avr/up_stackframe.c rename to arch/avr/src/avr/avr_stackframe.c index e279daccd82..3ddeffd1d44 100644 --- a/arch/avr/src/avr/up_stackframe.c +++ b/arch/avr/src/avr/avr_stackframe.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr/up_stackframe.c + * arch/avr/src/avr/avr_stackframe.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/avr/src/avr/up_switchcontext.S b/arch/avr/src/avr/avr_switchcontext.S similarity index 88% rename from arch/avr/src/avr/up_switchcontext.S rename to arch/avr/src/avr/avr_switchcontext.S index de7676dcee7..61b26789e3b 100644 --- a/arch/avr/src/avr/up_switchcontext.S +++ b/arch/avr/src/avr/avr_switchcontext.S @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/avr/src/avr/up_switchcontext.S + * arch/avr/src/avr/avr_switchcontext.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -36,7 +36,7 @@ * Public Symbols ************************************************************************************/ - .file "up_switchcontext.S" + .file "avr_switchcontext.S" /************************************************************************************ * Macros @@ -47,20 +47,20 @@ ************************************************************************************/ /************************************************************************************ - * Name: up_switchcontext + * Name: avr_switchcontext * * Description: * Save the current thread context and restore the specified context. The full * C function prototype is: * - * void up_switchcontext(uint8_t *saveregs, uint8_t *restoreregs); + * void avr_switchcontext(uint8_t *saveregs, uint8_t *restoreregs); * * On Entry: * r24-r25: savregs * r22-r23: restoreregs * * Returned Value: - * up_switchcontext forces a context switch to the task "canned" in restoreregs. + * avr_switchcontext forces a context switch to the task "canned" in restoreregs. * It does not 'return' in the normal sense, rather, it will context switch back * to the function point. When it does 'return,' it is because the blocked * task hat was "pickeled" in the saveregs "can" is again ready to run and has @@ -72,9 +72,9 @@ ************************************************************************************/ .text - .globl up_switchcontext - .func up_switchcontext -up_switchcontext: + .globl avr_switchcontext + .func avr_switchcontext +avr_switchcontext: /* Use X [r26:r27] to reference the save structure. (X is Call-used) */ movw r26, r24 @@ -89,7 +89,7 @@ up_switchcontext: .endfunc /**************************************************************************** - * Name: up_fullcontextrestore + * Name: avr_fullcontextrestore * * Description: * Restore the full-running context of a thread. @@ -98,7 +98,7 @@ up_switchcontext: * r24-r25 = A pointer to the register save area of the thread to be restored. * * C Prototype: - * void up_fullcontextrestore(uint8_t *regs); + * void avr_fullcontextrestore(uint8_t *regs); * * Assumptions: * Interrupts are disabled. @@ -106,9 +106,9 @@ up_switchcontext: ****************************************************************************/ .text - .global up_fullcontextrestore - .func up_fullcontextrestore -up_fullcontextrestore: + .global avr_fullcontextrestore + .func avr_fullcontextrestore +avr_fullcontextrestore: /* Use X [r26:r27] to reference the restore structure. */ movw r26, r24 diff --git a/arch/avr/src/avr/up_unblocktask.c b/arch/avr/src/avr/avr_unblocktask.c similarity index 91% rename from arch/avr/src/avr/up_unblocktask.c rename to arch/avr/src/avr/avr_unblocktask.c index 1d906bb4b84..00ee9cc206d 100644 --- a/arch/avr/src/avr/up_unblocktask.c +++ b/arch/avr/src/avr/avr_unblocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr/up_unblocktask.c + * arch/avr/src/avr/avr_unblocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include "sched/sched.h" #include "clock/clock.h" -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Public Functions @@ -66,7 +66,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + avr_savestate(rtcb->xcp.regs); /* Update scheduler parameters */ @@ -74,7 +74,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) /* Then switch contexts */ - up_restorestate(tcb->xcp.regs); + avr_restorestate(tcb->xcp.regs); } /* No, then we will need to perform the user context switch */ @@ -89,9 +89,9 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * ready to run list. */ - up_switchcontext(rtcb->xcp.regs, tcb->xcp.regs); + avr_switchcontext(rtcb->xcp.regs, tcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the + /* avr_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. diff --git a/arch/avr/src/avr/up_usestack.c b/arch/avr/src/avr/avr_usestack.c similarity index 98% rename from arch/avr/src/avr/up_usestack.c rename to arch/avr/src/avr/avr_usestack.c index 1ab016b840c..d49d65a8179 100644 --- a/arch/avr/src/avr/up_usestack.c +++ b/arch/avr/src/avr/avr_usestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr/up_usestack.c + * arch/avr/src/avr/avr_usestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -35,7 +35,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/avr/src/avr/excptmacros.h b/arch/avr/src/avr/excptmacros.h index d61cf6f4d53..d301fbabc0b 100644 --- a/arch/avr/src/avr/excptmacros.h +++ b/arch/avr/src/avr/excptmacros.h @@ -546,7 +546,7 @@ * interrupt_enable - return sequence. * * NOTE: since actual returning is handled by this macro it has been - * removed from up_fullcontextrestore function (up_switchcontext.S) + * removed from avr_fullcontextrestore function (avr_switchcontext.S) */ /* If interrupts shall be enabled go to 'restore remaining and reti' code diff --git a/arch/avr/src/avr32/avr32.h b/arch/avr/src/avr32/avr32.h index b61cde415e1..d32c2c55c2d 100644 --- a/arch/avr/src/avr32/avr32.h +++ b/arch/avr/src/avr32/avr32.h @@ -53,8 +53,8 @@ * state from the TCB. */ -#define up_savestate(regs) up_copystate(regs, (uint32_t*)g_current_regs) -#define up_restorestate(regs) (g_current_regs = regs) +#define avr_savestate(regs) avr_copystate(regs, (uint32_t*)g_current_regs) +#define avr_restorestate(regs) (g_current_regs = regs) /**************************************************************************** * Public Types @@ -85,7 +85,7 @@ extern uint32_t g_idle_topstack; #ifndef __ASSEMBLY__ /**************************************************************************** - * Name: up_copystate + * Name: avr_copystate * * Description: * Copy the contents of a register state save structure from one location @@ -93,37 +93,37 @@ extern uint32_t g_idle_topstack; * ****************************************************************************/ -void up_copystate(uint32_t *dest, uint32_t *src); +void avr_copystate(uint32_t *dest, uint32_t *src); /**************************************************************************** - * Name: up_fullcontextrestore + * Name: avr_fullcontextrestore * * Description: * Restore the full context of a saved thread/task. * ****************************************************************************/ -void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function; +void avr_fullcontextrestore(uint32_t *restoreregs) noreturn_function; /**************************************************************************** - * Name: up_switchcontext + * Name: avr_switchcontext * * Description: * Switch from one thread/task context to another. * ****************************************************************************/ -void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); +void avr_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); /**************************************************************************** - * Name: up_doirq + * Name: avr_doirq * * Description: * Dispatch an interrupt. * ****************************************************************************/ -uint32_t *up_doirq(int irq, uint32_t *regs); +uint32_t *avr_doirq(int irq, uint32_t *regs); #endif /* __ASSEMBLY__ */ #endif /* __ARCH_AVR_SRC_AVR32_AVR32_H */ diff --git a/arch/avr/src/avr32/up_blocktask.c b/arch/avr/src/avr32/avr_blocktask.c similarity index 93% rename from arch/avr/src/avr32/up_blocktask.c rename to arch/avr/src/avr32/avr_blocktask.c index 5da62c9562f..8ce9585a680 100644 --- a/arch/avr/src/avr32/up_blocktask.c +++ b/arch/avr/src/avr32/avr_blocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr32/up_blocktask.c + * arch/avr/src/avr32/avr_blocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Public Functions @@ -68,7 +68,7 @@ void up_block_task(struct tcb_s *rtcb) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + avr_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. @@ -85,7 +85,7 @@ void up_block_task(struct tcb_s *rtcb) * interrupt. */ - up_restorestate(rtcb->xcp.regs); + avr_restorestate(rtcb->xcp.regs); } /* No, then we will need to perform the user context switch */ @@ -113,9 +113,9 @@ void up_block_task(struct tcb_s *rtcb) /* Then switch contexts */ - up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); + avr_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the + /* avr_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. diff --git a/arch/avr/src/avr32/up_copystate.c b/arch/avr/src/avr32/avr_copystate.c similarity index 94% rename from arch/avr/src/avr32/up_copystate.c rename to arch/avr/src/avr32/avr_copystate.c index b893549a35e..58963040ec4 100644 --- a/arch/avr/src/avr32/up_copystate.c +++ b/arch/avr/src/avr32/avr_copystate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr32/up_copystate.c + * arch/avr/src/avr32/avr_copystate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -28,7 +28,7 @@ #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -47,12 +47,12 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_copystate + * Name: avr_copystate ****************************************************************************/ /* A little faster than most memcpy's */ -void up_copystate(uint32_t *dest, uint32_t *src) +void avr_copystate(uint32_t *dest, uint32_t *src) { int i; diff --git a/arch/avr/src/avr32/up_createstack.c b/arch/avr/src/avr32/avr_createstack.c similarity index 99% rename from arch/avr/src/avr32/up_createstack.c rename to arch/avr/src/avr32/avr_createstack.c index 3b7a7435f67..ae265d8ac03 100644 --- a/arch/avr/src/avr32/up_createstack.c +++ b/arch/avr/src/avr32/avr_createstack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr32/up_createstack.c + * arch/avr/src/avr32/avr_createstack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -38,7 +38,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Private Types diff --git a/arch/avr/src/avr32/up_doirq.c b/arch/avr/src/avr32/avr_doirq.c similarity index 97% rename from arch/avr/src/avr32/up_doirq.c rename to arch/avr/src/avr32/avr_doirq.c index 39b2bcf3a01..8268c9f2bd6 100644 --- a/arch/avr/src/avr32/up_doirq.c +++ b/arch/avr/src/avr32/avr_doirq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr32/up_doirq.c + * arch/avr/src/avr32/avr_doirq.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" #include "group/group.h" /**************************************************************************** @@ -55,7 +55,7 @@ * Public Functions ****************************************************************************/ -uint32_t *up_doirq(int irq, uint32_t *regs) +uint32_t *avr_doirq(int irq, uint32_t *regs) { board_autoled_on(LED_INIRQ); #ifdef CONFIG_SUPPRESS_INTERRUPTS diff --git a/arch/avr/src/avr32/up_dumpstate.c b/arch/avr/src/avr32/avr_dumpstate.c similarity index 98% rename from arch/avr/src/avr32/up_dumpstate.c rename to arch/avr/src/avr32/avr_dumpstate.c index 70f114f1c55..b422733cf5a 100644 --- a/arch/avr/src/avr32/up_dumpstate.c +++ b/arch/avr/src/avr32/avr_dumpstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr32/up_dumpstate.c + * arch/avr/src/avr32/avr_dumpstate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -35,7 +35,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "avr_internal.h" #ifdef CONFIG_ARCH_STACKDUMP @@ -93,10 +93,10 @@ static inline void avr_registerdump(void) } /**************************************************************************** - * Name: up_dumpstate + * Name: avr_dumpstate ****************************************************************************/ -void up_dumpstate(void) +void avr_dumpstate(void) { FAR struct tcb_s *rtcb = running_task(); uint32_t sp = up_getsp(); diff --git a/arch/avr/src/avr32/up_exceptions.S b/arch/avr/src/avr32/avr_exceptions.S similarity index 97% rename from arch/avr/src/avr32/up_exceptions.S rename to arch/avr/src/avr32/avr_exceptions.S index 88bb9e06502..192f2a49521 100644 --- a/arch/avr/src/avr32/up_exceptions.S +++ b/arch/avr/src/avr32/avr_exceptions.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr32/up_exceptions.S + * arch/avr/src/avr32/avr_exceptions.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -35,8 +35,8 @@ .global avr32_int1irqno /* Returns IRQ number of INT1 event */ .global avr32_int2irqno /* Returns IRQ number of INT2 event */ .global avr32_int3irqno /* Returns IRQ number of INT3 event */ - .global up_doirq /* Dispatch an IRQ */ - .global up_fullcontextrestore /* Restore new task context */ + .global avr_doirq /* Dispatch an IRQ */ + .global avr_fullcontextrestore /* Restore new task context */ /**************************************************************************** * Macros @@ -276,7 +276,7 @@ avr32_common: stm --sp, r0-r7 - /* Now call up_doirq passing the IRQ number in r12 and the base address */ + /* Now call avr_doirq passing the IRQ number in r12 and the base address */ /* of the register context save area in r11. */ mov r11, sp @@ -290,7 +290,7 @@ avr32_common: lddpc sp, .Linstacktopptr #endif - /* Call up_doirq with r12=IRQ number and r11=register save area */ + /* Call avr_doirq with r12=IRQ number and r11=register save area */ mcall .Ldoirqptr @@ -304,7 +304,7 @@ avr32_common: /* On return, r12 will hold the new address of the register context */ /* save area. On an interrupt context switch, this will (1) not be the */ - /* same as the value of r12 passed to up_doirq(), and (2) may not */ + /* same as the value of r12 passed to avr_doirq(), and (2) may not */ /* reside on a stack. */ cp.w sp, r12 @@ -330,9 +330,9 @@ avr32_common: lddpc pc, .Lfullcontextrestoreptr .Ldoirqptr: - .word up_doirq + .word avr_doirq .Lfullcontextrestoreptr: - .word up_fullcontextrestore + .word avr_fullcontextrestore #if CONFIG_ARCH_INTERRUPTSTACK > 3 .Linstacktopptr: diff --git a/arch/avr/src/avr32/up_fullcontextrestore.S b/arch/avr/src/avr32/avr_fullcontextrestore.S similarity index 93% rename from arch/avr/src/avr32/up_fullcontextrestore.S rename to arch/avr/src/avr32/avr_fullcontextrestore.S index 32a91d1aeb6..6f97347373e 100644 --- a/arch/avr/src/avr32/up_fullcontextrestore.S +++ b/arch/avr/src/avr32/avr_fullcontextrestore.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr32/src/avr32/up_fullcontextrestore.S + * arch/avr32/src/avr32/avr_fullcontextrestore.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -29,23 +29,23 @@ * External Symbols ****************************************************************************/ - .file "up_fullcontextrestore.S" + .file "avr_fullcontextrestore.S" /**************************************************************************** * Macros ****************************************************************************/ /**************************************************************************** - * Name: up_fullcontextrestore + * Name: avr_fullcontextrestore * * Description: * Restore the full-running context of a thread. * * NOTE: Thus function must handle one very strange case. That is when - * this function is called with up_sigdeliver(). That case is strange in + * this function is called with avr_sigdeliver(). That case is strange in * two ways: * - * 1. It is not a context switch between threads. Rather, up_fullcontextrestore + * 1. It is not a context switch between threads. Rather, avr_fullcontextrestore * must behave more it more like a longjmp within the same task, using the * same stack. * 2. In this case, this function is called with r12 pointing to a register @@ -64,7 +64,7 @@ * r12 = A pointer to the register save area of the thread to be restored. * * C Prototype: - * void up_fullcontextrestore(uint32_t *regs); + * void avr_fullcontextrestore(uint32_t *regs); * * Assumptions: * Interrupts are disabled. @@ -72,9 +72,9 @@ ****************************************************************************/ .text - .global up_fullcontextrestore - .type up_fullcontextrestore, @function -up_fullcontextrestore: + .global avr_fullcontextrestore + .type avr_fullcontextrestore, @function +avr_fullcontextrestore: /* Initially, r12 points to the r7 save area. Restore r0-r7. */ /* regs: 07 06 05 04 03 02 01 00 xx xx xx xx xx xx xx xx xx */ diff --git a/arch/avr/src/avr32/up_initialstate.c b/arch/avr/src/avr32/avr_initialstate.c similarity index 98% rename from arch/avr/src/avr32/up_initialstate.c rename to arch/avr/src/avr32/avr_initialstate.c index 58d99b913c5..fad705ca752 100644 --- a/arch/avr/src/avr32/up_initialstate.c +++ b/arch/avr/src/avr32/avr_initialstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr32/up_initialstate.c + * arch/avr/src/avr32/avr_initialstate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/avr/src/avr32/up_nommuhead.S b/arch/avr/src/avr32/avr_nommuhead.S similarity index 95% rename from arch/avr/src/avr32/up_nommuhead.S rename to arch/avr/src/avr32/avr_nommuhead.S index d8b0d0cdb5b..3a823386878 100644 --- a/arch/avr/src/avr32/up_nommuhead.S +++ b/arch/avr/src/avr32/avr_nommuhead.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr32/src/avr32/up_nommuhead.S + * arch/avr32/src/avr32/avr_nommuhead.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -25,7 +25,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * External Symbols @@ -39,7 +39,7 @@ .global _edata /* End of .data section in RAM */ .global _eronly /* Start of .data section in FLASH */ #endif - .global up_lowinit /* Perform low level initialization */ + .global avr_lowinit /* Perform low level initialization */ .global nx_start /* NuttX entry point */ .global vectortab /* Vector base address */ @@ -113,7 +113,7 @@ __start: /* Perform low-level initialization */ - mcall .Lup_lowinit + mcall .Lavr_lowinit /* Then jump to OS entry (will not return) */ @@ -121,8 +121,8 @@ __start: .Lstackbase: .word _ebss+CONFIG_IDLETHREAD_STACKSIZE -.Lup_lowinit: - .word up_lowinit +.Lavr_lowinit: + .word avr_lowinit .size __start, .-__start /* This global variable is unsigned long g_idle_topstack and is diff --git a/arch/avr/src/avr32/up_releasepending.c b/arch/avr/src/avr32/avr_releasepending.c similarity index 93% rename from arch/avr/src/avr32/up_releasepending.c rename to arch/avr/src/avr32/avr_releasepending.c index e2deee42685..4f83151ef4c 100644 --- a/arch/avr/src/avr32/up_releasepending.c +++ b/arch/avr/src/avr32/avr_releasepending.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr32/up_releasepending.c + * arch/avr/src/avr32/avr_releasepending.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Public Functions @@ -74,7 +74,7 @@ void up_release_pending(void) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + avr_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. @@ -90,7 +90,7 @@ void up_release_pending(void) * changes will be made when the interrupt returns. */ - up_restorestate(rtcb->xcp.regs); + avr_restorestate(rtcb->xcp.regs); } /* No, then we will need to perform the user context switch */ @@ -118,9 +118,9 @@ void up_release_pending(void) /* Then switch contexs */ - up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); + avr_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the + /* avr_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. diff --git a/arch/avr/src/avr32/up_schedulesigaction.c b/arch/avr/src/avr32/avr_schedulesigaction.c similarity index 96% rename from arch/avr/src/avr32/up_schedulesigaction.c rename to arch/avr/src/avr32/avr_schedulesigaction.c index e537e4b8a9e..2828bd90588 100644 --- a/arch/avr/src/avr32/up_schedulesigaction.c +++ b/arch/avr/src/avr32/avr_schedulesigaction.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr32/up_schedulesigaction.c + * arch/avr/src/avr32/avr_schedulesigaction.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Public Functions @@ -130,14 +130,14 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - g_current_regs[REG_PC] = (uint32_t)up_sigdeliver; + g_current_regs[REG_PC] = (uint32_t)avr_sigdeliver; g_current_regs[REG_SR] |= AVR32_SR_GM_MASK; /* And make sure that the saved context in the TCB * is the same as the interrupt return context. */ - up_savestate(tcb->xcp.regs); + avr_savestate(tcb->xcp.regs); } } @@ -162,7 +162,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver; + tcb->xcp.regs[REG_PC] = (uint32_t)avr_sigdeliver; tcb->xcp.regs[REG_SR] |= AVR32_SR_GM_MASK; } } diff --git a/arch/avr/src/avr32/up_sigdeliver.c b/arch/avr/src/avr32/avr_sigdeliver.c similarity index 91% rename from arch/avr/src/avr32/up_sigdeliver.c rename to arch/avr/src/avr32/avr_sigdeliver.c index 78aa0bc390f..ca81e807ced 100644 --- a/arch/avr/src/avr32/up_sigdeliver.c +++ b/arch/avr/src/avr32/avr_sigdeliver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr32/up_sigdeliver.c + * arch/avr/src/avr32/avr_sigdeliver.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -35,14 +35,14 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_sigdeliver + * Name: avr_sigdeliver * * Description: * This is the a signal handling trampoline. When a signal action was @@ -51,7 +51,7 @@ * ****************************************************************************/ -void up_sigdeliver(void) +void avr_sigdeliver(void) { struct tcb_s *rtcb = this_task(); #if 0 @@ -68,7 +68,7 @@ void up_sigdeliver(void) /* Save the return state on the stack. */ - up_copystate(regs, rtcb->xcp.regs); + avr_copystate(regs, rtcb->xcp.regs); #ifndef CONFIG_SUPPRESS_INTERRUPTS /* Then make sure that interrupts are enabled. Signal handlers must always @@ -109,13 +109,13 @@ void up_sigdeliver(void) * unusual in two ways: * * 1. It is not a context switch between threads. Rather, - * up_fullcontextrestore must behave more it more like a longjmp + * avr_fullcontextrestore must behave more it more like a longjmp * within the same task, using the same stack. - * 2. In this case, up_fullcontextrestore is called with r12 pointing to + * 2. In this case, avr_fullcontextrestore is called with r12 pointing to * a register save area on the stack to be destroyed. This is * dangerous because there is the very real possibility that the new * stack pointer might overlap with the register save area and that - * stack usage in up_fullcontextrestore might corrupt the register + * stack usage in avr_fullcontextrestore might corrupt the register * save data before the state is restored. At present, there does * not appear to be any stack overlap problems. If there were, then * adding 3 words to the size of register save structure size will @@ -123,5 +123,5 @@ void up_sigdeliver(void) */ board_autoled_off(LED_SIGNAL); - up_fullcontextrestore(regs); + avr_fullcontextrestore(regs); } diff --git a/arch/hc/src/common/up_stackframe.c b/arch/avr/src/avr32/avr_stackframe.c similarity index 98% rename from arch/hc/src/common/up_stackframe.c rename to arch/avr/src/avr32/avr_stackframe.c index e103c84845c..37e49122595 100644 --- a/arch/hc/src/common/up_stackframe.c +++ b/arch/avr/src/avr32/avr_stackframe.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_stackframe.c + * arch/avr/src/avr32/avr_stackframe.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/avr/src/avr32/up_switchcontext.S b/arch/avr/src/avr32/avr_switchcontext.S similarity index 87% rename from arch/avr/src/avr32/up_switchcontext.S rename to arch/avr/src/avr32/avr_switchcontext.S index b7bef3c4ada..4eb815c88aa 100644 --- a/arch/avr/src/avr32/up_switchcontext.S +++ b/arch/avr/src/avr32/avr_switchcontext.S @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/avr/src/avr32/up_switchcontext.S + * arch/avr/src/avr32/avr_switchcontext.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ * Public Symbols ************************************************************************************/ - .file "up_switchcontext.S" + .file "avr_switchcontext.S" /************************************************************************************ * Macros @@ -45,16 +45,16 @@ ************************************************************************************/ /************************************************************************************ - * Name: up_switchcontext + * Name: avr_switchcontext * * Description: * Save the current thread context and restore the specified context. The full * C function prototype is: * - * void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); + * void avr_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); * * Returned Value: - * up_switchcontext forces a context switch to the task "canned" in restoreregs. + * avr_switchcontext forces a context switch to the task "canned" in restoreregs. * It does not 'return' in the normal sense, rather, it will context switch back * to the function point. When it does 'return,' it is because the blocked * task hat was "pickeled" in the saveregs "can" is again ready to run and has @@ -66,9 +66,9 @@ ************************************************************************************/ .text - .globl up_switchcontext - .type up_switchcontext, @function -up_switchcontext: + .globl avr_switchcontext + .type avr_switchcontext, @function +avr_switchcontext: /* "Pickle" the current thread context in the saveregs "can." r12=saveregs. */ /* xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx */ /* ^r12 */ @@ -95,13 +95,13 @@ up_switchcontext: stm --r12, r0-r7 - /* Finally, let up_fullcontextrestore handling the re-instatement of the thread */ + /* Finally, let avr_fullcontextrestore handling the re-instatement of the thread */ /* "canned" in restoregs. */ mov r12, r11 - lddpc pc, .Lup_fullcontextrestore + lddpc pc, .Lavr_fullcontextrestore -.Lup_fullcontextrestore: - .word up_fullcontextrestore - .size up_switchcontext, .-up_switchcontext +.Lavr_fullcontextrestore: + .word avr_fullcontextrestore + .size avr_switchcontext, .-avr_switchcontext .end diff --git a/arch/avr/src/avr32/up_syscall6.S b/arch/avr/src/avr32/avr_syscall6.S similarity index 98% rename from arch/avr/src/avr32/up_syscall6.S rename to arch/avr/src/avr32/avr_syscall6.S index ea9106be2c4..4e21170399f 100644 --- a/arch/avr/src/avr32/up_syscall6.S +++ b/arch/avr/src/avr32/avr_syscall6.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr32/up_syscall6.S + * arch/avr/src/avr32/avr_syscall6.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/avr/src/avr32/up_unblocktask.c b/arch/avr/src/avr32/avr_unblocktask.c similarity index 92% rename from arch/avr/src/avr32/up_unblocktask.c rename to arch/avr/src/avr32/avr_unblocktask.c index 8dfcc80eaa0..ed99d3dd5c3 100644 --- a/arch/avr/src/avr32/up_unblocktask.c +++ b/arch/avr/src/avr32/avr_unblocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr32/up_unblocktask.c + * arch/avr/src/avr32/avr_unblocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include "sched/sched.h" #include "group/group.h" #include "clock/clock.h" -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Public Functions @@ -67,7 +67,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + avr_savestate(rtcb->xcp.regs); /* Update scheduler parameters */ @@ -78,7 +78,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * interrupt. */ - up_restorestate(tcb->xcp.regs); + avr_restorestate(tcb->xcp.regs); } /* No, then we will need to perform the user context switch */ @@ -100,9 +100,9 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) /* Then switch contexts */ - up_switchcontext(rtcb->xcp.regs, tcb->xcp.regs); + avr_switchcontext(rtcb->xcp.regs, tcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the + /* avr_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. diff --git a/arch/avr/src/avr32/up_usestack.c b/arch/avr/src/avr32/avr_usestack.c similarity index 98% rename from arch/avr/src/avr32/up_usestack.c rename to arch/avr/src/avr32/avr_usestack.c index e6a1661764b..280596c87bb 100644 --- a/arch/avr/src/avr32/up_usestack.c +++ b/arch/avr/src/avr32/avr_usestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr32/up_usestack.c + * arch/avr/src/avr32/avr_usestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/avr/src/common/up_allocateheap.c b/arch/avr/src/common/avr_allocateheap.c similarity index 97% rename from arch/avr/src/common/up_allocateheap.c rename to arch/avr/src/common/avr_allocateheap.c index 86fce5d5351..6c3e833eea5 100644 --- a/arch/avr/src/common/up_allocateheap.c +++ b/arch/avr/src/common/avr_allocateheap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/common/up_allocateheap.c + * arch/avr/src/common/avr_allocateheap.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/avr/src/common/up_assert.c b/arch/avr/src/common/avr_assert.c similarity index 98% rename from arch/avr/src/common/up_assert.c rename to arch/avr/src/common/avr_assert.c index b51b14ab9ca..61b9393551c 100644 --- a/arch/avr/src/common/up_assert.c +++ b/arch/avr/src/common/avr_assert.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/common/up_assert.c + * arch/avr/src/common/avr_assert.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -38,7 +38,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -143,7 +143,7 @@ void up_assert(const char *filename, int lineno) filename, lineno); #endif - up_dumpstate(); + avr_dumpstate(); /* Flush any buffered SYSLOG data (from the above) */ diff --git a/arch/avr/src/common/up_exit.c b/arch/avr/src/common/avr_exit.c similarity index 97% rename from arch/avr/src/common/up_exit.c rename to arch/avr/src/common/avr_exit.c index e0c9664e7a6..bd82fbfe73f 100644 --- a/arch/avr/src/common/up_exit.c +++ b/arch/avr/src/common/avr_exit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/common/up_exit.c + * arch/avr/src/common/avr_exit.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -36,7 +36,7 @@ #include "task/task.h" #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -145,5 +145,5 @@ void up_exit(int status) /* Then switch contexts */ - up_fullcontextrestore(tcb->xcp.regs); + avr_fullcontextrestore(tcb->xcp.regs); } diff --git a/arch/avr/src/common/up_idle.c b/arch/avr/src/common/avr_idle.c similarity index 97% rename from arch/avr/src/common/up_idle.c rename to arch/avr/src/common/avr_idle.c index 99183f04737..7b5a68158de 100644 --- a/arch/avr/src/common/up_idle.c +++ b/arch/avr/src/common/avr_idle.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/common/up_idle.c + * arch/avr/src/common/avr_idle.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -25,7 +25,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/avr/src/common/up_initialize.c b/arch/avr/src/common/avr_initialize.c similarity index 93% rename from arch/avr/src/common/up_initialize.c rename to arch/avr/src/common/avr_initialize.c index 95fa2dfe4f5..f01711bacd7 100644 --- a/arch/avr/src/common/up_initialize.c +++ b/arch/avr/src/common/avr_initialize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/common/up_initialize.c + * arch/avr/src/common/avr_initialize.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -26,14 +26,14 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ /* Determine which (if any) console driver to use. This will probably cause - * up_serialinit to be incorrectly called if there is no USART configured to + * avr_serialinit to be incorrectly called if there is no USART configured to * be an RS-232 device (see as an example * arch/avr/src/at32uc23/at32uc3_config.h) * This will probably have to be revisited someday. @@ -130,7 +130,7 @@ void up_initialize(void) /* Add any extra memory fragments to the memory manager */ - up_addregion(); + avr_addregion(); #ifdef CONFIG_PM /* Initialize the power management subsystem. This MCU-specific function @@ -143,31 +143,31 @@ void up_initialize(void) #endif #ifdef CONFIG_ARCH_DMA - /* Initialize the DMA subsystem if the weak function up_dma_initialize has + /* Initialize the DMA subsystem if the weak function avr_dma_initialize has * been brought into the build */ #ifdef CONFIG_HAVE_WEAKFUNCTIONS - if (up_dma_initialize) + if (avr_dma_initialize) #endif { - up_dma_initialize(); + avr_dma_initialize(); } #endif /* Initialize the serial device driver */ #ifdef USE_SERIALDRIVER - up_serialinit(); + avr_serialinit(); #endif /* Initialize the network */ - up_netinitialize(); + avr_netinitialize(); /* Initialize USB */ - up_usbinitialize(); + avr_usbinitialize(); #if defined(ARCH_HAVE_LEDS) board_autoled_on(LED_IRQSENABLED); diff --git a/arch/avr/src/common/up_internal.h b/arch/avr/src/common/avr_internal.h similarity index 89% rename from arch/avr/src/common/up_internal.h rename to arch/avr/src/common/avr_internal.h index 052dc26ff5f..2d79bf6b69b 100644 --- a/arch/avr/src/common/up_internal.h +++ b/arch/avr/src/common/avr_internal.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/common/up_internal.h + * arch/avr/src/common/avr_internal.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -114,19 +114,19 @@ void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits); /* Defined in files with the same name as the function */ #ifdef CONFIG_ARCH_DMA -void weak_function up_dma_initialize(void); +void weak_function avr_dma_initialize(void); #endif -void up_sigdeliver(void); -void up_lowputc(char ch); -void up_lowputs(const char *str); -void up_dumpstate(void); +void avr_sigdeliver(void); +void avr_lowputc(char ch); +void avr_lowputs(const char *str); +void avr_dumpstate(void); -/* Defined in common/up_allocateheap.c or chip/xxx_allocateheap.c */ +/* Defined in common/avr_allocateheap.c or chip/xxx_allocateheap.c */ #if CONFIG_MM_REGIONS > 1 -void up_addregion(void); +void avr_addregion(void); #else -# define up_addregion() +# define avr_addregion() #endif /* Defined in chip/xxx_lowinit.c. This function is called from the @@ -135,31 +135,31 @@ void up_addregion(void); * before the OS gets started (clocks, console, LEDs, etc.) */ -void up_lowinit(void); +void avr_lowinit(void); /* Defined in chip/xxx_serial.c */ #ifdef CONFIG_DEV_CONSOLE -void up_earlyserialinit(void); -void up_serialinit(void); +void avr_earlyserialinit(void); +void avr_serialinit(void); #endif /* Defined in chip/xxx_ethernet.c */ #if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) -void up_netinitialize(void); +void avr_netinitialize(void); #else -# define up_netinitialize() +# define avr_netinitialize() #endif /* Defined in chip/xxx_usbdev.c */ #ifdef CONFIG_USBDEV -void up_usbinitialize(void); -void up_usbuninitialize(void); +void avr_usbinitialize(void); +void avr_usbuninitialize(void); #else -# define up_usbinitialize() -# define up_usbuninitialize() +# define avr_usbinitialize() +# define avr_usbuninitialize() #endif #ifdef CONFIG_STACK_COLORATION diff --git a/arch/sparc/src/common/up_lowputs.c b/arch/avr/src/common/avr_lowputs.c similarity index 93% rename from arch/sparc/src/common/up_lowputs.c rename to arch/avr/src/common/avr_lowputs.c index cde7b7039bf..4d3fc0102f6 100644 --- a/arch/sparc/src/common/up_lowputs.c +++ b/arch/avr/src/common/avr_lowputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/common/up_lowputs.c + * arch/avr/src/common/avr_lowputs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -24,7 +24,7 @@ #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -43,18 +43,17 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_lowputs + * Name: avr_lowputs * * Description: * This is a low-level helper function used to support debug. * ****************************************************************************/ -void up_lowputs(const char *str) +void avr_lowputs(const char *str) { while (*str) { - up_lowputc(*str++); + avr_lowputc(*str++); } } - diff --git a/arch/avr/src/common/up_mdelay.c b/arch/avr/src/common/avr_mdelay.c similarity index 98% rename from arch/avr/src/common/up_mdelay.c rename to arch/avr/src/common/avr_mdelay.c index 62c0936c295..6d660c1dd2f 100644 --- a/arch/avr/src/common/up_mdelay.c +++ b/arch/avr/src/common/avr_mdelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/common/up_mdelay.c + * arch/avr/src/common/avr_mdelay.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/avr/src/common/up_modifyreg16.c b/arch/avr/src/common/avr_modifyreg16.c similarity index 97% rename from arch/avr/src/common/up_modifyreg16.c rename to arch/avr/src/common/avr_modifyreg16.c index 4044e619b3a..65ec60afeec 100644 --- a/arch/avr/src/common/up_modifyreg16.c +++ b/arch/avr/src/common/avr_modifyreg16.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/common/up_modifyreg16.c + * arch/avr/src/common/avr_modifyreg16.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/avr/src/common/up_modifyreg32.c b/arch/avr/src/common/avr_modifyreg32.c similarity index 97% rename from arch/avr/src/common/up_modifyreg32.c rename to arch/avr/src/common/avr_modifyreg32.c index 46fa49a7da2..a3c3aac0b00 100644 --- a/arch/avr/src/common/up_modifyreg32.c +++ b/arch/avr/src/common/avr_modifyreg32.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/common/up_modifyreg32.c + * arch/avr/src/common/avr_modifyreg32.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/avr/src/common/up_modifyreg8.c b/arch/avr/src/common/avr_modifyreg8.c similarity index 97% rename from arch/avr/src/common/up_modifyreg8.c rename to arch/avr/src/common/avr_modifyreg8.c index b2c9a7b76b9..50e087e492b 100644 --- a/arch/avr/src/common/up_modifyreg8.c +++ b/arch/avr/src/common/avr_modifyreg8.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/common/up_modifyreg8.c + * arch/avr/src/common/avr_modifyreg8.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/avr/src/common/up_nputs.c b/arch/avr/src/common/avr_nputs.c similarity index 98% rename from arch/avr/src/common/up_nputs.c rename to arch/avr/src/common/avr_nputs.c index afc0049df62..f6e57a5bef1 100644 --- a/arch/avr/src/common/up_nputs.c +++ b/arch/avr/src/common/avr_nputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/common/up_nputs.c + * arch/avr/src/common/avr_nputs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/avr/src/common/up_releasestack.c b/arch/avr/src/common/avr_releasestack.c similarity index 98% rename from arch/avr/src/common/up_releasestack.c rename to arch/avr/src/common/avr_releasestack.c index bd53ac1615a..3f757ca1ec0 100644 --- a/arch/avr/src/common/up_releasestack.c +++ b/arch/avr/src/common/avr_releasestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/common/up_releasestack.c + * arch/avr/src/common/avr_releasestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" /**************************************************************************** * Private Types diff --git a/arch/x86/src/common/up_udelay.c b/arch/avr/src/common/avr_udelay.c similarity index 99% rename from arch/x86/src/common/up_udelay.c rename to arch/avr/src/common/avr_udelay.c index acd2978d7ca..c45731921fc 100644 --- a/arch/x86/src/common/up_udelay.c +++ b/arch/avr/src/common/avr_udelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/common/up_udelay.c + * arch/avr/src/common/avr_udelay.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/ceva/include/syscall.h b/arch/ceva/include/syscall.h index f22102fd404..19b7ab80c92 100644 --- a/arch/ceva/include/syscall.h +++ b/arch/ceva/include/syscall.h @@ -65,14 +65,14 @@ /* SYS call 1: * - * void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function; + * void ceva_fullcontextrestore(uint32_t *restoreregs) noreturn_function; */ #define SYS_restore_context 0x01 /* SYS call 2: * - * void up_switchcontext(uint32_t **saveregs, uint32_t *restoreregs); + * void ceva_switchcontext(uint32_t **saveregs, uint32_t *restoreregs); */ #define SYS_switch_context 0x02 diff --git a/arch/ceva/src/common/up_assert.c b/arch/ceva/src/common/ceva_assert.c similarity index 99% rename from arch/ceva/src/common/up_assert.c rename to arch/ceva/src/common/ceva_assert.c index 61bed8dbbc0..1eda27c3ac7 100644 --- a/arch/ceva/src/common/up_assert.c +++ b/arch/ceva/src/common/ceva_assert.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_assert.c + * arch/ceva/src/common/ceva_assert.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include "sched/sched.h" #include "irq/irq.h" -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/ceva/src/common/up_blocktask.c b/arch/ceva/src/common/ceva_blocktask.c similarity index 93% rename from arch/ceva/src/common/up_blocktask.c rename to arch/ceva/src/common/ceva_blocktask.c index 2fdcbdb70ba..df80b01dded 100644 --- a/arch/ceva/src/common/up_blocktask.c +++ b/arch/ceva/src/common/ceva_blocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_blocktask.c + * arch/ceva/src/common/ceva_blocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -26,7 +26,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Public Functions @@ -91,9 +91,9 @@ void up_block_task(struct tcb_s *rtcb) * ready to run list. */ - up_switchcontext(&rtcb->xcp.regs, nexttcb->xcp.regs); + ceva_switchcontext(&rtcb->xcp.regs, nexttcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the + /* ceva_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. diff --git a/arch/ceva/src/common/up_board.c b/arch/ceva/src/common/ceva_board.c similarity index 97% rename from arch/ceva/src/common/up_board.c rename to arch/ceva/src/common/ceva_board.c index 0fadc62f423..b13588e7a84 100644 --- a/arch/ceva/src/common/up_board.c +++ b/arch/ceva/src/common/ceva_board.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_board.c + * arch/ceva/src/common/ceva_board.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -28,7 +28,7 @@ #include #include -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -64,7 +64,7 @@ void board_late_initialize(void) { /* Perform the arch late initialization */ - up_lateinitialize(); + ceva_lateinitialize(); /* Perform the board late initialization */ @@ -103,7 +103,7 @@ int board_app_initialize(uintptr_t arg) # ifdef CONFIG_NSH_ARCHINIT /* Perform the arch late initialization */ - up_lateinitialize(); + ceva_lateinitialize(); /* Perform the board late initialization */ @@ -137,7 +137,7 @@ int board_app_finalinitialize(uintptr_t arg) { /* Perform the arch final initialization */ - up_finalinitialize(); + ceva_finalinitialize(); /* Perform the board final initialization */ @@ -171,8 +171,8 @@ int board_reset(int status) { while (1) { - up_reset(status); - up_cpu_idle(); + ceva_reset(status); + ceva_cpu_idle(); } return 0; diff --git a/arch/ceva/src/common/up_checkstack.c b/arch/ceva/src/common/ceva_checkstack.c similarity index 98% rename from arch/ceva/src/common/up_checkstack.c rename to arch/ceva/src/common/ceva_checkstack.c index 1d72ec82bb8..b80e832be8f 100644 --- a/arch/ceva/src/common/up_checkstack.c +++ b/arch/ceva/src/common/ceva_checkstack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_checkstack.c + * arch/ceva/src/common/ceva_checkstack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "ceva_internal.h" #ifdef CONFIG_STACK_COLORATION diff --git a/arch/ceva/src/common/up_createstack.c b/arch/ceva/src/common/ceva_createstack.c similarity index 97% rename from arch/ceva/src/common/up_createstack.c rename to arch/ceva/src/common/ceva_createstack.c index f2e9a6fdf37..ed7738df0b6 100644 --- a/arch/ceva/src/common/up_createstack.c +++ b/arch/ceva/src/common/ceva_createstack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_createstack.c + * arch/ceva/src/common/ceva_createstack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include #include -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Pre-processor Macros @@ -208,7 +208,7 @@ int up_create_stack(struct tcb_s *tcb, size_t stack_size, uint8_t ttype) * water marks. */ - up_stack_color(tcb->stack_alloc_ptr, tcb->adj_stack_size); + ceva_stack_color(tcb->stack_alloc_ptr, tcb->adj_stack_size); #endif /* CONFIG_STACK_COLORATION */ @@ -220,7 +220,7 @@ int up_create_stack(struct tcb_s *tcb, size_t stack_size, uint8_t ttype) } /**************************************************************************** - * Name: up_stack_color + * Name: ceva_stack_color * * Description: * Write a well know value into the stack @@ -228,7 +228,7 @@ int up_create_stack(struct tcb_s *tcb, size_t stack_size, uint8_t ttype) ****************************************************************************/ #ifdef CONFIG_STACK_COLORATION -void up_stack_color(void *stackbase, size_t nbytes) +void ceva_stack_color(void *stackbase, size_t nbytes) { uint32_t *stkptr; uintptr_t stkend; diff --git a/arch/ceva/src/common/up_doirq.c b/arch/ceva/src/common/ceva_doirq.c similarity index 96% rename from arch/ceva/src/common/up_doirq.c rename to arch/ceva/src/common/ceva_doirq.c index f2ff7562546..532d3c44632 100644 --- a/arch/ceva/src/common/up_doirq.c +++ b/arch/ceva/src/common/ceva_doirq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_doirq.c + * arch/ceva/src/common/ceva_doirq.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -27,7 +27,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Public Data @@ -45,7 +45,7 @@ uint32_t *volatile g_current_regs[CONFIG_SMP_NCPUS]; * Public Functions ****************************************************************************/ -uint32_t *up_doirq(int irq, uint32_t *regs) +uint32_t *ceva_doirq(int irq, uint32_t *regs) { /* Is it the outermost interrupt? */ diff --git a/arch/ceva/src/common/up_exit.c b/arch/ceva/src/common/ceva_exit.c similarity index 96% rename from arch/ceva/src/common/up_exit.c rename to arch/ceva/src/common/ceva_exit.c index dcdfbe28776..08d60544c11 100644 --- a/arch/ceva/src/common/up_exit.c +++ b/arch/ceva/src/common/ceva_exit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_exit.c + * arch/ceva/src/common/ceva_exit.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include "task/task.h" #include "sched/sched.h" -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Public Functions @@ -80,5 +80,5 @@ void _exit(int status) /* Then switch contexts */ - up_fullcontextrestore(tcb->xcp.regs); + ceva_fullcontextrestore(tcb->xcp.regs); } diff --git a/arch/ceva/src/common/up_fullcontextrestore.c b/arch/ceva/src/common/ceva_fullcontextrestore.c similarity index 88% rename from arch/ceva/src/common/up_fullcontextrestore.c rename to arch/ceva/src/common/ceva_fullcontextrestore.c index 8aa008dc697..de8818f4443 100644 --- a/arch/ceva/src/common/up_fullcontextrestore.c +++ b/arch/ceva/src/common/ceva_fullcontextrestore.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_fullcontextrestore.c + * arch/ceva/src/common/ceva_fullcontextrestore.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -24,26 +24,26 @@ #include -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_fullcontextrestore + * Name: ceva_fullcontextrestore * * Description: * Restore the current thread context. Full prototype is: * - * void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function; + * void ceva_fullcontextrestore(uint32_t *restoreregs) noreturn_function; * * Return: * None * ****************************************************************************/ -void up_fullcontextrestore(uint32_t *restoreregs) +void ceva_fullcontextrestore(uint32_t *restoreregs) { /* Let sys_call1() do all of the work */ diff --git a/arch/ceva/src/common/up_heap.c b/arch/ceva/src/common/ceva_heap.c similarity index 97% rename from arch/ceva/src/common/up_heap.c rename to arch/ceva/src/common/ceva_heap.c index 6eb49cf7ee6..267aae3683c 100644 --- a/arch/ceva/src/common/up_heap.c +++ b/arch/ceva/src/common/ceva_heap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_heap.c + * arch/ceva/src/common/ceva_heap.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include #include "mpu.h" -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -187,7 +187,7 @@ void up_allocate_heap(void **heap_start, size_t *heap_size) if (size != 0) { mpu_user_data(bssend[i], size); - up_heap_color(bssend[i], size); + ceva_heap_color(bssend[i], size); if (i == CONFIG_ARCH_USER_DEFAULT_HEAP) { /* Return the default user-space heap settings */ @@ -210,7 +210,7 @@ void up_allocate_heap(void **heap_start, size_t *heap_size) if (size != 0) { mpu_priv_data(g_bssend[i], size); - up_heap_color(g_bssend[i], size); + ceva_heap_color(g_bssend[i], size); if (i == CONFIG_ARCH_DEFAULT_HEAP) { /* Return the default heap settings */ @@ -250,7 +250,7 @@ void up_allocate_kheap(void **heap_start, size_t *heap_size) if (size != 0) { mpu_priv_data(g_bssend[i], size); - up_heap_color(g_bssend[i], size); + ceva_heap_color(g_bssend[i], size); if (i == CONFIG_ARCH_DEFAULT_HEAP) { /* Return the default kernel-space heap settings */ diff --git a/arch/ceva/src/common/up_idle.c b/arch/ceva/src/common/ceva_idle.c similarity index 93% rename from arch/ceva/src/common/up_idle.c rename to arch/ceva/src/common/ceva_idle.c index 16d4d8a7e6d..01b51266e53 100644 --- a/arch/ceva/src/common/up_idle.c +++ b/arch/ceva/src/common/ceva_idle.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_idle.c + * arch/ceva/src/common/ceva_idle.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -28,7 +28,7 @@ #include #include -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Private Functions @@ -73,19 +73,19 @@ static void up_idlepm(void) switch (newstate) { case PM_NORMAL: - up_cpu_doze(); + ceva_cpu_doze(); break; case PM_IDLE: - up_cpu_idle(); + ceva_cpu_idle(); break; case PM_STANDBY: - up_cpu_standby(); + ceva_cpu_standby(); break; case PM_SLEEP: - up_cpu_sleep(); + ceva_cpu_sleep(); break; default: @@ -93,7 +93,7 @@ static void up_idlepm(void) } } #else -# define up_idlepm() up_cpu_idle() +# define up_idlepm() ceva_cpu_idle() #endif /**************************************************************************** @@ -127,7 +127,7 @@ void up_idle(void) /* Quit lower power mode, restore to PM_NORMAL */ - up_cpu_normal(); + ceva_cpu_normal(); pm_changestate(PM_IDLE_DOMAIN, PM_RESTORE); sched_unlock(); @@ -138,12 +138,12 @@ void up_idle(void) * Power callback default implementation ****************************************************************************/ -void weak_function up_cpu_normal(void) +void weak_function ceva_cpu_normal(void) { } /**************************************************************************** - * Name: up_pminitialize + * Name: ceva_pminitialize * * Description: * This function is called by MCU-specific logic at power-on reset in @@ -161,7 +161,7 @@ void weak_function up_cpu_normal(void) ****************************************************************************/ #ifdef CONFIG_PM -void up_pminitialize(void) +void ceva_pminitialize(void) { /* Initialize the NuttX power management subsystem proper */ diff --git a/arch/ceva/src/common/up_initialize.c b/arch/ceva/src/common/ceva_initialize.c similarity index 92% rename from arch/ceva/src/common/up_initialize.c rename to arch/ceva/src/common/ceva_initialize.c index a1f129f5b17..8dc7dee4340 100644 --- a/arch/ceva/src/common/up_initialize.c +++ b/arch/ceva/src/common/ceva_initialize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_initialize.c + * arch/ceva/src/common/ceva_initialize.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -24,7 +24,7 @@ #include -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Private Functions @@ -81,7 +81,7 @@ void up_initialize(void) /* Add any extra memory fragments to the memory manager */ - up_addregion(); + ceva_addregion(); #ifdef CONFIG_PM /* Initialize the power management subsystem. This MCU-specific function @@ -90,30 +90,30 @@ void up_initialize(void) * with the power management subsystem). */ - up_pminitialize(); + ceva_pminitialize(); #endif #ifdef CONFIG_ARCH_DMA - /* Initialize the DMA subsystem if the weak function up_dma_initialize has - * been brought into the build + /* Initialize the DMA subsystem if the weak function ceva_dma_initialize + * has been brought into the build */ - up_dma_initialize(); + ceva_dma_initialize(); #endif /* Initialize the serial device driver */ #ifdef USE_SERIALDRIVER - up_serialinit(); + ceva_serialinit(); #endif /* Initialize the network */ - up_netinitialize(); + ceva_netinitialize(); #if defined(CONFIG_USBDEV) || defined(CONFIG_USBHOST) /* Initialize USB -- device and/or host */ - up_usbinitialize(); + ceva_usbinitialize(); #endif } diff --git a/arch/ceva/src/common/up_internal.h b/arch/ceva/src/common/ceva_internal.h similarity index 85% rename from arch/ceva/src/common/up_internal.h rename to arch/ceva/src/common/ceva_internal.h index e08367fc8f2..8a2de7647ee 100644 --- a/arch/ceva/src/common/up_internal.h +++ b/arch/ceva/src/common/ceva_internal.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_internal.h + * arch/ceva/src/common/ceva_internal.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -205,104 +205,104 @@ void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits); /* Context switching */ -void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function; -void up_switchcontext(uint32_t **saveregs, uint32_t *restoreregs); +void ceva_fullcontextrestore(uint32_t *restoreregs) noreturn_function; +void ceva_switchcontext(uint32_t **saveregs, uint32_t *restoreregs); /* Signal handling **********************************************************/ -void up_sigdeliver(void); +void ceva_sigdeliver(void); /* Arch specific ************************************************************/ -void up_earlyinitialize(void); -void up_lateinitialize(void); -void up_finalinitialize(void); +void ceva_earlyinitialize(void); +void ceva_lateinitialize(void); +void ceva_finalinitialize(void); /* Power management *********************************************************/ #ifdef CONFIG_PM -void up_pminitialize(void); +void ceva_pminitialize(void); #else -# define up_pminitialize() +# define ceva_pminitialize() #endif -void up_reset(void); +void ceva_reset(void); -void up_cpu_doze(void); -void up_cpu_idle(void); -void up_cpu_standby(void); -void up_cpu_sleep(void); -void up_cpu_normal(void); +void ceva_cpu_doze(void); +void ceva_cpu_idle(void); +void ceva_cpu_standby(void); +void ceva_cpu_sleep(void); +void ceva_cpu_normal(void); /* Interrupt handling *******************************************************/ /* Interrupt acknowledge and dispatch */ -uint32_t *up_doirq(int irq, uint32_t *regs); +uint32_t *ceva_doirq(int irq, uint32_t *regs); /* Exception Handlers */ -int up_svcall(int irq, void *context, void *arg); -int up_hardfault(int irq, void *context, void *arg); +int ceva_svcall(int irq, void *context, void *arg); +int ceva_hardfault(int irq, void *context, void *arg); -void up_svcall_handler(void); +void ceva_svcall_handler(void); /* Low level serial output **************************************************/ #ifdef USE_SERIALDRIVER -void up_serialinit(void); +void ceva_serialinit(void); #else -# define up_serialinit() +# define ceva_serialinit() #endif #ifdef USE_EARLYSERIALINIT -void up_earlyserialinit(void); +void ceva_earlyserialinit(void); #else -# define up_earlyserialinit() +# define ceva_earlyserialinit() #endif /* DMA **********************************************************************/ #ifdef CONFIG_ARCH_DMA -void up_dma_initialize(void); +void ceva_dma_initialize(void); #endif /* Memory management ********************************************************/ #if CONFIG_MM_REGIONS > 1 -void up_addregion(void); +void ceva_addregion(void); #else -# define up_addregion() +# define ceva_addregion() #endif /* Networking ***************************************************************/ #if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) -void up_netinitialize(void); +void ceva_netinitialize(void); #else -# define up_netinitialize() +# define ceva_netinitialize() #endif /* USB **********************************************************************/ #ifdef CONFIG_USBDEV -void up_usbinitialize(void); -void up_usbuninitialize(void); +void ceva_usbinitialize(void); +void ceva_usbuninitialize(void); #else -# define up_usbinitialize() -# define up_usbuninitialize() +# define ceva_usbinitialize() +# define ceva_usbuninitialize() #endif /* Debug ********************************************************************/ #ifdef CONFIG_HEAP_COLORATION -# define up_heap_color(start, size) memset(start, HEAP_COLOR, size) +# define ceva_heap_color(start, size) memset(start, HEAP_COLOR, size) #else -# define up_heap_color(start, size) +# define ceva_heap_color(start, size) #endif #ifdef CONFIG_STACK_COLORATION size_t ceva_stack_check(uintptr_t alloc, size_t size); -void up_stack_color(void *stackbase, size_t nbytes); +void ceva_stack_color(void *stackbase, size_t nbytes); #endif #undef EXTERN diff --git a/arch/ceva/src/common/up_modifyreg16.c b/arch/ceva/src/common/ceva_modifyreg16.c similarity index 96% rename from arch/ceva/src/common/up_modifyreg16.c rename to arch/ceva/src/common/ceva_modifyreg16.c index c067e8b2f49..79a50f70b9f 100644 --- a/arch/ceva/src/common/up_modifyreg16.c +++ b/arch/ceva/src/common/ceva_modifyreg16.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_modifyreg16.c + * arch/ceva/src/common/ceva_modifyreg16.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -25,7 +25,7 @@ #include #include -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/ceva/src/common/up_modifyreg32.c b/arch/ceva/src/common/ceva_modifyreg32.c similarity index 96% rename from arch/ceva/src/common/up_modifyreg32.c rename to arch/ceva/src/common/ceva_modifyreg32.c index a2dd2d3483a..90cacd0d563 100644 --- a/arch/ceva/src/common/up_modifyreg32.c +++ b/arch/ceva/src/common/ceva_modifyreg32.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_modifyreg32.c + * arch/ceva/src/common/ceva_modifyreg32.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -25,7 +25,7 @@ #include #include -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/ceva/src/common/up_modifyreg8.c b/arch/ceva/src/common/ceva_modifyreg8.c similarity index 96% rename from arch/ceva/src/common/up_modifyreg8.c rename to arch/ceva/src/common/ceva_modifyreg8.c index 2bd746b2fa8..5825a49663b 100644 --- a/arch/ceva/src/common/up_modifyreg8.c +++ b/arch/ceva/src/common/ceva_modifyreg8.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_modifyreg8.c + * arch/ceva/src/common/ceva_modifyreg8.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -25,7 +25,7 @@ #include #include -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/ceva/src/common/up_nputs.c b/arch/ceva/src/common/ceva_nputs.c similarity index 97% rename from arch/ceva/src/common/up_nputs.c rename to arch/ceva/src/common/ceva_nputs.c index a63994c24b8..9bb65b20d4c 100644 --- a/arch/ceva/src/common/up_nputs.c +++ b/arch/ceva/src/common/ceva_nputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_nputs.c + * arch/ceva/src/common/ceva_nputs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/ceva/src/common/up_pthread_start.c b/arch/ceva/src/common/ceva_pthread_start.c similarity index 98% rename from arch/ceva/src/common/up_pthread_start.c rename to arch/ceva/src/common/ceva_pthread_start.c index 03194b0c3c5..469a7d1ac1d 100644 --- a/arch/ceva/src/common/up_pthread_start.c +++ b/arch/ceva/src/common/ceva_pthread_start.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_pthread_start.c + * arch/ceva/src/common/ceva_pthread_start.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/ceva/src/common/up_releasepending.c b/arch/ceva/src/common/ceva_releasepending.c similarity index 94% rename from arch/ceva/src/common/up_releasepending.c rename to arch/ceva/src/common/ceva_releasepending.c index 65fb0872fc4..1cc47c73036 100644 --- a/arch/ceva/src/common/up_releasepending.c +++ b/arch/ceva/src/common/ceva_releasepending.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_releasepending.c + * arch/ceva/src/common/ceva_releasepending.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -28,7 +28,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Public Functions @@ -102,9 +102,9 @@ void up_release_pending(void) * ready to run list. */ - up_switchcontext(&rtcb->xcp.regs, nexttcb->xcp.regs); + ceva_switchcontext(&rtcb->xcp.regs, nexttcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the + /* ceva_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. diff --git a/arch/ceva/src/common/up_releasestack.c b/arch/ceva/src/common/ceva_releasestack.c similarity index 98% rename from arch/ceva/src/common/up_releasestack.c rename to arch/ceva/src/common/ceva_releasestack.c index 509ba49b4b5..78c32d2d7d5 100644 --- a/arch/ceva/src/common/up_releasestack.c +++ b/arch/ceva/src/common/ceva_releasestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_releasestack.c + * arch/ceva/src/common/ceva_releasestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/ceva/src/common/up_saveusercontext.c b/arch/ceva/src/common/ceva_saveusercontext.c similarity index 96% rename from arch/ceva/src/common/up_saveusercontext.c rename to arch/ceva/src/common/ceva_saveusercontext.c index a1d0bffca18..7206720461c 100644 --- a/arch/ceva/src/common/up_saveusercontext.c +++ b/arch/ceva/src/common/ceva_saveusercontext.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_saveusercontext.c + * arch/ceva/src/common/ceva_saveusercontext.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -27,7 +27,7 @@ #include -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/ceva/src/common/up_schedulesigaction.c b/arch/ceva/src/common/ceva_schedulesigaction.c similarity index 97% rename from arch/ceva/src/common/up_schedulesigaction.c rename to arch/ceva/src/common/ceva_schedulesigaction.c index d92b99a582c..c11b08ab5ab 100644 --- a/arch/ceva/src/common/up_schedulesigaction.c +++ b/arch/ceva/src/common/ceva_schedulesigaction.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_schedulesigaction.c + * arch/ceva/src/common/ceva_schedulesigaction.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "ceva_internal.h" #ifndef CONFIG_DISABLE_SIGNALS @@ -159,7 +159,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * to be here. */ - g_current_regs[cpu][REG_PC] = (uint32_t)up_sigdeliver; + g_current_regs[cpu][REG_PC] = (uint32_t)ceva_sigdeliver; #ifdef REG_OM g_current_regs[cpu][REG_OM] &= ~REG_OM_MASK; g_current_regs[cpu][REG_OM] |= REG_OM_KERNEL; @@ -203,7 +203,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * here. */ - tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver; + tcb->xcp.regs[REG_PC] = (uint32_t)ceva_sigdeliver; #ifdef REG_OM tcb->xcp.regs[REG_OM] &= ~REG_OM_MASK; tcb->xcp.regs[REG_OM] |= REG_OM_KERNEL; diff --git a/arch/ceva/src/common/up_sigdeliver.c b/arch/ceva/src/common/ceva_sigdeliver.c similarity index 95% rename from arch/ceva/src/common/up_sigdeliver.c rename to arch/ceva/src/common/ceva_sigdeliver.c index dd222ca4450..3bf25abdffa 100644 --- a/arch/ceva/src/common/up_sigdeliver.c +++ b/arch/ceva/src/common/ceva_sigdeliver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_sigdeliver.c + * arch/ceva/src/common/ceva_sigdeliver.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "ceva_internal.h" #ifndef CONFIG_DISABLE_SIGNALS @@ -39,7 +39,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_sigdeliver + * Name: ceva_sigdeliver * * Description: * This is the a signal handling trampoline. When a signal action was @@ -48,7 +48,7 @@ * ****************************************************************************/ -void up_sigdeliver(void) +void ceva_sigdeliver(void) { struct tcb_s *rtcb = this_task(); uint32_t *regs = rtcb->xcp.saved_regs; @@ -90,7 +90,7 @@ void up_sigdeliver(void) * execution. */ - up_fullcontextrestore(regs); + ceva_fullcontextrestore(regs); } #endif /* !CONFIG_DISABLE_SIGNALS */ diff --git a/arch/ceva/src/common/up_signal_dispatch.c b/arch/ceva/src/common/ceva_signal_dispatch.c similarity index 96% rename from arch/ceva/src/common/up_signal_dispatch.c rename to arch/ceva/src/common/ceva_signal_dispatch.c index 4a3d345a64b..d532fa2b70e 100644 --- a/arch/ceva/src/common/up_signal_dispatch.c +++ b/arch/ceva/src/common/ceva_signal_dispatch.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_signal_dispatch.c + * arch/ceva/src/common/ceva_signal_dispatch.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -46,7 +46,7 @@ * * Normally the a user-mode signalling handling stub will also execute * before the ultimate signal handler is called. See - * arch/ceva/src/[xc5/xm6]/up_signal_handler. This function is the + * arch/ceva/src/[xc5/xm6]/ceva_signal_handler. This function is the * user-space, signal handler trampoline function. It is called from * up_signal_dispatch() in user-mode. * diff --git a/arch/ceva/src/common/up_stackframe.c b/arch/ceva/src/common/ceva_stackframe.c similarity index 98% rename from arch/ceva/src/common/up_stackframe.c rename to arch/ceva/src/common/ceva_stackframe.c index 4f598f638e7..9324e7eefc8 100644 --- a/arch/ceva/src/common/up_stackframe.c +++ b/arch/ceva/src/common/ceva_stackframe.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_stackframe.c + * arch/ceva/src/common/ceva_stackframe.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -27,7 +27,7 @@ #include #include -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/ceva/src/common/up_start.c b/arch/ceva/src/common/ceva_start.c similarity index 98% rename from arch/ceva/src/common/up_start.c rename to arch/ceva/src/common/ceva_start.c index f7bf93e8965..146cc421a37 100644 --- a/arch/ceva/src/common/up_start.c +++ b/arch/ceva/src/common/ceva_start.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_start.c + * arch/ceva/src/common/ceva_start.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include "mpu.h" -#include "up_internal.h" +#include "ceva_internal.h" #if CONFIG_ARCH_NR_MEMORY >= 2 # define _START_TEXT2 _stext2 @@ -300,8 +300,8 @@ void up_start(void) mpu_control(true); - up_earlyserialinit(); - up_earlyinitialize(); + ceva_earlyserialinit(); + ceva_earlyinitialize(); board_earlyinitialize(); nx_start(); diff --git a/arch/ceva/src/common/up_svcall.c b/arch/ceva/src/common/ceva_svcall.c similarity index 95% rename from arch/ceva/src/common/up_svcall.c rename to arch/ceva/src/common/ceva_svcall.c index 2b2115275a5..5af40e6dfc7 100644 --- a/arch/ceva/src/common/up_svcall.c +++ b/arch/ceva/src/common/ceva_svcall.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_svcall.c + * arch/ceva/src/common/ceva_svcall.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,21 +33,21 @@ #include #include -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_svcall + * Name: ceva_svcall * * Description: * This is SVCall exception handler that performs context switching * ****************************************************************************/ -int up_svcall(int irq, void *context, void *arg) +int ceva_svcall(int irq, void *context, void *arg) { uint32_t *regs = (uint32_t *)context; uint32_t cmd; @@ -105,7 +105,7 @@ int up_svcall(int irq, void *context, void *arg) /* A0=SYS_restore_context: This a restore context command: * - * void up_fullcontextrestore(uint32_t *restoreregs); + * void ceva_fullcontextrestore(uint32_t *restoreregs); * * At this point, the following values are saved in context: * @@ -127,7 +127,8 @@ int up_svcall(int irq, void *context, void *arg) /* A0=SYS_switch_context: This a switch context command: * - * void up_switchcontext(uint32_t **saveregs, uint32_t *restoreregs); + * void ceva_switchcontext(uint32_t **saveregs, + * uint32_t *restoreregs); * * At this point, the following values are saved in context: * @@ -181,7 +182,7 @@ int up_svcall(int irq, void *context, void *arg) #endif rtcb->xcp.nsyscalls = index; - /* The return value must be in A0-A1. up_svcall_handler() + /* The return value must be in A0-A1. ceva_svcall_handler() * temporarily moved the value for A0 into A2. */ @@ -351,7 +352,7 @@ int up_svcall(int irq, void *context, void *arg) DEBUGASSERT(cmd >= CONFIG_SYS_RESERVED && cmd < SYS_maxsyscall); DEBUGASSERT(index < CONFIG_SYS_NNEST); - /* Setup to return to up_svcall_handler in privileged mode. */ + /* Setup to return to ceva_svcall_handler in privileged mode. */ rtcb->xcp.syscall[index].saved_pc = regs[REG_PC]; #ifdef REG_OM @@ -359,7 +360,7 @@ int up_svcall(int irq, void *context, void *arg) #endif rtcb->xcp.nsyscalls = index + 1; - regs[REG_PC] = (uint32_t)up_svcall_handler; + regs[REG_PC] = (uint32_t)ceva_svcall_handler; #ifdef REG_OM regs[REG_OM] &= ~REG_OM_MASK; regs[REG_OM] |= REG_OM_KERNEL; diff --git a/arch/ceva/src/common/up_switchcontext.c b/arch/ceva/src/common/ceva_switchcontext.c similarity index 87% rename from arch/ceva/src/common/up_switchcontext.c rename to arch/ceva/src/common/ceva_switchcontext.c index 360d0890cbd..d013cff3d42 100644 --- a/arch/ceva/src/common/up_switchcontext.c +++ b/arch/ceva/src/common/ceva_switchcontext.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_switchcontext.c + * arch/ceva/src/common/ceva_switchcontext.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -24,27 +24,27 @@ #include -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_switchcontext + * Name: ceva_switchcontext * * Description: * Save the current thread context and restore the specified context. * Full prototype is: * - * void up_switchcontext(uint32_t **saveregs, uint32_t *restoreregs); + * void ceva_switchcontext(uint32_t **saveregs, uint32_t *restoreregs); * * Return: * None * ****************************************************************************/ -void up_switchcontext(uint32_t **saveregs, uint32_t *restoreregs) +void ceva_switchcontext(uint32_t **saveregs, uint32_t *restoreregs) { /* Let sys_call2() do all of the work */ diff --git a/arch/ceva/src/common/up_task_start.c b/arch/ceva/src/common/ceva_task_start.c similarity index 98% rename from arch/ceva/src/common/up_task_start.c rename to arch/ceva/src/common/ceva_task_start.c index 5a0bf81ea00..d095ea18bc6 100644 --- a/arch/ceva/src/common/up_task_start.c +++ b/arch/ceva/src/common/ceva_task_start.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_task_start.c + * arch/ceva/src/common/ceva_task_start.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/ceva/src/common/up_unblocktask.c b/arch/ceva/src/common/ceva_unblocktask.c similarity index 93% rename from arch/ceva/src/common/up_unblocktask.c rename to arch/ceva/src/common/ceva_unblocktask.c index 395c9db46b9..701f8b4f7fb 100644 --- a/arch/ceva/src/common/up_unblocktask.c +++ b/arch/ceva/src/common/ceva_unblocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_unblocktask.c + * arch/ceva/src/common/ceva_unblocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -28,7 +28,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Public Functions @@ -85,9 +85,9 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * ready to run list. */ - up_switchcontext(&rtcb->xcp.regs, tcb->xcp.regs); + ceva_switchcontext(&rtcb->xcp.regs, tcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the + /* ceva_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. diff --git a/arch/ceva/src/common/up_userspace.c b/arch/ceva/src/common/ceva_userspace.c similarity index 98% rename from arch/ceva/src/common/up_userspace.c rename to arch/ceva/src/common/ceva_userspace.c index cff5cb8f5f2..236491b6ff6 100644 --- a/arch/ceva/src/common/up_userspace.c +++ b/arch/ceva/src/common/ceva_userspace.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_userspace.c + * arch/ceva/src/common/ceva_userspace.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "ceva_internal.h" #ifdef CONFIG_BUILD_PROTECTED diff --git a/arch/ceva/src/common/up_usestack.c b/arch/ceva/src/common/ceva_usestack.c similarity index 96% rename from arch/ceva/src/common/up_usestack.c rename to arch/ceva/src/common/ceva_usestack.c index b6f47743110..5b043e099fa 100644 --- a/arch/ceva/src/common/up_usestack.c +++ b/arch/ceva/src/common/ceva_usestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_usestack.c + * arch/ceva/src/common/ceva_usestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Public Functions @@ -115,7 +115,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size) * value that we can use later to test for high water marks. */ - up_stack_color(tcb->stack_alloc_ptr, tcb->adj_stack_size); + ceva_stack_color(tcb->stack_alloc_ptr, tcb->adj_stack_size); #endif return OK; diff --git a/arch/ceva/src/common/up_vfork.c b/arch/ceva/src/common/ceva_vfork.c similarity index 99% rename from arch/ceva/src/common/up_vfork.c rename to arch/ceva/src/common/ceva_vfork.c index 8dd33a25e9a..ab1c6e31b4f 100644 --- a/arch/ceva/src/common/up_vfork.c +++ b/arch/ceva/src/common/ceva_vfork.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/common/up_vfork.c + * arch/ceva/src/common/ceva_vfork.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/ceva/src/xc5/up_hardfault.c b/arch/ceva/src/xc5/xc5_hardfault.c similarity index 95% rename from arch/ceva/src/xc5/up_hardfault.c rename to arch/ceva/src/xc5/xc5_hardfault.c index 82e15f91641..31218767a4e 100644 --- a/arch/ceva/src/xc5/up_hardfault.c +++ b/arch/ceva/src/xc5/xc5_hardfault.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xc5/up_hardfault.c + * arch/ceva/src/xc5/xc5_hardfault.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -28,7 +28,7 @@ #include #include "cpm.h" -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -73,14 +73,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_hardfault + * Name: ceva_hardfault * * Description: * This is Hard Fault exception handler. * ****************************************************************************/ -int up_hardfault(int irq, void *context, void *arg) +int ceva_hardfault(int irq, void *context, void *arg) { /* Dump some hard fault info */ diff --git a/arch/ceva/src/xc5/up_head.S b/arch/ceva/src/xc5/xc5_head.S similarity index 96% rename from arch/ceva/src/xc5/up_head.S rename to arch/ceva/src/xc5/xc5_head.S index 0654c2a46dd..dbcd9ba2222 100644 --- a/arch/ceva/src/xc5/up_head.S +++ b/arch/ceva/src/xc5/xc5_head.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xc5/up_head.S + * arch/ceva/src/xc5/xc5_head.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -49,10 +49,10 @@ * Public Symbols ****************************************************************************/ - .file "up_head.S" + .file "xc5_head.S" .extern _g_idle_topstack .extern _g_idle_basestack - .extern _up_doirq + .extern _ceva_doirq .extern _up_start .extern _up_relocate @@ -204,7 +204,7 @@ exception_common: or a1, #0x0000001b, a1 mov a1, modg - /* There are two arguments to up_doirq: + /* There are two arguments to ceva_doirq: * * a0 = The IRQ number * r0 = The top of the stack points to the saved state @@ -219,13 +219,13 @@ exception_common: nop push {dw} retreg - mov #_up_doirq, r1 + mov #_ceva_doirq, r1 nop nop callar r1 pop {dw} retreg - /* On return from up_doirq, r0 will hold a pointer to register context + /* On return from ceva_doirq, r0 will hold a pointer to register context * array to use for the interrupt return. */ diff --git a/arch/ceva/src/xc5/up_icache.c b/arch/ceva/src/xc5/xc5_icache.c similarity index 99% rename from arch/ceva/src/xc5/up_icache.c rename to arch/ceva/src/xc5/xc5_icache.c index 028f10496d4..dda1f3366a9 100644 --- a/arch/ceva/src/xc5/up_icache.c +++ b/arch/ceva/src/xc5/xc5_icache.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xc5/up_icache.c + * arch/ceva/src/xc5/xc5_icache.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/ceva/src/xc5/up_initialstate.c b/arch/ceva/src/xc5/xc5_initialstate.c similarity index 96% rename from arch/ceva/src/xc5/up_initialstate.c rename to arch/ceva/src/xc5/xc5_initialstate.c index 14e37dcd474..b03498a9c0c 100644 --- a/arch/ceva/src/xc5/up_initialstate.c +++ b/arch/ceva/src/xc5/xc5_initialstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xc5/up_initialstate.c + * arch/ceva/src/xc5/xc5_initialstate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -29,7 +29,7 @@ #include #include -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Public Functions @@ -66,7 +66,7 @@ void up_initial_state(struct tcb_s *tcb) * water marks. */ - up_stack_color(tcb->stack_alloc_ptr, 0); + ceva_stack_color(tcb->stack_alloc_ptr, 0); #endif /* CONFIG_STACK_COLORATION */ } diff --git a/arch/ceva/src/xc5/up_intc.c b/arch/ceva/src/xc5/xc5_intc.c similarity index 97% rename from arch/ceva/src/xc5/up_intc.c rename to arch/ceva/src/xc5/xc5_intc.c index 65f093b9859..b4f73766716 100644 --- a/arch/ceva/src/xc5/up_intc.c +++ b/arch/ceva/src/xc5/xc5_intc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xc5/up_intc.c + * arch/ceva/src/xc5/xc5_intc.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -28,7 +28,7 @@ #include #include "cpm.h" -#include "up_internal.h" +#include "ceva_internal.h" #include "vintc.h" /**************************************************************************** @@ -185,13 +185,13 @@ void up_irqinitialize(void) /* Attach and enable SVCall exception handler */ - irq_attach(IRQ_TRAP0, up_svcall, NULL); + irq_attach(IRQ_TRAP0, ceva_svcall, NULL); up_enable_irq(IRQ_TRAP0); /* Attach and enable Hard Fault exception handler */ #if CONFIG_ARCH_HARDFAULT_IRQ >= 0 - irq_attach(CONFIG_ARCH_HARDFAULT_IRQ, up_hardfault, NULL); + irq_attach(CONFIG_ARCH_HARDFAULT_IRQ, ceva_hardfault, NULL); up_enable_irq(CONFIG_ARCH_HARDFAULT_IRQ); #endif diff --git a/arch/ceva/src/xc5/up_mpu.c b/arch/ceva/src/xc5/xc5_mpu.c similarity index 99% rename from arch/ceva/src/xc5/up_mpu.c rename to arch/ceva/src/xc5/xc5_mpu.c index a5510a8f626..23720c86eb6 100644 --- a/arch/ceva/src/xc5/up_mpu.c +++ b/arch/ceva/src/xc5/xc5_mpu.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xc5/up_mpu.c + * arch/ceva/src/xc5/xc5_mpu.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/ceva/src/xc5/up_psu.c b/arch/ceva/src/xc5/xc5_psu.c similarity index 97% rename from arch/ceva/src/xc5/up_psu.c rename to arch/ceva/src/xc5/xc5_psu.c index 81b664457d4..f7bb5098b8c 100644 --- a/arch/ceva/src/xc5/up_psu.c +++ b/arch/ceva/src/xc5/xc5_psu.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xc5/up_psu.c + * arch/ceva/src/xc5/xc5_psu.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -26,7 +26,7 @@ #include -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/ceva/src/xc5/up_relocate.c b/arch/ceva/src/xc5/xc5_relocate.c similarity index 98% rename from arch/ceva/src/xc5/up_relocate.c rename to arch/ceva/src/xc5/xc5_relocate.c index 9765b2ebc35..4937e7b2fc4 100644 --- a/arch/ceva/src/xc5/up_relocate.c +++ b/arch/ceva/src/xc5/xc5_relocate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xc5/up_relocate.c + * arch/ceva/src/xc5/xc5_relocate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/ceva/src/xc5/up_signal_handler.S b/arch/ceva/src/xc5/xc5_signal_handler.S similarity index 97% rename from arch/ceva/src/xc5/up_signal_handler.S rename to arch/ceva/src/xc5/xc5_signal_handler.S index 8b231b82564..5628b3f3cbb 100644 --- a/arch/ceva/src/xc5/up_signal_handler.S +++ b/arch/ceva/src/xc5/xc5_signal_handler.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xc5/up_signal_handler.S + * arch/ceva/src/xc5/xc5_signal_handler.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ * File info ****************************************************************************/ - .file "up_signal_handler.S" + .file "xc5_signal_handler.S" /**************************************************************************** * Public Functions diff --git a/arch/ceva/src/xc5/up_svcall_handler.S b/arch/ceva/src/xc5/xc5_svcall_handler.S similarity index 89% rename from arch/ceva/src/xc5/up_svcall_handler.S rename to arch/ceva/src/xc5/xc5_svcall_handler.S index 565753f02e3..fe227076e2c 100644 --- a/arch/ceva/src/xc5/up_svcall_handler.S +++ b/arch/ceva/src/xc5/xc5_svcall_handler.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xc5/up_svcall_handler.S + * arch/ceva/src/xc5/xc5_svcall_handler.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ * Public Symbols ****************************************************************************/ - .file "up_svcall_handler.S" + .file "ceva_svcall_handler.S" .extern _g_stublookup /**************************************************************************** @@ -40,11 +40,11 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_svcall_handler + * Name: ceva_svcall_handler * * Description: * This function is the kernel-space, syscall handler trampoline function. It - * is called from up_svcall() in interrupt handler. + * is called from ceva_svcall() in interrupt handler. * * Call the stub function corresponding to the system call. NOTE the non- * standard parameter passing: @@ -64,10 +64,10 @@ ****************************************************************************/ .text - .public _up_svcall_handler - .func_start 3 _up_svcall_handler + .public _ceva_svcall_handler + .func_start 3 _ceva_svcall_handler -_up_svcall_handler: +_ceva_svcall_handler: /* Create a stack frame to hold LR */ @@ -96,11 +96,11 @@ _up_svcall_handler: /* Execute the SYS_syscall_return SVCall (will not return) */ /* Save return value in r2 */ - mov a0, a2 /* will restore in up_svcall */ + mov a0, a2 /* will restore in ceva_svcall */ mov #SYS_syscall_return, a0 trap - .func_end 3 _up_svcall_handler + .func_end 3 _ceva_svcall_handler #else /* Add dummy symbol to avoid cofflib crash */ diff --git a/arch/ceva/src/xm6/up_hardfault.c b/arch/ceva/src/xm6/xm6_hardfault.c similarity index 96% rename from arch/ceva/src/xm6/up_hardfault.c rename to arch/ceva/src/xm6/xm6_hardfault.c index c61c38e5789..f1b3e972b90 100644 --- a/arch/ceva/src/xm6/up_hardfault.c +++ b/arch/ceva/src/xm6/xm6_hardfault.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xm6/up_hardfault.c + * arch/ceva/src/xm6/xm6_hardfault.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -28,7 +28,7 @@ #include #include "cpm.h" -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -88,14 +88,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_hardfault + * Name: ceva_hardfault * * Description: * This is Hard Fault exception handler. * ****************************************************************************/ -int up_hardfault(int irq, void *context, void *arg) +int ceva_hardfault(int irq, void *context, void *arg) { /* Dump some hard fault info */ diff --git a/arch/ceva/src/xm6/up_head.S b/arch/ceva/src/xm6/xm6_head.S similarity index 95% rename from arch/ceva/src/xm6/up_head.S rename to arch/ceva/src/xm6/xm6_head.S index adbbb7caa5b..c6383332769 100644 --- a/arch/ceva/src/xm6/up_head.S +++ b/arch/ceva/src/xm6/xm6_head.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xm6/up_head.S + * arch/ceva/src/xm6/xm6_head.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -54,10 +54,10 @@ * Public Symbols ****************************************************************************/ - .file "up_head.S" + .file "xm6_head.S" .extern _g_idle_topstack .extern _g_idle_basestack - .extern _up_doirq + .extern _ceva_doirq .extern _up_start /**************************************************************************** @@ -174,7 +174,7 @@ exception_common: lbf {sv} #0x00 - /* There are two arguments to up_doirq: + /* There are two arguments to ceva_doirq: * * r0 = The IRQ number * r1 = The top of the stack points to the saved state @@ -186,10 +186,10 @@ exception_common: mov r2.ui, sp.ui push retreg.ui - callr #_up_doirq, ?prx.b + callr #_ceva_doirq, ?prx.b pop retreg.ui - /* On return from up_doirq, r0 will hold a pointer to register context + /* On return from ceva_doirq, r0 will hold a pointer to register context * array to use for the interrupt return. */ diff --git a/arch/ceva/src/xm6/up_icache.c b/arch/ceva/src/xm6/xm6_icache.c similarity index 99% rename from arch/ceva/src/xm6/up_icache.c rename to arch/ceva/src/xm6/xm6_icache.c index ee70f5b99c0..308e2d787fa 100644 --- a/arch/ceva/src/xm6/up_icache.c +++ b/arch/ceva/src/xm6/xm6_icache.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xm6/up_icache.c + * arch/ceva/src/xm6/xm6_icache.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/ceva/src/xm6/up_initialstate.c b/arch/ceva/src/xm6/xm6_initialstate.c similarity index 97% rename from arch/ceva/src/xm6/up_initialstate.c rename to arch/ceva/src/xm6/xm6_initialstate.c index 4677c19ce4b..440a4b5f6f8 100644 --- a/arch/ceva/src/xm6/up_initialstate.c +++ b/arch/ceva/src/xm6/xm6_initialstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xm6/up_initialstate.c + * arch/ceva/src/xm6/xm6_initialstate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -29,7 +29,7 @@ #include #include -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -72,7 +72,7 @@ void up_initial_state(struct tcb_s *tcb) * water marks. */ - up_stack_color(tcb->stack_alloc_ptr, 0); + ceva_stack_color(tcb->stack_alloc_ptr, 0); #endif /* CONFIG_STACK_COLORATION */ } diff --git a/arch/ceva/src/xm6/up_intc.c b/arch/ceva/src/xm6/xm6_intc.c similarity index 97% rename from arch/ceva/src/xm6/up_intc.c rename to arch/ceva/src/xm6/xm6_intc.c index 0d29d2a06d7..f906adf0659 100644 --- a/arch/ceva/src/xm6/up_intc.c +++ b/arch/ceva/src/xm6/xm6_intc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xm6/up_intc.c + * arch/ceva/src/xm6/xm6_intc.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -28,7 +28,7 @@ #include #include "cpm.h" -#include "up_internal.h" +#include "ceva_internal.h" #include "vintc.h" /**************************************************************************** @@ -201,13 +201,13 @@ void up_irqinitialize(void) /* Attach and enable SVCall exception handler */ - irq_attach(IRQ_TRAP0, up_svcall, NULL); + irq_attach(IRQ_TRAP0, ceva_svcall, NULL); up_enable_irq(IRQ_TRAP0); /* Attach and enable Hard Fault exception handler */ #if CONFIG_ARCH_HARDFAULT_IRQ >= 0 - irq_attach(CONFIG_ARCH_HARDFAULT_IRQ, up_hardfault, NULL); + irq_attach(CONFIG_ARCH_HARDFAULT_IRQ, ceva_hardfault, NULL); up_enable_irq(CONFIG_ARCH_HARDFAULT_IRQ); #endif diff --git a/arch/ceva/src/xm6/up_mpu.c b/arch/ceva/src/xm6/xm6_mpu.c similarity index 99% rename from arch/ceva/src/xm6/up_mpu.c rename to arch/ceva/src/xm6/xm6_mpu.c index 0a6db9e7d7b..c80fc099b2c 100644 --- a/arch/ceva/src/xm6/up_mpu.c +++ b/arch/ceva/src/xm6/xm6_mpu.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xm6/up_mpu.c + * arch/ceva/src/xm6/xm6_mpu.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/ceva/src/xm6/up_psu.c b/arch/ceva/src/xm6/xm6_psu.c similarity index 95% rename from arch/ceva/src/xm6/up_psu.c rename to arch/ceva/src/xm6/xm6_psu.c index b7ee135e7ee..6ce4ea6c983 100644 --- a/arch/ceva/src/xm6/up_psu.c +++ b/arch/ceva/src/xm6/xm6_psu.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xm6/up_psu.c + * arch/ceva/src/xm6/xm6_psu.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -26,7 +26,7 @@ #include -#include "up_internal.h" +#include "ceva_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -58,12 +58,12 @@ * Public Functions ****************************************************************************/ -void up_cpu_doze(void) +void ceva_cpu_doze(void) { up_cpu_pmod("psu {lightsleep}\n"); } -void up_cpu_idle(void) +void ceva_cpu_idle(void) { up_cpu_pmod("psu {standby}\n"); } diff --git a/arch/ceva/src/xm6/up_signal_handler.S b/arch/ceva/src/xm6/xm6_signal_handler.S similarity index 97% rename from arch/ceva/src/xm6/up_signal_handler.S rename to arch/ceva/src/xm6/xm6_signal_handler.S index 07bb3af3d60..a0f6c3bdecb 100644 --- a/arch/ceva/src/xm6/up_signal_handler.S +++ b/arch/ceva/src/xm6/xm6_signal_handler.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xm6/up_signal_handler.S + * arch/ceva/src/xm6/xm6_signal_handler.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ * File info ****************************************************************************/ - .file "up_signal_handler.S" + .file "xm6_signal_handler.S" /**************************************************************************** * Public Functions diff --git a/arch/ceva/src/xm6/up_svcall_handler.S b/arch/ceva/src/xm6/xm6_svcall_handler.S similarity index 89% rename from arch/ceva/src/xm6/up_svcall_handler.S rename to arch/ceva/src/xm6/xm6_svcall_handler.S index d6b26036851..0709ae8a83e 100644 --- a/arch/ceva/src/xm6/up_svcall_handler.S +++ b/arch/ceva/src/xm6/xm6_svcall_handler.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/ceva/src/xm6/up_svcall_handler.S + * arch/ceva/src/xm6/xm6_svcall_handler.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ * Public Symbols ****************************************************************************/ - .file "up_svcall_handler.S" + .file "xm6_svcall_handler.S" .extern _g_stublookup /**************************************************************************** @@ -40,11 +40,11 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_svcall_handler + * Name: ceva_svcall_handler * * Description: * This function is the kernel-space, syscall handler trampoline function. It - * is called from up_svcall() in interrupt handler. + * is called from ceva_svcall() in interrupt handler. * * Call the stub function corresponding to the system call. NOTE the non- * standard parameter passing: @@ -64,10 +64,10 @@ ****************************************************************************/ .text - .public _up_svcall_handler - .func_start 3 _up_svcall_handler + .public _ceva_svcall_handler + .func_start 3 _ceva_svcall_handler -_up_svcall_handler: +_ceva_svcall_handler: /* Create a stack frame to hold LR */ @@ -89,11 +89,11 @@ _up_svcall_handler: /* Execute the SYS_syscall_return SVCall (will not return) */ /* Save return value in r2 */ - mov r0.ui, r2.ui /* will restore in up_svcall */ + mov r0.ui, r2.ui /* will restore in ceva_svcall */ mov #SYS_syscall_return, r0.ui trap {t0} - .func_end 3 _up_svcall_handler + .func_end 3 _ceva_svcall_handler #else /* Add dummy symbol to avoid cofflib crash */ diff --git a/arch/hc/src/common/up_allocateheap.c b/arch/hc/src/common/hc_allocateheap.c similarity index 97% rename from arch/hc/src/common/up_allocateheap.c rename to arch/hc/src/common/hc_allocateheap.c index e4371f7cdc6..d0a654245d1 100644 --- a/arch/hc/src/common/up_allocateheap.c +++ b/arch/hc/src/common/hc_allocateheap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_allocateheap.c + * arch/hc/src/common/hc_allocateheap.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "hc_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/hc/src/common/up_blocktask.c b/arch/hc/src/common/hc_blocktask.c similarity index 95% rename from arch/hc/src/common/up_blocktask.c rename to arch/hc/src/common/hc_blocktask.c index dfc9a86c140..75859f229a9 100644 --- a/arch/hc/src/common/up_blocktask.c +++ b/arch/hc/src/common/hc_blocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_blocktask.c + * arch/hc/src/common/hc_blocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "hc_internal.h" /**************************************************************************** * Public Functions @@ -68,7 +68,7 @@ void up_block_task(struct tcb_s *rtcb) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + hc_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. @@ -84,7 +84,7 @@ void up_block_task(struct tcb_s *rtcb) * changes will be made when the interrupt returns. */ - up_restorestate(rtcb->xcp.regs); + hc_restorestate(rtcb->xcp.regs); } /* Copy the user C context into the TCB at the (old) head of the @@ -115,6 +115,6 @@ void up_block_task(struct tcb_s *rtcb) /* Then switch contexts */ - up_fullcontextrestore(rtcb->xcp.regs); + hc_fullcontextrestore(rtcb->xcp.regs); } } diff --git a/arch/hc/src/common/up_copystate.c b/arch/hc/src/common/hc_copystate.c similarity index 95% rename from arch/hc/src/common/up_copystate.c rename to arch/hc/src/common/hc_copystate.c index 832d53fa967..155aa9637f0 100644 --- a/arch/hc/src/common/up_copystate.c +++ b/arch/hc/src/common/hc_copystate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_copystate.c + * arch/hc/src/common/hc_copystate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -27,7 +27,7 @@ #include #include -#include "up_internal.h" +#include "hc_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -51,7 +51,7 @@ /* A little faster than most memcpy's */ -void up_copystate(uint8_t *dest, uint8_t *src) +void hc_copystate(uint8_t *dest, uint8_t *src) { int i; diff --git a/arch/hc/src/common/up_createstack.c b/arch/hc/src/common/hc_createstack.c similarity index 99% rename from arch/hc/src/common/up_createstack.c rename to arch/hc/src/common/hc_createstack.c index 6fcac4ba426..4bc50638602 100644 --- a/arch/hc/src/common/up_createstack.c +++ b/arch/hc/src/common/hc_createstack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_createstack.c + * arch/hc/src/common/hc_createstack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -35,7 +35,7 @@ #include #include -#include "up_internal.h" +#include "hc_internal.h" /**************************************************************************** * Private Types diff --git a/arch/hc/src/common/up_doirq.c b/arch/hc/src/common/hc_doirq.c similarity index 97% rename from arch/hc/src/common/up_doirq.c rename to arch/hc/src/common/hc_doirq.c index c2073b9ddb1..65be8e9d986 100644 --- a/arch/hc/src/common/up_doirq.c +++ b/arch/hc/src/common/hc_doirq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_doirq.c + * arch/hc/src/common/hc_doirq.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "hc_internal.h" #include "group/group.h" /**************************************************************************** @@ -55,7 +55,7 @@ * Public Functions ****************************************************************************/ -uint8_t *up_doirq(int irq, uint8_t *regs) +uint8_t *hc_doirq(int irq, uint8_t *regs) { board_autoled_on(LED_INIRQ); #ifdef CONFIG_SUPPRESS_INTERRUPTS diff --git a/arch/hc/src/common/up_exit.c b/arch/hc/src/common/hc_exit.c similarity index 97% rename from arch/hc/src/common/up_exit.c rename to arch/hc/src/common/hc_exit.c index 3e92f8936b3..aeb4414ae9d 100644 --- a/arch/hc/src/common/up_exit.c +++ b/arch/hc/src/common/hc_exit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_exit.c + * arch/hc/src/common/hc_exit.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -36,7 +36,7 @@ #include "task/task.h" #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "hc_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -145,5 +145,5 @@ void up_exit(int status) /* Then switch contexts */ - up_fullcontextrestore(tcb->xcp.regs); + hc_fullcontextrestore(tcb->xcp.regs); } diff --git a/arch/hc/src/common/up_idle.c b/arch/hc/src/common/hc_idle.c similarity index 97% rename from arch/hc/src/common/up_idle.c rename to arch/hc/src/common/hc_idle.c index 007218338ef..e2e95b6c753 100644 --- a/arch/hc/src/common/up_idle.c +++ b/arch/hc/src/common/hc_idle.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_idle.c + * arch/hc/src/common/hc_idle.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -25,7 +25,7 @@ #include #include -#include "up_internal.h" +#include "hc_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/hc/src/common/up_initialize.c b/arch/hc/src/common/hc_initialize.c similarity index 92% rename from arch/hc/src/common/up_initialize.c rename to arch/hc/src/common/hc_initialize.c index 27a740046e4..03315334f76 100644 --- a/arch/hc/src/common/up_initialize.c +++ b/arch/hc/src/common/hc_initialize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_initialize.c + * arch/hc/src/common/hc_initialize.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -26,7 +26,7 @@ #include #include -#include "up_internal.h" +#include "hc_internal.h" /**************************************************************************** * Public Data @@ -59,7 +59,7 @@ void up_initialize(void) { /* Add any extra memory fragments to the memory manager */ - up_addregion(); + hc_addregion(); #ifdef CONFIG_PM /* Initialize the power management subsystem. This MCU-specific function @@ -72,30 +72,30 @@ void up_initialize(void) #endif #ifdef CONFIG_ARCH_DMA - /* Initialize the DMA subsystem if the weak function up_dma_initialize has + /* Initialize the DMA subsystem if the weak function hc_dma_initialize has * been brought into the build */ #ifdef CONFIG_HAVE_WEAKFUNCTIONS - if (up_dma_initialize) + if (hc_dma_initialize) #endif { - up_dma_initialize(); + hc_dma_initialize(); } #endif /* Initialize the serial device driver */ #ifdef USE_SERIALDRIVER - up_serialinit(); + hc_serialinit(); #endif /* Initialize the network */ - up_netinitialize(); + hc_netinitialize(); /* Initialize USB */ - up_usbinitialize(); + hc_usbinitialize(); board_autoled_on(LED_IRQSENABLED); } diff --git a/arch/hc/src/common/up_internal.h b/arch/hc/src/common/hc_internal.h similarity index 86% rename from arch/hc/src/common/up_internal.h rename to arch/hc/src/common/hc_internal.h index f3d395328b3..a493daccda4 100644 --- a/arch/hc/src/common/up_internal.h +++ b/arch/hc/src/common/hc_internal.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_internal.h + * arch/hc/src/common/hc_internal.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -95,8 +95,8 @@ * a referenced is passed to get the state from the TCB. */ -#define up_savestate(regs) up_copystate(regs, (uint8_t*)g_current_regs) -#define up_restorestate(regs) (g_current_regs = regs) +#define hc_savestate(regs) hc_copystate(regs, (uint8_t*)g_current_regs) +#define hc_restorestate(regs) (g_current_regs = regs) /**************************************************************************** * Public Types @@ -141,58 +141,58 @@ void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits); /* Context switching functions */ -void up_copystate(uint8_t *dest, uint8_t *src); -void up_decodeirq(uint8_t *regs); -void up_fullcontextrestore(uint8_t *restoreregs) noreturn_function; -void up_switchcontext(uint8_t *saveregs, uint8_t *restoreregs); +void hc_copystate(uint8_t *dest, uint8_t *src); +void hc_decodeirq(uint8_t *regs); +void hc_fullcontextrestore(uint8_t *restoreregs) noreturn_function; +void hc_switchcontext(uint8_t *saveregs, uint8_t *restoreregs); /* Interrupt handling */ -uint8_t *up_doirq(int irq, uint8_t *regs); +uint8_t *hc_doirq(int irq, uint8_t *regs); /* Signal handling */ -void up_sigdeliver(void); +void hc_sigdeliver(void); /* Debug output */ #ifdef USE_EARLYSERIALINIT -void up_earlyserialinit(void); +void hc_earlyserialinit(void); #endif #ifdef USE_SERIALDRIVER -void up_serialinit(void); +void hc_serialinit(void); #endif -void up_lowputc(char ch); -void up_lowputs(const char *str); +void hc_lowputc(char ch); +void hc_lowputs(const char *str); /* Memory configuration */ #if CONFIG_MM_REGIONS > 1 -void up_addregion(void); +void hc_addregion(void); #else -# define up_addregion() +# define hc_addregion() #endif /* Sub-system/driver initialization */ #ifdef CONFIG_ARCH_DMA -void weak_function up_dma_initialize(void); +void weak_function hc_dma_initialize(void); #endif #if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) -void up_netinitialize(void); +void hc_netinitialize(void); #else -# define up_netinitialize() +# define hc_netinitialize() #endif #ifdef CONFIG_USBDEV -void up_usbinitialize(void); -void up_usbuninitialize(void); +void hc_usbinitialize(void); +void hc_usbuninitialize(void); #else -# define up_usbinitialize() -# define up_usbuninitialize() +# define hc_usbinitialize() +# define hc_usbuninitialize() #endif #endif /* __ASSEMBLY__ */ diff --git a/arch/hc/src/common/up_mdelay.c b/arch/hc/src/common/hc_mdelay.c similarity index 98% rename from arch/hc/src/common/up_mdelay.c rename to arch/hc/src/common/hc_mdelay.c index 11b3edfc55a..9b262f2eca5 100644 --- a/arch/hc/src/common/up_mdelay.c +++ b/arch/hc/src/common/hc_mdelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_mdelay.c + * arch/hc/src/common/hc_mdelay.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/hc/src/common/up_modifyreg16.c b/arch/hc/src/common/hc_modifyreg16.c similarity index 97% rename from arch/hc/src/common/up_modifyreg16.c rename to arch/hc/src/common/hc_modifyreg16.c index 898bae29d08..3a9f4eb60af 100644 --- a/arch/hc/src/common/up_modifyreg16.c +++ b/arch/hc/src/common/hc_modifyreg16.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_modifyreg16.c + * arch/hc/src/common/hc_modifyreg16.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "hc_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/hc/src/common/up_modifyreg32.c b/arch/hc/src/common/hc_modifyreg32.c similarity index 97% rename from arch/hc/src/common/up_modifyreg32.c rename to arch/hc/src/common/hc_modifyreg32.c index 647d8dfe899..fc61a38b2ce 100644 --- a/arch/hc/src/common/up_modifyreg32.c +++ b/arch/hc/src/common/hc_modifyreg32.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_modifyreg32.c + * arch/hc/src/common/hc_modifyreg32.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "hc_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/hc/src/common/up_modifyreg8.c b/arch/hc/src/common/hc_modifyreg8.c similarity index 97% rename from arch/hc/src/common/up_modifyreg8.c rename to arch/hc/src/common/hc_modifyreg8.c index 439d0f00ab6..9f19f71afca 100644 --- a/arch/hc/src/common/up_modifyreg8.c +++ b/arch/hc/src/common/hc_modifyreg8.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_modifyreg8.c + * arch/hc/src/common/hc_modifyreg8.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "hc_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/hc/src/common/up_nputs.c b/arch/hc/src/common/hc_nputs.c similarity index 98% rename from arch/hc/src/common/up_nputs.c rename to arch/hc/src/common/hc_nputs.c index 0c979cd2560..a776b70081a 100644 --- a/arch/hc/src/common/up_nputs.c +++ b/arch/hc/src/common/hc_nputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_nputs.c + * arch/hc/src/common/hc_nputs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/hc/src/common/up_releasepending.c b/arch/hc/src/common/hc_releasepending.c similarity index 95% rename from arch/hc/src/common/up_releasepending.c rename to arch/hc/src/common/hc_releasepending.c index c1868a18f59..d2eaf76e316 100644 --- a/arch/hc/src/common/up_releasepending.c +++ b/arch/hc/src/common/hc_releasepending.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_releasepending.c + * arch/hc/src/common/hc_releasepending.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "hc_internal.h" /**************************************************************************** * Public Functions @@ -73,7 +73,7 @@ void up_release_pending(void) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + hc_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. @@ -89,7 +89,7 @@ void up_release_pending(void) * changes will be made when the interrupt returns. */ - up_restorestate(rtcb->xcp.regs); + hc_restorestate(rtcb->xcp.regs); } /* Copy the exception context into the TCB of the task that @@ -121,7 +121,7 @@ void up_release_pending(void) /* Then switch contexts */ - up_fullcontextrestore(rtcb->xcp.regs); + hc_fullcontextrestore(rtcb->xcp.regs); } } } diff --git a/arch/hc/src/common/up_releasestack.c b/arch/hc/src/common/hc_releasestack.c similarity index 98% rename from arch/hc/src/common/up_releasestack.c rename to arch/hc/src/common/hc_releasestack.c index c695b0f9964..6865a94ac9c 100644 --- a/arch/hc/src/common/up_releasestack.c +++ b/arch/hc/src/common/hc_releasestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_releasestack.c + * arch/hc/src/common/hc_releasestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "hc_internal.h" /**************************************************************************** * Private Types diff --git a/arch/avr/src/avr32/up_stackframe.c b/arch/hc/src/common/hc_stackframe.c similarity index 98% rename from arch/avr/src/avr32/up_stackframe.c rename to arch/hc/src/common/hc_stackframe.c index b7fe27ea585..edfc438f0e4 100644 --- a/arch/avr/src/avr32/up_stackframe.c +++ b/arch/hc/src/common/hc_stackframe.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/avr32/up_stackframe.c + * arch/hc/src/common/hc_stackframe.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "hc_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/hc/src/common/up_udelay.c b/arch/hc/src/common/hc_udelay.c similarity index 99% rename from arch/hc/src/common/up_udelay.c rename to arch/hc/src/common/hc_udelay.c index 3a5e204af76..4b6348f157f 100644 --- a/arch/hc/src/common/up_udelay.c +++ b/arch/hc/src/common/hc_udelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_udelay.c + * arch/hc/src/common/hc_udelay.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/hc/src/common/up_unblocktask.c b/arch/hc/src/common/hc_unblocktask.c similarity index 94% rename from arch/hc/src/common/up_unblocktask.c rename to arch/hc/src/common/hc_unblocktask.c index 75991546be2..075c68b8f64 100644 --- a/arch/hc/src/common/up_unblocktask.c +++ b/arch/hc/src/common/hc_unblocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_unblocktask.c + * arch/hc/src/common/hc_unblocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include "sched/sched.h" #include "group/group.h" #include "clock/clock.h" -#include "up_internal.h" +#include "hc_internal.h" /**************************************************************************** * Public Functions @@ -67,7 +67,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + hc_savestate(rtcb->xcp.regs); /* Update scheduler parameters */ @@ -77,7 +77,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * changes will be made when the interrupt returns. */ - up_restorestate(tcb->xcp.regs); + hc_restorestate(tcb->xcp.regs); } /* We are not in an interrupt handler. Copy the user C context @@ -103,6 +103,6 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) /* Then switch contexts */ - up_fullcontextrestore(tcb->xcp.regs); + hc_fullcontextrestore(tcb->xcp.regs); } } diff --git a/arch/hc/src/common/up_usestack.c b/arch/hc/src/common/hc_usestack.c similarity index 98% rename from arch/hc/src/common/up_usestack.c rename to arch/hc/src/common/hc_usestack.c index a72f0e1c1ee..494734bb10c 100644 --- a/arch/hc/src/common/up_usestack.c +++ b/arch/hc/src/common/hc_usestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/hc/src/common/up_usestack.c + * arch/hc/src/common/hc_usestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include #include -#include "up_internal.h" +#include "hc_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/hc/src/m9s12/Make.defs b/arch/hc/src/m9s12/Make.defs index d1f73e7125b..30de67436d4 100644 --- a/arch/hc/src/m9s12/Make.defs +++ b/arch/hc/src/m9s12/Make.defs @@ -20,11 +20,11 @@ HEAD_ASRC = m9s12_vectors.S -CMN_CSRCS = up_allocateheap.c up_blocktask.c up_copystate.c up_createstack.c -CMN_CSRCS += up_doirq.c up_exit.c up_idle.c up_initialize.c -CMN_CSRCS += up_mdelay.c up_modifyreg16.c up_modifyreg32.c up_modifyreg8.c -CMN_CSRCS += up_nputs.c up_releasepending.c up_releasestack.c -CMN_CSRCS += up_stackframe.c up_udelay.c up_unblocktask.c up_usestack.c +CMN_CSRCS = hc_allocateheap.c hc_blocktask.c hc_copystate.c hc_createstack.c +CMN_CSRCS += hc_doirq.c hc_exit.c hc_idle.c hc_initialize.c +CMN_CSRCS += hc_mdelay.c hc_modifyreg16.c hc_modifyreg32.c hc_modifyreg8.c +CMN_CSRCS += hc_nputs.c hc_releasepending.c hc_releasestack.c +CMN_CSRCS += hc_stackframe.c hc_udelay.c hc_unblocktask.c hc_usestack.c CHIP_ASRCS = m9s12_start.S m9s12_lowputc.S m9s12_saveusercontext.S CHIP_CSRCS = m9s12_assert.c m9s12_gpio.c m9s12_gpioirq.c m9s12_initialstate.c diff --git a/arch/hc/src/m9s12/m9s12.h b/arch/hc/src/m9s12/m9s12.h index 7b8588ac10a..edf9b45357c 100644 --- a/arch/hc/src/m9s12/m9s12.h +++ b/arch/hc/src/m9s12/m9s12.h @@ -33,7 +33,7 @@ # include #endif -#include "up_internal.h" +#include "hc_internal.h" #include "chip.h" /**************************************************************************** @@ -294,7 +294,7 @@ int hcs12_dumpgpio(uint16_t pinset, const char *msg); * Description: * Initialize the Ethernet driver for one interface. If the STM32 chip * supports multiple Ethernet controllers, then bould specific logic - * must implement up_netinitialize() and call this function to initialize + * must implement hc_netinitialize() and call this function to initialize * the desiresed interfaces. * * Input Parameters: diff --git a/arch/hc/src/m9s12/m9s12_assert.c b/arch/hc/src/m9s12/m9s12_assert.c index d048b29e188..b328353db8e 100644 --- a/arch/hc/src/m9s12/m9s12_assert.c +++ b/arch/hc/src/m9s12/m9s12_assert.c @@ -38,7 +38,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "hc_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/hc/src/m9s12/m9s12_dumpgpio.c b/arch/hc/src/m9s12/m9s12_dumpgpio.c index 766d9b6cbf7..90b8e3a092c 100644 --- a/arch/hc/src/m9s12/m9s12_dumpgpio.c +++ b/arch/hc/src/m9s12/m9s12_dumpgpio.c @@ -35,7 +35,7 @@ #include #include -#include "up_internal.h" +#include "hc_internal.h" #include "m9s12.h" #include "m9s12_pim.h" #include "m9s12_mebi.h" diff --git a/arch/hc/src/m9s12/m9s12_gpio.c b/arch/hc/src/m9s12/m9s12_gpio.c index f0a1bd5e77b..8108217b6d0 100644 --- a/arch/hc/src/m9s12/m9s12_gpio.c +++ b/arch/hc/src/m9s12/m9s12_gpio.c @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "hc_internal.h" #include "m9s12.h" #include "m9s12_pim.h" #include "m9s12_mebi.h" diff --git a/arch/hc/src/m9s12/m9s12_gpioirq.c b/arch/hc/src/m9s12/m9s12_gpioirq.c index 33798afc7ef..bc7a1b84ceb 100644 --- a/arch/hc/src/m9s12/m9s12_gpioirq.c +++ b/arch/hc/src/m9s12/m9s12_gpioirq.c @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "hc_internal.h" #include "m9s12.h" #include "m9s12_pim.h" #include "m9s12_mebi.h" diff --git a/arch/hc/src/m9s12/m9s12_initialstate.c b/arch/hc/src/m9s12/m9s12_initialstate.c index a91c2e58e86..bc6ee602af3 100644 --- a/arch/hc/src/m9s12/m9s12_initialstate.c +++ b/arch/hc/src/m9s12/m9s12_initialstate.c @@ -29,7 +29,7 @@ #include #include -#include "up_internal.h" +#include "hc_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/hc/src/m9s12/m9s12_irq.c b/arch/hc/src/m9s12/m9s12_irq.c index b584c9468e4..9136dfaee24 100644 --- a/arch/hc/src/m9s12/m9s12_irq.c +++ b/arch/hc/src/m9s12/m9s12_irq.c @@ -31,7 +31,7 @@ #include #include -#include "up_internal.h" +#include "hc_internal.h" #include "m9s12.h" /**************************************************************************** diff --git a/arch/hc/src/m9s12/m9s12_lowputc.S b/arch/hc/src/m9s12/m9s12_lowputc.S index 93303cca0b0..f44c92c07fc 100644 --- a/arch/hc/src/m9s12/m9s12_lowputc.S +++ b/arch/hc/src/m9s12/m9s12_lowputc.S @@ -24,7 +24,7 @@ #include -#include "up_internal.h" +#include "hc_internal.h" #include "m9s12.h" #include "m9s12_sci.h" #include "m9s12_serial.h" @@ -163,13 +163,13 @@ up_lowsetup: .size up_lowsetup, . - up_lowsetup /************************************************************************** - * Name: up_lowputc + * Name: hc_lowputc **************************************************************************/ .text - .global up_lowputc - .type up_lowputc, function -up_lowputc: + .global hc_lowputc + .type hc_lowputc, function +hc_lowputc: #ifdef HAVE_SERIAL_CONSOLE #ifdef CONFIG_HCS12_SERIALMON jmp PutChar @@ -206,5 +206,5 @@ up_lowputc: #else RETURN #endif /* HAVE_SERIAL_CONSOLE */ - .size up_lowputc, . - up_lowputc + .size hc_lowputc, . - hc_lowputc .end diff --git a/arch/hc/src/m9s12/m9s12_saveusercontext.S b/arch/hc/src/m9s12/m9s12_saveusercontext.S index 7876d05fc76..2fbe9f76738 100644 --- a/arch/hc/src/m9s12/m9s12_saveusercontext.S +++ b/arch/hc/src/m9s12/m9s12_saveusercontext.S @@ -26,7 +26,7 @@ #include -#include "up_internal.h" +#include "hc_internal.h" #include "m9s12.h" /************************************************************************** diff --git a/arch/hc/src/m9s12/m9s12_serial.c b/arch/hc/src/m9s12/m9s12_serial.c index be884b6e486..0e2c3039981 100644 --- a/arch/hc/src/m9s12/m9s12_serial.c +++ b/arch/hc/src/m9s12/m9s12_serial.c @@ -27,7 +27,7 @@ #include -#include "up_internal.h" +#include "hc_internal.h" #include "m9s12_serial.h" /**************************************************************************** @@ -707,17 +707,17 @@ static bool up_txempty(struct uart_dev_s *dev) ****************************************************************************/ /**************************************************************************** - * Name: up_earlyserialinit + * Name: hc_earlyserialinit * * Description: * Performs the low level SCI initialization early in debug so that the * serial console will be available during bootup. This must be called - * before up_serialinit. + * before hc_serialinit. * ****************************************************************************/ #ifdef USE_EARLYSERIALINIT -void up_earlyserialinit(void) +void hc_earlyserialinit(void) { /* Disable all UARTS */ @@ -736,15 +736,15 @@ void up_earlyserialinit(void) #endif /**************************************************************************** - * Name: up_serialinit + * Name: hc_serialinit * * Description: * Register serial console and serial ports. This assumes - * that up_earlyserialinit was called previously. + * that hc_earlyserialinit was called previously. * ****************************************************************************/ -void up_serialinit(void) +void hc_serialinit(void) { /* Register the console */ @@ -807,7 +807,7 @@ int up_putc(int ch) int up_putc(int ch) { #ifdef CONFIG_ARCH_LOWPUTC - up_lowputc(ch); + hc_lowputc(ch); /* Check for LF */ @@ -815,7 +815,7 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + hc_lowputc('\r'); } #endif diff --git a/arch/hc/src/m9s12/m9s12_start.S b/arch/hc/src/m9s12/m9s12_start.S index 6ba51e05c1e..51dc1756cce 100644 --- a/arch/hc/src/m9s12/m9s12_start.S +++ b/arch/hc/src/m9s12/m9s12_start.S @@ -71,7 +71,7 @@ #ifdef CONFIG_HCS12_SERIALMON jsr #PutChar #else - CALL up_lowputc + CALL hc_lowputc #endif #endif .endm diff --git a/arch/hc/src/m9s12/m9s12_timerisr.c b/arch/hc/src/m9s12/m9s12_timerisr.c index 463898d78af..300c389262c 100644 --- a/arch/hc/src/m9s12/m9s12_timerisr.c +++ b/arch/hc/src/m9s12/m9s12_timerisr.c @@ -32,7 +32,7 @@ #include #include "clock/clock.h" -#include "up_internal.h" +#include "hc_internal.h" #include "chip.h" #include "m9s12.h" #include "m9s12_crg.h" diff --git a/arch/hc/src/m9s12/m9s12_vectors.S b/arch/hc/src/m9s12/m9s12_vectors.S index 5ec06e7b5a5..ba3c482174b 100644 --- a/arch/hc/src/m9s12/m9s12_vectors.S +++ b/arch/hc/src/m9s12/m9s12_vectors.S @@ -42,8 +42,8 @@ ************************************************************************************/ .globl __start - .globl up_doirq - .globl up_fullcontextrestore + .globl hc_doirq + .globl hc_fullcontextrestore .file "m9s12_vectors.S" /************************************************************************************ @@ -219,7 +219,7 @@ handlers: * PCH * High Address PCL <-- SP before interrupt * - * This function will create the following stack frame and will call up_doirq(): + * This function will create the following stack frame and will call hc_doirq(): * * Low Address <-- SP after state save * [PPAGE] @@ -290,16 +290,16 @@ vcommon: std .Lspsave std 2, -sp - /* Recover the IRQ number and call up_doirq() */ + /* Recover the IRQ number and call hc_doirq() */ ldab .Lbsave - CALL up_doirq + CALL hc_doirq leas 2, sp /* Check if the return value in d is the same as regs parameter passed in the TOS */ cpd .Lspsave - bne up_fullcontextrestore + bne hc_fullcontextrestore /* Restore registers and return */ @@ -331,7 +331,7 @@ vcommon: .size handlers, .-handlers /************************************************************************************ - * Name: up_fullcontextrestore + * Name: hc_fullcontextrestore * * Description: * Given a pointer to a register save block that was previously created by either @@ -364,7 +364,7 @@ vcommon: * ************************************************************************************/ -up_fullcontextrestore: +hc_fullcontextrestore: /* Make sure that interrupts are disabled */ orcc #0x50 @@ -404,7 +404,7 @@ up_fullcontextrestore: movw 2, -sp, 2, -x /* Copy A:B */ movw 1, -sp, 1, -x /* Copy CCR */ rti /* And return from interrupt */ - .size up_fullcontextrestore, .-up_fullcontextrestore + .size hc_fullcontextrestore, .-hc_fullcontextrestore /************************************************************************************ * .bss diff --git a/arch/mips/include/syscall.h b/arch/mips/include/syscall.h index 38022ece2a2..d459dcf2813 100644 --- a/arch/mips/include/syscall.h +++ b/arch/mips/include/syscall.h @@ -149,11 +149,11 @@ /* SYS call 2: * - * void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); + * void mips_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); */ #define SYS_switch_context (2) -#define up_switchcontext(saveregs, restoreregs) \ +#define mips_switchcontext(saveregs, restoreregs) \ sys_call2(SYS_switch_context, (uintptr_t)saveregs, (uintptr_t)restoreregs) #ifdef CONFIG_BUILD_KERNEL diff --git a/arch/mips/src/common/mips_etherstub.c b/arch/mips/src/common/mips_etherstub.c index a534576d888..63c1398f43e 100644 --- a/arch/mips/src/common/mips_etherstub.c +++ b/arch/mips/src/common/mips_etherstub.c @@ -47,25 +47,25 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_netinitialize (stub) + * Name: mips_netinitialize (stub) * * Description: - * This is a stub version os up_netinitialize. Normally, up_netinitialize + * This is a stub version of mips_netinitialize. Normally, netinitialize * is defined in board/xyz_network.c for board-specific Ethernet * implementations, or chip/xyx_ethernet.c for chip-specific Ethernet * implementations. The stub version here is used in the corner case where * the network is enable yet there is no Ethernet driver to be initialized. - * In this case, up_initialize will still try to call up_netinitialize() + * In this case, up_initialize will still try to call mips_netinitialize() * when one does not exist. This corner case would occur if, for example, * only a USB network interface is being used or perhaps if a SLIP is * being used). * * Use of this stub is deprecated. The preferred mechanism is to use - * CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in + * CONFIG_NETDEV_LATEINIT=y to suppress the call to mips_netinitialize() in * up_initialize(). Then this stub would not be needed. * ****************************************************************************/ -void up_netinitialize(void) +void mips_netinitialize(void) { } diff --git a/arch/mips/src/common/mips_initialize.c b/arch/mips/src/common/mips_initialize.c index b4aae9a42f0..a569808a301 100644 --- a/arch/mips/src/common/mips_initialize.c +++ b/arch/mips/src/common/mips_initialize.c @@ -65,7 +65,7 @@ void up_initialize(void) { /* Add any extra memory fragments to the memory manager */ - up_addregion(); + mips_addregion(); #ifdef CONFIG_PM /* Initialize the power management subsystem. This MCU-specific function @@ -78,30 +78,30 @@ void up_initialize(void) #endif #ifdef CONFIG_ARCH_DMA - /* Initialize the DMA subsystem if the weak function up_dma_initialize has - * been brought into the build. + /* Initialize the DMA subsystem if the weak function mips_dma_initialize + * has been brought into the build. */ #ifdef CONFIG_HAVE_WEAKFUNCTIONS - if (up_dma_initialize) + if (mips_dma_initialize) #endif { - up_dma_initialize(); + mips_dma_initialize(); } #endif /* Initialize the serial device driver */ #ifdef USE_SERIALDRIVER - up_serialinit(); + mips_serialinit(); #endif /* Initialize the network */ - up_netinitialize(); + mips_netinitialize(); /* Initialize USB -- device and/or host */ - up_usbinitialize(); + mips_usbinitialize(); board_autoled_on(LED_IRQSENABLED); } diff --git a/arch/mips/src/common/mips_internal.h b/arch/mips/src/common/mips_internal.h index 3b5dc639244..612d9fd2031 100644 --- a/arch/mips/src/common/mips_internal.h +++ b/arch/mips/src/common/mips_internal.h @@ -96,15 +96,15 @@ * only a referenced is passed to get the state from the TCB. */ -#define up_savestate(regs) up_copystate(regs, (uint32_t*)CURRENT_REGS) -#define up_restorestate(regs) (CURRENT_REGS = regs) +#define mips_savestate(regs) mips_copystate(regs, (uint32_t*)CURRENT_REGS) +#define mips_restorestate(regs) (CURRENT_REGS = regs) /**************************************************************************** * Public Types ****************************************************************************/ #ifndef __ASSEMBLY__ -typedef void (*up_vector_t)(void); +typedef void (*mips_vector_t)(void); #endif /**************************************************************************** @@ -170,33 +170,33 @@ void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits); /* Context switching */ -void up_copystate(uint32_t *dest, uint32_t *src); +void mips_copystate(uint32_t *dest, uint32_t *src); /* Serial output */ -void up_lowputs(const char *str); +void mips_lowputs(const char *str); /* Debug */ #ifdef CONFIG_ARCH_STACKDUMP -void up_dumpstate(void); +void mips_dumpstate(void); #else -# define up_dumpstate() +# define mips_dumpstate() #endif /* Common MIPS32 functions defined in arch/mips/src/MIPS32 */ /* IRQs */ -uint32_t *up_doirq(int irq, uint32_t *regs); +uint32_t *mips_doirq(int irq, uint32_t *regs); /* Software interrupt 0 handler */ -int up_swint0(int irq, void *context, void *arg); +int mips_swint0(int irq, void *context, void *arg); /* Signals */ -void up_sigdeliver(void); +void mips_sigdeliver(void); /* Chip-specific functions **************************************************/ @@ -204,52 +204,52 @@ void up_sigdeliver(void); /* IRQs */ -bool up_pending_irq(int irq); -void up_clrpend_irq(int irq); -void up_clrpend_sw0(void); +bool mips_pending_irq(int irq); +void mips_clrpend_irq(int irq); +void mips_clrpend_sw0(void); /* DMA */ #ifdef CONFIG_ARCH_DMA -void weak_function up_dma_initialize(void); +void weak_function mips_dma_initialize(void); #endif /* Memory management */ #if CONFIG_MM_REGIONS > 1 -void up_addregion(void); +void mips_addregion(void); #else -# define up_addregion() +# define mips_addregion() #endif /* Serial output */ -void up_lowputc(char ch); +void mips_lowputc(char ch); #ifdef USE_EARLYSERIALINIT -void up_earlyserialinit(void); +void mips_earlyserialinit(void); #endif #ifdef USE_SERIALDRIVER -void up_serialinit(void); +void mips_serialinit(void); #endif /* Network */ #if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) -void up_netinitialize(void); +void mips_netinitialize(void); #else -# define up_netinitialize() +# define mips_netinitialize() #endif /* USB */ #ifdef CONFIG_USBDEV -void up_usbinitialize(void); -void up_usbuninitialize(void); +void mips_usbinitialize(void); +void mips_usbuninitialize(void); #else -# define up_usbinitialize() -# define up_usbuninitialize() +# define mips_usbinitialize() +# define mips_usbuninitialize() #endif #endif /* __ASSEMBLY__ */ diff --git a/arch/mips/src/common/mips_lowputs.c b/arch/mips/src/common/mips_lowputs.c index 8d0628d913c..6e42b572cbb 100644 --- a/arch/mips/src/common/mips_lowputs.c +++ b/arch/mips/src/common/mips_lowputs.c @@ -44,17 +44,17 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_lowputs + * Name: mips_lowputs * * Description: * This is a low-level helper function used to support debug. * ****************************************************************************/ -void up_lowputs(const char *str) +void mips_lowputs(const char *str) { while (*str) { - up_lowputc(*str++); + mips_lowputc(*str++); } } diff --git a/arch/mips/src/mips32/mips_assert.c b/arch/mips/src/mips32/mips_assert.c index 964d0d9c459..d88cf31d867 100644 --- a/arch/mips/src/mips32/mips_assert.c +++ b/arch/mips/src/mips32/mips_assert.c @@ -143,7 +143,7 @@ void up_assert(const char *filename, int lineno) filename, lineno); #endif - up_dumpstate(); + mips_dumpstate(); /* Flush any buffered SYSLOG data (from the above) */ diff --git a/arch/mips/src/mips32/mips_blocktask.c b/arch/mips/src/mips32/mips_blocktask.c index 35df1053619..1e2c2d7ece8 100644 --- a/arch/mips/src/mips32/mips_blocktask.c +++ b/arch/mips/src/mips32/mips_blocktask.c @@ -69,7 +69,7 @@ void up_block_task(struct tcb_s *rtcb) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + mips_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. @@ -85,7 +85,7 @@ void up_block_task(struct tcb_s *rtcb) * changes will be made when the interrupt returns. */ - up_restorestate(rtcb->xcp.regs); + mips_restorestate(rtcb->xcp.regs); } /* No, then we will need to perform the user context switch */ @@ -104,9 +104,9 @@ void up_block_task(struct tcb_s *rtcb) /* Then switch contexts */ - up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); + mips_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the + /* mips_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. diff --git a/arch/mips/src/mips32/mips_copystate.c b/arch/mips/src/mips32/mips_copystate.c index 6ae765949ea..e243785d360 100644 --- a/arch/mips/src/mips32/mips_copystate.c +++ b/arch/mips/src/mips32/mips_copystate.c @@ -46,12 +46,12 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_copystate + * Name: mips_copystate ****************************************************************************/ /* A little faster than most memcpy's */ -void up_copystate(uint32_t *dest, uint32_t *src) +void mips_copystate(uint32_t *dest, uint32_t *src) { int i; diff --git a/arch/mips/src/mips32/mips_doirq.c b/arch/mips/src/mips32/mips_doirq.c index 500bc63dfb2..1f10adae8cf 100644 --- a/arch/mips/src/mips32/mips_doirq.c +++ b/arch/mips/src/mips32/mips_doirq.c @@ -55,7 +55,7 @@ * Public Functions ****************************************************************************/ -uint32_t *up_doirq(int irq, uint32_t *regs) +uint32_t *mips_doirq(int irq, uint32_t *regs) { board_autoled_on(LED_INIRQ); #ifdef CONFIG_SUPPRESS_INTERRUPTS diff --git a/arch/mips/src/mips32/mips_dumpstate.c b/arch/mips/src/mips32/mips_dumpstate.c index cf3c81c682d..55b683e3375 100644 --- a/arch/mips/src/mips32/mips_dumpstate.c +++ b/arch/mips/src/mips32/mips_dumpstate.c @@ -123,10 +123,10 @@ static inline void mips_registerdump(void) ****************************************************************************/ /**************************************************************************** - * Name: up_dumpstate + * Name: mips_dumpstate ****************************************************************************/ -void up_dumpstate(void) +void mips_dumpstate(void) { struct tcb_s *rtcb = running_task(); uint32_t sp = up_getsp(); diff --git a/arch/mips/src/mips32/mips_releasepending.c b/arch/mips/src/mips32/mips_releasepending.c index 4c061e5bd41..4218bbde560 100644 --- a/arch/mips/src/mips32/mips_releasepending.c +++ b/arch/mips/src/mips32/mips_releasepending.c @@ -78,7 +78,7 @@ void up_release_pending(void) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + mips_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. @@ -94,7 +94,7 @@ void up_release_pending(void) * changes will be made when the interrupt returns. */ - up_restorestate(rtcb->xcp.regs); + mips_restorestate(rtcb->xcp.regs); } /* No, then we will need to perform the user context switch */ @@ -113,9 +113,9 @@ void up_release_pending(void) /* Then switch contexts */ - up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); + mips_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the + /* mips_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. diff --git a/arch/mips/src/mips32/mips_schedulesigaction.c b/arch/mips/src/mips32/mips_schedulesigaction.c index 7e5e5147a65..dedba82dfc5 100644 --- a/arch/mips/src/mips32/mips_schedulesigaction.c +++ b/arch/mips/src/mips32/mips_schedulesigaction.c @@ -133,7 +133,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - CURRENT_REGS[REG_EPC] = (uint32_t)up_sigdeliver; + CURRENT_REGS[REG_EPC] = (uint32_t)mips_sigdeliver; status = CURRENT_REGS[REG_STATUS]; status &= ~CP0_STATUS_INT_MASK; status |= CP0_STATUS_INT_SW0; @@ -143,7 +143,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * is the same as the interrupt return context. */ - up_savestate(tcb->xcp.regs); + mips_savestate(tcb->xcp.regs); sinfo("PC/STATUS Saved: %08" PRIx32 "/%08" PRIx32 " New: %08" PRIx32 "/%08" PRIx32 "\n", @@ -173,7 +173,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - tcb->xcp.regs[REG_EPC] = (uint32_t)up_sigdeliver; + tcb->xcp.regs[REG_EPC] = (uint32_t)mips_sigdeliver; status = tcb->xcp.regs[REG_STATUS]; status &= ~CP0_STATUS_INT_MASK; status |= CP0_STATUS_INT_SW0; diff --git a/arch/mips/src/mips32/mips_sigdeliver.c b/arch/mips/src/mips32/mips_sigdeliver.c index c50b1477192..ea810a56386 100644 --- a/arch/mips/src/mips32/mips_sigdeliver.c +++ b/arch/mips/src/mips32/mips_sigdeliver.c @@ -44,7 +44,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_sigdeliver + * Name: mips_sigdeliver * * Description: * This is the a signal handling trampoline. When a signal action was @@ -53,7 +53,7 @@ * ****************************************************************************/ -void up_sigdeliver(void) +void mips_sigdeliver(void) { struct tcb_s *rtcb = this_task(); uint32_t regs[XCPTCONTEXT_REGS]; @@ -66,7 +66,7 @@ void up_sigdeliver(void) /* Save the return state on the stack. */ - up_copystate(regs, rtcb->xcp.regs); + mips_copystate(regs, rtcb->xcp.regs); #ifndef CONFIG_SUPPRESS_INTERRUPTS /* Then make sure that interrupts are enabled. Signal handlers must always diff --git a/arch/mips/src/mips32/mips_swint0.c b/arch/mips/src/mips32/mips_swint0.c index 191025bb628..0c2bb58688b 100644 --- a/arch/mips/src/mips32/mips_swint0.c +++ b/arch/mips/src/mips32/mips_swint0.c @@ -119,7 +119,7 @@ static void dispatch_syscall(void) ****************************************************************************/ /**************************************************************************** - * Name: up_swint0 + * Name: mips_swint0 * * Description: * This is software interrupt 0 exception handler that performs context @@ -127,7 +127,7 @@ static void dispatch_syscall(void) * ****************************************************************************/ -int up_swint0(int irq, void *context, void *arg) +int mips_swint0(int irq, void *context, void *arg) { uint32_t *regs = (uint32_t *)context; uint32_t cause; @@ -173,7 +173,8 @@ int up_swint0(int irq, void *context, void *arg) /* R4=SYS_switch_context: This a switch context command: * - * void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); + * void mips_switchcontext(uint32_t *saveregs, + * uint32_t *restoreregs); * * At this point, the following values are saved in context: * @@ -190,7 +191,7 @@ int up_swint0(int irq, void *context, void *arg) case SYS_switch_context: { DEBUGASSERT(regs[REG_A1] != 0 && regs[REG_A2] != 0); - up_copystate((uint32_t *)regs[REG_A1], regs); + mips_copystate((uint32_t *)regs[REG_A1], regs); CURRENT_REGS = (uint32_t *)regs[REG_A2]; } break; @@ -297,7 +298,7 @@ int up_swint0(int irq, void *context, void *arg) /* Clear the pending software interrupt 0 */ - up_clrpend_sw0(); + mips_clrpend_sw0(); /* And reset the software interrupt bit in the MIPS CAUSE register */ diff --git a/arch/mips/src/mips32/mips_unblocktask.c b/arch/mips/src/mips32/mips_unblocktask.c index 4cdb70e6822..2bd58b6429b 100644 --- a/arch/mips/src/mips32/mips_unblocktask.c +++ b/arch/mips/src/mips32/mips_unblocktask.c @@ -69,7 +69,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + mips_savestate(rtcb->xcp.regs); /* Update scheduler parameters */ @@ -79,7 +79,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * changes will be made when the interrupt returns. */ - up_restorestate(tcb->xcp.regs); + mips_restorestate(tcb->xcp.regs); } /* No, then we will need to perform the user context switch */ @@ -92,9 +92,9 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) /* Then switch contexts */ - up_switchcontext(rtcb->xcp.regs, tcb->xcp.regs); + mips_switchcontext(rtcb->xcp.regs, tcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the + /* mips_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. diff --git a/arch/mips/src/pic32mx/Make.defs b/arch/mips/src/pic32mx/Make.defs index edfcc7cae3e..ce134defa13 100644 --- a/arch/mips/src/pic32mx/Make.defs +++ b/arch/mips/src/pic32mx/Make.defs @@ -41,8 +41,8 @@ CMN_CSRCS += mips_idle.c endif # Use of common/mips_etherstub.c is deprecated. The preferred mechanism is to -# use CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in -# up_initialize(). Then this stub would not be needed. +# use CONFIG_NETDEV_LATEINIT=y to suppress the call to mips_netinitialize() in +# mips_initialize(). Then this stub would not be needed. ifneq ($(CONFIG_PIC32MX_ETHERNET),y) ifeq ($(CONFIG_NET),y) diff --git a/arch/mips/src/pic32mx/pic32mx_ethernet.c b/arch/mips/src/pic32mx/pic32mx_ethernet.c index 5544b5fb1c1..edbc9c5943c 100644 --- a/arch/mips/src/pic32mx/pic32mx_ethernet.c +++ b/arch/mips/src/pic32mx/pic32mx_ethernet.c @@ -1800,9 +1800,9 @@ static void pic32mx_interrupt_work(void *arg) /* Clear the pending interrupt */ #if CONFIG_PIC32MX_NINTERFACES > 1 - up_clrpend_irq(priv->pd_irqsrc); + mips_clrpend_irq(priv->pd_irqsrc); #else - up_clrpend_irq(PIC32MX_IRQSRC_ETH); + mips_clrpend_irq(PIC32MX_IRQSRC_ETH); #endif net_unlock(); @@ -3192,9 +3192,9 @@ static void pic32mx_ethreset(struct pic32mx_driver_s *priv) /* Clear the Ethernet Interrupt Flag (ETHIF) bit in the Interrupts module */ #if CONFIG_PIC32MX_NINTERFACES > 1 - up_pending_irq(priv->pd_irqsrc); + mips_pending_irq(priv->pd_irqsrc); #else - up_pending_irq(PIC32MX_IRQSRC_ETH); + mips_pending_irq(PIC32MX_IRQSRC_ETH); #endif /* Disable any Ethernet Controller interrupt generation by clearing the IEN @@ -3303,7 +3303,7 @@ static inline int pic32mx_ethinitialize(int intf) } /**************************************************************************** - * Name: up_netinitialize + * Name: mips_netinitialize * * Description: * Initialize the first network interface. If there are more than one @@ -3314,7 +3314,7 @@ static inline int pic32mx_ethinitialize(int intf) ****************************************************************************/ #if CONFIG_PIC32MX_NINTERFACES == 1 && !defined(CONFIG_NETDEV_LATEINIT) -void up_netinitialize(void) +void mips_netinitialize(void) { pic32mx_ethinitialize(0); } diff --git a/arch/mips/src/pic32mx/pic32mx_gpioirq.c b/arch/mips/src/pic32mx/pic32mx_gpioirq.c index cb8584aa399..c2bdaf1a0b3 100644 --- a/arch/mips/src/pic32mx/pic32mx_gpioirq.c +++ b/arch/mips/src/pic32mx/pic32mx_gpioirq.c @@ -116,7 +116,7 @@ static int pic32mx_cninterrupt(int irq, void *context) /* Clear the pending interrupt */ - up_clrpend_irq(PIC32MX_IRQ_CN); + mips_clrpend_irq(PIC32MX_IRQ_CN); return ret; } diff --git a/arch/mips/src/pic32mx/pic32mx_irq.c b/arch/mips/src/pic32mx/pic32mx_irq.c index 4649a3c3e45..a682b4bcc32 100644 --- a/arch/mips/src/pic32mx/pic32mx_irq.c +++ b/arch/mips/src/pic32mx/pic32mx_irq.c @@ -133,7 +133,7 @@ void up_irqinitialize(void) /* Attach and enable software interrupts */ - irq_attach(PIC32MX_IRQ_CS0, up_swint0, NULL); + irq_attach(PIC32MX_IRQ_CS0, mips_swint0, NULL); up_enable_irq(PIC32MX_IRQSRC_CS0); /* And finally, enable interrupts */ @@ -267,14 +267,14 @@ void up_enable_irq(int irq) } /**************************************************************************** - * Name: up_pending_irq + * Name: mips_pending_irq * * Description: * Return true if the interrupt is pending and unmasked. * ****************************************************************************/ -bool up_pending_irq(int irq) +bool mips_pending_irq(int irq) { uint32_t ifsaddr; uint32_t iecaddr; @@ -334,14 +334,14 @@ bool up_pending_irq(int irq) } /**************************************************************************** - * Name: up_clrpend_irq + * Name: mips_clrpend_irq * * Description: * Clear any pending interrupt * ****************************************************************************/ -void up_clrpend_irq(int irq) +void mips_clrpend_irq(int irq) { uint32_t regaddr; int bitno; @@ -391,16 +391,16 @@ void up_clrpend_irq(int irq) } /**************************************************************************** - * Name: up_clrpend_sw0 + * Name: mips_clrpend_sw0 * * Description: * Clear a pending Software Interrupt. * ****************************************************************************/ -void up_clrpend_sw0(void) +void mips_clrpend_sw0(void) { - up_clrpend_irq(PIC32MX_IRQSRC_CS0); + mips_clrpend_irq(PIC32MX_IRQSRC_CS0); } /**************************************************************************** diff --git a/arch/mips/src/pic32mx/pic32mx_lowconsole.c b/arch/mips/src/pic32mx/pic32mx_lowconsole.c index 538247bffe1..1a6f6319915 100644 --- a/arch/mips/src/pic32mx/pic32mx_lowconsole.c +++ b/arch/mips/src/pic32mx/pic32mx_lowconsole.c @@ -325,14 +325,14 @@ void pic32mx_consoleinit(void) #endif /**************************************************************************** - * Name: up_lowputc + * Name: mips_lowputc * * Description: * Output one byte on the serial console. * ****************************************************************************/ -void up_lowputc(char ch) +void mips_lowputc(char ch) { #ifdef HAVE_SERIAL_CONSOLE /* Wait for the transmit buffer not full */ diff --git a/arch/mips/src/pic32mx/pic32mx_lowinit.c b/arch/mips/src/pic32mx/pic32mx_lowinit.c index 79a4a7eee83..cd418469c9e 100644 --- a/arch/mips/src/pic32mx/pic32mx_lowinit.c +++ b/arch/mips/src/pic32mx/pic32mx_lowinit.c @@ -242,7 +242,7 @@ void pic32mx_lowinit(void) */ #ifdef USE_EARLYSERIALINIT - up_earlyserialinit(); + mips_earlyserialinit(); #endif #ifdef CONFIG_PIC32MX_JTAG_ENABLE diff --git a/arch/mips/src/pic32mx/pic32mx_serial.c b/arch/mips/src/pic32mx/pic32mx_serial.c index 2df05c112c1..850ac8fe00d 100644 --- a/arch/mips/src/pic32mx/pic32mx_serial.c +++ b/arch/mips/src/pic32mx/pic32mx_serial.c @@ -101,7 +101,7 @@ /* Common initialization logic will not not know that the all of the UARTs * have been disabled. So, as a result, we may still have to provide - * stub implementations of up_earlyserialinit(), up_serialinit(), and + * stub implementations of mips_earlyserialinit(), mips_serialinit(), and * up_putc(). */ @@ -469,11 +469,11 @@ static int up_interrupt(int irq, void *context, void *arg) */ #ifdef CONFIG_DEBUG_FEATURES - if (up_pending_irq(priv->irqe)) + if (mips_pending_irq(priv->irqe)) { /* Clear the pending error interrupt */ - up_clrpend_irq(priv->irqe); + mips_clrpend_irq(priv->irqe); _err("ERROR: interrupt STA: %08x\n", up_serialin(priv, PIC32MX_UART_STA_OFFSET)); handled = true; @@ -485,7 +485,7 @@ static int up_interrupt(int irq, void *context, void *arg) * FIFOs or 3 of 4 for 4-deep FIFOS. */ - if (up_pending_irq(priv->irqrx)) + if (mips_pending_irq(priv->irqrx)) { /* Process incoming bytes */ @@ -503,7 +503,7 @@ static int up_interrupt(int irq, void *context, void *arg) if ((up_serialin(priv, PIC32MX_UART_STA_OFFSET) & UART_STA_URXDA) == 0) { - up_clrpend_irq(priv->irqrx); + mips_clrpend_irq(priv->irqrx); } } @@ -522,7 +522,7 @@ static int up_interrupt(int irq, void *context, void *arg) * full condition. */ - if (up_pending_irq(priv->irqtx)) + if (mips_pending_irq(priv->irqtx)) { /* Process outgoing bytes */ @@ -540,7 +540,7 @@ static int up_interrupt(int irq, void *context, void *arg) if ((up_serialin(priv, PIC32MX_UART_STA_OFFSET) & UART_STA_UTRMT) != 0) { - up_clrpend_irq(priv->irqtx); + mips_clrpend_irq(priv->irqtx); } } } @@ -812,18 +812,18 @@ static bool up_txempty(struct uart_dev_s *dev) #ifdef USE_EARLYSERIALINIT /**************************************************************************** - * Name: up_earlyserialinit + * Name: mips_earlyserialinit * * Description: * Performs the low level UART initialization early in debug so that the * serial console will be available during bootup. This must be called - * before up_serialinit. NOTE: This function depends on GPIO pin + * before mips_serialinit. NOTE: This function depends on GPIO pin * configuration performed in up_consoleinit() and main clock * initialization performed in up_clkinitialize(). * ****************************************************************************/ -void up_earlyserialinit(void) +void mips_earlyserialinit(void) { /* Disable interrupts from all UARTS. The console is enabled in * pic32mx_consoleinit(). @@ -844,15 +844,15 @@ void up_earlyserialinit(void) #endif /**************************************************************************** - * Name: up_serialinit + * Name: mips_serialinit * * Description: * Register serial console and serial ports. This assumes - * that up_earlyserialinit was called previously. + * that mips_earlyserialinit was called previously. * ****************************************************************************/ -void up_serialinit(void) +void mips_serialinit(void) { /* Register the console */ @@ -890,31 +890,31 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + mips_lowputc('\r'); } - up_lowputc(ch); + mips_lowputc(ch); up_restoreuartint(dev, imr); #endif return ch; } /**************************************************************************** - * Name: up_earlyserialinit, up_serialinit, and up_putc + * Name: mips_earlyserialinit, mips_serialinit, and up_putc * * Description: * stubs that may be needed. These stubs would be used if all UARTs are - * disabled. In that case, the logic in common/up_initialize() is not + * disabled. In that case, the logic in common/mips_initialize() is not * smart enough to know that there are not UARTs and will still expect * these interfaces to be provided. * ****************************************************************************/ #else /* HAVE_UART_DEVICE */ -void up_earlyserialinit(void) +void mips_earlyserialinit(void) { } -void up_serialinit(void) +void mips_serialinit(void) { } @@ -943,10 +943,10 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + mips_lowputc('\r'); } - up_lowputc(ch); + mips_lowputc(ch); #endif return ch; } diff --git a/arch/mips/src/pic32mx/pic32mx_timerisr.c b/arch/mips/src/pic32mx/pic32mx_timerisr.c index 0b00dee304c..4fbcdbca32e 100644 --- a/arch/mips/src/pic32mx/pic32mx_timerisr.c +++ b/arch/mips/src/pic32mx/pic32mx_timerisr.c @@ -161,7 +161,7 @@ void up_timer_initialize(void) /* Configure the timer interrupt */ - up_clrpend_irq(PIC32MX_IRQSRC_T1); + mips_clrpend_irq(PIC32MX_IRQSRC_T1); #ifdef CONFIG_ARCH_IRQPRIO up_prioritize_irq(PIC32MX_IRQ_T1, CONFIG_PIC32MX_T1PRIO); #endif diff --git a/arch/mips/src/pic32mx/pic32mx_usbdev.c b/arch/mips/src/pic32mx/pic32mx_usbdev.c index 543f36752fb..1faf13927da 100644 --- a/arch/mips/src/pic32mx/pic32mx_usbdev.c +++ b/arch/mips/src/pic32mx/pic32mx_usbdev.c @@ -2949,7 +2949,7 @@ static int pic32mx_interrupt(int irq, void *context, void *arg) */ interrupt_exit: - up_clrpend_irq(PIC32MX_IRQSRC_USB); + mips_clrpend_irq(PIC32MX_IRQSRC_USB); usbtrace(TRACE_INTEXIT(PIC32MX_TRACEINTID_INTERRUPT), usbir | otgir); return OK; } @@ -4319,7 +4319,7 @@ static void pic32mx_hwshutdown(struct pic32mx_usbdev_s *priv) ****************************************************************************/ /**************************************************************************** - * Name: up_usbinitialize + * Name: mips_usbinitialize * * Description: * Initialize the USB driver @@ -4332,7 +4332,7 @@ static void pic32mx_hwshutdown(struct pic32mx_usbdev_s *priv) * ****************************************************************************/ -void up_usbinitialize(void) +void mips_usbinitialize(void) { /* For now there is only one USB controller, but we will always refer to * it using a pointer to make any future ports to multiple USB controllers @@ -4364,12 +4364,12 @@ void up_usbinitialize(void) { usbtrace(TRACE_DEVERROR(PIC32MX_TRACEERR_IRQREGISTRATION), (uint16_t)PIC32MX_IRQ_USB); - up_usbuninitialize(); + mips_usbuninitialize(); } } /**************************************************************************** - * Name: up_usbuninitialize + * Name: mips_usbuninitialize * Description: * Initialize the USB driver * Input Parameters: @@ -4380,7 +4380,7 @@ void up_usbinitialize(void) * ****************************************************************************/ -void up_usbuninitialize(void) +void mips_usbuninitialize(void) { /* For now there is only one USB controller, but we will always refer to * it using a pointer to make any future ports to multiple USB controllers diff --git a/arch/mips/src/pic32mz/Make.defs b/arch/mips/src/pic32mz/Make.defs index 231d5fc01fd..f0f54f77f81 100644 --- a/arch/mips/src/pic32mz/Make.defs +++ b/arch/mips/src/pic32mz/Make.defs @@ -41,8 +41,8 @@ CMN_CSRCS += mips_idle.c endif # Use of common/mips_etherstub.c is deprecated. The preferred mechanism is to -# use CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in -# up_initialize(). Then this stub would not be needed. +# use CONFIG_NETDEV_LATEINIT=y to suppress the call to mips_netinitialize() in +# mips_initialize(). Then this stub would not be needed. ifneq ($(CONFIG_PIC32MZ_ETHERNET),y) ifeq ($(CONFIG_NET),y) diff --git a/arch/mips/src/pic32mz/pic32mz_dma.c b/arch/mips/src/pic32mz/pic32mz_dma.c index dfbffee5565..ab1ee67b1f7 100644 --- a/arch/mips/src/pic32mz/pic32mz_dma.c +++ b/arch/mips/src/pic32mz/pic32mz_dma.c @@ -505,7 +505,7 @@ static int pic32mz_dma_interrupt(int irq, void *context, void *arg) /* Clear the interrupt flags. */ - up_clrpend_irq(dmach->irq); + mips_clrpend_irq(dmach->irq); pic32mz_dma_intclr(dmach); /* Invoke the callback. */ @@ -698,7 +698,7 @@ void pic32mz_dma_dump(DMA_HANDLE handle, * ****************************************************************************/ -void weak_function up_dma_initialize(void) +void weak_function mips_dma_initialize(void) { struct pic32mz_dmach_s *dmach; int i; @@ -726,7 +726,7 @@ void weak_function up_dma_initialize(void) /* Clear any pending interrupts */ pic32mz_dma_intclr(dmach); - up_clrpend_irq(dmach->irq); + mips_clrpend_irq(dmach->irq); /* Enable the IRQ. */ @@ -780,7 +780,7 @@ DMA_HANDLE pic32mz_dma_alloc(const struct pic32mz_dma_chcfg_s *cfg) /* Clear any pending interrupts on the channel */ pic32mz_dma_intclr(dmach); - up_clrpend_irq(dmach->irq); + mips_clrpend_irq(dmach->irq); /* Disable the channel */ @@ -843,7 +843,7 @@ void pic32mz_dma_free(DMA_HANDLE handle) /* Clear any pending interrupt */ pic32mz_dma_intclr(dmach); - up_clrpend_irq(dmach->irq); + mips_clrpend_irq(dmach->irq); } /**************************************************************************** @@ -955,7 +955,7 @@ void pic32mz_dma_stop(DMA_HANDLE handle) /* Clear any pending interrupts */ pic32mz_dma_intclr(dmach); - up_clrpend_irq(dmach->irq); + mips_clrpend_irq(dmach->irq); } #endif /* CONFIG_PIC32MZ_DMA */ diff --git a/arch/mips/src/pic32mz/pic32mz_ethernet.c b/arch/mips/src/pic32mz/pic32mz_ethernet.c index 0c5ee759dd0..0bdce67bb05 100644 --- a/arch/mips/src/pic32mz/pic32mz_ethernet.c +++ b/arch/mips/src/pic32mz/pic32mz_ethernet.c @@ -1930,9 +1930,9 @@ static void pic32mz_interrupt_work(void *arg) /* Clear the pending interrupt */ #if CONFIG_PIC32MZ_NINTERFACES > 1 - up_clrpend_irq(priv->pd_irqsrc); + mips_clrpend_irq(priv->pd_irqsrc); #else - up_clrpend_irq(PIC32MZ_IRQ_ETH); + mips_clrpend_irq(PIC32MZ_IRQ_ETH); #endif net_unlock(); @@ -3350,9 +3350,9 @@ static void pic32mz_ethreset(struct pic32mz_driver_s *priv) /* Clear the Ethernet Interrupt Flag (ETHIF) bit in the Interrupts module */ #if CONFIG_PIC32MZ_NINTERFACES > 1 - up_pending_irq(priv->pd_irqsrc); + mips_pending_irq(priv->pd_irqsrc); #else - up_pending_irq(PIC32MZ_IRQ_ETH); + mips_pending_irq(PIC32MZ_IRQ_ETH); #endif /* Disable any Ethernet Controller interrupt generation by clearing the IEN @@ -3465,7 +3465,7 @@ static inline int pic32mz_ethinitialize(int intf) } /**************************************************************************** - * Name: up_netinitialize + * Name: mips_netinitialize * * Description: * Initialize the first network interface. If there are more than one @@ -3476,7 +3476,7 @@ static inline int pic32mz_ethinitialize(int intf) ****************************************************************************/ #if CONFIG_PIC32MZ_NINTERFACES == 1 && !defined(CONFIG_NETDEV_LATEINIT) -void up_netinitialize(void) +void mips_netinitialize(void) { pic32mz_ethinitialize(0); } diff --git a/arch/mips/src/pic32mz/pic32mz_gpioirq.c b/arch/mips/src/pic32mz/pic32mz_gpioirq.c index 03e47c7aed3..1e796857fc4 100644 --- a/arch/mips/src/pic32mz/pic32mz_gpioirq.c +++ b/arch/mips/src/pic32mz/pic32mz_gpioirq.c @@ -343,7 +343,7 @@ static int pic32mz_cninterrupt(int irq, void *context, void *arg) /* Clear the pending interrupt */ - up_clrpend_irq(irq); + mips_clrpend_irq(irq); return ret; } @@ -414,7 +414,7 @@ void pic32mz_gpioirqinitialize(void) /* Clear the CN interrupt flag. Same assumption as above. */ - up_clrpend_irq(PIC32MZ_IRQ_PORTA + i); + mips_clrpend_irq(PIC32MZ_IRQ_PORTA + i); } } } diff --git a/arch/mips/src/pic32mz/pic32mz_head.S b/arch/mips/src/pic32mz/pic32mz_head.S index 1dffff9985c..85417cfeda4 100644 --- a/arch/mips/src/pic32mz/pic32mz_head.S +++ b/arch/mips/src/pic32mz/pic32mz_head.S @@ -147,7 +147,7 @@ .macro showprogress, code #ifdef CONFIG_DEBUG_FEATURES - la t0, up_lowputc + la t0, mips_lowputc la a0, \code jalr ra, t0 nop @@ -187,7 +187,7 @@ #ifdef CONFIG_DEBUG_FEATURES .global pic32mz_consoleinit - .global up_lowputc + .global mips_lowputc #endif /* This file contains 32-bit assembly code */ diff --git a/arch/mips/src/pic32mz/pic32mz_i2c.c b/arch/mips/src/pic32mz/pic32mz_i2c.c index 29ab0b8b5e3..726ba00ec6a 100644 --- a/arch/mips/src/pic32mz/pic32mz_i2c.c +++ b/arch/mips/src/pic32mz/pic32mz_i2c.c @@ -881,7 +881,7 @@ static int pic32mz_i2c_isr_process(struct pic32mz_i2c_priv_s *priv) else { #ifndef CONFIG_I2C_POLLED - up_clrpend_irq(priv->config->ev_irq); + mips_clrpend_irq(priv->config->ev_irq); #endif } break; @@ -1192,20 +1192,20 @@ static int pic32mz_i2c_isr_process(struct pic32mz_i2c_priv_s *priv) /* Clear the master interrupt flag. */ #ifndef CONFIG_I2C_POLLED - if (up_pending_irq(priv->config->ev_irq)) + if (mips_pending_irq(priv->config->ev_irq)) { - up_clrpend_irq(priv->config->ev_irq); + mips_clrpend_irq(priv->config->ev_irq); } #endif /* If an error interrupt has accured. */ #ifndef CONFIG_I2C_POLLED - if (up_pending_irq(priv->config->er_irq)) + if (mips_pending_irq(priv->config->er_irq)) { pic32mz_i2c_traceevent(priv, I2CEVENT_ERROR, 0); - up_clrpend_irq(priv->config->er_irq); + mips_clrpend_irq(priv->config->er_irq); } #endif @@ -1546,7 +1546,7 @@ static int pic32mz_i2c_transfer(struct i2c_master_s *dev, /* Clear any pending error interrupts. */ #ifndef CONFIG_I2C_POLLED - up_clrpend_irq(priv->config->er_irq); + mips_clrpend_irq(priv->config->er_irq); #endif /* Old transfers are done */ diff --git a/arch/mips/src/pic32mz/pic32mz_irq.c b/arch/mips/src/pic32mz/pic32mz_irq.c index 65bb41ffd75..1e738e45cdf 100644 --- a/arch/mips/src/pic32mz/pic32mz_irq.c +++ b/arch/mips/src/pic32mz/pic32mz_irq.c @@ -216,7 +216,7 @@ void up_irqinitialize(void) /* Attach and enable software interrupts */ - irq_attach(PIC32MZ_IRQ_CS0, up_swint0, NULL); + irq_attach(PIC32MZ_IRQ_CS0, mips_swint0, NULL); up_enable_irq(PIC32MZ_IRQ_CS0); /* And finally, enable interrupts */ @@ -298,14 +298,14 @@ void up_enable_irq(int irq) } /**************************************************************************** - * Name: up_pending_irq + * Name: mips_pending_irq * * Description: * Return true if the interrupt is pending and unmasked. * ****************************************************************************/ -bool up_pending_irq(int irq) +bool mips_pending_irq(int irq) { uintptr_t ifsaddr; uintptr_t iecaddr; @@ -337,14 +337,14 @@ bool up_pending_irq(int irq) } /**************************************************************************** - * Name: up_clrpend_irq + * Name: mips_clrpend_irq * * Description: * Clear any pending interrupt * ****************************************************************************/ -void up_clrpend_irq(int irq) +void mips_clrpend_irq(int irq) { uintptr_t regaddr; int bitno; @@ -368,16 +368,16 @@ void up_clrpend_irq(int irq) } /**************************************************************************** - * Name: up_clrpend_sw0 + * Name: mips_clrpend_sw0 * * Description: * Clear a pending Software Interrupt. * ****************************************************************************/ -void up_clrpend_sw0(void) +void mips_clrpend_sw0(void) { - up_clrpend_irq(PIC32MZ_IRQ_CS0); + mips_clrpend_irq(PIC32MZ_IRQ_CS0); } /**************************************************************************** diff --git a/arch/mips/src/pic32mz/pic32mz_lowconsole.c b/arch/mips/src/pic32mz/pic32mz_lowconsole.c index 52537d0d088..c4036e3c0a6 100644 --- a/arch/mips/src/pic32mz/pic32mz_lowconsole.c +++ b/arch/mips/src/pic32mz/pic32mz_lowconsole.c @@ -458,14 +458,14 @@ void pic32mz_consoleinit(void) } /**************************************************************************** - * Name: up_lowputc + * Name: mips_lowputc * * Description: * Output one byte on the serial console. * ****************************************************************************/ -void up_lowputc(char ch) +void mips_lowputc(char ch) { #ifdef HAVE_SERIAL_CONSOLE /* Wait for the transmit buffer not full */ diff --git a/arch/mips/src/pic32mz/pic32mz_lowinit.c b/arch/mips/src/pic32mz/pic32mz_lowinit.c index 2325d294862..882d582b761 100644 --- a/arch/mips/src/pic32mz/pic32mz_lowinit.c +++ b/arch/mips/src/pic32mz/pic32mz_lowinit.c @@ -419,7 +419,7 @@ void pic32mz_lowinit(void) */ #ifdef USE_EARLYSERIALINIT - up_earlyserialinit(); + mips_earlyserialinit(); #endif /* Perform board-level initialization */ diff --git a/arch/mips/src/pic32mz/pic32mz_serial.c b/arch/mips/src/pic32mz/pic32mz_serial.c index def3106ceeb..f9b91230cbd 100644 --- a/arch/mips/src/pic32mz/pic32mz_serial.c +++ b/arch/mips/src/pic32mz/pic32mz_serial.c @@ -205,7 +205,7 @@ /* Common initialization logic will not not know that the all of the UARTs * have been disabled. So, as a result, we may still have to provide - * stub implementations of up_earlyserialinit(), up_serialinit(), and + * stub implementations of mips_earlyserialinit(), mips_serialinit(), and * up_putc(). */ @@ -720,11 +720,11 @@ static int up_interrupt(int irq, void *context, void *arg) */ #ifdef CONFIG_DEBUG_ERROR - if (up_pending_irq(priv->irqe)) + if (mips_pending_irq(priv->irqe)) { /* Clear the pending error interrupt */ - up_clrpend_irq(priv->irqe); + mips_clrpend_irq(priv->irqe); _err("ERROR: interrupt STA: %08x\n", up_serialin(priv, PIC32MZ_UART_STA_OFFSET)); handled = true; @@ -736,7 +736,7 @@ static int up_interrupt(int irq, void *context, void *arg) * FIFOs or 3 of 4 for 4-deep FIFOS. */ - if (up_pending_irq(priv->irqrx)) + if (mips_pending_irq(priv->irqrx)) { /* Process incoming bytes */ @@ -754,7 +754,7 @@ static int up_interrupt(int irq, void *context, void *arg) if ((up_serialin(priv, PIC32MZ_UART_STA_OFFSET) & UART_STA_URXDA) == 0) { - up_clrpend_irq(priv->irqrx); + mips_clrpend_irq(priv->irqrx); } } @@ -773,7 +773,7 @@ static int up_interrupt(int irq, void *context, void *arg) * full condition. */ - if (up_pending_irq(priv->irqtx)) + if (mips_pending_irq(priv->irqtx)) { /* Process outgoing bytes */ @@ -791,7 +791,7 @@ static int up_interrupt(int irq, void *context, void *arg) if ((up_serialin(priv, PIC32MZ_UART_STA_OFFSET) & UART_STA_UTRMT) != 0) { - up_clrpend_irq(priv->irqtx); + mips_clrpend_irq(priv->irqtx); } } } @@ -1063,18 +1063,18 @@ static bool up_txempty(struct uart_dev_s *dev) #ifdef USE_EARLYSERIALINIT /**************************************************************************** - * Name: up_earlyserialinit + * Name: mips_earlyserialinit * * Description: * Performs the low level UART initialization early in debug so that the * serial console will be available during bootup. This must be called - * before up_serialinit. NOTE: This function depends on GPIO pin + * before mips_serialinit. NOTE: This function depends on GPIO pin * configuration performed in up_consoleinit() and main clock * initialization performed in up_clkinitialize(). * ****************************************************************************/ -void up_earlyserialinit(void) +void mips_earlyserialinit(void) { /* Disable interrupts from all UARTS. The console is enabled in * pic32mz_consoleinit(). @@ -1110,15 +1110,15 @@ void up_earlyserialinit(void) #endif /**************************************************************************** - * Name: up_serialinit + * Name: mips_serialinit * * Description: * Register serial console and serial ports. This assumes - * that up_earlyserialinit was called previously. + * that mips_earlyserialinit was called previously. * ****************************************************************************/ -void up_serialinit(void) +void mips_serialinit(void) { /* Register the console */ @@ -1171,31 +1171,31 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + mips_lowputc('\r'); } - up_lowputc(ch); + mips_lowputc(ch); up_restoreuartint(dev, imr); #endif return ch; } /**************************************************************************** - * Name: up_earlyserialinit, up_serialinit, and up_putc + * Name: mips_earlyserialinit, mips_serialinit, and up_putc * * Description: * stubs that may be needed. These stubs would be used if all UARTs are - * disabled. In that case, the logic in common/up_initialize() is not + * disabled. In that case, the logic in common/mips_initialize() is not * smart enough to know that there are not UARTs and will still expect * these interfaces to be provided. * ****************************************************************************/ #else /* HAVE_UART_DEVICE */ -void up_earlyserialinit(void) +void mips_earlyserialinit(void) { } -void up_serialinit(void) +void mips_serialinit(void) { } @@ -1224,10 +1224,10 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + mips_lowputc('\r'); } - up_lowputc(ch); + mips_lowputc(ch); #endif return ch; } diff --git a/arch/mips/src/pic32mz/pic32mz_timer.c b/arch/mips/src/pic32mz/pic32mz_timer.c index 0492730a727..0a09fbc619f 100644 --- a/arch/mips/src/pic32mz/pic32mz_timer.c +++ b/arch/mips/src/pic32mz/pic32mz_timer.c @@ -1110,13 +1110,13 @@ static int pic32mz_timer_setisr(struct pic32mz_timer_dev_s *dev, static void pic32mz_timer_ackint(struct pic32mz_timer_dev_s *dev) { - up_clrpend_irq(((struct pic32mz_timer_priv_s *)dev)->config->irq); + mips_clrpend_irq(((struct pic32mz_timer_priv_s *)dev)->config->irq); if (pic32mz_timer_mode32(dev)) { /* In 32bit mode, the consecutive odd timer controls the interrupt. */ - up_clrpend_irq(pic32mz_timer_nextirq(dev)); + mips_clrpend_irq(pic32mz_timer_nextirq(dev)); } } @@ -1134,14 +1134,14 @@ static bool pic32mz_timer_checkint(struct pic32mz_timer_dev_s *dev) { /* In 32bit mode, the consecutive odd timer controls the interrupt. */ - return up_pending_irq(pic32mz_timer_nextirq(dev)); + return mips_pending_irq(pic32mz_timer_nextirq(dev)); } else { struct pic32mz_timer_priv_s *priv = (struct pic32mz_timer_priv_s *)dev; - return up_pending_irq(priv->config->irq); + return mips_pending_irq(priv->config->irq); } } diff --git a/arch/mips/src/pic32mz/pic32mz_timerisr.c b/arch/mips/src/pic32mz/pic32mz_timerisr.c index 1d8ca424100..0a8f69b7933 100644 --- a/arch/mips/src/pic32mz/pic32mz_timerisr.c +++ b/arch/mips/src/pic32mz/pic32mz_timerisr.c @@ -125,7 +125,7 @@ static int pc32mz_timerisr(int irq, uint32_t *regs, void *arg) { /* Clear the pending timer interrupt */ - up_clrpend_irq(PIC32MZ_IRQ_T1); + mips_clrpend_irq(PIC32MZ_IRQ_T1); /* Process timer interrupt */ @@ -160,7 +160,7 @@ void up_timer_initialize(void) /* Configure the timer interrupt */ - up_clrpend_irq(PIC32MZ_IRQ_T1); + mips_clrpend_irq(PIC32MZ_IRQ_T1); /* Attach the timer interrupt vector */ diff --git a/arch/misoc/include/syscall.h b/arch/misoc/include/syscall.h index bbea8797cb1..b3f7e401710 100644 --- a/arch/misoc/include/syscall.h +++ b/arch/misoc/include/syscall.h @@ -74,11 +74,11 @@ /* SYS call 2: * - * void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); + * void misoc_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); */ #define SYS_switch_context (2) -#define up_switchcontext(saveregs, restoreregs) \ +#define misoc_switchcontext(saveregs, restoreregs) \ sys_call2(SYS_switch_context, (uintptr_t)saveregs, \ (uintptr_t)restoreregs) diff --git a/arch/misoc/src/common/misoc.h b/arch/misoc/src/common/misoc.h index e2ae9c27b67..6a88e6e6672 100644 --- a/arch/misoc/src/common/misoc.h +++ b/arch/misoc/src/common/misoc.h @@ -58,7 +58,7 @@ void flush_cpu_dcache(void); /**************************************************************************** - * Name: up_serialinit + * Name: misoc_serial_initialize * * Description: * Register serial console and serial ports. This assumes that @@ -69,7 +69,7 @@ void flush_cpu_dcache(void); void misoc_serial_initialize(void); /**************************************************************************** - * Name: up_net_initialize + * Name: misoc_net_initialize * * Description: * Register Network diff --git a/arch/misoc/src/lm32/lm32.h b/arch/misoc/src/lm32/lm32.h index 431c942f8f2..e9552a043c5 100644 --- a/arch/misoc/src/lm32/lm32.h +++ b/arch/misoc/src/lm32/lm32.h @@ -42,9 +42,9 @@ * only a referenced is passed to get the state from the TCB. */ -#define up_savestate(regs) lm32_copystate(regs, (uint32_t*)g_current_regs) +#define misoc_savestate(regs) lm32_copystate(regs, (uint32_t*)g_current_regs) #define up_copystate(rega,regb) lm32_copystate(rega, regb) -#define up_restorestate(regs) (g_current_regs = regs) +#define misoc_restorestate(regs) (g_current_regs = regs) /* Determine which (if any) console driver to use. If a console is enabled * and no other console device is specified, then a serial console is diff --git a/arch/misoc/src/lm32/lm32_blocktask.c b/arch/misoc/src/lm32/lm32_blocktask.c index 78f915d5563..624617473d3 100644 --- a/arch/misoc/src/lm32/lm32_blocktask.c +++ b/arch/misoc/src/lm32/lm32_blocktask.c @@ -69,7 +69,7 @@ void up_block_task(struct tcb_s *rtcb) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + misoc_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. @@ -85,7 +85,7 @@ void up_block_task(struct tcb_s *rtcb) * changes will be made when the interrupt returns. */ - up_restorestate(rtcb->xcp.regs); + misoc_restorestate(rtcb->xcp.regs); } /* No, then we will need to perform the user context switch */ @@ -104,9 +104,9 @@ void up_block_task(struct tcb_s *rtcb) /* Then switch contexts */ - up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); + misoc_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the + /* misoc_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. diff --git a/arch/misoc/src/lm32/lm32_releasepending.c b/arch/misoc/src/lm32/lm32_releasepending.c index 75f88a0bfe7..7bc87e099c8 100644 --- a/arch/misoc/src/lm32/lm32_releasepending.c +++ b/arch/misoc/src/lm32/lm32_releasepending.c @@ -76,7 +76,7 @@ void up_release_pending(void) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + misoc_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. @@ -92,7 +92,7 @@ void up_release_pending(void) * changes will be made when the interrupt returns. */ - up_restorestate(rtcb->xcp.regs); + misoc_restorestate(rtcb->xcp.regs); } /* No, then we will need to perform the user context switch */ @@ -111,9 +111,9 @@ void up_release_pending(void) /* Then switch contexts */ - up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); + misoc_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the + /* misoc_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. diff --git a/arch/misoc/src/lm32/lm32_schedulesigaction.c b/arch/misoc/src/lm32/lm32_schedulesigaction.c index d0a75dc438e..b7dead86580 100644 --- a/arch/misoc/src/lm32/lm32_schedulesigaction.c +++ b/arch/misoc/src/lm32/lm32_schedulesigaction.c @@ -136,7 +136,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * is the same as the interrupt return context. */ - up_savestate(tcb->xcp.regs); + misoc_savestate(tcb->xcp.regs); sinfo("PC/STATUS Saved: %08x/%08x New: %08x/%08x\n", tcb->xcp.saved_epc, tcb->xcp.saved_status, diff --git a/arch/misoc/src/lm32/lm32_swint.c b/arch/misoc/src/lm32/lm32_swint.c index b54336eb006..e80f79dc14c 100644 --- a/arch/misoc/src/lm32/lm32_swint.c +++ b/arch/misoc/src/lm32/lm32_swint.c @@ -174,7 +174,8 @@ int lm32_swint(int irq, void *context, void *arg) /* A0=SYS_switch_context: This a switch context command: * - * void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); + * void misoc_switchcontext(uint32_t *saveregs, + * uint32_t *restoreregs); * * At this point, the following values are saved in context: * diff --git a/arch/misoc/src/lm32/lm32_unblocktask.c b/arch/misoc/src/lm32/lm32_unblocktask.c index 51e7c01b998..e2f4c9aa277 100644 --- a/arch/misoc/src/lm32/lm32_unblocktask.c +++ b/arch/misoc/src/lm32/lm32_unblocktask.c @@ -69,7 +69,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + misoc_savestate(rtcb->xcp.regs); /* Update scheduler parameters */ @@ -79,7 +79,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * changes will be made when the interrupt returns. */ - up_restorestate(tcb->xcp.regs); + misoc_restorestate(tcb->xcp.regs); } /* No, then we will need to perform the user context switch */ @@ -92,9 +92,9 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) /* Then switch contexts */ - up_switchcontext(rtcb->xcp.regs, tcb->xcp.regs); + misoc_switchcontext(rtcb->xcp.regs, tcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the + /* misoc_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. diff --git a/arch/misoc/src/minerva/minerva.h b/arch/misoc/src/minerva/minerva.h index 53b637beed6..5def3d49e2d 100644 --- a/arch/misoc/src/minerva/minerva.h +++ b/arch/misoc/src/minerva/minerva.h @@ -41,9 +41,9 @@ * only a referenced is passed to get the state from the TCB. */ -#define up_savestate(regs) minerva_copystate(regs, (uint32_t*)g_current_regs) +#define misoc_savestate(regs) minerva_copystate(regs, (uint32_t*)g_current_regs) #define up_copystate(rega,regb) minerva_copystate(rega, regb) -#define up_restorestate(regs) (g_current_regs = regs) +#define misoc_restorestate(regs) (g_current_regs = regs) /* Determine which (if any) console driver to use. If a console is enabled * and no other console device is specified, then a serial console is diff --git a/arch/misoc/src/minerva/minerva_blocktask.c b/arch/misoc/src/minerva/minerva_blocktask.c index 07888c91ab9..9627a9ea20d 100644 --- a/arch/misoc/src/minerva/minerva_blocktask.c +++ b/arch/misoc/src/minerva/minerva_blocktask.c @@ -69,7 +69,7 @@ void up_block_task(struct tcb_s *rtcb) * g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + misoc_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head of * the ready-to-run task list. @@ -85,7 +85,7 @@ void up_block_task(struct tcb_s *rtcb) * will be made when the interrupt returns. */ - up_restorestate(rtcb->xcp.regs); + misoc_restorestate(rtcb->xcp.regs); } /* No, then we will need to perform the user context switch */ @@ -104,9 +104,9 @@ void up_block_task(struct tcb_s *rtcb) /* Then switch contexts */ - up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); + misoc_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the head + /* misoc_switchcontext forces a context switch to the task at the head * of the ready-to-run list. It does not 'return' in the normal * sense. When it does return, it is because the blocked task is * again ready to run and has execution priority. diff --git a/arch/misoc/src/minerva/minerva_releasepending.c b/arch/misoc/src/minerva/minerva_releasepending.c index 56c1441a80c..51826dbf39f 100644 --- a/arch/misoc/src/minerva/minerva_releasepending.c +++ b/arch/misoc/src/minerva/minerva_releasepending.c @@ -76,7 +76,7 @@ void up_release_pending(void) * g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + misoc_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head of * the ready-to-run task list. @@ -92,7 +92,7 @@ void up_release_pending(void) * will be made when the interrupt returns. */ - up_restorestate(rtcb->xcp.regs); + misoc_restorestate(rtcb->xcp.regs); } /* No, then we will need to perform the user context switch */ @@ -111,12 +111,12 @@ void up_release_pending(void) /* Then switch contexts */ - up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); + misoc_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the head - * of the ready-to-run list. It does not 'return' in the normal - * sense. When it does return, it is because the blocked task is - * again ready to run and has execution priority. + /* misoc_switchcontext forces a context switch to the task at the + * head of the ready-to-run list. It does not 'return' in the + * normal sense. When it does return, it is because the blocked + * task is again ready to run and has execution priority. */ } } diff --git a/arch/misoc/src/minerva/minerva_schedulesigaction.c b/arch/misoc/src/minerva/minerva_schedulesigaction.c index 9343449a0eb..b46788ae030 100644 --- a/arch/misoc/src/minerva/minerva_schedulesigaction.c +++ b/arch/misoc/src/minerva/minerva_schedulesigaction.c @@ -136,7 +136,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * as the interrupt return context. */ - up_savestate(tcb->xcp.regs); + misoc_savestate(tcb->xcp.regs); sinfo("PC/STATUS Saved: %08x/%08x New: %08x/%08x\n", tcb->xcp.saved_epc, tcb->xcp.saved_status, diff --git a/arch/misoc/src/minerva/minerva_swint.c b/arch/misoc/src/minerva/minerva_swint.c index 4b4b2f07114..66f03330f5e 100644 --- a/arch/misoc/src/minerva/minerva_swint.c +++ b/arch/misoc/src/minerva/minerva_swint.c @@ -162,8 +162,8 @@ int minerva_swint(int irq, void *context, void *arg) break; /* A0=SYS_switch_context: This a switch context command: void - * up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); At this - * point, the following values are saved in context: A0 = + * misoc_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); + * At this point, the following values are saved in context: A0 = * SYS_switch_context A1 = saveregs A2 = restoreregs. In this case, we * save the context registers to the save register area referenced by * the saved contents of R5 and then set g_current_regs to the save diff --git a/arch/misoc/src/minerva/minerva_unblocktask.c b/arch/misoc/src/minerva/minerva_unblocktask.c index a8b74afc0ee..91a719369f6 100644 --- a/arch/misoc/src/minerva/minerva_unblocktask.c +++ b/arch/misoc/src/minerva/minerva_unblocktask.c @@ -69,7 +69,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + misoc_savestate(rtcb->xcp.regs); /* Update scheduler parameters */ @@ -79,7 +79,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * will be made when the interrupt returns. */ - up_restorestate(tcb->xcp.regs); + misoc_restorestate(tcb->xcp.regs); } /* No, then we will need to perform the user context switch */ @@ -92,9 +92,9 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) /* Then switch contexts */ - up_switchcontext(rtcb->xcp.regs, tcb->xcp.regs); + misoc_switchcontext(rtcb->xcp.regs, tcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the head + /* misoc_switchcontext forces a context switch to the task at the head * of the ready-to-run list. It does not 'return' in the normal * sense. When it does return, it is because the blocked task is * again ready to run and has execution priority. diff --git a/arch/or1k/src/common/up_allocateheap.c b/arch/or1k/src/common/or1k_allocateheap.c similarity index 98% rename from arch/or1k/src/common/up_allocateheap.c rename to arch/or1k/src/common/or1k_allocateheap.c index 52b316d0194..4369ae7bef3 100644 --- a/arch/or1k/src/common/up_allocateheap.c +++ b/arch/or1k/src/common/or1k_allocateheap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_allocateheap.c + * arch/or1k/src/common/or1k_allocateheap.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -35,7 +35,7 @@ #include -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -58,7 +58,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_allocate_heap/up_allocate_kheap + * Name: up_allocate_heap/or1k_allocate_kheap * * Description: * This function will be called to dynamically set aside the heap region. diff --git a/arch/or1k/src/common/up_assert.c b/arch/or1k/src/common/or1k_assert.c similarity index 99% rename from arch/or1k/src/common/up_assert.c rename to arch/or1k/src/common/or1k_assert.c index 44ce3bbff48..3b6d9782c68 100644 --- a/arch/or1k/src/common/up_assert.c +++ b/arch/or1k/src/common/or1k_assert.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_assert.c + * arch/or1k/src/common/or1k_assert.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -38,7 +38,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/or1k/src/common/up_blocktask.c b/arch/or1k/src/common/or1k_blocktask.c similarity index 94% rename from arch/or1k/src/common/up_blocktask.c rename to arch/or1k/src/common/or1k_blocktask.c index f3b513409aa..6775b2cb869 100644 --- a/arch/or1k/src/common/up_blocktask.c +++ b/arch/or1k/src/common/or1k_blocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_blocktask.c + * arch/or1k/src/common/or1k_blocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Public Functions @@ -68,7 +68,7 @@ void up_block_task(struct tcb_s *rtcb) * Just copy the CURRENT_REGS into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + or1k_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. @@ -84,7 +84,7 @@ void up_block_task(struct tcb_s *rtcb) * changes will be made when the interrupt returns. */ - up_restorestate(rtcb->xcp.regs); + or1k_restorestate(rtcb->xcp.regs); } /* Copy the user C context into the TCB at the (old) head of the @@ -115,6 +115,6 @@ void up_block_task(struct tcb_s *rtcb) /* Then switch contexts */ - up_fullcontextrestore(rtcb->xcp.regs); + or1k_fullcontextrestore(rtcb->xcp.regs); } } diff --git a/arch/or1k/src/common/up_checkstack.c b/arch/or1k/src/common/or1k_checkstack.c similarity index 98% rename from arch/or1k/src/common/up_checkstack.c rename to arch/or1k/src/common/or1k_checkstack.c index c07e5217a67..dd5350ff25e 100644 --- a/arch/or1k/src/common/up_checkstack.c +++ b/arch/or1k/src/common/or1k_checkstack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_checkstack.c + * arch/or1k/src/common/or1k_checkstack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "or1k_internal.h" #ifdef CONFIG_STACK_COLORATION diff --git a/arch/or1k/src/common/up_copyfullstate.c b/arch/or1k/src/common/or1k_copyfullstate.c similarity index 91% rename from arch/or1k/src/common/up_copyfullstate.c rename to arch/or1k/src/common/or1k_copyfullstate.c index 567e764a376..35c50757ab5 100644 --- a/arch/or1k/src/common/up_copyfullstate.c +++ b/arch/or1k/src/common/or1k_copyfullstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_copyfullstate.c + * arch/or1k/src/common/or1k_copyfullstate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -27,19 +27,19 @@ #include #include -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_copyfullstate + * Name: or1k_copyfullstate ****************************************************************************/ /* A little faster than most memcpy's */ -void up_copyfullstate(uint32_t *dest, uint32_t *src) +void or1k_copyfullstate(uint32_t *dest, uint32_t *src) { int i; diff --git a/arch/or1k/src/common/up_cpuinfo.c b/arch/or1k/src/common/or1k_cpuinfo.c similarity index 99% rename from arch/or1k/src/common/up_cpuinfo.c rename to arch/or1k/src/common/or1k_cpuinfo.c index 4309955c126..931ecf8cc53 100644 --- a/arch/or1k/src/common/up_cpuinfo.c +++ b/arch/or1k/src/common/or1k_cpuinfo.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_cpuinfo.c + * arch/or1k/src/common/or1k_cpuinfo.c * * Copyright (C) 2018 Extent3D. All rights reserved. * Author: Matt Thompson diff --git a/arch/or1k/src/common/up_createstack.c b/arch/or1k/src/common/or1k_createstack.c similarity index 97% rename from arch/or1k/src/common/up_createstack.c rename to arch/or1k/src/common/or1k_createstack.c index 5c128228074..e4e36d211bb 100644 --- a/arch/or1k/src/common/up_createstack.c +++ b/arch/or1k/src/common/or1k_createstack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_createstack.c + * arch/or1k/src/common/or1k_createstack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -37,7 +37,7 @@ #include #include -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Public Functions @@ -181,7 +181,7 @@ int up_create_stack(struct tcb_s *tcb, size_t stack_size, uint8_t ttype) * water marks. */ - up_stack_color(tcb->stack_base_ptr, tcb->adj_stack_size); + or1k_stack_color(tcb->stack_base_ptr, tcb->adj_stack_size); #endif /* CONFIG_STACK_COLORATION */ tcb->flags |= TCB_FLAG_FREE_STACK; @@ -193,7 +193,7 @@ int up_create_stack(struct tcb_s *tcb, size_t stack_size, uint8_t ttype) } /**************************************************************************** - * Name: up_stack_color + * Name: or1k_stack_color * * Description: * Write a well know value into the stack @@ -201,7 +201,7 @@ int up_create_stack(struct tcb_s *tcb, size_t stack_size, uint8_t ttype) ****************************************************************************/ #ifdef CONFIG_STACK_COLORATION -void up_stack_color(void *stackbase, size_t nbytes) +void or1k_stack_color(void *stackbase, size_t nbytes) { uint32_t *stkptr; uintptr_t stkend; diff --git a/arch/or1k/src/common/up_doirq.c b/arch/or1k/src/common/or1k_doirq.c similarity index 95% rename from arch/or1k/src/common/up_doirq.c rename to arch/or1k/src/common/or1k_doirq.c index 6f24fab03ab..2464e07b74b 100644 --- a/arch/or1k/src/common/up_doirq.c +++ b/arch/or1k/src/common/or1k_doirq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_doirq.c + * arch/or1k/src/common/or1k_doirq.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,13 +32,13 @@ #include #include -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ -uint32_t *up_doirq(int irq, uint32_t *regs) +uint32_t *or1k_doirq(int irq, uint32_t *regs) { board_autoled_on(LED_INIRQ); #ifdef CONFIG_SUPPRESS_INTERRUPTS @@ -57,7 +57,7 @@ uint32_t *up_doirq(int irq, uint32_t *regs) /* Acknowledge the interrupt */ - up_ack_irq(irq); + or1k_ack_irq(irq); /* Deliver the IRQ */ diff --git a/arch/or1k/src/common/up_etherstub.c b/arch/or1k/src/common/or1k_etherstub.c similarity index 85% rename from arch/or1k/src/common/up_etherstub.c rename to arch/or1k/src/common/or1k_etherstub.c index c983e3cb801..742e2f8a778 100644 --- a/arch/or1k/src/common/up_etherstub.c +++ b/arch/or1k/src/common/or1k_etherstub.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_etherstub.c + * arch/or1k/src/common/or1k_etherstub.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -24,32 +24,32 @@ #include -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_netinitialize (stub) + * Name: or1k_etinitialize (stub) * * Description: - * This is a stub version os up_netinitialize. Normally, up_netinitialize + * This is a stub version of or1k_etinitialize. Normally, etinitialize * is defined in board/xyz_network.c for board-specific Ethernet * implementations, or chip/xyx_ethernet.c for chip-specific Ethernet * implementations. The stub version here is used in the corner case where * the network is enable yet there is no Ethernet driver to be initialized. - * In this case, up_initialize will still try to call up_netinitialize() + * In this case, up_initialize will still try to call or1k_etinitialize() * when one does not exist. This corner case would occur if, for example, * only a USB network interface is being used or perhaps if a SLIP is * being used). * * Use of this stub is deprecated. The preferred mechanism is to use - * CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in + * CONFIG_NETDEV_LATEINIT=y to suppress the call to or1k_etinitialize() in * up_initialize(). Then this stub would not be needed. * ****************************************************************************/ -void up_netinitialize(void) +void or1k_etinitialize(void) { } diff --git a/arch/or1k/src/common/up_exit.c b/arch/or1k/src/common/or1k_exit.c similarity index 97% rename from arch/or1k/src/common/up_exit.c rename to arch/or1k/src/common/or1k_exit.c index 05fa24e10e7..ac59c5b5cb8 100644 --- a/arch/or1k/src/common/up_exit.c +++ b/arch/or1k/src/common/or1k_exit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_exit.c + * arch/or1k/src/common/or1k_exit.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -37,7 +37,7 @@ #include "sched/sched.h" #include "group/group.h" #include "irq/irq.h" -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -146,5 +146,5 @@ void up_exit(int status) /* Then switch contexts */ - up_fullcontextrestore(tcb->xcp.regs); + or1k_fullcontextrestore(tcb->xcp.regs); } diff --git a/arch/or1k/src/common/up_fullcontextrestore.S b/arch/or1k/src/common/or1k_fullcontextrestore.S similarity index 90% rename from arch/or1k/src/common/up_fullcontextrestore.S rename to arch/or1k/src/common/or1k_fullcontextrestore.S index 8b53e7966fe..f9dd348a416 100644 --- a/arch/or1k/src/common/up_fullcontextrestore.S +++ b/arch/or1k/src/common/or1k_fullcontextrestore.S @@ -1,5 +1,5 @@ /************************************************************************** - * arch/or1k/src/common/up_fullcontextrestore.S + * arch/or1k/src/common/or1k_fullcontextrestore.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -23,19 +23,19 @@ **************************************************************************/ #include -#include "up_internal.h" +#include "or1k_internal.h" /************************************************************************** * Public Functions **************************************************************************/ /************************************************************************** - * Name: up_fullcontextrestore + * Name: or1k_fullcontextrestore **************************************************************************/ - .globl up_fullcontextrestore - .type up_fullcontextrestore, function -up_fullcontextrestore: + .globl or1k_fullcontextrestore + .type or1k_fullcontextrestore, function +or1k_fullcontextrestore: /* l.lwz r30, 4*REG_PC(r3); @@ -92,4 +92,4 @@ up_fullcontextrestore: //l.rfe; - .size up_fullcontextrestore, . - up_fullcontextrestore + .size or1k_fullcontextrestore, . - or1k_fullcontextrestore diff --git a/arch/or1k/src/common/up_idle.c b/arch/or1k/src/common/or1k_idle.c similarity index 97% rename from arch/or1k/src/common/up_idle.c rename to arch/or1k/src/common/or1k_idle.c index 5ffe07f6333..d048558ae51 100644 --- a/arch/or1k/src/common/up_idle.c +++ b/arch/or1k/src/common/or1k_idle.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_idle.c + * arch/or1k/src/common/or1k_idle.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -25,7 +25,7 @@ #include #include -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/or1k/src/common/up_initialize.c b/arch/or1k/src/common/or1k_initialize.c similarity index 94% rename from arch/or1k/src/common/up_initialize.c rename to arch/or1k/src/common/or1k_initialize.c index 0b418a9a6d2..06e7b5bdf34 100644 --- a/arch/or1k/src/common/up_initialize.c +++ b/arch/or1k/src/common/or1k_initialize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_initialize.c + * arch/or1k/src/common/or1k_initialize.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -28,7 +28,7 @@ #include #include -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Public Data @@ -159,7 +159,7 @@ void up_initialize(void) /* Add any extra memory fragments to the memory manager */ - up_addregion(); + or1k_addregion(); #ifdef CONFIG_PM /* Initialize the power management subsystem. This MCU-specific function @@ -168,25 +168,25 @@ void up_initialize(void) * with the power management subsystem). */ - up_pminitialize(); + or1k_pminitialize(); #endif #ifdef CONFIG_ARCH_DMA - /* Initialize the DMA subsystem if the weak function up_dma_initialize has - * been brought into the build + /* Initialize the DMA subsystem if the weak function or1k_dma_initialize + * has been brought into the build */ #ifdef CONFIG_HAVE_WEAKFUNCTIONS - if (up_dma_initialize) + if (or1k_dma_initialize) #endif { - up_dma_initialize(); + or1k_dma_initialize(); } #endif /* Initialize the serial device driver */ - up_serialinit(); + or1k_serialinit(); /* Print OpenRISC CPU information */ @@ -194,15 +194,15 @@ void up_initialize(void) /* Initialize the network */ - up_netinitialize(); + or1k_etinitialize(); /* Initialize USB -- device and/or host */ - up_usbinitialize(); + or1k_usbinitialize(); /* Initialize the L2 cache if present and selected */ - up_l2ccinitialize(); + or1k_l2ccinitialize(); #ifdef CONFIG_OR1K_ICACHE up_enable_icache(); diff --git a/arch/or1k/src/common/up_initialstate.c b/arch/or1k/src/common/or1k_initialstate.c similarity index 97% rename from arch/or1k/src/common/up_initialstate.c rename to arch/or1k/src/common/or1k_initialstate.c index f0d010d5068..83abcad5212 100644 --- a/arch/or1k/src/common/up_initialstate.c +++ b/arch/or1k/src/common/or1k_initialstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_initialstate.c + * arch/or1k/src/common/or1k_initialstate.c * * Copyright (C) 2018 Extent3D. All rights reserved. * Author: Matt Thompson @@ -45,7 +45,7 @@ #include -#include "up_internal.h" +#include "or1k_internal.h" #include @@ -87,7 +87,7 @@ void up_initial_state(struct tcb_s *tcb) * water marks. */ - up_stack_color(tcb->stack_alloc_ptr, 0); + or1k_stack_color(tcb->stack_alloc_ptr, 0); #endif /* CONFIG_STACK_COLORATION */ } diff --git a/arch/or1k/src/common/up_internal.h b/arch/or1k/src/common/or1k_internal.h similarity index 85% rename from arch/or1k/src/common/up_internal.h rename to arch/or1k/src/common/or1k_internal.h index fc392af581c..6ea0c9fb2ef 100644 --- a/arch/or1k/src/common/up_internal.h +++ b/arch/or1k/src/common/or1k_internal.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_internal.h + * arch/or1k/src/common/or1k_internal.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -84,8 +84,8 @@ #define STACK_ALIGN_DOWN(a) ((a) & ~STACK_ALIGN_MASK) #define STACK_ALIGN_UP(a) (((a) + STACK_ALIGN_MASK) & ~STACK_ALIGN_MASK) -#define up_savestate(regs) up_copyfullstate(regs, (uint32_t*)CURRENT_REGS) -#define up_restorestate(regs) up_copyfullstate((uint32_t*)CURRENT_REGS, regs) +#define or1k_savestate(regs) or1k_copyfullstate(regs, (uint32_t*)CURRENT_REGS) +#define or1k_restorestate(regs) or1k_copyfullstate((uint32_t*)CURRENT_REGS, regs) #define _START_TEXT _stext #define _END_TEXT _etext @@ -215,21 +215,21 @@ int or1k_print_cpuinfo(void); /* Context switching */ -void up_copyfullstate(uint32_t *dest, uint32_t *src); -void up_decodeirq(uint32_t *regs); -void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function; -void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); +void or1k_copyfullstate(uint32_t *dest, uint32_t *src); +void or1k_decodeirq(uint32_t *regs); +void or1k_fullcontextrestore(uint32_t *restoreregs) noreturn_function; +void or1k_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); /* Signal handling **********************************************************/ -void up_sigdeliver(void); +void or1k_sigdeliver(void); /* Power management *********************************************************/ #ifdef CONFIG_PM -void up_pminitialize(void); +void or1k_pminitialize(void); #else -# define up_pminitialize() +# define or1k_pminitialize() #endif /* Interrupt handling *******************************************************/ @@ -238,13 +238,13 @@ void up_pminitialize(void); /* Interrupt acknowledge and dispatch */ -void up_ack_irq(int irq); -uint32_t *up_doirq(int irq, uint32_t *regs); +void or1k_ack_irq(int irq); +uint32_t *or1k_doirq(int irq, uint32_t *regs); /* Exception Handlers */ -int up_hardfault(int irq, void *context, void *arg); -int up_memfault(int irq, void *context, void *arg); +int or1k_hardfault(int irq, void *context, void *arg); +int or1k_memfault(int irq, void *context, void *arg); /* Interrupt acknowledge and dispatch */ @@ -256,71 +256,71 @@ uint32_t *or1k_syscall(uint32_t *regs); /* Low level serial output **************************************************/ -void up_lowputc(char ch); -void up_lowputs(const char *str); +void or1k_lowputc(char ch); +void or1k_lowputs(const char *str); #ifdef USE_SERIALDRIVER -void up_serialinit(void); +void or1k_serialinit(void); #endif #ifdef USE_EARLYSERIALINIT -void up_earlyserialinit(void); +void or1k_earlyserialinit(void); #endif /* DMA **********************************************************************/ #ifdef CONFIG_ARCH_DMA -void weak_function up_dma_initialize(void); +void weak_function or1k_dma_initialize(void); #endif /* Cache control ************************************************************/ #ifdef CONFIG_ARCH_L2CACHE -void up_l2ccinitialize(void); +void or1k_l2ccinitialize(void); #else -# define up_l2ccinitialize() +# define or1k_l2ccinitialize() #endif /* Memory management ********************************************************/ #if CONFIG_MM_REGIONS > 1 -void up_addregion(void); +void or1k_addregion(void); #else -# define up_addregion() +# define or1k_addregion() #endif /* Networking ***************************************************************/ /* Defined in board/xyz_network.c for board-specific Ethernet * implementations, or chip/xyx_ethernet.c for chip-specific Ethernet - * implementations, or common/up_etherstub.c for a corner case where the + * implementations, or common/or1k_etherstub.c for a corner case where the * network is enabled yet there is no Ethernet driver to be initialized. * - * Use of common/up_etherstub.c is deprecated. The preferred mechanism is to - * use CONFIG_NETDEV_LATEINIT=y to suppress the call to up_netinitialize() in - * up_initialize(). Then this stub would not be needed. + * Use of common/or1k_etherstub.c is deprecated. The preferred mechanism is + * use CONFIG_NETDEV_LATEINIT=y to suppress the call to or1k_etinitialize() + * in up_initialize(). Then this stub would not be needed. */ #if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) -void up_netinitialize(void); +void or1k_etinitialize(void); #else -# define up_netinitialize() +# define or1k_etinitialize() #endif /* USB **********************************************************************/ #ifdef CONFIG_USBDEV -void up_usbinitialize(void); -void up_usbuninitialize(void); +void or1k_usbinitialize(void); +void or1k_usbuninitialize(void); #else -# define up_usbinitialize() -# define up_usbuninitialize() +# define or1k_usbinitialize() +# define or1k_usbuninitialize() #endif /* Debug ********************************************************************/ #ifdef CONFIG_STACK_COLORATION size_t or1k_stack_check(uintptr_t alloc, size_t size); -void up_stack_color(void *stackbase, size_t nbytes); +void or1k_stack_color(void *stackbase, size_t nbytes); #endif #undef EXTERN diff --git a/arch/or1k/src/common/up_lowputs.c b/arch/or1k/src/common/or1k_lowputs.c similarity index 91% rename from arch/or1k/src/common/up_lowputs.c rename to arch/or1k/src/common/or1k_lowputs.c index a7e5ccd325b..771e963e98f 100644 --- a/arch/or1k/src/common/up_lowputs.c +++ b/arch/or1k/src/common/or1k_lowputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_lowputs.c + * arch/or1k/src/common/or1k_lowputs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -24,24 +24,24 @@ #include -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_lowputs + * Name: or1k_lowputs * * Description: * This is a low-level helper function used to support debug. * ****************************************************************************/ -void up_lowputs(const char *str) +void or1k_lowputs(const char *str) { while (*str) { - up_lowputc(*str++); + or1k_lowputc(*str++); } } diff --git a/arch/or1k/src/common/up_mdelay.c b/arch/or1k/src/common/or1k_mdelay.c similarity index 98% rename from arch/or1k/src/common/up_mdelay.c rename to arch/or1k/src/common/or1k_mdelay.c index 1df1e73afac..8beeaeeb55c 100644 --- a/arch/or1k/src/common/up_mdelay.c +++ b/arch/or1k/src/common/or1k_mdelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_mdelay.c + * arch/or1k/src/common/or1k_mdelay.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/or1k/src/common/up_modifyreg16.c b/arch/or1k/src/common/or1k_modifyreg16.c similarity index 96% rename from arch/or1k/src/common/up_modifyreg16.c rename to arch/or1k/src/common/or1k_modifyreg16.c index 32bfc5aa631..e2c7b29e4d1 100644 --- a/arch/or1k/src/common/up_modifyreg16.c +++ b/arch/or1k/src/common/or1k_modifyreg16.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_modifyreg16.c + * arch/or1k/src/common/or1k_modifyreg16.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -29,7 +29,7 @@ #include -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/or1k/src/common/up_modifyreg32.c b/arch/or1k/src/common/or1k_modifyreg32.c similarity index 96% rename from arch/or1k/src/common/up_modifyreg32.c rename to arch/or1k/src/common/or1k_modifyreg32.c index 002426b4834..3a82c8f6c22 100644 --- a/arch/or1k/src/common/up_modifyreg32.c +++ b/arch/or1k/src/common/or1k_modifyreg32.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_modifyreg32.c + * arch/or1k/src/common/or1k_modifyreg32.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -29,7 +29,7 @@ #include -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/or1k/src/common/up_modifyreg8.c b/arch/or1k/src/common/or1k_modifyreg8.c similarity index 96% rename from arch/or1k/src/common/up_modifyreg8.c rename to arch/or1k/src/common/or1k_modifyreg8.c index eb035f0ab3f..aa1ef38a260 100644 --- a/arch/or1k/src/common/up_modifyreg8.c +++ b/arch/or1k/src/common/or1k_modifyreg8.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_modifyreg8.c + * arch/or1k/src/common/or1k_modifyreg8.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -29,7 +29,7 @@ #include -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/or1k/src/common/up_nputs.c b/arch/or1k/src/common/or1k_nputs.c similarity index 97% rename from arch/or1k/src/common/up_nputs.c rename to arch/or1k/src/common/or1k_nputs.c index 273b757df4c..5ed0bdb648d 100644 --- a/arch/or1k/src/common/up_nputs.c +++ b/arch/or1k/src/common/or1k_nputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_nputs.c + * arch/or1k/src/common/or1k_nputs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/or1k/src/common/up_pthread_start.c b/arch/or1k/src/common/or1k_pthread_start.c similarity index 97% rename from arch/or1k/src/common/up_pthread_start.c rename to arch/or1k/src/common/or1k_pthread_start.c index 060a7115c6e..1656481f95c 100644 --- a/arch/or1k/src/common/up_pthread_start.c +++ b/arch/or1k/src/common/or1k_pthread_start.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_pthread_start.c + * arch/or1k/src/common/or1k_pthread_start.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -29,7 +29,7 @@ #include -#include "up_internal.h" +#include "or1k_internal.h" #if !defined(CONFIG_BUILD_FLAT) && defined(__KERNEL__) && \ !defined(CONFIG_DISABLE_PTHREAD) diff --git a/arch/or1k/src/common/up_releasepending.c b/arch/or1k/src/common/or1k_releasepending.c similarity index 94% rename from arch/or1k/src/common/up_releasepending.c rename to arch/or1k/src/common/or1k_releasepending.c index 02bc327c62a..3d93b7c0794 100644 --- a/arch/or1k/src/common/up_releasepending.c +++ b/arch/or1k/src/common/or1k_releasepending.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_releasepending.c + * arch/or1k/src/common/or1k_releasepending.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Public Functions @@ -74,7 +74,7 @@ void up_release_pending(void) * Just copy the CURRENT_REGS into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + or1k_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. @@ -90,7 +90,7 @@ void up_release_pending(void) * changes will be made when the interrupt returns. */ - up_restorestate(rtcb->xcp.regs); + or1k_restorestate(rtcb->xcp.regs); } /* Copy the exception context into the TCB of the task that @@ -122,7 +122,7 @@ void up_release_pending(void) /* Then switch contexts */ - up_fullcontextrestore(rtcb->xcp.regs); + or1k_fullcontextrestore(rtcb->xcp.regs); } } } diff --git a/arch/or1k/src/common/up_releasestack.c b/arch/or1k/src/common/or1k_releasestack.c similarity index 98% rename from arch/or1k/src/common/up_releasestack.c rename to arch/or1k/src/common/or1k_releasestack.c index eaad0c1461f..5eb84dd9ab3 100644 --- a/arch/or1k/src/common/up_releasestack.c +++ b/arch/or1k/src/common/or1k_releasestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_releasestack.c + * arch/or1k/src/common/or1k_releasestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/or1k/src/common/up_saveusercontext.S b/arch/or1k/src/common/or1k_saveusercontext.S similarity index 97% rename from arch/or1k/src/common/up_saveusercontext.S rename to arch/or1k/src/common/or1k_saveusercontext.S index 4e92a6d2ffb..e3e1b39c6b7 100644 --- a/arch/or1k/src/common/up_saveusercontext.S +++ b/arch/or1k/src/common/or1k_saveusercontext.S @@ -1,5 +1,5 @@ /************************************************************************** - * arch/or1k/src/common/up_saveusercontext.S + * arch/or1k/src/common/or1k_saveusercontext.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -23,7 +23,7 @@ **************************************************************************/ #include -#include "up_internal.h" +#include "or1k_internal.h" /************************************************************************** * Public Functions diff --git a/arch/or1k/src/common/up_schedulesigaction.c b/arch/or1k/src/common/or1k_schedulesigaction.c similarity index 95% rename from arch/or1k/src/common/up_schedulesigaction.c rename to arch/or1k/src/common/or1k_schedulesigaction.c index 32c5c5612a5..0a472248341 100644 --- a/arch/or1k/src/common/up_schedulesigaction.c +++ b/arch/or1k/src/common/or1k_schedulesigaction.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_schedulesigaction.c + * arch/or1k/src/common/or1k_schedulesigaction.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Public Functions @@ -129,7 +129,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - /* CURRENT_REGS[REG_PC] = (uint32_t)up_sigdeliver; + /* CURRENT_REGS[REG_PC] = (uint32_t)or1k_sigdeliver; * CURRENT_REGS[REG_CPSR] = SVC_MODE | PSR_I_BIT | * PSR_F_BIT; */ @@ -138,7 +138,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * is the same as the interrupt return context. */ - up_savestate(tcb->xcp.regs); + or1k_savestate(tcb->xcp.regs); } } @@ -164,7 +164,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - /* tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver; + /* tcb->xcp.regs[REG_PC] = (uint32_t)or1k_sigdeliver; * tcb->xcp.regs[REG_CPSR] = SVC_MODE | PSR_I_BIT | PSR_F_BIT; */ } diff --git a/arch/or1k/src/common/up_stackframe.c b/arch/or1k/src/common/or1k_stackframe.c similarity index 97% rename from arch/or1k/src/common/up_stackframe.c rename to arch/or1k/src/common/or1k_stackframe.c index c848de353d3..daa7e1680fb 100644 --- a/arch/or1k/src/common/up_stackframe.c +++ b/arch/or1k/src/common/or1k_stackframe.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_stackframe.c + * arch/or1k/src/common/or1k_stackframe.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/or1k/src/common/up_task_start.c b/arch/or1k/src/common/or1k_task_start.c similarity index 97% rename from arch/or1k/src/common/up_task_start.c rename to arch/or1k/src/common/or1k_task_start.c index b57064803df..5ee95684c63 100644 --- a/arch/or1k/src/common/up_task_start.c +++ b/arch/or1k/src/common/or1k_task_start.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_task_start.c + * arch/or1k/src/common/or1k_task_start.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -28,7 +28,7 @@ #include -#include "up_internal.h" +#include "or1k_internal.h" #ifndef CONFIG_BUILD_FLAT diff --git a/arch/or1k/src/common/up_timer.c b/arch/or1k/src/common/or1k_timer.c similarity index 98% rename from arch/or1k/src/common/up_timer.c rename to arch/or1k/src/common/or1k_timer.c index 234cda2c45a..0c0aa843bcc 100644 --- a/arch/or1k/src/common/up_timer.c +++ b/arch/or1k/src/common/or1k_timer.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_timer.c + * arch/or1k/src/common/or1k_timer.c * * Copyright (C) 2018 Extent3D. All rights reserved. * Author: Matt Thompson @@ -48,7 +48,7 @@ #include #include "clock/clock.h" -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/or1k/src/common/up_uart.c b/arch/or1k/src/common/or1k_uart.c similarity index 96% rename from arch/or1k/src/common/up_uart.c rename to arch/or1k/src/common/or1k_uart.c index c1f8eaa07cd..d6c15157df2 100644 --- a/arch/or1k/src/common/up_uart.c +++ b/arch/or1k/src/common/or1k_uart.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_uart.c + * arch/or1k/src/common/or1k_uart.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -27,7 +27,7 @@ #include -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/or1k/src/common/up_udelay.c b/arch/or1k/src/common/or1k_udelay.c similarity index 98% rename from arch/or1k/src/common/up_udelay.c rename to arch/or1k/src/common/or1k_udelay.c index 19a034debf7..362ddde554e 100644 --- a/arch/or1k/src/common/up_udelay.c +++ b/arch/or1k/src/common/or1k_udelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_udelay.c + * arch/or1k/src/common/or1k_udelay.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/or1k/src/common/up_unblocktask.c b/arch/or1k/src/common/or1k_unblocktask.c similarity index 94% rename from arch/or1k/src/common/up_unblocktask.c rename to arch/or1k/src/common/or1k_unblocktask.c index 01e80d3c488..eefa03d1ea0 100644 --- a/arch/or1k/src/common/up_unblocktask.c +++ b/arch/or1k/src/common/or1k_unblocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_unblocktask.c + * arch/or1k/src/common/or1k_unblocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include "sched/sched.h" #include "group/group.h" #include "clock/clock.h" -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Public Functions @@ -71,7 +71,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * Just copy the CURRENT_REGS into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + or1k_savestate(rtcb->xcp.regs); /* Update scheduler parameters */ @@ -81,7 +81,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * changes will be made when the interrupt returns. */ - up_restorestate(tcb->xcp.regs); + or1k_restorestate(tcb->xcp.regs); } /* We are not in an interrupt handler. Copy the user C context @@ -107,6 +107,6 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) /* Then switch contexts */ - up_fullcontextrestore(tcb->xcp.regs); + or1k_fullcontextrestore(tcb->xcp.regs); } } diff --git a/arch/or1k/src/common/up_usestack.c b/arch/or1k/src/common/or1k_usestack.c similarity index 98% rename from arch/or1k/src/common/up_usestack.c rename to arch/or1k/src/common/or1k_usestack.c index 2e1993cb22c..6d92adcc2f1 100644 --- a/arch/or1k/src/common/up_usestack.c +++ b/arch/or1k/src/common/or1k_usestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/common/up_usestack.c + * arch/or1k/src/common/or1k_usestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ #include #include -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/or1k/src/mor1kx/Make.defs b/arch/or1k/src/mor1kx/Make.defs index 689d942854a..9474446386f 100644 --- a/arch/or1k/src/mor1kx/Make.defs +++ b/arch/or1k/src/mor1kx/Make.defs @@ -18,47 +18,47 @@ # ############################################################################ -CMN_ASRCS = up_vectortab.S \ - up_saveusercontext.S \ - up_fullcontextrestore.S +CMN_ASRCS = or1k_vectortab.S \ + or1k_saveusercontext.S \ + or1k_fullcontextrestore.S -CMN_CSRCS = up_initialize.c \ - up_allocateheap.c \ - up_createstack.c \ - up_usestack.c \ - up_releasestack.c \ - up_stackframe.c \ - up_initialstate.c \ - up_blocktask.c \ - up_unblocktask.c \ - up_releasepending.c \ - up_schedulesigaction.c \ - up_copyfullstate.c \ - up_assert.c \ - up_exit.c \ - up_udelay.c \ - up_mdelay.c \ - up_idle.c \ - up_irq.c \ - up_nputs.c \ - up_uart.c \ - up_timer.c \ - up_doirq.c \ - up_cpuinfo.c \ +CMN_CSRCS = or1k_initialize.c \ + or1k_allocateheap.c \ + or1k_createstack.c \ + or1k_usestack.c \ + or1k_releasestack.c \ + or1k_stackframe.c \ + or1k_initialstate.c \ + or1k_blocktask.c \ + or1k_unblocktask.c \ + or1k_releasepending.c \ + or1k_schedulesigaction.c \ + or1k_copyfullstate.c \ + or1k_assert.c \ + or1k_exit.c \ + or1k_udelay.c \ + or1k_mdelay.c \ + or1k_idle.c \ + or1k_irq.c \ + or1k_nputs.c \ + or1k_uart.c \ + or1k_timer.c \ + or1k_doirq.c \ + or1k_cpuinfo.c \ mor1kx_start.c ifeq ($(CONFIG_BUILD_PROTECTED),y) -CMN_CSRCS += up_task_start.c up_pthread_start.c -#CMN_CSRCS += up_signal_dispatch.c -#CMN_UASRCS += up_signal_handler.S +CMN_CSRCS += or1k_task_start.c or1k_pthread_start.c +#CMN_CSRCS += or1k_signal_dispatch.c +#CMN_UASRCS += or1k_signal_handler.S endif ifeq ($(CONFIG_STACK_COLORATION),y) -#CMN_CSRCS += up_checkstack.c +#CMN_CSRCS += or1k_checkstack.c endif ifeq ($(CONFIG_DEBUG_FEATURES),y) -#CMN_CSRCS += up_dumpnvic.c +#CMN_CSRCS += or1k_dumpnvic.c endif ifneq ($(CONFIG_SCHED_TICKLESS),y) diff --git a/arch/or1k/src/mor1kx/mor1kx_serial.c b/arch/or1k/src/mor1kx/mor1kx_serial.c index 3cf6cd3c1e2..e57a54ce683 100644 --- a/arch/or1k/src/mor1kx/mor1kx_serial.c +++ b/arch/or1k/src/mor1kx/mor1kx_serial.c @@ -38,7 +38,7 @@ #include -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -55,7 +55,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_earlyserialinit + * Name: or1k_earlyserialinit * * Description: * Performs the low level USART initialization early in debug so that the @@ -65,7 +65,7 @@ ****************************************************************************/ #ifdef USE_EARLYSERIALINIT -void up_earlyserialinit(void) +void or1k_earlyserialinit(void) { /* Disable all USARTS */ @@ -78,7 +78,7 @@ void up_earlyserialinit(void) #endif /**************************************************************************** - * Name: up_serialinit + * Name: or1k_serialinit * * Description: * Register serial console and serial ports. @@ -86,7 +86,7 @@ void up_earlyserialinit(void) ****************************************************************************/ #ifdef USE_SERIALDRIVER -void up_serialinit(void) +void or1k_serialinit(void) { /* Register the console */ diff --git a/arch/or1k/src/mor1kx/mor1kx_start.c b/arch/or1k/src/mor1kx/mor1kx_start.c index b0d4d99a505..4d543b0d0fd 100644 --- a/arch/or1k/src/mor1kx/mor1kx_start.c +++ b/arch/or1k/src/mor1kx/mor1kx_start.c @@ -30,7 +30,7 @@ #include -#include "up_internal.h" +#include "or1k_internal.h" #include "mor1kx_start.h" /**************************************************************************** @@ -113,7 +113,7 @@ void __start(void) /* Bring up some serial support early for debug support */ - up_earlyserialinit(); + or1k_earlyserialinit(); /* Start NuttX */ diff --git a/arch/or1k/src/mor1kx/up_irq.c b/arch/or1k/src/mor1kx/or1k_irq.c similarity index 97% rename from arch/or1k/src/mor1kx/up_irq.c rename to arch/or1k/src/mor1kx/or1k_irq.c index 205cd7062ad..fc8e1f3b4e0 100644 --- a/arch/or1k/src/mor1kx/up_irq.c +++ b/arch/or1k/src/mor1kx/or1k_irq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/mor1kx/up_irq.c + * arch/or1k/src/mor1kx/or1k_irq.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include #include -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Public Functions @@ -103,14 +103,14 @@ void up_enable_irq(int irq) } /**************************************************************************** - * Name: up_ack_irq + * Name: or1k_ack_irq * * Description: * Acknowledge the IRQ * ****************************************************************************/ -void up_ack_irq(int irq) +void or1k_ack_irq(int irq) { if (irq <= 31) { diff --git a/arch/or1k/src/mor1kx/up_vectortab.S b/arch/or1k/src/mor1kx/or1k_vectortab.S similarity index 99% rename from arch/or1k/src/mor1kx/up_vectortab.S rename to arch/or1k/src/mor1kx/or1k_vectortab.S index 807ab4158d1..eec99e8adbe 100644 --- a/arch/or1k/src/mor1kx/up_vectortab.S +++ b/arch/or1k/src/mor1kx/or1k_vectortab.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/or1k/src/mor1kx/up_vectortab.S + * arch/or1k/src/mor1kx/or1k_vectortab.S * * Copyright (C) 2018 Extent3D. All rights reserved. * Author: Matt Thompson @@ -392,7 +392,7 @@ _handler_entry: l.addi r4,r1,0; - l.jal up_doirq; + l.jal or1k_doirq; l.nop; //l.ori r1,r2,0; diff --git a/arch/renesas/src/common/up_allocateheap.c b/arch/renesas/src/common/renesas_allocateheap.c similarity index 97% rename from arch/renesas/src/common/up_allocateheap.c rename to arch/renesas/src/common/renesas_allocateheap.c index 548c09335d0..2b22f27f6fb 100644 --- a/arch/renesas/src/common/up_allocateheap.c +++ b/arch/renesas/src/common/renesas_allocateheap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/renesas/src/common/up_allocateheap.c + * arch/renesas/src/common/renesas_allocateheap.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/renesas/src/common/up_assert.c b/arch/renesas/src/common/renesas_assert.c similarity index 97% rename from arch/renesas/src/common/up_assert.c rename to arch/renesas/src/common/renesas_assert.c index ee632cbaf6d..ea776412d6a 100644 --- a/arch/renesas/src/common/up_assert.c +++ b/arch/renesas/src/common/renesas_assert.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/renesas/src/common/up_assert.c + * arch/renesas/src/common/renesas_assert.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -40,7 +40,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -145,7 +145,7 @@ void up_assert(const char *filename, int lineno) filename, lineno); #endif - up_dumpstate(); + renesas_dumpstate(); #ifdef CONFIG_ARCH_USBDUMP /* Dump USB trace data */ diff --git a/arch/renesas/src/common/up_blocktask.c b/arch/renesas/src/common/renesas_blocktask.c similarity index 95% rename from arch/renesas/src/common/up_blocktask.c rename to arch/renesas/src/common/renesas_blocktask.c index 83221fcb889..01a3342f667 100644 --- a/arch/renesas/src/common/up_blocktask.c +++ b/arch/renesas/src/common/renesas_blocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/renesas/src/common/up_blocktask.c + * arch/renesas/src/common/renesas_blocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Public Functions @@ -67,7 +67,7 @@ void up_block_task(struct tcb_s *rtcb) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + renesas_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. @@ -115,6 +115,6 @@ void up_block_task(struct tcb_s *rtcb) /* Then switch contexts */ - up_fullcontextrestore(rtcb->xcp.regs); + renesas_fullcontextrestore(rtcb->xcp.regs); } } diff --git a/arch/renesas/src/common/up_createstack.c b/arch/renesas/src/common/renesas_createstack.c similarity index 98% rename from arch/renesas/src/common/up_createstack.c rename to arch/renesas/src/common/renesas_createstack.c index 19678c14ec9..8544010ed1a 100644 --- a/arch/renesas/src/common/up_createstack.c +++ b/arch/renesas/src/common/renesas_createstack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/renesas/src/common/up_createstack.c + * arch/renesas/src/common/renesas_createstack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -36,7 +36,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Private Types diff --git a/arch/renesas/src/common/up_doirq.c b/arch/renesas/src/common/renesas_doirq.c similarity index 97% rename from arch/renesas/src/common/up_doirq.c rename to arch/renesas/src/common/renesas_doirq.c index 885a81534fb..3e97d436e63 100644 --- a/arch/renesas/src/common/up_doirq.c +++ b/arch/renesas/src/common/renesas_doirq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/renesas/src/common/up_doirq.c + * arch/renesas/src/common/renesas_doirq.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" #include "group/group.h" /**************************************************************************** @@ -55,7 +55,7 @@ * Public Functions ****************************************************************************/ -uint32_t *up_doirq(int irq, uint32_t * regs) +uint32_t *renesas_doirq(int irq, uint32_t * regs) { board_autoled_on(LED_INIRQ); #ifdef CONFIG_SUPPRESS_INTERRUPTS diff --git a/arch/renesas/src/common/up_exit.c b/arch/renesas/src/common/renesas_exit.c similarity index 97% rename from arch/renesas/src/common/up_exit.c rename to arch/renesas/src/common/renesas_exit.c index 6d78ba4dccd..319667c0c06 100644 --- a/arch/renesas/src/common/up_exit.c +++ b/arch/renesas/src/common/renesas_exit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/renesas/src/common/up_exit.c + * arch/renesas/src/common/renesas_exit.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -36,7 +36,7 @@ #include "task/task.h" #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -145,5 +145,5 @@ void up_exit(int status) /* Then switch contexts */ - up_fullcontextrestore(tcb->xcp.regs); + renesas_fullcontextrestore(tcb->xcp.regs); } diff --git a/arch/renesas/src/common/up_idle.c b/arch/renesas/src/common/renesas_idle.c similarity index 97% rename from arch/renesas/src/common/up_idle.c rename to arch/renesas/src/common/renesas_idle.c index c7488dfe603..7d9ebed26e2 100644 --- a/arch/renesas/src/common/up_idle.c +++ b/arch/renesas/src/common/renesas_idle.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/renesas/src/common/up_idle.c + * arch/renesas/src/common/renesas_idle.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -25,7 +25,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/renesas/src/common/up_initialize.c b/arch/renesas/src/common/renesas_initialize.c similarity index 95% rename from arch/renesas/src/common/up_initialize.c rename to arch/renesas/src/common/renesas_initialize.c index 41accf06b8e..de395e4e4b1 100644 --- a/arch/renesas/src/common/up_initialize.c +++ b/arch/renesas/src/common/renesas_initialize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/renesas/src/common/up_initialize.c + * arch/renesas/src/common/renesas_initialize.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -26,7 +26,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Public Data @@ -76,15 +76,15 @@ void up_initialize(void) /* Initialize the serial device driver */ #ifdef USE_SERIALDRIVER - up_serialinit(); + renesas_serialinit(); #endif /* Initialize the network */ - up_netinitialize(); + renesas_netinitialize(); /* Initialize USB */ - up_usbinitialize(); + renesas_usbinitialize(); board_autoled_on(LED_IRQSENABLED); } diff --git a/arch/renesas/src/common/up_internal.h b/arch/renesas/src/common/renesas_internal.h similarity index 79% rename from arch/renesas/src/common/up_internal.h rename to arch/renesas/src/common/renesas_internal.h index 21c35248602..270b6745825 100644 --- a/arch/renesas/src/common/up_internal.h +++ b/arch/renesas/src/common/renesas_internal.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/renesas/src/common/up_internal.h + * arch/renesas/src/common/renesas_internal.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -87,7 +87,7 @@ #define STACK_ALIGN_DOWN(a) ((a) & ~STACK_ALIGN_MASK) #define STACK_ALIGN_UP(a) (((a) + STACK_ALIGN_MASK) & ~STACK_ALIGN_MASK) -#define up_savestate(regs) up_copystate(regs, (uint32_t *)g_current_regs) +#define renesas_savestate(regs) renesas_copystate(regs, (uint32_t *)g_current_regs) #define getreg8(a) (*(volatile uint8_t *)(a)) #define putreg8(v,a) (*(volatile uint8_t *)(a) = (v)) @@ -130,73 +130,73 @@ extern uint32_t g_idle_topstack; /* Defined in files with the same name as the function */ -void up_copystate(uint32_t *dest, uint32_t *src); -void up_dataabort(uint32_t *regs); -void up_decodeirq(uint32_t *regs); -uint32_t *up_doirq(int irq, uint32_t *regs); -void up_fullcontextrestore(uint32_t *regs) noreturn_function; -void up_prefetchabort(uint32_t *regs); -void up_sigdeliver(void); -void up_syscall(uint32_t *regs); -void up_undefinedinsn(uint32_t *regs); -void up_lowputc(char ch); -void up_lowputs(const char *str); +void renesas_copystate(uint32_t *dest, uint32_t *src); +void renesas_dataabort(uint32_t *regs); +void renesas_decodeirq(uint32_t *regs); +uint32_t *renesas_doirq(int irq, uint32_t *regs); +void renesas_fullcontextrestore(uint32_t *regs) noreturn_function; +void renesas_prefetchabort(uint32_t *regs); +void renesas_sigdeliver(void); +void renesas_syscall(uint32_t *regs); +void renesas_undefinedinsn(uint32_t *regs); +void renesas_lowputc(char ch); +void renesas_lowputs(const char *str); /* Defined in xyz_vectors.S */ -void up_vectorundefinsn(void); -void up_vectorswi(void); -void up_vectorprefetch(void); -void up_vectordata(void); -void up_vectoraddrexcptn(void); -void up_vectorirq(void); -void up_vectorfiq(void); +void renesas_vectorundefinsn(void); +void renesas_vectorswi(void); +void renesas_vectorprefetch(void); +void renesas_vectordata(void); +void renesas_vectoraddrexcptn(void); +void renesas_vectorirq(void); +void renesas_vectorfiq(void); /* Defined in xyz_serial.c */ #ifdef USE_EARLYSERIALINIT -void up_earlyconsoleinit(void); +void renesas_earlyconsoleinit(void); #endif #ifdef USE_SERIALDRIVER -void up_consoleinit(void); -void up_serialinit(void); +void renesas_consoleinit(void); +void renesas_serialinit(void); #endif /* Defined in board/xyz_lcd.c */ #ifdef CONFIG_SLCD_CONSOLE -void up_lcdinit(void); -void up_lcdputc(char ch); +void renesas_lcdinit(void); +void renesas_lcdputc(char ch); #else -# define up_lcdinit() -# define up_lcdputc(ch) +# define renesas_lcdinit() +# define renesas_lcdputc(ch) #endif /* Defined in board/xyz_network.c */ #if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) -void up_netinitialize(void); +void renesas_netinitialize(void); #else -# define up_netinitialize() +# define renesas_netinitialize() #endif /* USB */ #ifdef CONFIG_USBDEV -void up_usbinitialize(void); -void up_usbuninitialize(void); +void renesas_usbinitialize(void); +void renesas_usbuninitialize(void); #else -# define up_usbinitialize() -# define up_usbuninitialize() +# define renesas_usbinitialize() +# define renesas_usbuninitialize() #endif /* Defined in chip-specific logic */ #ifdef CONFIG_ARCH_STACKDUMP -void up_dumpstate(void); +void renesas_dumpstate(void); #else -# define up_dumpstate() +# define renesas_dumpstate() #endif #endif /* __ASSEMBLY__ */ diff --git a/arch/renesas/src/common/renesas_lowputs.c b/arch/renesas/src/common/renesas_lowputs.c new file mode 100644 index 00000000000..1e7d0218f01 --- /dev/null +++ b/arch/renesas/src/common/renesas_lowputs.c @@ -0,0 +1,59 @@ +/**************************************************************************** + * arch/renesas/src/common/renesas_lowputs.c + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include "renesas_internal.h" + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: renesas_lowputs + * + * Description: + * This is a low-level helper function used to support debug. + * + ****************************************************************************/ + +void renesas_lowputs(const char *str) +{ + while (*str) + { + renesas_lowputc(*str++); + } +} diff --git a/arch/renesas/src/common/renesas_mdelay.c b/arch/renesas/src/common/renesas_mdelay.c new file mode 100644 index 00000000000..6ab885bd1fd --- /dev/null +++ b/arch/renesas/src/common/renesas_mdelay.c @@ -0,0 +1,75 @@ +/**************************************************************************** + * arch/renesas/src/common/renesas_mdelay.c + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/**************************************************************************** + * Private Function Prototypes + ****************************************************************************/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_mdelay + * + * Description: + * Delay inline for the requested number of milliseconds. + * *** NOT multi-tasking friendly *** + * + * ASSUMPTIONS: + * The setting CONFIG_BOARD_LOOPSPERMSEC has been calibrated + * + ****************************************************************************/ + +void up_mdelay(unsigned int milliseconds) +{ + volatile int i; + volatile int j; + + for (i = 0; i < milliseconds; i++) + { + for (j = 0; j < CONFIG_BOARD_LOOPSPERMSEC; j++) + { + } + } +} diff --git a/arch/renesas/src/common/renesas_nputs.c b/arch/renesas/src/common/renesas_nputs.c new file mode 100644 index 00000000000..7cc07eb6f02 --- /dev/null +++ b/arch/renesas/src/common/renesas_nputs.c @@ -0,0 +1,58 @@ +/**************************************************************************** + * arch/renesas/src/common/renesas_nputs.c + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_nputs + * + * Description: + * This is a low-level helper function used to support debug. + * + ****************************************************************************/ + +void up_nputs(const char *str, size_t len) +{ + while (len-- > 0 && *str) + { + up_putc(*str++); + } +} diff --git a/arch/renesas/src/common/up_releasepending.c b/arch/renesas/src/common/renesas_releasepending.c similarity index 95% rename from arch/renesas/src/common/up_releasepending.c rename to arch/renesas/src/common/renesas_releasepending.c index 42c44c950ff..7b50a713d00 100644 --- a/arch/renesas/src/common/up_releasepending.c +++ b/arch/renesas/src/common/renesas_releasepending.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/renesas/src/common/up_releasepending.c + * arch/renesas/src/common/renesas_releasepending.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Public Functions @@ -74,7 +74,7 @@ void up_release_pending(void) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + renesas_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. @@ -122,7 +122,7 @@ void up_release_pending(void) /* Then switch contexts */ - up_fullcontextrestore(rtcb->xcp.regs); + renesas_fullcontextrestore(rtcb->xcp.regs); } } } diff --git a/arch/renesas/src/common/up_releasestack.c b/arch/renesas/src/common/renesas_releasestack.c similarity index 97% rename from arch/renesas/src/common/up_releasestack.c rename to arch/renesas/src/common/renesas_releasestack.c index 0d440d4c70d..2c9ca5020d3 100644 --- a/arch/renesas/src/common/up_releasestack.c +++ b/arch/renesas/src/common/renesas_releasestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/renesas/src/common/up_releasestack.c + * arch/renesas/src/common/renesas_releasestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Private Types diff --git a/arch/renesas/src/common/up_stackframe.c b/arch/renesas/src/common/renesas_stackframe.c similarity index 97% rename from arch/renesas/src/common/up_stackframe.c rename to arch/renesas/src/common/renesas_stackframe.c index d5f9ae8c32f..f683a1f6fec 100644 --- a/arch/renesas/src/common/up_stackframe.c +++ b/arch/renesas/src/common/renesas_stackframe.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/renesas/src/common/up_stackframe.c + * arch/renesas/src/common/renesas_stackframe.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/renesas/src/common/up_udelay.c b/arch/renesas/src/common/renesas_udelay.c similarity index 98% rename from arch/renesas/src/common/up_udelay.c rename to arch/renesas/src/common/renesas_udelay.c index 2d9c35ec12d..ed64499d4c2 100644 --- a/arch/renesas/src/common/up_udelay.c +++ b/arch/renesas/src/common/renesas_udelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/renesas/src/common/up_udelay.c + * arch/renesas/src/common/renesas_udelay.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/x86/src/common/up_unblocktask.c b/arch/renesas/src/common/renesas_unblocktask.c similarity index 90% rename from arch/x86/src/common/up_unblocktask.c rename to arch/renesas/src/common/renesas_unblocktask.c index 5003675cad2..c86a26aeb8d 100644 --- a/arch/x86/src/common/up_unblocktask.c +++ b/arch/renesas/src/common/renesas_unblocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/common/up_unblocktask.c + * arch/renesas/src/common/renesas_unblocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include "sched/sched.h" #include "group/group.h" #include "clock/clock.h" -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Public Functions @@ -67,7 +67,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + renesas_savestate(rtcb->xcp.regs); /* Update scheduler parameters */ @@ -77,13 +77,13 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * changes will be made when the interrupt returns. */ - up_restorestate(tcb->xcp.regs); + g_current_regs = tcb->xcp.regs; } /* We are not in an interrupt handler. Copy the user C context * into the TCB of the task that was previously active. if - * up_saveusercontext returns a non-zero value, then this is really the - * previously running task restarting! + * up_saveusercontext returns a non-zero value, then this + * is really the previously running task restarting! */ else if (!up_saveusercontext(rtcb->xcp.regs)) @@ -103,6 +103,6 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) /* Then switch contexts */ - up_fullcontextrestore(tcb->xcp.regs); + renesas_fullcontextrestore(tcb->xcp.regs); } } diff --git a/arch/renesas/src/common/up_usestack.c b/arch/renesas/src/common/renesas_usestack.c similarity index 98% rename from arch/renesas/src/common/up_usestack.c rename to arch/renesas/src/common/renesas_usestack.c index db2987a7650..55dda421bb0 100644 --- a/arch/renesas/src/common/up_usestack.c +++ b/arch/renesas/src/common/renesas_usestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/renesas/src/common/up_usestack.c + * arch/renesas/src/common/renesas_usestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/renesas/src/m16c/Make.defs b/arch/renesas/src/m16c/Make.defs index a59716ca3ff..56835468e96 100644 --- a/arch/renesas/src/m16c/Make.defs +++ b/arch/renesas/src/m16c/Make.defs @@ -20,11 +20,11 @@ HEAD_ASRC = m16c_head.S -CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c -CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c -CMN_CSRCS += up_lowputs.c up_mdelay.c up_nputs.c -CMN_CSRCS += up_releasepending.c up_releasestack.c -CMN_CSRCS += up_stackframe.c up_udelay.c up_unblocktask.c up_usestack.c +CMN_CSRCS = renesas_allocateheap.c renesas_assert.c renesas_blocktask.c +CMN_CSRCS += renesas_createstack.c renesas_doirq.c renesas_exit.c renesas_idle.c renesas_initialize.c +CMN_CSRCS += renesas_lowputs.c renesas_mdelay.c renesas_nputs.c +CMN_CSRCS += renesas_releasepending.c renesas_releasestack.c +CMN_CSRCS += renesas_stackframe.c renesas_udelay.c renesas_unblocktask.c renesas_usestack.c CHIP_ASRCS = m16c_vectors.S CHIP_CSRCS = m16c_initialstate.c m16c_copystate.c m16c_lowputc.c m16c_irq.c diff --git a/arch/renesas/src/m16c/m16c_copystate.c b/arch/renesas/src/m16c/m16c_copystate.c index d847aa9a39a..4c5661fd052 100644 --- a/arch/renesas/src/m16c/m16c_copystate.c +++ b/arch/renesas/src/m16c/m16c_copystate.c @@ -29,7 +29,7 @@ #include -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -48,12 +48,12 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_copystate + * Name: renesas_copystate ****************************************************************************/ /* A little faster than most memcpy's */ -void up_copystate(uint32_t *dest, uint32_t *src) +void renesas_copystate(uint32_t *dest, uint32_t *src) { memcpy(dest, src, XCPTCONTEXT_SIZE); } diff --git a/arch/renesas/src/m16c/m16c_dumpstate.c b/arch/renesas/src/m16c/m16c_dumpstate.c index e4acb4a86f5..e43d9b6fffb 100644 --- a/arch/renesas/src/m16c/m16c_dumpstate.c +++ b/arch/renesas/src/m16c/m16c_dumpstate.c @@ -31,7 +31,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" #include "sched/sched.h" #include "chip.h" @@ -120,10 +120,10 @@ static inline void m16c_registerdump(void) ****************************************************************************/ /**************************************************************************** - * Name: up_dumpstate + * Name: renesas_dumpstate ****************************************************************************/ -void up_dumpstate(void) +void renesas_dumpstate(void) { FAR struct tcb_s *rtcb = running_task(); uint16_t sp = up_getsp(); diff --git a/arch/renesas/src/m16c/m16c_head.S b/arch/renesas/src/m16c/m16c_head.S index 5e386dee35b..243c2b58198 100644 --- a/arch/renesas/src/m16c/m16c_head.S +++ b/arch/renesas/src/m16c/m16c_head.S @@ -24,7 +24,7 @@ #include #include "chip.h" -#include "up_internal.h" +#include "renesas_internal.h" /************************************************************************************ * Pre-processor Definitions @@ -44,9 +44,9 @@ .macro showprogress, code #ifdef CONFIG_DEBUG_FEATURES - .globl _up_lowputc + .globl _renesas_lowputc mov.b r#\code1l /* Character to print */ - jsr.a _up_lowputc /* Print it */ + jsr.a _renesas_lowputc /* Print it */ #endif .endm @@ -230,8 +230,8 @@ __start: /* Perform early console initialization */ #ifdef USE_EARLYSERIALINIT - .globl _up_earlyconsoleinit /* Early initialization of console driver */ - jsr.a _up_earlyconsoleinit /* Call it */ + .globl _renesas_earlyconsoleinit /* Early initialization of console driver */ + jsr.a _renesas_earlyconsoleinit /* Call it */ showprogress 'D' #endif diff --git a/arch/renesas/src/m16c/m16c_initialstate.c b/arch/renesas/src/m16c/m16c_initialstate.c index 6b7e386f30b..e86717ba18a 100644 --- a/arch/renesas/src/m16c/m16c_initialstate.c +++ b/arch/renesas/src/m16c/m16c_initialstate.c @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/renesas/src/m16c/m16c_irq.c b/arch/renesas/src/m16c/m16c_irq.c index 550ab05e1a9..f54f06ef08d 100644 --- a/arch/renesas/src/m16c/m16c_irq.c +++ b/arch/renesas/src/m16c/m16c_irq.c @@ -28,7 +28,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/renesas/src/m16c/m16c_lowputc.c b/arch/renesas/src/m16c/m16c_lowputc.c index bd9004241df..0f1984ff371 100644 --- a/arch/renesas/src/m16c/m16c_lowputc.c +++ b/arch/renesas/src/m16c/m16c_lowputc.c @@ -27,7 +27,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" #include "chip.h" #include "m16c_uart.h" @@ -275,7 +275,7 @@ static inline void up_lowserialsetup(void) ****************************************************************************/ /**************************************************************************** - * Name: up_lowputc + * Name: renesas_lowputc * * Description: * Output one byte on the serial console. @@ -283,7 +283,7 @@ static inline void up_lowserialsetup(void) ****************************************************************************/ #if defined(HAVE_SERIAL) && !defined(CONFIG_SLCD_CONSOLE) -void up_lowputc(char ch) +void renesas_lowputc(char ch) { #ifdef HAVE_SERIALCONSOLE /* Wait until the transmit buffer is empty */ @@ -320,6 +320,6 @@ void up_lowsetup(void) /* The LCD is initialized here if the LCD is used for console output. */ #ifdef CONFIG_SLCD_CONSOLE - up_lcdinit(); + renesas_lcdinit(); #endif } diff --git a/arch/renesas/src/m16c/m16c_schedulesigaction.c b/arch/renesas/src/m16c/m16c_schedulesigaction.c index f1207d469ba..8de5f9145da 100644 --- a/arch/renesas/src/m16c/m16c_schedulesigaction.c +++ b/arch/renesas/src/m16c/m16c_schedulesigaction.c @@ -32,7 +32,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Public Functions @@ -123,15 +123,15 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - g_current_regs[REG_PC] = (uint32_t)up_sigdeliver >> 8; - g_current_regs[REG_PC + 1] = (uint32_t)up_sigdeliver; + g_current_regs[REG_PC] = (uint32_t)renesas_sigdeliver >> 8; + g_current_regs[REG_PC + 1] = (uint32_t)renesas_sigdeliver; g_current_regs[REG_FLG] &= ~M16C_FLG_I; /* And make sure that the saved context in the TCB * is the same as the interrupt return context. */ - up_copystate(tcb->xcp.regs, g_current_regs); + renesas_copystate(tcb->xcp.regs, g_current_regs); } } @@ -157,8 +157,8 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver >> 8; - tcb->xcp.regs[REG_PC + 1] = (uint32_t)up_sigdeliver; + tcb->xcp.regs[REG_PC] = (uint32_t)renesas_sigdeliver >> 8; + tcb->xcp.regs[REG_PC + 1] = (uint32_t)renesas_sigdeliver; tcb->xcp.regs[REG_FLG] &= ~M16C_FLG_I; } } diff --git a/arch/renesas/src/m16c/m16c_serial.c b/arch/renesas/src/m16c/m16c_serial.c index 1d0d3a8dea5..67bc75925e6 100644 --- a/arch/renesas/src/m16c/m16c_serial.c +++ b/arch/renesas/src/m16c/m16c_serial.c @@ -38,7 +38,7 @@ #include #include "chip.h" -#include "up_internal.h" +#include "renesas_internal.h" #include "m16c_uart.h" /* Is there any serial support? This might be the case if the board does @@ -1022,16 +1022,16 @@ static bool up_txready(struct uart_dev_s *dev) ****************************************************************************/ /**************************************************************************** - * Name: up_earlyconsoleinit + * Name: renesas_earlyconsoleinit * * Description: * Performs the low level UART initialization early in * debug so that the serial console will be available - * during bootup. This must be called before up_consoleinit. + * during bootup. This must be called before renesas_consoleinit. * ****************************************************************************/ -void up_earlyconsoleinit(void) +void renesas_earlyconsoleinit(void) { /* NOTE: All GPIO configuration for the UARTs was performed in * up_lowsetup @@ -1058,15 +1058,15 @@ void up_earlyconsoleinit(void) } /**************************************************************************** - * Name: up_consoleinit + * Name: renesas_consoleinit * * Description: * Register serial console and serial ports. This assumes - * that up_earlyconsoleinit was called previously. + * that renesas_earlyconsoleinit was called previously. * ****************************************************************************/ -void up_consoleinit(void) +void renesas_consoleinit(void) { /* Register the console */ @@ -1141,10 +1141,10 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + renesas_lowputc('\r'); } - up_lowputc(ch); + renesas_lowputc(ch); #endif return ch; } diff --git a/arch/renesas/src/m16c/m16c_sigdeliver.c b/arch/renesas/src/m16c/m16c_sigdeliver.c index 3ccc5a83b9e..52cd6703af3 100644 --- a/arch/renesas/src/m16c/m16c_sigdeliver.c +++ b/arch/renesas/src/m16c/m16c_sigdeliver.c @@ -34,14 +34,14 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_sigdeliver + * Name: renesas_sigdeliver * * Description: * This is the a signal handling trampoline. When a signal action was @@ -50,7 +50,7 @@ * ****************************************************************************/ -void up_sigdeliver(void) +void renesas_sigdeliver(void) { struct tcb_s *rtcb = this_task(); uint8_t regs[XCPTCONTEXT_SIZE]; @@ -63,7 +63,7 @@ void up_sigdeliver(void) /* Save the return state on the stack. */ - up_copystate(regs, rtcb->xcp.regs); + renesas_copystate(regs, rtcb->xcp.regs); #ifndef CONFIG_SUPPRESS_INTERRUPTS /* Then make sure that interrupts are enabled. Signal handlers must always @@ -105,5 +105,5 @@ void up_sigdeliver(void) */ board_autoled_off(LED_SIGNAL); - up_fullcontextrestore(regs); + renesas_fullcontextrestore(regs); } diff --git a/arch/renesas/src/m16c/m16c_timerisr.c b/arch/renesas/src/m16c/m16c_timerisr.c index ccd40caaa45..9e64d468bce 100644 --- a/arch/renesas/src/m16c/m16c_timerisr.c +++ b/arch/renesas/src/m16c/m16c_timerisr.c @@ -32,7 +32,7 @@ #include #include "clock/clock.h" -#include "up_internal.h" +#include "renesas_internal.h" #include "chip.h" #include "m16c_timer.h" diff --git a/arch/renesas/src/m16c/m16c_vectors.S b/arch/renesas/src/m16c/m16c_vectors.S index d1f3f926a4b..0f9fce190e1 100644 --- a/arch/renesas/src/m16c/m16c_vectors.S +++ b/arch/renesas/src/m16c/m16c_vectors.S @@ -338,13 +338,13 @@ _m16c_commonvector: ldipl #M16C_INTERRUPT_IPL /* Set interrupt level */ #endif -/* Then call _up_doirq with r1=IRQ number, r2=address of context info. At this +/* Then call _renesas_doirq with r1=IRQ number, r2=address of context info. At this * point, the interrupt stack holds the address of the last byte of the context * info array */ stc isp, r2 /* R2 = address of base of context info */ - jsr.a _up_doirq + jsr.a _renesas_doirq #ifdef M16C_INTERRUPT_IPL fclr i /* Disable interrupts */ @@ -441,7 +441,7 @@ _m16c_contextsave: .size _up_saveusercontext, .-_up_saveusercontext /************************************************************************************ - * Name: void up_fullcontextrestore(uint32_t *regs) + * Name: void renesas_fullcontextrestore(uint32_t *regs) * * Description: * Restore the context of the using the provided register save array. @@ -454,10 +454,10 @@ _m16c_contextsave: * ************************************************************************************/ - .globl _up_fullcontextrestore - .type _up_fullcontextrestore, #function + .globl _renesas_fullcontextrestore + .type _renesas_fullcontextrestore, #function -_up_fullcontextrestore: +_renesas_fullcontextrestore: int #32 /* Execute S/W interrupt 32 */ rts /* and return */ @@ -504,5 +504,5 @@ _m16c_contextrestore: /* The return from interrupt */ reit /* Return from interrupt */ - .size _up_fullcontextrestore, .-_up_fullcontextrestore + .size _renesas_fullcontextrestore, .-_renesas_fullcontextrestore .end diff --git a/arch/renesas/src/rx65n/Make.defs b/arch/renesas/src/rx65n/Make.defs index 042c7091af3..8f41f3cb80b 100644 --- a/arch/renesas/src/rx65n/Make.defs +++ b/arch/renesas/src/rx65n/Make.defs @@ -20,11 +20,11 @@ HEAD_ASRC = rx65n_head.S -CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c -CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c -CMN_CSRCS += up_lowputs.c up_mdelay.c up_nputs.c -CMN_CSRCS += up_releasepending.c up_releasestack.c -CMN_CSRCS += up_stackframe.c up_udelay.c up_unblocktask.c up_usestack.c +CMN_CSRCS = renesas_allocateheap.c renesas_assert.c renesas_blocktask.c +CMN_CSRCS += renesas_createstack.c renesas_doirq.c renesas_exit.c renesas_idle.c renesas_initialize.c +CMN_CSRCS += renesas_lowputs.c renesas_mdelay.c renesas_nputs.c +CMN_CSRCS += renesas_releasepending.c renesas_releasestack.c +CMN_CSRCS += renesas_stackframe.c renesas_udelay.c renesas_unblocktask.c renesas_usestack.c CHIP_ASRCS = rx65n_vector.S CHIP_CSRCS = rx65n_lowputc.c rx65n_serial.c rx65n_copystate.c rx65n_irq.c diff --git a/arch/renesas/src/rx65n/rx65n_copystate.c b/arch/renesas/src/rx65n/rx65n_copystate.c index e1a331b8cda..d2d3377b5df 100644 --- a/arch/renesas/src/rx65n/rx65n_copystate.c +++ b/arch/renesas/src/rx65n/rx65n_copystate.c @@ -29,19 +29,19 @@ #include -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_copystate + * Name: renesas_copystate ****************************************************************************/ /* A little faster than most memcpy's */ -void up_copystate(uint32_t *dest, uint32_t *src) +void renesas_copystate(uint32_t *dest, uint32_t *src) { memcpy(dest, src, XCPTCONTEXT_SIZE); } diff --git a/arch/renesas/src/rx65n/rx65n_dtc.c b/arch/renesas/src/rx65n/rx65n_dtc.c index efb637eefc2..4a8f93a8f27 100644 --- a/arch/renesas/src/rx65n/rx65n_dtc.c +++ b/arch/renesas/src/rx65n/rx65n_dtc.c @@ -34,7 +34,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" #include "chip.h" #include "rx65n_definitions.h" #include "rx65n_dtc.h" diff --git a/arch/renesas/src/rx65n/rx65n_dumpstate.c b/arch/renesas/src/rx65n/rx65n_dumpstate.c index 2596b8f257e..a10d4cde958 100644 --- a/arch/renesas/src/rx65n/rx65n_dumpstate.c +++ b/arch/renesas/src/rx65n/rx65n_dumpstate.c @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" #include "sched/sched.h" #include "chip.h" #include "arch/rx65n/irq.h" @@ -130,10 +130,10 @@ static inline void rx65n_registerdump(void) ****************************************************************************/ /**************************************************************************** - * Name: up_dumpstate + * Name: renesas_dumpstate ****************************************************************************/ -void up_dumpstate(void) +void renesas_dumpstate(void) { FAR struct tcb_s *rtcb = running_task(); uint32_t sp = up_getsp(); diff --git a/arch/renesas/src/rx65n/rx65n_eth.c b/arch/renesas/src/rx65n/rx65n_eth.c index 2249dde644f..e4eceada32f 100644 --- a/arch/renesas/src/rx65n/rx65n_eth.c +++ b/arch/renesas/src/rx65n/rx65n_eth.c @@ -54,7 +54,7 @@ # include #endif -#include "up_internal.h" +#include "renesas_internal.h" #include "chip.h" #include "rx65n_definitions.h" #include "rx65n_eth.h" @@ -3985,13 +3985,13 @@ int rx65n_ethinitialize(int intf) } /**************************************************************************** - * Function: up_netinitialize + * Function: renesas_netinitialize * * Description: * This is the "standard" network initialization logic called from the * low-level initialization logic in up_initialize.c. If RX65N_NETHERNET * greater than one, then board specific logic will have to supply a - * version of up_netinitialize() that calls rx65n_ethinitialize() with + * version of renesas_netinitialize() that calls rx65n_ethinitialize() with * the appropriate interface number. * * Input Parameters: @@ -4005,7 +4005,7 @@ int rx65n_ethinitialize(int intf) ****************************************************************************/ #if defined (CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) -void up_netinitialize(void) +void renesas_netinitialize(void) { int ret; diff --git a/arch/renesas/src/rx65n/rx65n_hardware_setup.c b/arch/renesas/src/rx65n/rx65n_hardware_setup.c index 25580e258df..ce4ae30c12e 100644 --- a/arch/renesas/src/rx65n/rx65n_hardware_setup.c +++ b/arch/renesas/src/rx65n/rx65n_hardware_setup.c @@ -28,7 +28,7 @@ #include "rx65n_port.h" #include "rx65n_sci.h" #include "chip.h" -#include "up_internal.h" +#include "renesas_internal.h" #include "rx65n_definitions.h" /**************************************************************************** diff --git a/arch/renesas/src/rx65n/rx65n_head.S b/arch/renesas/src/rx65n/rx65n_head.S index f765fa6de49..9f60ac8cd07 100644 --- a/arch/renesas/src/rx65n/rx65n_head.S +++ b/arch/renesas/src/rx65n/rx65n_head.S @@ -26,7 +26,7 @@ #include /* Board-specific settings */ #include /* IRQ definitions */ #include "chip.h" /* Chip-specific settings */ -#include "up_internal.h" +#include "renesas_internal.h" /***************************************************************************** * Pre-processor Definitions @@ -40,13 +40,13 @@ .globl _up_lowsetup /* Early initialization of UART */ #ifdef USE_EARLYSERIALINIT - .globl _up_earlyconsoleinit /* Early initialization of console driver */ + .globl _renesas_earlyconsoleinit /* Early initialization of console driver */ #endif #ifdef CONFIG_ARCH_LEDS .globl _board_autoled_initialize /* Boot LED setup */ #endif #ifdef CONFIG_DEBUG_FEATURES - .globl _up_lowputc /* Low-level debug output */ + .globl _renesas_lowputc /* Low-level debug output */ #endif .globl _nx_start /* NuttX entry point */ @@ -79,7 +79,7 @@ .macro showprogress, code #ifdef CONFIG_DEBUG_FEATURES - mov.l #_up_lowputc, r13 /* Address of up_earlyconsoleinit */ + mov.l #_renesas_lowputc, r13 /* Address of renesas_earlyconsoleinit */ mov #\code, r1 jsr r13 /* Call it */ #endif @@ -138,8 +138,8 @@ __start: jsr r15 /* Call up_lowsetup */ nop #ifdef USE_EARLYSERIALINIT - mov.l #_up_earlyconsoleinit, r14 - jsr r14 /* Call up_earlyconsoleinit */ + mov.l #_renesas_earlyconsoleinit, r14 + jsr r14 /* Call renesas_earlyconsoleinit */ nop #endif bsr.a _nx_start diff --git a/arch/renesas/src/rx65n/rx65n_initialstate.c b/arch/renesas/src/rx65n/rx65n_initialstate.c index 65a3b938efd..4e09d2667b2 100644 --- a/arch/renesas/src/rx65n/rx65n_initialstate.c +++ b/arch/renesas/src/rx65n/rx65n_initialstate.c @@ -29,7 +29,7 @@ #include #include "chip/chip.h" -#include "up_internal.h" +#include "renesas_internal.h" #include "arch/rx65n/irq.h" /**************************************************************************** diff --git a/arch/renesas/src/rx65n/rx65n_irq.c b/arch/renesas/src/rx65n/rx65n_irq.c index 668fd1e6a85..2621fc3c26f 100644 --- a/arch/renesas/src/rx65n/rx65n_irq.c +++ b/arch/renesas/src/rx65n/rx65n_irq.c @@ -28,7 +28,7 @@ #include #include #include "arch/rx65n/iodefine.h" -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/renesas/src/rx65n/rx65n_lowputc.c b/arch/renesas/src/rx65n/rx65n_lowputc.c index 4f6c2907a46..6447d1389d4 100644 --- a/arch/renesas/src/rx65n/rx65n_lowputc.c +++ b/arch/renesas/src/rx65n/rx65n_lowputc.c @@ -28,7 +28,7 @@ #include #include "chip.h" -#include "up_internal.h" +#include "renesas_internal.h" #include "rx65n_definitions.h" /**************************************************************************** @@ -175,14 +175,14 @@ static inline int up_txready(void) ****************************************************************************/ /**************************************************************************** - * Name: up_lowputc + * Name: renesas_lowputc * * Description: * Output one byte on the serial console * ****************************************************************************/ -void up_lowputc(char ch) +void renesas_lowputc(char ch) { #ifdef HAVE_CONSOLE uint8_t ssr; diff --git a/arch/renesas/src/rx65n/rx65n_riic.c b/arch/renesas/src/rx65n/rx65n_riic.c index c7a6f57d1b7..2643ea302c7 100644 --- a/arch/renesas/src/rx65n/rx65n_riic.c +++ b/arch/renesas/src/rx65n/rx65n_riic.c @@ -35,7 +35,7 @@ #include #include #include -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ diff --git a/arch/renesas/src/rx65n/rx65n_rspi.c b/arch/renesas/src/rx65n/rx65n_rspi.c index c625ef075f6..c4d92ba154d 100644 --- a/arch/renesas/src/rx65n/rx65n_rspi.c +++ b/arch/renesas/src/rx65n/rx65n_rspi.c @@ -39,7 +39,7 @@ #include -#include "up_internal.h" +#include "renesas_internal.h" #include "chip.h" #include "rx65n_definitions.h" #include "rx65n_rspi.h" diff --git a/arch/renesas/src/rx65n/rx65n_rspi_sw.c b/arch/renesas/src/rx65n/rx65n_rspi_sw.c index e20d836cde8..136b2b1c802 100644 --- a/arch/renesas/src/rx65n/rx65n_rspi_sw.c +++ b/arch/renesas/src/rx65n/rx65n_rspi_sw.c @@ -39,7 +39,7 @@ #include -#include "up_internal.h" +#include "renesas_internal.h" #include "chip.h" #include "rx65n_definitions.h" #include "rx65n_rspi.h" diff --git a/arch/renesas/src/rx65n/rx65n_rtc.c b/arch/renesas/src/rx65n/rx65n_rtc.c index 2f7db40e077..17164ce6167 100644 --- a/arch/renesas/src/rx65n/rx65n_rtc.c +++ b/arch/renesas/src/rx65n/rx65n_rtc.c @@ -35,7 +35,7 @@ #include #include #include -#include "up_internal.h" +#include "renesas_internal.h" #include "nuttx/compiler.h" #ifdef CONFIG_RX65N_RTC diff --git a/arch/renesas/src/rx65n/rx65n_rtc_lowerhalf.c b/arch/renesas/src/rx65n/rx65n_rtc_lowerhalf.c index e949d455ab4..d305cbd21a3 100644 --- a/arch/renesas/src/rx65n/rx65n_rtc_lowerhalf.c +++ b/arch/renesas/src/rx65n/rx65n_rtc_lowerhalf.c @@ -34,7 +34,7 @@ #include #include "chip.h" #include -#include "up_internal.h" +#include "renesas_internal.h" #ifdef CONFIG_RTC_DRIVER diff --git a/arch/renesas/src/rx65n/rx65n_schedulesigaction.c b/arch/renesas/src/rx65n/rx65n_schedulesigaction.c index 83eb5f719d5..96efb0a4863 100644 --- a/arch/renesas/src/rx65n/rx65n_schedulesigaction.c +++ b/arch/renesas/src/rx65n/rx65n_schedulesigaction.c @@ -32,7 +32,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Public Functions @@ -122,14 +122,14 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - g_current_regs[REG_PC] = (uint32_t)up_sigdeliver; + g_current_regs[REG_PC] = (uint32_t)renesas_sigdeliver; g_current_regs[REG_PSW] |= 0x00030000; /* And make sure that the saved context in the TCB * is the same as the interrupt return context. */ - up_copystate(tcb->xcp.regs, (uint32_t *)g_current_regs); + renesas_copystate(tcb->xcp.regs, (uint32_t *)g_current_regs); } } @@ -154,7 +154,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver; + tcb->xcp.regs[REG_PC] = (uint32_t)renesas_sigdeliver; tcb->xcp.regs[REG_PSW] |= 0x00030000; } } diff --git a/arch/renesas/src/rx65n/rx65n_sci.c b/arch/renesas/src/rx65n/rx65n_sci.c index 5c5cee5fab2..899fe37a44a 100644 --- a/arch/renesas/src/rx65n/rx65n_sci.c +++ b/arch/renesas/src/rx65n/rx65n_sci.c @@ -27,7 +27,7 @@ #include "rx65n_macrodriver.h" #include "rx65n_sci.h" #include "chip.h" -#include "up_internal.h" +#include "renesas_internal.h" #include "rx65n_definitions.h" #include "arch/board/rx65n_gpio.h" diff --git a/arch/renesas/src/rx65n/rx65n_serial.c b/arch/renesas/src/rx65n/rx65n_serial.c index 9734a58f55c..b6a846fc82b 100644 --- a/arch/renesas/src/rx65n/rx65n_serial.c +++ b/arch/renesas/src/rx65n/rx65n_serial.c @@ -40,7 +40,7 @@ #include "rx65n_macrodriver.h" #include "arch/rx65n/iodefine.h" #include "chip.h" -#include "up_internal.h" +#include "renesas_internal.h" #include "rx65n_definitions.h" #include "rx65n_sci.h" #include "arch/rx65n/irq.h" @@ -1509,16 +1509,16 @@ static bool up_txready(struct uart_dev_s *dev) ****************************************************************************/ /**************************************************************************** - * Name: up_earlyconsoleinit + * Name: renesas_earlyconsoleinit * * Description: * Performs the low level SCI initialization early in * debug so that the serial console will be available - * during bootup. This must be called before up_consoleinit. + * during bootup. This must be called before renesas_consoleinit. * ****************************************************************************/ -void up_earlyconsoleinit(void) +void renesas_earlyconsoleinit(void) { /* NOTE: All GPIO configuration for the SCIs was performed in * up_lowsetup @@ -1575,15 +1575,15 @@ void up_earlyconsoleinit(void) } /**************************************************************************** - * Name: up_serialinit + * Name: renesas_serialinit * * Description: * Register serial console and serial ports. This assumes - * that up_earlyconsoleinit was called previously. + * that renesas_earlyconsoleinit was called previously. * ****************************************************************************/ -void up_serialinit(void) +void renesas_serialinit(void) { /* Register all SCIs */ @@ -1738,10 +1738,10 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + renesas_lowputc('\r'); } - up_lowputc(ch); + renesas_lowputc(ch); #endif return ch; } diff --git a/arch/renesas/src/rx65n/rx65n_sigdeliver.c b/arch/renesas/src/rx65n/rx65n_sigdeliver.c index 649e621be39..5c8d50b1092 100644 --- a/arch/renesas/src/rx65n/rx65n_sigdeliver.c +++ b/arch/renesas/src/rx65n/rx65n_sigdeliver.c @@ -35,14 +35,14 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_sigdeliver + * Name: renesas_sigdeliver * * Description: * This is the a signal handling trampoline. When a signal action was @@ -51,7 +51,7 @@ * ****************************************************************************/ -void up_sigdeliver(void) +void renesas_sigdeliver(void) { struct tcb_s *rtcb = this_task(); uint32_t regs[XCPTCONTEXT_REGS]; @@ -65,7 +65,7 @@ void up_sigdeliver(void) /* Save the real return state on the stack. */ - up_copystate(regs, rtcb->xcp.regs); + renesas_copystate(regs, rtcb->xcp.regs); regs[REG_PC] = rtcb->xcp.saved_pc; regs[REG_PSW] = rtcb->xcp.saved_sr; @@ -103,5 +103,5 @@ void up_sigdeliver(void) */ board_autoled_off(LED_SIGNAL); - up_fullcontextrestore(regs); + renesas_fullcontextrestore(regs); } diff --git a/arch/renesas/src/rx65n/rx65n_timerisr.c b/arch/renesas/src/rx65n/rx65n_timerisr.c index 979330556d1..a4b8148f824 100644 --- a/arch/renesas/src/rx65n/rx65n_timerisr.c +++ b/arch/renesas/src/rx65n/rx65n_timerisr.c @@ -32,7 +32,7 @@ #include #include "arch/rx65n/irq.h" #include "clock/clock.h" -#include "up_internal.h" +#include "renesas_internal.h" #include "arch/rx65n/iodefine.h" #include "chip.h" #include "rx65n_cmt.h" diff --git a/arch/renesas/src/rx65n/rx65n_usbdev.c b/arch/renesas/src/rx65n/rx65n_usbdev.c index b06ab7766de..8342f070edd 100644 --- a/arch/renesas/src/rx65n/rx65n_usbdev.c +++ b/arch/renesas/src/rx65n/rx65n_usbdev.c @@ -47,7 +47,7 @@ #include #include "chip.h" -#include "up_internal.h" +#include "renesas_internal.h" #include "rx65n_usbdev.h" /**************************************************************************** @@ -6016,14 +6016,14 @@ static int rx65n_usbinterrupt(int irq, FAR void *context, FAR void *arg) ****************************************************************************/ /**************************************************************************** - * Name: up_usbinitialize + * Name: renesas_usbinitialize * * Description: * Initialize USB hardware * ****************************************************************************/ -void up_usbinitialize(void) +void renesas_usbinitialize(void) { /* For now there is only one USB controller, but we will always refer to * it using a pointer @@ -6140,7 +6140,7 @@ void up_usbinitialize(void) } /**************************************************************************** - * Name: up_usbuninitialize + * Name: renesas_usbuninitialize * Description: * Initialize the USB driver * Input Parameters: @@ -6151,7 +6151,7 @@ void up_usbinitialize(void) * ****************************************************************************/ -void up_usbuninitialize(void) +void renesas_usbuninitialize(void) { struct rx65n_usbdev_s *priv = &g_usbdev; diff --git a/arch/renesas/src/rx65n/rx65n_usbhost.c b/arch/renesas/src/rx65n/rx65n_usbhost.c index dcfbc010988..8161f26c4ca 100644 --- a/arch/renesas/src/rx65n/rx65n_usbhost.c +++ b/arch/renesas/src/rx65n/rx65n_usbhost.c @@ -51,7 +51,7 @@ #include -#include "up_internal.h" +#include "renesas_internal.h" #include "chip.h" #include "rx65n_usbhost.h" diff --git a/arch/renesas/src/rx65n/rx65n_vector.S b/arch/renesas/src/rx65n/rx65n_vector.S index 5f7d7e9e7f9..983b3e31b96 100644 --- a/arch/renesas/src/rx65n/rx65n_vector.S +++ b/arch/renesas/src/rx65n/rx65n_vector.S @@ -25,7 +25,7 @@ #include /* NuttX configuration settings */ #include /* Board-specific settings */ #include /* IRQ definitions */ -#include "up_internal.h" +#include "renesas_internal.h" #include "arch/rx65n/iodefine.h" #include "rx65n_definitions.h" @@ -38,7 +38,7 @@ ***************************************************************************/ .section .text - .globl _up_doirq /* C interrupt processing logic */ + .globl _renesas_doirq /* C interrupt processing logic */ .section .bss .globl _up_num_irq @@ -191,8 +191,8 @@ _up_vector: #endif MOV.L #_up_num_irq, R2 MOV.W [R2], R1 - MVFC ISP, R2 /* stack pointer as 2nd args of _up_doirq */ - BSR.A _up_doirq /* remaining R1 register as 1st args of _up_doirq */ + MVFC ISP, R2 /* stack pointer as 2nd args of _renesas_doirq */ + BSR.A _renesas_doirq /* remaining R1 register as 1st args of _renesas_doirq */ NOP MVFC ISP, R2 CMP R2, R1 @@ -277,7 +277,7 @@ _uprx65_swint_handler: .size _uprx65_swint_handler, . - _uprx65_swint_handler /**************************************************************************** - * Name: void up_fullcontextrestore(uint32_t *regs) + * Name: void renesas_fullcontextrestore(uint32_t *regs) * * Description: * Restore the context of the using the provided register save array. @@ -289,17 +289,17 @@ _uprx65_swint_handler: * None ***************************************************************************/ - .global _up_fullcontextrestore - .type _up_fullcontextrestore, #function + .global _renesas_fullcontextrestore + .type _renesas_fullcontextrestore, #function -_up_fullcontextrestore: +_renesas_fullcontextrestore: INT #VECT_ICU_SWINT2 /* #RX65N_SWINT2_VNDX */ NOP NOP RTS NOP NOP - .size _up_fullcontextrestore, . - _up_fullcontextrestore + .size _renesas_fullcontextrestore, . - _renesas_fullcontextrestore _uprx65_swint2_handler: MOV.L R1, R2 diff --git a/arch/renesas/src/sh1/Make.defs b/arch/renesas/src/sh1/Make.defs index 7151a41bef3..0cc778a1d43 100644 --- a/arch/renesas/src/sh1/Make.defs +++ b/arch/renesas/src/sh1/Make.defs @@ -20,13 +20,13 @@ HEAD_ASRC = sh1_head.S -CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c -CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c -CMN_CSRCS += up_initialstate.c up_lowputs.c -CMN_CSRCS += up_mdelay.c up_nputs.c up_releasepending.c up_releasestack.c -CMN_CSRCS += up_stackframe.c up_udelay.c +CMN_CSRCS = renesas_allocateheap.c renesas_assert.c renesas_blocktask.c +CMN_CSRCS += renesas_createstack.c renesas_doirq.c renesas_exit.c renesas_idle.c renesas_initialize.c +CMN_CSRCS += renesas_initialstate.c renesas_lowputs.c +CMN_CSRCS += renesas_mdelay.c renesas_nputs.c renesas_releasepending.c renesas_releasestack.c +CMN_CSRCS += renesas_stackframe.c renesas_udelay.c CMN_CSRCS += sh1_schedulesigaction.c sh1_sigdeliver.c -CMN_CSRCS += up_unblocktask.c up_usestack.c +CMN_CSRCS += renesas_unblocktask.c renesas_usestack.c CHIP_ASRCS = sh1_vector.S sh1_saveusercontext.S CHIP_CSRCS = sh1_lowputc.c sh1_irq.c sh1_serial.c sh1_initialstate.c diff --git a/arch/renesas/src/sh1/sh1_copystate.c b/arch/renesas/src/sh1/sh1_copystate.c index f64278cb189..86a180ad773 100644 --- a/arch/renesas/src/sh1/sh1_copystate.c +++ b/arch/renesas/src/sh1/sh1_copystate.c @@ -27,7 +27,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -46,12 +46,12 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_copystate + * Name: renesas_copystate ****************************************************************************/ /* A little faster than most memcpy's */ -void up_copystate(uint32_t *dest, uint32_t *src) +void renesas_copystate(uint32_t *dest, uint32_t *src) { int i; for (i = 0; i < XCPTCONTEXT_REGS; i++) diff --git a/arch/renesas/src/sh1/sh1_dumpstate.c b/arch/renesas/src/sh1/sh1_dumpstate.c index 68f147bf209..3cb68cf845f 100644 --- a/arch/renesas/src/sh1/sh1_dumpstate.c +++ b/arch/renesas/src/sh1/sh1_dumpstate.c @@ -31,7 +31,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" #include "sched/sched.h" #ifdef CONFIG_ARCH_STACKDUMP @@ -107,10 +107,10 @@ static inline void sh1_registerdump(void) ****************************************************************************/ /**************************************************************************** - * Name: up_dumpstate + * Name: renesas_dumpstate ****************************************************************************/ -void up_dumpstate(void) +void renesas_dumpstate(void) { FAR struct tcb_s *rtcb = running_task(); uint32_t sp = up_getsp(); diff --git a/arch/renesas/src/sh1/sh1_head.S b/arch/renesas/src/sh1/sh1_head.S index 32bfa48fc6d..503419293fc 100644 --- a/arch/renesas/src/sh1/sh1_head.S +++ b/arch/renesas/src/sh1/sh1_head.S @@ -27,7 +27,7 @@ #include /* IRQ definitions */ #include "chip.h" /* Chip-specific settings */ -#include "up_internal.h" +#include "renesas_internal.h" /***************************************************************************** * Pre-processor Definitions @@ -46,13 +46,13 @@ .globl _up_lowsetup /* Early initialization of UART */ #ifdef USE_EARLYSERIALINIT - .globl _up_earlyconsoleinit /* Early initialization of console driver */ + .globl _renesas_earlyconsoleinit /* Early initialization of console driver */ #endif #ifdef CONFIG_ARCH_LEDS .globl _board_autoled_initialize /* Boot LED setup */ #endif #ifdef CONFIG_DEBUG_FEATURES - .globl _up_lowputc /* Low-level debug output */ + .globl _renesas_lowputc /* Low-level debug output */ #endif .globl _nx_start /* NuttX entry point */ @@ -146,7 +146,7 @@ .macro showprogress, code #ifdef CONFIG_DEBUG_FEATURES - mov.l .Llowputc, r0 /* Address of up_earlyconsoleinit */ + mov.l .Llowputc, r0 /* Address of renesas_earlyconsoleinit */ jsr @r0 /* Call it */ mov #\code, r4 /* Delay slot */ #endif @@ -412,7 +412,7 @@ __start0: /* Perform early console initialization */ #ifdef USE_EARLYSERIALINIT - mov.l .Learlyconsole, r0 /* Address of up_earlyconsoleinit */ + mov.l .Learlyconsole, r0 /* Address of renesas_earlyconsoleinit */ jsr @r0 /* Call it */ or r0, r0 /* Delay slot */ #endif @@ -468,13 +468,13 @@ __start0: .long _ebss #ifdef USE_EARLYSERIALINIT .Learlyconsole: - .long _up_earlyconsoleinit + .long _renesas_earlyconsoleinit #endif .Llowsetup: .long _up_lowsetup #ifdef CONFIG_DEBUG_FEATURES .Llowputc: - .long _up_lowputc + .long _renesas_lowputc #endif .Lledinit: .long _board_autoled_initialize diff --git a/arch/renesas/src/sh1/sh1_initialstate.c b/arch/renesas/src/sh1/sh1_initialstate.c index abbda0409f7..ed2a0893390 100644 --- a/arch/renesas/src/sh1/sh1_initialstate.c +++ b/arch/renesas/src/sh1/sh1_initialstate.c @@ -26,7 +26,7 @@ #include #include #include -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Private Functions diff --git a/arch/renesas/src/sh1/sh1_irq.c b/arch/renesas/src/sh1/sh1_irq.c index 95ca5c8fdae..e2c1d9fb80c 100644 --- a/arch/renesas/src/sh1/sh1_irq.c +++ b/arch/renesas/src/sh1/sh1_irq.c @@ -30,7 +30,7 @@ #include -#include "up_internal.h" +#include "renesas_internal.h" #include "chip.h" /**************************************************************************** diff --git a/arch/renesas/src/sh1/sh1_lowputc.c b/arch/renesas/src/sh1/sh1_lowputc.c index a2b4c76dc0a..597bef3758a 100644 --- a/arch/renesas/src/sh1/sh1_lowputc.c +++ b/arch/renesas/src/sh1/sh1_lowputc.c @@ -28,7 +28,7 @@ #include #include "chip.h" -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -170,14 +170,14 @@ static inline int up_txready(void) ****************************************************************************/ /**************************************************************************** - * Name: up_lowputc + * Name: renesas_lowputc * * Description: * Output one byte on the serial console * ****************************************************************************/ -void up_lowputc(char ch) +void renesas_lowputc(char ch) { #ifdef HAVE_CONSOLE uint8_t ssr; diff --git a/arch/renesas/src/sh1/sh1_saveusercontext.S b/arch/renesas/src/sh1/sh1_saveusercontext.S index dc71953d7ec..5fb286d9459 100644 --- a/arch/renesas/src/sh1/sh1_saveusercontext.S +++ b/arch/renesas/src/sh1/sh1_saveusercontext.S @@ -23,7 +23,7 @@ **************************************************************************/ #include -#include "up_internal.h" +#include "renesas_internal.h" /************************************************************************** * Pre-processor Definitions diff --git a/arch/renesas/src/sh1/sh1_schedulesigaction.c b/arch/renesas/src/sh1/sh1_schedulesigaction.c index 1862da3f744..e61bd217a4e 100644 --- a/arch/renesas/src/sh1/sh1_schedulesigaction.c +++ b/arch/renesas/src/sh1/sh1_schedulesigaction.c @@ -32,7 +32,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Public Functions @@ -122,14 +122,14 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - g_current_regs[REG_PC] = (uint32_t)up_sigdeliver; + g_current_regs[REG_PC] = (uint32_t)renesas_sigdeliver; g_current_regs[REG_SR] |= 0x000000f0; /* And make sure that the saved context in the TCB * is the same as the interrupt return context. */ - up_copystate(tcb->xcp.regs, g_current_regs); + renesas_copystate(tcb->xcp.regs, g_current_regs); } } @@ -154,7 +154,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver; + tcb->xcp.regs[REG_PC] = (uint32_t)renesas_sigdeliver; tcb->xcp.regs[REG_SR] |= 0x000000f0 ; } } diff --git a/arch/renesas/src/sh1/sh1_serial.c b/arch/renesas/src/sh1/sh1_serial.c index 90f2049ba80..293d3e972e9 100644 --- a/arch/renesas/src/sh1/sh1_serial.c +++ b/arch/renesas/src/sh1/sh1_serial.c @@ -38,7 +38,7 @@ #include #include "chip.h" -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -814,16 +814,16 @@ static bool up_txready(struct uart_dev_s *dev) ****************************************************************************/ /**************************************************************************** - * Name: up_earlyconsoleinit + * Name: renesas_earlyconsoleinit * * Description: * Performs the low level SCI initialization early in * debug so that the serial console will be available - * during bootup. This must be called before up_consoleinit. + * during bootup. This must be called before renesas_consoleinit. * ****************************************************************************/ -void up_earlyconsoleinit(void) +void renesas_earlyconsoleinit(void) { /* NOTE: All GPIO configuration for the SCIs was performed in * up_lowsetup @@ -847,15 +847,15 @@ void up_earlyconsoleinit(void) } /**************************************************************************** - * Name: up_consoleinit + * Name: renesas_consoleinit * * Description: * Register serial console and serial ports. This assumes - * that up_earlyconsoleinit was called previously. + * that renesas_earlyconsoleinit was called previously. * ****************************************************************************/ -void up_consoleinit(void) +void renesas_consoleinit(void) { /* Register the console */ @@ -927,10 +927,10 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + renesas_lowputc('\r'); } - up_lowputc(ch); + renesas_lowputc(ch); #endif return ch; } diff --git a/arch/renesas/src/sh1/sh1_sigdeliver.c b/arch/renesas/src/sh1/sh1_sigdeliver.c index 6f57a3b3dc7..d32166906c4 100644 --- a/arch/renesas/src/sh1/sh1_sigdeliver.c +++ b/arch/renesas/src/sh1/sh1_sigdeliver.c @@ -34,14 +34,14 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_sigdeliver + * Name: renesas_sigdeliver * * Description: * This is the a signal handling trampoline. When a signal action was @@ -50,7 +50,7 @@ * ****************************************************************************/ -void up_sigdeliver(void) +void renesas_sigdeliver(void) { struct tcb_s *rtcb = this_task(); uint32_t regs[XCPTCONTEXT_REGS]; @@ -63,7 +63,7 @@ void up_sigdeliver(void) /* Save the return state on the stack. */ - up_copystate(regs, rtcb->xcp.regs); + renesas_copystate(regs, rtcb->xcp.regs); #ifndef CONFIG_SUPPRESS_INTERRUPTS /* Then make sure that interrupts are enabled. Signal handlers must always @@ -102,5 +102,5 @@ void up_sigdeliver(void) /* Then restore the correct state for this thread of execution. */ board_autoled_off(LED_SIGNAL); - up_fullcontextrestore(regs); + renesas_fullcontextrestore(regs); } diff --git a/arch/renesas/src/sh1/sh1_timerisr.c b/arch/renesas/src/sh1/sh1_timerisr.c index d684f99f33c..b42ca38d149 100644 --- a/arch/renesas/src/sh1/sh1_timerisr.c +++ b/arch/renesas/src/sh1/sh1_timerisr.c @@ -32,7 +32,7 @@ #include #include "clock/clock.h" -#include "up_internal.h" +#include "renesas_internal.h" #include "chip.h" /**************************************************************************** diff --git a/arch/renesas/src/sh1/sh1_vector.S b/arch/renesas/src/sh1/sh1_vector.S index 5fe0a777241..3599fddbd9d 100644 --- a/arch/renesas/src/sh1/sh1_vector.S +++ b/arch/renesas/src/sh1/sh1_vector.S @@ -27,7 +27,7 @@ #include /* IRQ definitions */ #include "chip.h" /* Chip-specific settings */ -#include "up_internal.h" +#include "renesas_internal.h" /***************************************************************************** * Pre-processor Definitions @@ -39,7 +39,7 @@ /* Called functions */ - .globl _up_doirq /* C interrupt processing logic */ + .globl _renesas_doirq /* C interrupt processing logic */ /***************************************************************************** * Macros @@ -399,11 +399,11 @@ _up_vector: .long _g_intstacktop #endif .Ldoirq: - .long _up_doirq + .long _renesas_doirq .size _up_vector, .-_up_vector /***************************************************************************** - * Name: _up_fullcontextrestore + * Name: _renesas_fullcontextrestore * * Description: * restore context from a set of save registers @@ -412,10 +412,10 @@ _up_vector: * *****************************************************************************/ - .global _up_fullcontextrestore - .type _up_fullcontextrestore, #function + .global _renesas_fullcontextrestore + .type _renesas_fullcontextrestore, #function -_up_fullcontextrestore: +_renesas_fullcontextrestore: /* Mask all interrupts */ stc sr, r8 @@ -483,7 +483,7 @@ _up_fullcontextrestore: .align 2 .Lintmask: .long 0x000000f0 - .size _up_fullcontextrestore, .-_up_fullcontextrestore + .size _renesas_fullcontextrestore, .-_renesas_fullcontextrestore /************************************************************************************ * Name: g_intstackalloc/g_intstacktop diff --git a/arch/risc-v/src/c906/c906_allocateheap.c b/arch/risc-v/src/c906/c906_allocateheap.c index cc28eda59a5..bf8dbb338d5 100644 --- a/arch/risc-v/src/c906/c906_allocateheap.c +++ b/arch/risc-v/src/c906/c906_allocateheap.c @@ -122,9 +122,11 @@ void up_allocate_kheap(void **heap_start, size_t *heap_size) #endif /**************************************************************************** - * Name: up_addregion + * Name: riscv_addregion ****************************************************************************/ -void up_addregion(void) +#if CONFIG_MM_REGIONS > 1 +void riscv_addregion(void) { } +#endif \ No newline at end of file diff --git a/arch/risc-v/src/mpfs/mpfs_allocateheap.c b/arch/risc-v/src/mpfs/mpfs_allocateheap.c index 1af53b4be49..1c600635e6c 100644 --- a/arch/risc-v/src/mpfs/mpfs_allocateheap.c +++ b/arch/risc-v/src/mpfs/mpfs_allocateheap.c @@ -139,9 +139,11 @@ void up_allocate_kheap(void **heap_start, size_t *heap_size) #endif /* CONFIG_BUILD_PROTECTED && CONFIG_MM_KERNEL_HEAP */ /**************************************************************************** - * Name: up_addregion + * Name: riscv_addregion ****************************************************************************/ -void up_addregion(void) +#if CONFIG_MM_REGIONS > 1 +void riscv_addregion(void) { } +#endif \ No newline at end of file diff --git a/arch/risc-v/src/qemu-rv/qemu_rv_allocateheap.c b/arch/risc-v/src/qemu-rv/qemu_rv_allocateheap.c index bf61de105b6..d529cf75fb5 100644 --- a/arch/risc-v/src/qemu-rv/qemu_rv_allocateheap.c +++ b/arch/risc-v/src/qemu-rv/qemu_rv_allocateheap.c @@ -139,9 +139,11 @@ void up_allocate_kheap(void **heap_start, size_t *heap_size) #endif /* CONFIG_BUILD_PROTECTED && CONFIG_MM_KERNEL_HEAP */ /**************************************************************************** - * Name: up_addregion + * Name: riscv_addregion ****************************************************************************/ -void up_addregion(void) +#if CONFIG_MM_REGIONS > 1 +void riscv_addregion(void) { } +#endif diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile index da4614f2224..f0b17f4406a 100644 --- a/arch/sim/src/Makefile +++ b/arch/sim/src/Makefile @@ -34,44 +34,44 @@ AFLAGS += $(INCLUDES) NUTTX = $(call CONVERT_PATH,$(TOPDIR)$(DELIM)nuttx$(EXEEXT)) # Determine which objects are required in the link.The -# up_head object normally draws in all that is needed, but +# sim_head object normally draws in all that is needed, but # there are a fews that must be included because they # are called only from the host OS-specific logic(HOSTOBJS) -LINKOBJS = up_head$(OBJEXT) +LINKOBJS = sim_head$(OBJEXT) REQUIREDOBJS = $(LINKOBJS) ifeq ($(CONFIG_HOST_X86_64),y) ifeq ($(CONFIG_SIM_M32),y) - ASRCS += up_vfork_x86.S + ASRCS += sim_vfork_x86.S else - ASRCS += up_vfork_x86_64.S + ASRCS += sim_vfork_x86_64.S endif else ifeq ($(CONFIG_HOST_X86),y) - ASRCS += up_vfork_x86.S + ASRCS += sim_vfork_x86.S else ifeq ($(CONFIG_HOST_ARM),y) - ASRCS += up_vfork_arm.S + ASRCS += sim_vfork_arm.S else ifeq ($(CONFIG_HOST_ARM64),y) - ASRCS += up_vfork_arm64.S + ASRCS += sim_vfork_arm64.S endif AOBJS = $(ASRCS:.S=$(OBJEXT)) -CSRCS = up_initialize.c up_idle.c up_interruptcontext.c up_initialstate.c -CSRCS += up_createstack.c up_usestack.c up_releasestack.c up_stackframe.c -CSRCS += up_unblocktask.c up_blocktask.c up_releasepending.c -CSRCS += up_exit.c up_schedulesigaction.c -CSRCS += up_heap.c up_uart.c up_assert.c up_nputs.c -CSRCS += up_copyfullstate.c -CSRCS += up_sigdeliver.c +CSRCS = sim_initialize.c sim_idle.c sim_interruptcontext.c sim_initialstate.c +CSRCS += sim_createstack.c sim_usestack.c sim_releasestack.c sim_stackframe.c +CSRCS += sim_unblocktask.c sim_blocktask.c sim_releasepending.c +CSRCS += sim_exit.c sim_schedulesigaction.c +CSRCS += sim_heap.c sim_uart.c sim_assert.c sim_nputs.c +CSRCS += sim_copyfullstate.c +CSRCS += sim_sigdeliver.c ifeq ($(CONFIG_SCHED_BACKTRACE),y) -CSRCS += up_backtrace.c +CSRCS += sim_backtrace.c endif ifeq ($(CONFIG_ARCH_HAVE_VFORK),y) ifeq ($(CONFIG_SCHED_WAITPID),y) -CSRCS += up_vfork.c +CSRCS += sim_vfork.c endif endif @@ -94,123 +94,123 @@ ifeq ($(CONFIG_HOST_MACOS),y) HOSTCFLAGS += -Wno-deprecated-declarations endif -HOSTSRCS = up_hostirq.c up_hostmemory.c up_hosttime.c up_simuart.c up_hostmisc.c +HOSTSRCS = sim_hostirq.c sim_hostmemory.c sim_hosttime.c sim_simuart.c sim_hostmisc.c STDLIBS += -lpthread ifeq ($(CONFIG_HOST_MACOS),y) ifeq ($(CONFIG_HAVE_CXXINITIALIZE),y) - # Note: up_macho_init.c is not in CSRCS because it's picky about + # Note: sim_macho_init.c is not in CSRCS because it's picky about # the place in the object list for linking. Namely, its constructor # should be the first one in the executable. - HEADSRC = up_macho_init.c + HEADSRC = sim_macho_init.c endif else STDLIBS += -lrt endif ifeq ($(CONFIG_STACK_COLORATION),y) - CSRCS += up_checkstack.c + CSRCS += sim_checkstack.c endif ifeq ($(CONFIG_SPINLOCK),y) - HOSTSRCS += up_testset.c + HOSTSRCS += sim_testset.c endif ifeq ($(CONFIG_SMP),y) - CSRCS += up_smpsignal.c up_cpuidlestack.c - HOSTSRCS += up_simsmp.c + CSRCS += sim_smpsignal.c sim_cpuidlestack.c + HOSTSRCS += sim_simsmp.c endif ifeq ($(CONFIG_ONESHOT),y) - CSRCS += up_oneshot.c + CSRCS += sim_oneshot.c endif ifeq ($(CONFIG_RTC_DRIVER),y) - CSRCS += up_rtc.c + CSRCS += sim_rtc.c endif ifeq ($(CONFIG_SIM_LCDDRIVER),y) - CSRCS += up_lcd.c + CSRCS += sim_lcd.c else ifeq ($(CONFIG_SIM_FRAMEBUFFER),y) - CSRCS += up_framebuffer.c + CSRCS += sim_framebuffer.c endif ifeq ($(CONFIG_SIM_X11FB),y) - HOSTSRCS += up_x11framebuffer.c + HOSTSRCS += sim_x11framebuffer.c STDLIBS += -lX11 -lXext ifeq ($(CONFIG_SIM_TOUCHSCREEN),y) - CSRCS += up_touchscreen.c - HOSTSRCS += up_x11eventloop.c + CSRCS += sim_touchscreen.c + HOSTSRCS += sim_x11eventloop.c else ifeq ($(CONFIG_SIM_AJOYSTICK),y) - CSRCS += up_ajoystick.c - HOSTSRCS += up_x11eventloop.c + CSRCS += sim_ajoystick.c + HOSTSRCS += sim_x11eventloop.c else ifeq ($(CONFIG_SIM_BUTTONS),y) - HOSTSRCS += up_x11eventloop.c + HOSTSRCS += sim_x11eventloop.c endif ifeq ($(CONFIG_SIM_KEYBOARD),y) - CSRCS += up_keyboard.c + CSRCS += sim_keyboard.c endif endif ifeq ($(CONFIG_FS_FAT),y) - CSRCS += up_blockdevice.c up_deviceimage.c + CSRCS += sim_blockdevice.c sim_deviceimage.c STDLIBS += -lz endif ifeq ($(CONFIG_ARCH_ROMGETC),y) - CSRCS += up_romgetc.c + CSRCS += sim_romgetc.c endif ifeq ($(CONFIG_SIM_NETDEV_TAP),y) - CSRCS += up_netdriver.c + CSRCS += sim_netdriver.c ifneq ($(CONFIG_WINDOWS_CYGWIN),y) - HOSTSRCS += up_tapdev.c + HOSTSRCS += sim_tapdev.c else # CONFIG_WINDOWS_CYGWIN != y - HOSTSRCS += up_wpcap.c + HOSTSRCS += sim_wpcap.c STDLIBS = /lib/w32api/libws2_32.a /lib/w32api/libiphlpapi.a endif # CONFIG_WINDOWS_CYGWIN != y else ifeq ($(CONFIG_SIM_NETDEV_VPNKIT),y) - CSRCS += up_netdriver.c - HOSTSRCS += up_vpnkit.c + CSRCS += sim_netdriver.c + HOSTSRCS += sim_vpnkit.c VPATH += :sim/vpnkit - HOSTSRCS += protocol.c negotiate.c + HOSTSRCS += sim_protocol.c sim_negotiate.c endif ifeq ($(CONFIG_SIM_NETUSRSOCK),y) - HOSTSRCS += up_usrsock_host.c - CSRCS += up_usrsock.c + HOSTSRCS += sim_usrsock_host.c + CSRCS += sim_usrsock.c endif ifeq ($(CONFIG_SIM_HCISOCKET),y) - HOSTSRCS += up_hcisocket_host.c - CSRCS += up_hcisocket.c + HOSTSRCS += sim_hcisocket_host.c + CSRCS += sim_hcisocket.c endif ifeq ($(CONFIG_SIM_I2CBUS_LINUX),y) - HOSTSRCS += up_i2cbuslinux.c + HOSTSRCS += sim_i2cbuslinux.c endif ifeq ($(CONFIG_SIM_SPI_LINUX),y) - HOSTSRCS += up_spilinux.c + HOSTSRCS += sim_spilinux.c endif ifeq ($(CONFIG_RPTUN),y) - CSRCS += up_rptun.c + CSRCS += sim_rptun.c endif ifeq ($(CONFIG_SIM_SOUND_ALSA),y) - CSRCS += up_alsa.c + CSRCS += sim_alsa.c STDLIBS += -lasound endif ifeq ($(CONFIG_SIM_HOSTFS),y) - HOSTSRCS += up_hostfs.c + HOSTSRCS += sim_hostfs.c hostfs.h: $(TOPDIR)/include/nuttx/fs/hostfs.h @echo "CP: $<" $(Q) cp $< $@ -up_hostfs.c: hostfs.h +sim_hostfs.c: hostfs.h endif COBJS = $(CSRCS:.c=$(OBJEXT)) @@ -251,7 +251,7 @@ RELLIBS += -lboard # Make targets begin here -all: up_head$(OBJEXT) libarch$(LIBEXT) +all: sim_head$(OBJEXT) libarch$(LIBEXT) .PHONY: export_startup clean distclean cleanrel depend @@ -348,8 +348,8 @@ endif # This is part of the top-level export target -export_startup: up_head.o $(HOSTOBJS) nuttx-names.dat - cp up_head.o $(HOSTOBJS) ${EXPORT_DIR}/startup +export_startup: sim_head.o $(HOSTOBJS) nuttx-names.dat + cp sim_head.o $(HOSTOBJS) ${EXPORT_DIR}/startup cp nuttx-names.dat ${EXPORT_DIR}/libs # Dependencies diff --git a/arch/sim/src/sim/posix/up_hcisocket_host.c b/arch/sim/src/sim/posix/sim_hcisocket_host.c similarity index 92% rename from arch/sim/src/sim/posix/up_hcisocket_host.c rename to arch/sim/src/sim/posix/sim_hcisocket_host.c index ece872896af..abd905cf93e 100644 --- a/arch/sim/src/sim/posix/up_hcisocket_host.c +++ b/arch/sim/src/sim/posix/sim_hcisocket_host.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/posix/up_hcisocket_host.c + * arch/sim/src/sim/posix/sim_hcisocket_host.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,8 +33,8 @@ #include #include -#include "up_internal.h" -#include "up_hcisocket_host.h" +#include "sim_internal.h" +#include "sim_hcisocket_host.h" /**************************************************************************** * Pre-processor Definitions @@ -63,7 +63,7 @@ struct sockaddr_hci ****************************************************************************/ /**************************************************************************** - * Name: bthcisock_host_avail + * Name: sim_bthcisock_hostavail * * Description: * Monitor the host user channel to see if I/O is possible on socket. @@ -76,7 +76,7 @@ struct sockaddr_hci * ****************************************************************************/ -int bthcisock_host_avail(int fd) +int sim_bthcisock_hostavail(int fd) { struct timeval tv; fd_set fdset; @@ -100,7 +100,7 @@ int bthcisock_host_avail(int fd) } /**************************************************************************** - * Name: bthcisock_host_send + * Name: sim_bthcisock_hostsend * * Description: * Send a Bluetooth packet out via the host user socket. @@ -116,7 +116,7 @@ int bthcisock_host_avail(int fd) * ****************************************************************************/ -int bthcisock_host_send(int fd, const void *data, size_t len) +int sim_bthcisock_hostsend(int fd, const void *data, size_t len) { while (write(fd, data, len) < 0) { @@ -132,7 +132,7 @@ int bthcisock_host_send(int fd, const void *data, size_t len) } /**************************************************************************** - * Name: bthcisock_host_read + * Name: sim_bthcisock_hostread * * Description: * Read from the Host HCI socket interface. @@ -148,7 +148,7 @@ int bthcisock_host_send(int fd, const void *data, size_t len) * ****************************************************************************/ -int bthcisock_host_read(int fd, void *data, size_t len) +int sim_bthcisock_hostread(int fd, void *data, size_t len) { int err; @@ -167,7 +167,7 @@ int bthcisock_host_read(int fd, void *data, size_t len) } /**************************************************************************** - * Name: bthcisock_host_open + * Name: sim_bthcisock_hostopen * * Description: * Open a User Channel HCI socket on the Host for the given device. @@ -183,7 +183,7 @@ int bthcisock_host_read(int fd, void *data, size_t len) * ****************************************************************************/ -int bthcisock_host_open(int dev_idx) +int sim_bthcisock_hostopen(int dev_idx) { int err; struct sockaddr_hci addr; @@ -218,7 +218,7 @@ int bthcisock_host_open(int dev_idx) } /**************************************************************************** - * Name: bthcisock_host_close + * Name: sim_bthcisock_hostclose * * Description: * Close a User Channel HCI socket on the Host for the given device idx. @@ -232,7 +232,7 @@ int bthcisock_host_open(int dev_idx) * ****************************************************************************/ -int bthcisock_host_close(int fd) +int sim_bthcisock_hostclose(int fd) { return close(fd); } diff --git a/arch/sim/src/sim/posix/up_hostfs.c b/arch/sim/src/sim/posix/sim_hostfs.c similarity index 99% rename from arch/sim/src/sim/posix/up_hostfs.c rename to arch/sim/src/sim/posix/sim_hostfs.c index a53320c0fdc..2e155e4affa 100644 --- a/arch/sim/src/sim/posix/up_hostfs.c +++ b/arch/sim/src/sim/posix/sim_hostfs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/posix/up_hostfs.c + * arch/sim/src/sim/posix/sim_hostfs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sim/src/sim/posix/up_hostirq.c b/arch/sim/src/sim/posix/sim_hostirq.c similarity index 97% rename from arch/sim/src/sim/posix/up_hostirq.c rename to arch/sim/src/sim/posix/sim_hostirq.c index bd8c31f2e29..1426b0e3a02 100644 --- a/arch/sim/src/sim/posix/up_hostirq.c +++ b/arch/sim/src/sim/posix/sim_hostirq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/posix/up_hostirq.c + * arch/sim/src/sim/posix/sim_hostirq.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -27,7 +27,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Data @@ -55,7 +55,7 @@ union sigset_u static void up_handle_irq(int irq, siginfo_t *info, void *context) { - up_doirq(irq, context); + sim_doirq(irq, context); } /**************************************************************************** @@ -110,7 +110,7 @@ void up_irqinitialize(void) #ifdef CONFIG_SMP /* Register the pause handler */ - up_init_ipi(SIGUSR1); + sim_init_ipi(SIGUSR1); #endif } diff --git a/arch/sim/src/sim/posix/up_hostmemory.c b/arch/sim/src/sim/posix/sim_hostmemory.c similarity index 84% rename from arch/sim/src/sim/posix/up_hostmemory.c rename to arch/sim/src/sim/posix/sim_hostmemory.c index 86e98d8bd01..286f7802be5 100644 --- a/arch/sim/src/sim/posix/up_hostmemory.c +++ b/arch/sim/src/sim/posix/sim_hostmemory.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/posix/up_hostmemory.c + * arch/sim/src/sim/posix/sim_hostmemory.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -38,7 +38,7 @@ #include #endif -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Private Data @@ -52,14 +52,14 @@ static atomic_int g_uordblks; ****************************************************************************/ /**************************************************************************** - * Name: host_alloc_heap + * Name: sim_host_allocheap * * Description: * Allocate executable memory for heap. * ****************************************************************************/ -void *host_alloc_heap(size_t sz) +void *sim_host_allocheap(size_t sz) { void *p; @@ -81,7 +81,7 @@ void *host_alloc_heap(size_t sz) return p; } -void *host_alloc_shmem(const char *name, size_t size, int master) +void *sim_host_allocshmem(const char *name, size_t size, int master) { void *mem; int oflag; @@ -124,12 +124,12 @@ void *host_alloc_shmem(const char *name, size_t size, int master) return mem; } -void host_free_shmem(void *mem) +void sim_host_freeshmem(void *mem) { munmap(mem, 0); } -size_t host_malloc_size(void *mem) +size_t sim_host_mallocsize(void *mem) { #ifdef __APPLE__ return malloc_size(mem); @@ -138,7 +138,7 @@ size_t host_malloc_size(void *mem) #endif } -void *host_memalign(size_t alignment, size_t size) +void *sim_host_memalign(size_t alignment, size_t size) { void *p; int error; @@ -149,14 +149,14 @@ void *host_memalign(size_t alignment, size_t size) return NULL; } - size = host_malloc_size(p); + size = sim_host_mallocsize(p); g_aordblks += 1; g_uordblks += size; return p; } -void host_free(void *mem) +void sim_host_free(void *mem) { size_t size; @@ -165,42 +165,42 @@ void host_free(void *mem) return; } - size = host_malloc_size(mem); + size = sim_host_mallocsize(mem); g_aordblks -= 1; g_uordblks -= size; free(mem); } -void *host_realloc(void *oldmem, size_t size) +void *sim_host_realloc(void *oldmem, size_t size) { size_t oldsize; void *mem; if (size == 0) { - host_free(oldmem); + sim_host_free(oldmem); return NULL; } else if (oldmem == NULL) { - return host_memalign(sizeof(void *), size); + return sim_host_memalign(sizeof(void *), size); } - oldsize = host_malloc_size(oldmem); + oldsize = sim_host_mallocsize(oldmem); mem = realloc(oldmem, size); if (mem == NULL) { return NULL; } - size = host_malloc_size(mem); + size = sim_host_mallocsize(mem); g_uordblks -= oldsize; g_uordblks += size; return mem; } -void host_mallinfo(int *aordblks, int *uordblks) +void sim_host_mallinfo(int *aordblks, int *uordblks) { *aordblks = g_aordblks; *uordblks = g_uordblks; diff --git a/arch/sim/src/sim/posix/up_hostmisc.c b/arch/sim/src/sim/posix/sim_hostmisc.c similarity index 92% rename from arch/sim/src/sim/posix/up_hostmisc.c rename to arch/sim/src/sim/posix/sim_hostmisc.c index 03e35e64906..6ef5a1aedde 100644 --- a/arch/sim/src/sim/posix/up_hostmisc.c +++ b/arch/sim/src/sim/posix/sim_hostmisc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/posix/up_hostmisc.c + * arch/sim/src/sim/posix/sim_hostmisc.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -24,7 +24,7 @@ #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Function Prototypes @@ -39,7 +39,7 @@ void __gcov_dump(void); ****************************************************************************/ /**************************************************************************** - * Name: host_abort + * Name: sim_host_abort * * Description: * Abort the simulation @@ -48,7 +48,7 @@ void __gcov_dump(void); * status - Exit status to set ****************************************************************************/ -void host_abort(int status) +void sim_host_abort(int status) { #ifdef CONFIG_ARCH_COVERAGE /* Dump gcov data. */ @@ -61,7 +61,7 @@ void host_abort(int status) exit(status); } -int host_backtrace(void** array, int size) +int sim_host_backtrace(void** array, int size) { #ifdef CONFIG_WINDOWS_CYGWIN return 0; diff --git a/arch/sim/src/sim/posix/up_hosttime.c b/arch/sim/src/sim/posix/sim_hosttime.c similarity index 89% rename from arch/sim/src/sim/posix/up_hosttime.c rename to arch/sim/src/sim/posix/sim_hosttime.c index ff148cb9bfa..07d936b316d 100644 --- a/arch/sim/src/sim/posix/up_hosttime.c +++ b/arch/sim/src/sim/posix/sim_hosttime.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/posix/up_hosttime.c + * arch/sim/src/sim/posix/sim_hosttime.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,17 +30,17 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: host_gettime + * Name: sim_host_gettime ****************************************************************************/ -uint64_t host_gettime(bool rtc) +uint64_t sim_host_gettime(bool rtc) { static uint64_t start; struct timespec tp; @@ -63,23 +63,23 @@ uint64_t host_gettime(bool rtc) } /**************************************************************************** - * Name: host_sleep + * Name: sim_host_sleep ****************************************************************************/ -void host_sleep(uint64_t nsec) +void sim_host_sleep(uint64_t nsec) { usleep((nsec + 999) / 1000); } /**************************************************************************** - * Name: host_sleepuntil + * Name: sim_host_sleepuntil ****************************************************************************/ -void host_sleepuntil(uint64_t nsec) +void sim_host_sleepuntil(uint64_t nsec) { uint64_t now; - now = host_gettime(false); + now = sim_host_gettime(false); if (nsec > now + 1000) { usleep((nsec - now) / 1000); @@ -87,7 +87,7 @@ void host_sleepuntil(uint64_t nsec) } /**************************************************************************** - * Name: host_settimer + * Name: sim_host_settimer * * Description: * Set up a timer to send periodic signals. @@ -100,7 +100,7 @@ void host_sleepuntil(uint64_t nsec) * ****************************************************************************/ -int host_settimer(int *irq) +int sim_host_settimer(int *irq) { struct itimerval it; diff --git a/arch/sim/src/sim/posix/up_i2cbus.h b/arch/sim/src/sim/posix/sim_i2cbus.h similarity index 94% rename from arch/sim/src/sim/posix/up_i2cbus.h rename to arch/sim/src/sim/posix/sim_i2cbus.h index 4b726394042..75ff91ad8c5 100644 --- a/arch/sim/src/sim/posix/up_i2cbus.h +++ b/arch/sim/src/sim/posix/sim_i2cbus.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_i2cbus.h + * arch/sim/src/sim/posix/sim_i2cbus.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_SIM_SRC_SIM_UP_I2CBUS_H -#define __ARCH_SIM_SRC_SIM_UP_I2CBUS_H +#ifndef __ARCH_SIM_SRC_SIM_I2CBUS_H +#define __ARCH_SIM_SRC_SIM_I2CBUS_H /**************************************************************************** * Included Files @@ -77,4 +77,4 @@ struct i2c_ops_s * Public Function Prototypes ****************************************************************************/ -#endif /* __ARCH_SIM_SRC_SIM_UP_I2CBUS_H */ +#endif /* __ARCH_SIM_SRC_SIM_I2CBUS_H */ diff --git a/arch/sim/src/sim/posix/up_i2cbuslinux.c b/arch/sim/src/sim/posix/sim_i2cbuslinux.c similarity index 97% rename from arch/sim/src/sim/posix/up_i2cbuslinux.c rename to arch/sim/src/sim/posix/sim_i2cbuslinux.c index 9a4574090d5..dc3ebd1183f 100644 --- a/arch/sim/src/sim/posix/up_i2cbuslinux.c +++ b/arch/sim/src/sim/posix/sim_i2cbuslinux.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/posix/up_i2cbuslinux.c + * arch/sim/src/sim/posix/sim_i2cbuslinux.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -36,16 +36,16 @@ #include #include -#include "up_i2cbus.h" +#include "sim_i2cbus.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ #define ERROR(fmt, ...) \ - syslog(LOG_ERR, "up_i2cbuslinux: " fmt "\n", ##__VA_ARGS__) + syslog(LOG_ERR, "sim_i2cbuslinux: " fmt "\n", ##__VA_ARGS__) #define INFO(fmt, ...) \ - syslog(LOG_ERR, "up_i2cbuslinux: " fmt "\n", ##__VA_ARGS__) + syslog(LOG_ERR, "sim_i2cbuslinux: " fmt "\n", ##__VA_ARGS__) #define DEBUG(fmt, ...) /**************************************************************************** diff --git a/arch/sim/src/sim/posix/up_simsmp.c b/arch/sim/src/sim/posix/sim_simsmp.c similarity index 97% rename from arch/sim/src/sim/posix/up_simsmp.c rename to arch/sim/src/sim/posix/sim_simsmp.c index 0cfc35d3bad..864e7903894 100644 --- a/arch/sim/src/sim/posix/up_simsmp.c +++ b/arch/sim/src/sim/posix/sim_simsmp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/posix/up_simsmp.c + * arch/sim/src/sim/posix/sim_simsmp.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Private Types @@ -99,11 +99,11 @@ static void *sim_idle_trampoline(void *arg) pthread_mutex_unlock(&cpuinfo->cpu_init_lock); - /* up_cpu_started() is logically a part of this function but needs to be + /* sim_cpu_started() is logically a part of this function but needs to be * inserted in the path because in needs to access NuttX domain definition. */ - up_cpu_started(); + sim_cpu_started(); /* The idle Loop */ @@ -112,7 +112,7 @@ static void *sim_idle_trampoline(void *arg) /* Wait a bit so that the timing is close to the correct rate. */ now += 1000 * CONFIG_USEC_PER_TICK; - host_sleepuntil(now); + sim_host_sleepuntil(now); } return NULL; diff --git a/arch/sim/src/sim/posix/up_simuart.c b/arch/sim/src/sim/posix/sim_simuart.c similarity index 98% rename from arch/sim/src/sim/posix/up_simuart.c rename to arch/sim/src/sim/posix/sim_simuart.c index dc1ab199fa4..833d9dd30a4 100644 --- a/arch/sim/src/sim/posix/up_simuart.c +++ b/arch/sim/src/sim/posix/sim_simuart.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/posix/up_simuart.c + * arch/sim/src/sim/posix/sim_simuart.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Private Data diff --git a/arch/sim/src/sim/posix/up_spi.h b/arch/sim/src/sim/posix/sim_spi.h similarity index 97% rename from arch/sim/src/sim/posix/up_spi.h rename to arch/sim/src/sim/posix/sim_spi.h index 90dbd1daa86..0c72003bd0d 100644 --- a/arch/sim/src/sim/posix/up_spi.h +++ b/arch/sim/src/sim/posix/sim_spi.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_spi.h + * arch/sim/src/sim/posix/sim_spi.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_SIM_SRC_SIM_UP_SPI_H -#define __ARCH_SIM_SRC_SIM_UP_SPI_H +#ifndef __ARCH_SIM_SRC_SIM_SPI_H +#define __ARCH_SIM_SRC_SIM_SPI_H /**************************************************************************** * Included Files @@ -153,4 +153,4 @@ struct spi_sequence_s * Public Function Prototypes ****************************************************************************/ -#endif /* __ARCH_SIM_SRC_SIM_UP_SPI_H */ +#endif /* __ARCH_SIM_SRC_SIM_SPI_H */ diff --git a/arch/sim/src/sim/posix/up_spilinux.c b/arch/sim/src/sim/posix/sim_spilinux.c similarity index 99% rename from arch/sim/src/sim/posix/up_spilinux.c rename to arch/sim/src/sim/posix/sim_spilinux.c index 6504f009ff8..cc164ae7527 100644 --- a/arch/sim/src/sim/posix/up_spilinux.c +++ b/arch/sim/src/sim/posix/sim_spilinux.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/posix/up_spilinux.c + * arch/sim/src/sim/posix/sim_spilinux.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -36,16 +36,16 @@ #include -#include "up_spi.h" +#include "sim_spi.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ #define ERROR(fmt, ...) \ - syslog(LOG_ERR, "up_spilinux: " fmt "\n", ##__VA_ARGS__) + syslog(LOG_ERR, "sim_spilinux: " fmt "\n", ##__VA_ARGS__) #define INFO(fmt, ...) \ - syslog(LOG_ERR, "up_spilinux: " fmt "\n", ##__VA_ARGS__) + syslog(LOG_ERR, "sim_spilinux: " fmt "\n", ##__VA_ARGS__) #define DEBUG(fmt, ...) /**************************************************************************** diff --git a/arch/sim/src/sim/posix/up_tapdev.c b/arch/sim/src/sim/posix/sim_tapdev.c similarity index 94% rename from arch/sim/src/sim/posix/up_tapdev.c rename to arch/sim/src/sim/posix/sim_tapdev.c index ce518006da0..7e77ca50ef7 100644 --- a/arch/sim/src/sim/posix/up_tapdev.c +++ b/arch/sim/src/sim/posix/sim_tapdev.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/posix/up_tapdev.c + * arch/sim/src/sim/posix/sim_tapdev.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -78,7 +78,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -175,14 +175,14 @@ static void set_macaddr(int devidx) mac[5] = rand() % 256; mac[6] = 0; - netdriver_setmacaddr(devidx, mac); + sim_netdriver_setmacaddr(devidx, mac); } /**************************************************************************** * Public Functions ****************************************************************************/ -void tapdev_init(int devidx, void *priv, +void sim_tapdev_init(int devidx, void *priv, void (*tx_done_intr_cb)(void *priv), void (*rx_ready_intr_cb)(void *priv)) { @@ -261,7 +261,7 @@ void tapdev_init(int devidx, void *priv, } else { - netdriver_setmtu(devidx, ifr.ifr_mtu); + sim_netdriver_setmtu(devidx, ifr.ifr_mtu); } gtapdevfd[devidx] = tapdevfd; @@ -280,7 +280,7 @@ void tapdev_init(int devidx, void *priv, set_macaddr(devidx); } -int tapdev_avail(int devidx) +int sim_tapdev_avail(int devidx) { struct timeval tv; fd_set fdset; @@ -303,11 +303,12 @@ int tapdev_avail(int devidx) return select(gtapdevfd[devidx] + 1, &fdset, NULL, NULL, &tv) > 0; } -unsigned int tapdev_read(int devidx, unsigned char *buf, unsigned int buflen) +unsigned int sim_tapdev_read(int devidx, unsigned char *buf, + unsigned int buflen) { int ret; - if (!tapdev_avail(devidx)) + if (!sim_tapdev_avail(devidx)) { return 0; } @@ -323,7 +324,7 @@ unsigned int tapdev_read(int devidx, unsigned char *buf, unsigned int buflen) return ret; } -void tapdev_send(int devidx, unsigned char *buf, unsigned int buflen) +void sim_tapdev_send(int devidx, unsigned char *buf, unsigned int buflen) { int ret; @@ -333,7 +334,7 @@ void tapdev_send(int devidx, unsigned char *buf, unsigned int buflen) } #ifdef TAPDEV_DEBUG - syslog(LOG_INFO, "tapdev_send: sending %d bytes\n", buflen); + syslog(LOG_INFO, "sim_tapdev_send: sending %d bytes\n", buflen); gdrop++; if (gdrop % 8 == 7) @@ -361,13 +362,13 @@ void tapdev_send(int devidx, unsigned char *buf, unsigned int buflen) /* Emulate RX ready interrupt */ - if (g_rx_ready_intr_cb[devidx] != NULL && tapdev_avail(devidx)) + if (g_rx_ready_intr_cb[devidx] != NULL && sim_tapdev_avail(devidx)) { g_rx_ready_intr_cb[devidx](g_priv[devidx]); } } -void tapdev_ifup(int devidx, in_addr_t ifaddr) +void sim_tapdev_ifup(int devidx, in_addr_t ifaddr) { struct ifreq ifr; int sockfd; @@ -440,7 +441,7 @@ void tapdev_ifup(int devidx, in_addr_t ifaddr) close(sockfd); } -void tapdev_ifdown(int devidx) +void sim_tapdev_ifdown(int devidx) { #ifdef CONFIG_SIM_NET_HOST_ROUTE int sockfd; diff --git a/arch/sim/src/sim/posix/up_testset.c b/arch/sim/src/sim/posix/sim_testset.c similarity index 97% rename from arch/sim/src/sim/posix/up_testset.c rename to arch/sim/src/sim/posix/sim_testset.c index 798331a2908..2efee25adac 100644 --- a/arch/sim/src/sim/posix/up_testset.c +++ b/arch/sim/src/sim/posix/sim_testset.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/posix/up_testset.c + * arch/sim/src/sim/posix/sim_testset.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -25,7 +25,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/sim/src/sim/posix/up_usrsock_host.c b/arch/sim/src/sim/posix/sim_usrsock_host.c similarity index 99% rename from arch/sim/src/sim/posix/up_usrsock_host.c rename to arch/sim/src/sim/posix/sim_usrsock_host.c index a52b78d23bc..25da6be7d3b 100644 --- a/arch/sim/src/sim/posix/up_usrsock_host.c +++ b/arch/sim/src/sim/posix/sim_usrsock_host.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/posix/up_usrsock_host.c + * arch/sim/src/sim/posix/sim_usrsock_host.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -37,7 +37,7 @@ #include -#include "up_usrsock_host.h" +#include "sim_usrsock_host.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/sim/src/sim/posix/up_vpnkit.c b/arch/sim/src/sim/posix/sim_vpnkit.c similarity index 89% rename from arch/sim/src/sim/posix/up_vpnkit.c rename to arch/sim/src/sim/posix/sim_vpnkit.c index 28b99296eef..5b70ee6340b 100644 --- a/arch/sim/src/sim/posix/up_vpnkit.c +++ b/arch/sim/src/sim/posix/sim_vpnkit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/posix/up_vpnkit.c + * arch/sim/src/sim/posix/sim_vpnkit.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -36,17 +36,17 @@ #include #include -#include "up_internal.h" -#include "vpnkit/protocol.h" +#include "sim_internal.h" +#include "vpnkit/sim_protocol.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ #define ERROR(fmt, ...) \ - syslog(LOG_ERR, "up_vpnkit: " fmt "\n", ##__VA_ARGS__) + syslog(LOG_ERR, "sim_vpnkit: " fmt "\n", ##__VA_ARGS__) #define INFO(fmt, ...) \ - syslog(LOG_ERR, "up_vpnkit: " fmt "\n", ##__VA_ARGS__) + syslog(LOG_ERR, "sim_vpnkit: " fmt "\n", ##__VA_ARGS__) #define DEBUG(fmt, ...) /**************************************************************************** @@ -106,7 +106,7 @@ static int vpnkit_connect(void) INFO("Successfully negotiated with vpnkit"); g_vpnkit_fd = fd; g_connect_warned = false; - netdriver_setmacaddr(0, g_vifinfo.mac); + sim_netdriver_setmacaddr(0, g_vifinfo.mac); return 0; } @@ -127,11 +127,11 @@ static void vpnkit_disconnect(void) ****************************************************************************/ /**************************************************************************** - * Name: vpnkit_init + * Name: sim_vpnkit_init * ****************************************************************************/ -void vpnkit_init(void *priv, +void sim_vpnkit_init(void *priv, void (*tx_done_intr_cb)(void *priv), void (*rx_ready_intr_cb)(void *priv)) { @@ -141,11 +141,11 @@ void vpnkit_init(void *priv, } /**************************************************************************** - * Name: vpnkit_avail + * Name: sim_vpnkit_avail * ****************************************************************************/ -int vpnkit_avail(void) +int sim_vpnkit_avail(void) { struct pollfd pfd; int ret; @@ -167,23 +167,23 @@ int vpnkit_avail(void) } else if (ret != 0) { - DEBUG("vpnkit_avail is returning 1"); + DEBUG("sim_vpnkit_avail is returning 1"); } return ret != 0; } /**************************************************************************** - * Name: vpnkit_read + * Name: sim_vpnkit_read * ****************************************************************************/ -unsigned int vpnkit_read(unsigned char *buf, unsigned int buflen) +unsigned int sim_vpnkit_read(unsigned char *buf, unsigned int buflen) { uint8_t header[2]; /* 16-bit payload length in little endian */ size_t packet_len; ssize_t ret; - DEBUG("vpnkit_read called"); + DEBUG("sim_vpnkit_read called"); if (vpnkit_connect()) { @@ -222,16 +222,16 @@ unsigned int vpnkit_read(unsigned char *buf, unsigned int buflen) } /**************************************************************************** - * Name: vpnkit_send + * Name: sim_vpnkit_send * ****************************************************************************/ -void vpnkit_send(unsigned char *buf, unsigned int buflen) +void sim_vpnkit_send(unsigned char *buf, unsigned int buflen) { uint8_t header[2]; /* 16-bit payload length in little endian */ ssize_t ret; - DEBUG("vpnkit_send called"); + DEBUG("sim_vpnkit_send called"); if (vpnkit_connect()) { return; diff --git a/arch/sim/src/sim/posix/up_wpcap.c b/arch/sim/src/sim/posix/sim_wpcap.c similarity index 95% rename from arch/sim/src/sim/posix/up_wpcap.c rename to arch/sim/src/sim/posix/sim_wpcap.c index 85018c40602..f701af8787f 100644 --- a/arch/sim/src/sim/posix/up_wpcap.c +++ b/arch/sim/src/sim/posix/sim_wpcap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/posix/up_wpcap.c + * arch/sim/src/sim/posix/sim_wpcap.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -70,7 +70,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -86,12 +86,12 @@ * Private Types ****************************************************************************/ -/* This is normally prototyped in up_internal.h. However, up_internal.h +/* This is normally prototyped in sim_internal.h. However, sim_internal.h * cannot be included by this file do to collisions between BSD networking * definitions and Windows network definitions. */ -void netdriver_setmacaddr(int devidx, unsigned char *macaddr); +void sim_netdriver_setmacaddr(int devidx, unsigned char *macaddr); /**************************************************************************** * Private Types @@ -254,7 +254,7 @@ static void set_ethaddr(struct in_addr addr) adapters->PhysicalAddress[2], adapters->PhysicalAddress[3], adapters->PhysicalAddress[4], adapters->PhysicalAddress[5]); - netdriver_setmacaddr(0, adapters->PhysicalAddress); + sim_netdriver_setmacaddr(0, adapters->PhysicalAddress); break; } } @@ -272,7 +272,7 @@ static void set_ethaddr(struct in_addr addr) * Public Functions ****************************************************************************/ -void wpcap_init(void *priv, +void sim_wpcap_init(void *priv, void (*tx_done_intr_cb)(void *priv), void (*rx_ready_intr_cb)(void *priv)) { @@ -282,7 +282,7 @@ void wpcap_init(void *priv, /* TODO: support emulation of TX done and RX ready interrupts */ addr.s_addr = HTONL(WCAP_IPADDR); - syslog(LOG_INFO, "wpcap_init: IP address: %s\n", inet_ntoa(addr)); + syslog(LOG_INFO, "sim_wpcap_init: IP address: %s\n", inet_ntoa(addr)); wpcap = LoadLibrary("wpcap.dll"); dlladdr = GetProcAddress(wpcap, "pcap_findalldevs"); @@ -307,7 +307,7 @@ void wpcap_init(void *priv, set_ethaddr(addr); } -unsigned int wpcap_read(unsigned char *buf, unsigned int buflen) +unsigned int sim_wpcap_read(unsigned char *buf, unsigned int buflen) { struct pcap_pkthdr *packet_header; unsigned char *packet; @@ -329,7 +329,7 @@ unsigned int wpcap_read(unsigned char *buf, unsigned int buflen) return packet_header->caplen; } -void wpcap_send(unsigned char *buf, unsigned int buflen) +void sim_wpcap_send(unsigned char *buf, unsigned int buflen) { if (pcap_sendpacket(pcap, buf, buflen) == -1) { diff --git a/arch/sim/src/sim/posix/up_x11eventloop.c b/arch/sim/src/sim/posix/sim_x11eventloop.c similarity index 85% rename from arch/sim/src/sim/posix/up_x11eventloop.c rename to arch/sim/src/sim/posix/sim_x11eventloop.c index 6f4fa69750d..4839dfb2122 100644 --- a/arch/sim/src/sim/posix/up_x11eventloop.c +++ b/arch/sim/src/sim/posix/sim_x11eventloop.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/posix/up_x11eventloop.c + * arch/sim/src/sim/posix/sim_x11eventloop.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -26,13 +26,13 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Data ****************************************************************************/ -/* Defined in up_x11framebuffer.c */ +/* Defined in sim_x11framebuffer.c */ extern Display *g_display; @@ -41,10 +41,10 @@ extern Display *g_display; ****************************************************************************/ /**************************************************************************** - * Name: up_buttonmap + * Name: sim_buttonmap ****************************************************************************/ -static int up_buttonmap(int state, int button) +static int sim_buttonmap(int state, int button) { int buttons = 0; @@ -92,14 +92,14 @@ static int up_buttonmap(int state, int button) ****************************************************************************/ /**************************************************************************** - * Name: up_x11events + * Name: sim_x11events * * Description: * Called periodically from the IDLE loop to check for queued X11 events. * ****************************************************************************/ -void up_x11events(void) +void sim_x11events(void) { XEvent event; @@ -119,25 +119,25 @@ void up_x11events(void) { #ifdef CONFIG_SIM_KEYBOARD case KeyPress: - up_kbdevent(XLookupKeysym(&event.xkey, 0), true); + sim_kbdevent(XLookupKeysym(&event.xkey, 0), true); break; case KeyRelease: - up_kbdevent(XLookupKeysym(&event.xkey, 0), false); + sim_kbdevent(XLookupKeysym(&event.xkey, 0), false); break; #endif case MotionNotify : /* Enabled by ButtonMotionMask */ { - up_buttonevent(event.xmotion.x, event.xmotion.y, - up_buttonmap(event.xmotion.state, 0)); + sim_buttonevent(event.xmotion.x, event.xmotion.y, + sim_buttonmap(event.xmotion.state, 0)); } break; case ButtonPress : /* Enabled by ButtonPressMask */ case ButtonRelease: /* Enabled by ButtonReleaseMask */ { - up_buttonevent(event.xbutton.x, event.xbutton.y, - up_buttonmap(event.xbutton.state, + sim_buttonevent(event.xbutton.x, event.xbutton.y, + sim_buttonmap(event.xbutton.state, event.xbutton.button)); } break; diff --git a/arch/sim/src/sim/posix/up_x11framebuffer.c b/arch/sim/src/sim/posix/sim_x11framebuffer.c similarity index 86% rename from arch/sim/src/sim/posix/up_x11framebuffer.c rename to arch/sim/src/sim/posix/sim_x11framebuffer.c index cee426b9538..47d6290f311 100644 --- a/arch/sim/src/sim/posix/up_x11framebuffer.c +++ b/arch/sim/src/sim/posix/sim_x11framebuffer.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/posix/up_x11framebuffer.c + * arch/sim/src/sim/posix/sim_x11framebuffer.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,13 +32,13 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Data ****************************************************************************/ -/* Also used in up_x11eventloop */ +/* Also used in sim_x11eventloop */ Display *g_display; @@ -65,10 +65,10 @@ static int b_useshm; ****************************************************************************/ /**************************************************************************** - * Name: up_x11createframe + * Name: sim_x11createframe ****************************************************************************/ -static inline int up_x11createframe(void) +static inline int sim_x11createframe(void) { XGCValues gcval; char *argv[2] = @@ -76,8 +76,8 @@ static inline int up_x11createframe(void) "nuttx", NULL }; - char *winName = "NuttX"; - char *iconName = "NX"; + char *winname = "NuttX"; + char *iconname = "NX"; XTextProperty winprop; XTextProperty iconprop; XSizeHints hints; @@ -95,8 +95,8 @@ static inline int up_x11createframe(void) BlackPixel(g_display, g_screen), BlackPixel(g_display, g_screen)); - XStringListToTextProperty(&winName, 1, &winprop); - XStringListToTextProperty(&iconName, 1, &iconprop); + XStringListToTextProperty(&winname, 1, &winprop); + XStringListToTextProperty(&iconname, 1, &iconprop); hints.flags = PSize | PMinSize | PMaxSize; hints.width = hints.min_width = hints.max_width = g_fbpixelwidth; @@ -138,11 +138,11 @@ static inline int up_x11createframe(void) } /**************************************************************************** - * Name: up_x11errorhandler + * Name: sim_x11errorhandler ****************************************************************************/ #ifndef CONFIG_SIM_X11NOSHM -static int up_x11errorhandler(Display *display, XErrorEvent *event) +static int sim_x11errorhandler(Display *display, XErrorEvent *event) { g_xerror = 1; return 0; @@ -150,23 +150,23 @@ static int up_x11errorhandler(Display *display, XErrorEvent *event) #endif /**************************************************************************** - * Name: up_x11traperrors + * Name: sim_x11traperrors ****************************************************************************/ #ifndef CONFIG_SIM_X11NOSHM -static void up_x11traperrors(void) +static void sim_x11traperrors(void) { g_xerror = 0; - XSetErrorHandler(up_x11errorhandler); + XSetErrorHandler(sim_x11errorhandler); } #endif /**************************************************************************** - * Name: up_x11untraperrors + * Name: sim_x11untraperrors ****************************************************************************/ #ifndef CONFIG_SIM_X11NOSHM -static int up_x11untraperrors(void) +static int sim_x11untraperrors(void) { XSync(g_display, 0); XSetErrorHandler(NULL); @@ -175,10 +175,10 @@ static int up_x11untraperrors(void) #endif /**************************************************************************** - * Name: up_x11uninitX + * Name: sim_x11uninit ****************************************************************************/ -static void up_x11uninitX(void) +static void sim_x11uninit(void) { #ifndef CONFIG_SIM_X11NOSHM if (g_shmcheckpoint > 4) @@ -213,11 +213,11 @@ static void up_x11uninitX(void) } /**************************************************************************** - * Name: up_x11uninitialize + * Name: sim_x11uninitialize ****************************************************************************/ #ifndef CONFIG_SIM_X11NOSHM -static void up_x11uninitialize(void) +static void sim_x11uninitialize(void) { if (g_shmcheckpoint > 1) { @@ -236,16 +236,16 @@ static void up_x11uninitialize(void) #endif /**************************************************************************** - * Name: up_x11mapsharedmem + * Name: sim_x11mapsharedmem ****************************************************************************/ -static inline int up_x11mapsharedmem(int depth, unsigned int fblen) +static inline int sim_x11mapsharedmem(int depth, unsigned int fblen) { #ifndef CONFIG_SIM_X11NOSHM Status result; #endif - atexit(up_x11uninitX); + atexit(sim_x11uninit); g_shmcheckpoint = 1; b_useshm = 0; @@ -254,14 +254,14 @@ static inline int up_x11mapsharedmem(int depth, unsigned int fblen) { b_useshm = 1; - up_x11traperrors(); + sim_x11traperrors(); g_image = XShmCreateImage(g_display, DefaultVisual(g_display, g_screen), depth, ZPixmap, NULL, &g_xshminfo, g_fbpixelwidth, g_fbpixelheight); - if (up_x11untraperrors()) + if (sim_x11untraperrors()) { - up_x11uninitialize(); + sim_x11uninitialize(); goto shmerror; } @@ -278,7 +278,7 @@ static inline int up_x11mapsharedmem(int depth, unsigned int fblen) IPC_CREAT | 0777); if (g_xshminfo.shmid < 0) { - up_x11uninitialize(); + sim_x11uninitialize(); goto shmerror; } @@ -287,7 +287,7 @@ static inline int up_x11mapsharedmem(int depth, unsigned int fblen) g_image->data = (char *) shmat(g_xshminfo.shmid, 0, 0); if (g_image->data == ((char *) -1)) { - up_x11uninitialize(); + sim_x11uninitialize(); goto shmerror; } @@ -296,11 +296,11 @@ static inline int up_x11mapsharedmem(int depth, unsigned int fblen) g_xshminfo.shmaddr = g_image->data; g_xshminfo.readOnly = 0; - up_x11traperrors(); + sim_x11traperrors(); result = XShmAttach(g_display, &g_xshminfo); - if (up_x11untraperrors() || !result) + if (sim_x11untraperrors() || !result) { - up_x11uninitialize(); + sim_x11uninitialize(); goto shmerror; } @@ -340,18 +340,18 @@ shmerror: ****************************************************************************/ /**************************************************************************** - * Name: up_x11initialize + * Name: sim_x11initialize * * Description: * Make an X11 window look like a frame buffer. * ****************************************************************************/ -int up_x11initialize(unsigned short width, unsigned short height, +int sim_x11initialize(unsigned short width, unsigned short height, void **fbmem, size_t *fblen, unsigned char *bpp, unsigned short *stride) { - XWindowAttributes windowAttributes; + XWindowAttributes windowattributes; int depth; int ret; @@ -362,7 +362,7 @@ int up_x11initialize(unsigned short width, unsigned short height, /* Create the X11 window */ - ret = up_x11createframe(); + ret = sim_x11createframe(); if (ret < 0) { return ret; @@ -371,13 +371,13 @@ int up_x11initialize(unsigned short width, unsigned short height, /* Determine the supported pixel bpp of the current window */ XGetWindowAttributes(g_display, DefaultRootWindow(g_display), - &windowAttributes); + &windowattributes); /* Get the pixel depth. If the depth is 24-bits, use 32 because X expects * 32-bit alignment anyway. */ - depth = windowAttributes.depth; + depth = windowattributes.depth; if (depth == 24) { depth = 32; @@ -389,26 +389,26 @@ int up_x11initialize(unsigned short width, unsigned short height, /* Map the window to shared memory */ - up_x11mapsharedmem(windowAttributes.depth, *fblen); + sim_x11mapsharedmem(windowattributes.depth, *fblen); *fbmem = (void *)g_framebuffer; return 0; } /**************************************************************************** - * Name: up_x11cmap + * Name: sim_x11cmap ****************************************************************************/ -int up_x11cmap(unsigned short first, unsigned short len, +int sim_x11cmap(unsigned short first, unsigned short len, unsigned char *red, unsigned char *green, unsigned char *blue, unsigned char *transp) { - Colormap cMap; + Colormap cmap; int ndx; /* Convert each color to X11 scaling */ - cMap = DefaultColormap(g_display, g_screen); + cmap = DefaultColormap(g_display, g_screen); for (ndx = first; ndx < first + len; ndx++) { XColor color; @@ -424,7 +424,7 @@ int up_x11cmap(unsigned short first, unsigned short len, /* Then allocate a color for this selection */ - if (!XAllocColor(g_display, cMap, &color)) + if (!XAllocColor(g_display, cmap, &color)) { syslog(LOG_ERR, "Failed to allocate color%d\n", ndx); return -1; @@ -435,10 +435,10 @@ int up_x11cmap(unsigned short first, unsigned short len, } /**************************************************************************** - * Name: up_x11update + * Name: sim_x11update ****************************************************************************/ -void up_x11update(void) +void sim_x11update(void) { #ifndef CONFIG_SIM_X11NOSHM if (b_useshm) diff --git a/arch/sim/src/sim/up_ajoystick.c b/arch/sim/src/sim/sim_ajoystick.c similarity index 98% rename from arch/sim/src/sim/up_ajoystick.c rename to arch/sim/src/sim/sim_ajoystick.c index 574111e6640..98d947575f5 100644 --- a/arch/sim/src/sim/up_ajoystick.c +++ b/arch/sim/src/sim/sim_ajoystick.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_ajoystick.c + * arch/sim/src/sim/sim_ajoystick.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -183,10 +183,10 @@ int sim_ajoy_initialize(void) } /**************************************************************************** - * Name: up_buttonevent + * Name: sim_buttonevent ****************************************************************************/ -void up_buttonevent(int x, int y, int buttons) +void sim_buttonevent(int x, int y, int buttons) { ajoy_buttonset_t changed; ajoy_buttonset_t pressed; diff --git a/arch/sim/src/sim/up_alsa.c b/arch/sim/src/sim/sim_alsa.c similarity index 99% rename from arch/sim/src/sim/up_alsa.c rename to arch/sim/src/sim/sim_alsa.c index 80b59eb1231..c97d00d0197 100644 --- a/arch/sim/src/sim/up_alsa.c +++ b/arch/sim/src/sim/sim_alsa.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_alsa.c + * arch/sim/src/sim/sim_alsa.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sim/src/sim/up_assert.c b/arch/sim/src/sim/sim_assert.c similarity index 97% rename from arch/sim/src/sim/up_assert.c rename to arch/sim/src/sim/sim_assert.c index 22789708f54..a995c50f298 100644 --- a/arch/sim/src/sim/up_assert.c +++ b/arch/sim/src/sim/sim_assert.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_assert.c + * arch/sim/src/sim/sim_assert.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ # include #endif -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -123,6 +123,6 @@ void up_assert(const char *filename, int lineno) { /* Exit the simulation */ - host_abort(EXIT_FAILURE); + sim_host_abort(EXIT_FAILURE); } } diff --git a/arch/sim/src/sim/up_backtrace.c b/arch/sim/src/sim/sim_backtrace.c similarity index 93% rename from arch/sim/src/sim/up_backtrace.c rename to arch/sim/src/sim/sim_backtrace.c index fed2dde247f..5ab21dc8ae6 100644 --- a/arch/sim/src/sim/up_backtrace.c +++ b/arch/sim/src/sim/sim_backtrace.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_backtrace.c + * arch/sim/src/sim/sim_backtrace.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -27,7 +27,7 @@ #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Functions @@ -40,7 +40,7 @@ int up_backtrace(struct tcb_s *tcb, void **buffer, int size, int skip) if (tcb == running_task()) { - ret = host_backtrace(buf, skip + size); + ret = sim_host_backtrace(buf, skip + size); } if (ret <= skip) diff --git a/arch/sim/src/sim/up_blockdevice.c b/arch/sim/src/sim/sim_blockdevice.c similarity index 91% rename from arch/sim/src/sim/up_blockdevice.c rename to arch/sim/src/sim/sim_blockdevice.c index 4e5b76bbcf3..31d102a3fdc 100644 --- a/arch/sim/src/sim/up_blockdevice.c +++ b/arch/sim/src/sim/sim_blockdevice.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_blockdevice.c + * arch/sim/src/sim/sim_blockdevice.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -45,14 +45,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_registerblockdevice + * Name: sim_registerblockdevice * * Description: Register the FAT ramdisk * ****************************************************************************/ -void up_registerblockdevice(void) +void sim_registerblockdevice(void) { - ramdisk_register(0, (uint8_t *)up_deviceimage(), NSECTORS, + ramdisk_register(0, (uint8_t *)sim_deviceimage(), NSECTORS, LOGICAL_SECTOR_SIZE, RDFLAG_WRENABLED | RDFLAG_FUNLINK); } diff --git a/arch/sim/src/sim/up_blocktask.c b/arch/sim/src/sim/sim_blocktask.c similarity index 98% rename from arch/sim/src/sim/up_blocktask.c rename to arch/sim/src/sim/sim_blocktask.c index acd1d87e641..9a65db43eea 100644 --- a/arch/sim/src/sim/up_blocktask.c +++ b/arch/sim/src/sim/sim_blocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_blocktask.c + * arch/sim/src/sim/sim_blocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/sim/src/sim/up_checkstack.c b/arch/sim/src/sim/sim_checkstack.c similarity index 98% rename from arch/sim/src/sim/up_checkstack.c rename to arch/sim/src/sim/sim_checkstack.c index a933a5e81f6..f4a6941bd96 100644 --- a/arch/sim/src/sim/up_checkstack.c +++ b/arch/sim/src/sim/sim_checkstack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_checkstack.c + * arch/sim/src/sim/sim_checkstack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Private Function Prototypes diff --git a/arch/sim/src/sim/up_copyfullstate.c b/arch/sim/src/sim/sim_copyfullstate.c similarity index 92% rename from arch/sim/src/sim/up_copyfullstate.c rename to arch/sim/src/sim/sim_copyfullstate.c index 0a8b5ffd3dd..fc9fef4c666 100644 --- a/arch/sim/src/sim/up_copyfullstate.c +++ b/arch/sim/src/sim/sim_copyfullstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_copyfullstate.c + * arch/sim/src/sim/sim_copyfullstate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -27,21 +27,21 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_copyfullstate + * Name: sim_copyfullstate * * Description: * Copy the entire register save area * ****************************************************************************/ -void up_copyfullstate(unsigned long *dest, unsigned long *src) +void sim_copyfullstate(unsigned long *dest, unsigned long *src) { int i; diff --git a/arch/sim/src/sim/up_cpuidlestack.c b/arch/sim/src/sim/sim_cpuidlestack.c similarity index 98% rename from arch/sim/src/sim/up_cpuidlestack.c rename to arch/sim/src/sim/sim_cpuidlestack.c index 94ac4395f30..6acd86ce3d3 100644 --- a/arch/sim/src/sim/up_cpuidlestack.c +++ b/arch/sim/src/sim/sim_cpuidlestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_cpuidlestack.c + * arch/sim/src/sim/sim_cpuidlestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sim/src/sim/up_createstack.c b/arch/sim/src/sim/sim_createstack.c similarity index 96% rename from arch/sim/src/sim/up_createstack.c rename to arch/sim/src/sim/sim_createstack.c index 6661dafa372..cbadcb0528d 100644 --- a/arch/sim/src/sim/up_createstack.c +++ b/arch/sim/src/sim/sim_createstack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_createstack.c + * arch/sim/src/sim/sim_createstack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Functions @@ -137,7 +137,7 @@ int up_create_stack(struct tcb_s *tcb, size_t stack_size, uint8_t ttype) * water marks. */ - up_stack_color(tcb->stack_base_ptr, tcb->adj_stack_size); + sim_stack_color(tcb->stack_base_ptr, tcb->adj_stack_size); #endif /* CONFIG_STACK_COLORATION */ tcb->flags |= TCB_FLAG_FREE_STACK; @@ -148,7 +148,7 @@ int up_create_stack(struct tcb_s *tcb, size_t stack_size, uint8_t ttype) } /**************************************************************************** - * Name: up_stack_color + * Name: sim_stack_color * * Description: * Write a well know value into the stack @@ -156,7 +156,7 @@ int up_create_stack(struct tcb_s *tcb, size_t stack_size, uint8_t ttype) ****************************************************************************/ #ifdef CONFIG_STACK_COLORATION -void nostackprotect_function up_stack_color(void *stackbase, +void nostackprotect_function sim_stack_color(void *stackbase, size_t nbytes) { uint32_t *stkptr; diff --git a/arch/sim/src/sim/up_deviceimage.c b/arch/sim/src/sim/sim_deviceimage.c similarity index 98% rename from arch/sim/src/sim/up_deviceimage.c rename to arch/sim/src/sim/sim_deviceimage.c index 10602f88af1..b18c6c96c82 100644 --- a/arch/sim/src/sim/up_deviceimage.c +++ b/arch/sim/src/sim/sim_deviceimage.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_deviceimage.c + * arch/sim/src/sim/sim_deviceimage.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -37,7 +37,7 @@ # include -# include "up_internal.h" +# include "sim_internal.h" #endif /**************************************************************************** @@ -262,14 +262,14 @@ static const unsigned char g_vfatdata[] = ****************************************************************************/ /**************************************************************************** - * Name: up_deviceimage + * Name: sim_deviceimage * * Description: Return an allocated buffer representing an in-memory VFAT * file system. * ****************************************************************************/ -char *up_deviceimage(void) +char *sim_deviceimage(void) { char *pbuffer; int bufsize = 1024 * 1024; @@ -383,7 +383,7 @@ char *up_deviceimage(void) * * Description: Used to test decompression logic * - * gcc -g -Wall -DVFAT_STANDALONE -lz -o vfat-test up_deviceimage.c + * gcc -g -Wall -DVFAT_STANDALONE -lz -o vfat-test sim_deviceimage.c * ****************************************************************************/ @@ -416,7 +416,7 @@ int main(int argc, char **argv, char **envp) syslog(LOG_INFO, "Fails check: %04x is not a multiple of 31\n", check); } - deviceimage = up_deviceimage(); + deviceimage = sim_deviceimage(); if (deviceimage) { syslog(LOG_INFO, "Inflate SUCCEEDED\n"); diff --git a/arch/sim/src/sim/up_exit.c b/arch/sim/src/sim/sim_exit.c similarity index 98% rename from arch/sim/src/sim/up_exit.c rename to arch/sim/src/sim/sim_exit.c index d3e6f4fec5a..255e0b3d4eb 100644 --- a/arch/sim/src/sim/up_exit.c +++ b/arch/sim/src/sim/sim_exit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_exit.c + * arch/sim/src/sim/sim_exit.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sim/src/sim/up_framebuffer.c b/arch/sim/src/sim/sim_framebuffer.c similarity index 88% rename from arch/sim/src/sim/up_framebuffer.c rename to arch/sim/src/sim/sim_framebuffer.c index 84285c3f068..74a71196b3b 100644 --- a/arch/sim/src/sim/up_framebuffer.c +++ b/arch/sim/src/sim/sim_framebuffer.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_framebuffer.c + * arch/sim/src/sim/sim_framebuffer.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -69,9 +69,9 @@ * configuration of each color plane. */ -static int up_getvideoinfo(struct fb_vtable_s *vtable, +static int sim_getvideoinfo(struct fb_vtable_s *vtable, struct fb_videoinfo_s *vinfo); -static int up_getplaneinfo(struct fb_vtable_s *vtable, int planeno, +static int sim_getplaneinfo(struct fb_vtable_s *vtable, int planeno, struct fb_planeinfo_s *pinfo); /* The following is provided only if the video hardware supports @@ -79,9 +79,9 @@ static int up_getplaneinfo(struct fb_vtable_s *vtable, int planeno, */ #ifdef CONFIG_FB_CMAP -static int up_getcmap(struct fb_vtable_s *vtable, +static int sim_getcmap(struct fb_vtable_s *vtable, struct fb_cmap_s *cmap); -static int up_putcmap(struct fb_vtable_s *vtable, +static int sim_putcmap(struct fb_vtable_s *vtable, const struct fb_cmap_s *cmap); #endif /* The following is provided only if the video hardware supports @@ -89,9 +89,9 @@ static int up_putcmap(struct fb_vtable_s *vtable, */ #ifdef CONFIG_FB_HWCURSOR -static int up_getcursor(struct fb_vtable_s *vtable, +static int sim_getcursor(struct fb_vtable_s *vtable, struct fb_cursorattrib_s *attrib); -static int up_setcursor(struct fb_vtable_s *vtable, +static int sim_setcursor(struct fb_vtable_s *vtable, struct fb_setcursor_s *settings); #endif @@ -152,15 +152,15 @@ static struct fb_cursorsize_s g_csize; struct fb_vtable_s g_fbobject = { - .getvideoinfo = up_getvideoinfo, - .getplaneinfo = up_getplaneinfo, + .getvideoinfo = sim_getvideoinfo, + .getplaneinfo = sim_getplaneinfo, #ifdef CONFIG_FB_CMAP - .getcmap = up_getcmap, - .putcmap = up_putcmap, + .getcmap = sim_getcmap, + .putcmap = sim_putcmap, #endif #ifdef CONFIG_FB_HWCURSOR - .getcursor = up_getcursor, - .setcursor = up_setcursor, + .getcursor = sim_getcursor, + .setcursor = sim_setcursor, #endif }; @@ -169,10 +169,10 @@ struct fb_vtable_s g_fbobject = ****************************************************************************/ /**************************************************************************** - * Name: up_getvideoinfo + * Name: sim_getvideoinfo ****************************************************************************/ -static int up_getvideoinfo(struct fb_vtable_s *vtable, +static int sim_getvideoinfo(struct fb_vtable_s *vtable, struct fb_videoinfo_s *vinfo) { ginfo("vtable=%p vinfo=%p\n", vtable, vinfo); @@ -187,10 +187,10 @@ static int up_getvideoinfo(struct fb_vtable_s *vtable, } /**************************************************************************** - * Name: up_getplaneinfo + * Name: sim_getplaneinfo ****************************************************************************/ -static int up_getplaneinfo(struct fb_vtable_s *vtable, int planeno, +static int sim_getplaneinfo(struct fb_vtable_s *vtable, int planeno, struct fb_planeinfo_s *pinfo) { ginfo("vtable=%p planeno=%d pinfo=%p\n", vtable, planeno, pinfo); @@ -205,11 +205,11 @@ static int up_getplaneinfo(struct fb_vtable_s *vtable, int planeno, } /**************************************************************************** - * Name: up_getcmap + * Name: sim_getcmap ****************************************************************************/ #ifdef CONFIG_FB_CMAP -static int up_getcmap(struct fb_vtable_s *vtable, +static int sim_getcmap(struct fb_vtable_s *vtable, struct fb_cmap_s *cmap) { int len; @@ -238,15 +238,15 @@ static int up_getcmap(struct fb_vtable_s *vtable, #endif /**************************************************************************** - * Name: up_putcmap + * Name: sim_putcmap ****************************************************************************/ #ifdef CONFIG_FB_CMAP -static int up_putcmap(struct fb_vtable_s *vtable, +static int sim_putcmap(struct fb_vtable_s *vtable, const struct fb_cmap_s *cmap) { #ifdef CONFIG_SIM_X11FB - return up_x11cmap(cmap->first, cmap->len, cmap->red, cmap->green, + return sim_x11cmap(cmap->first, cmap->len, cmap->red, cmap->green, cmap->blue, NULL); #else ginfo("vtable=%p cmap=%p len=%d\n", vtable, cmap, cmap->len); @@ -262,11 +262,11 @@ static int up_putcmap(struct fb_vtable_s *vtable, #endif /**************************************************************************** - * Name: up_getcursor + * Name: sim_getcursor ****************************************************************************/ #ifdef CONFIG_FB_HWCURSOR -static int up_getcursor(struct fb_vtable_s *vtable, +static int sim_getcursor(struct fb_vtable_s *vtable, struct fb_cursorattrib_s *attrib) { ginfo("vtable=%p attrib=%p\n", vtable, attrib); @@ -292,11 +292,11 @@ static int up_getcursor(struct fb_vtable_s *vtable, #endif /**************************************************************************** - * Name: up_setcursor + * Name: sim_setcursor ****************************************************************************/ #ifdef CONFIG_FB_HWCURSOR -static int up_setcursor(struct fb_vtable_s *vtable, +static int sim_setcursor(struct fb_vtable_s *vtable, struct fb_setcursor_s *settings) { ginfo("vtable=%p settings=%p\n", vtable, settings); @@ -335,14 +335,14 @@ static int up_setcursor(struct fb_vtable_s *vtable, #endif /**************************************************************************** - * Name: up_updatework + * Name: sim_updatework ****************************************************************************/ #ifdef CONFIG_SIM_X11FB -static void up_updatework(void *arg) +static void sim_updatework(void *arg) { - work_queue(LPWORK, &g_updatework, up_updatework, NULL, MSEC2TICK(33)); - up_x11update(); + work_queue(LPWORK, &g_updatework, sim_updatework, NULL, MSEC2TICK(33)); + sim_x11update(); } #endif @@ -371,12 +371,12 @@ int up_fbinitialize(int display) int ret = OK; #ifdef CONFIG_SIM_X11FB - ret = up_x11initialize(CONFIG_SIM_FBWIDTH, CONFIG_SIM_FBHEIGHT, + ret = sim_x11initialize(CONFIG_SIM_FBWIDTH, CONFIG_SIM_FBHEIGHT, &g_planeinfo.fbmem, &g_planeinfo.fblen, &g_planeinfo.bpp, &g_planeinfo.stride); if (ret == OK) { - work_queue(LPWORK, &g_updatework, up_updatework, NULL, MSEC2TICK(33)); + work_queue(LPWORK, &g_updatework, sim_updatework, NULL, MSEC2TICK(33)); } #endif diff --git a/arch/sim/src/sim/up_hcisocket.c b/arch/sim/src/sim/sim_hcisocket.c similarity index 94% rename from arch/sim/src/sim/up_hcisocket.c rename to arch/sim/src/sim/sim_hcisocket.c index a31298fb6d3..3138a7ad275 100644 --- a/arch/sim/src/sim/up_hcisocket.c +++ b/arch/sim/src/sim/sim_hcisocket.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_hcisocket.c + * arch/sim/src/sim/sim_hcisocket.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -43,8 +43,8 @@ #include #include -#include "up_internal.h" -#include "up_hcisocket_host.h" +#include "sim_internal.h" +#include "sim_hcisocket_host.h" /**************************************************************************** * Pre-processor Definitions @@ -110,7 +110,7 @@ static int bthcisock_send(struct bt_driver_s *drv, return -EINVAL; } - ret = bthcisock_host_send(dev->fd, hdr, len + H4_HEADER_SIZE); + ret = sim_bthcisock_hostsend(dev->fd, hdr, len + H4_HEADER_SIZE); return ret < 0 ? ret : len; } @@ -119,7 +119,7 @@ static void bthcisock_close(struct bt_driver_s *drv) { struct bthcisock_s *dev = (struct bthcisock_s *)drv; - bthcisock_host_close(dev->fd); + sim_bthcisock_hostclose(dev->fd); dev->fd = -1; } @@ -130,7 +130,7 @@ static int bthcisock_receive(struct bt_driver_s *drv) enum bt_buf_type_e type; int ret; - ret = bthcisock_host_read(dev->fd, data, sizeof(data)); + ret = sim_bthcisock_hostread(dev->fd, data, sizeof(data)); if (ret <= 0) { return ret; @@ -163,7 +163,7 @@ static int bthcisock_open(struct bt_driver_s *drv) struct bthcisock_s *dev = (struct bthcisock_s *)drv; int fd; - fd = bthcisock_host_open(dev->id); + fd = sim_bthcisock_hostopen(dev->id); if (fd < 0) { @@ -233,7 +233,7 @@ static int bthcisock_driver_register(struct bt_driver_s *drv, int id, ****************************************************************************/ /**************************************************************************** - * Name: bthcisock_register + * Name: sim_bthcisock_register * * Description: * Register the Linux HCI interface with the Bluetooth stack @@ -247,7 +247,7 @@ static int bthcisock_driver_register(struct bt_driver_s *drv, int id, * ****************************************************************************/ -int bthcisock_register(int dev_id) +int sim_bthcisock_register(int dev_id) { struct bthcisock_s *dev; #if defined(CONFIG_BLUETOOTH_BRIDGE) @@ -295,7 +295,7 @@ end: } /**************************************************************************** - * Name: bthcisock_loop + * Name: sim_bthcisock_loop * * Description: * Feed pending packets on the host sockets into the Bluetooth stack. @@ -309,7 +309,7 @@ end: * ****************************************************************************/ -int bthcisock_loop(void) +int sim_bthcisock_loop(void) { struct bthcisock_s *dev; sq_entry_t *entry; @@ -317,7 +317,7 @@ int bthcisock_loop(void) for (entry = sq_peek(&g_bthcisock_list); entry; entry = sq_next(entry)) { dev = container_of(entry, struct bthcisock_s, link); - if (bthcisock_host_avail(dev->fd)) + if (sim_bthcisock_hostavail(dev->fd)) { bthcisock_receive(&dev->drv); } diff --git a/arch/sim/src/sim/up_hcisocket_host.h b/arch/sim/src/sim/sim_hcisocket_host.h similarity index 76% rename from arch/sim/src/sim/up_hcisocket_host.h rename to arch/sim/src/sim/sim_hcisocket_host.h index 304ad5f5a05..9dbe87e7a26 100644 --- a/arch/sim/src/sim/up_hcisocket_host.h +++ b/arch/sim/src/sim/sim_hcisocket_host.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_hcisocket_host.h + * arch/sim/src/sim/sim_hcisocket_host.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_SIM_SRC_SIM_UP_HCISOCKET_HOST_H -#define __ARCH_SIM_SRC_SIM_UP_HCISOCKET_HOST_H +#ifndef __ARCH_SIM_SRC_SIM_HCISOCKET_HOST_H +#define __ARCH_SIM_SRC_SIM_HCISOCKET_HOST_H /**************************************************************************** * Included Files @@ -32,10 +32,10 @@ * Public Function Prototypes ****************************************************************************/ -int bthcisock_host_open(int dev_idx); -int bthcisock_host_send(int fd, const void *data, size_t len); -int bthcisock_host_read(int fd, void *data, size_t len); -int bthcisock_host_avail(int fd); -int bthcisock_host_close(int fd); +int sim_bthcisock_hostopen(int dev_idx); +int sim_bthcisock_hostsend(int fd, const void *data, size_t len); +int sim_bthcisock_hostread(int fd, void *data, size_t len); +int sim_bthcisock_hostavail(int fd); +int sim_bthcisock_hostclose(int fd); -#endif /* __ARCH_SIM_SRC_SIM_UP_HCISOCKET_HOST_H */ +#endif /* __ARCH_SIM_SRC_SIM_HCISOCKET_HOST_H */ diff --git a/arch/sim/src/sim/up_head.c b/arch/sim/src/sim/sim_head.c similarity index 98% rename from arch/sim/src/sim/up_head.c rename to arch/sim/src/sim/sim_head.c index 71c5d679294..18d184eee76 100644 --- a/arch/sim/src/sim/up_head.c +++ b/arch/sim/src/sim/sim_head.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_head.c + * arch/sim/src/sim/sim_head.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -36,7 +36,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Data @@ -154,7 +154,7 @@ int board_power_off(int status) { /* Abort simulator */ - host_abort(status); + sim_host_abort(status); /* Does not really return */ diff --git a/arch/sim/src/sim/up_heap.c b/arch/sim/src/sim/sim_heap.c similarity index 97% rename from arch/sim/src/sim/up_heap.c rename to arch/sim/src/sim/sim_heap.c index efa1104d69c..3205afecaaa 100644 --- a/arch/sim/src/sim/up_heap.c +++ b/arch/sim/src/sim/sim_heap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_heap.c + * arch/sim/src/sim/sim_heap.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" #ifdef CONFIG_MM_CUSTOMIZE_MANAGER @@ -141,7 +141,7 @@ struct mm_heap_s *mm_initialize(const char *name, { struct mm_heap_s *heap; - heap = host_memalign(sizeof(void *), sizeof(*heap)); + heap = sim_host_memalign(sizeof(void *), sizeof(*heap)); DEBUGASSERT(heap); memset(heap, 0, sizeof(struct mm_heap_s)); @@ -228,7 +228,7 @@ void mm_free(struct mm_heap_s *heap, void *mem) } else { - host_free(mem); + sim_host_free(mem); } } @@ -259,7 +259,7 @@ void *mm_realloc(struct mm_heap_s *heap, void *oldmem, size_t size) { mm_free_delaylist(heap); - return host_realloc(oldmem, size); + return sim_host_realloc(oldmem, size); } /**************************************************************************** @@ -320,7 +320,7 @@ void *mm_memalign(struct mm_heap_s *heap, size_t alignment, size_t size) { mm_free_delaylist(heap); - return host_memalign(alignment, size); + return sim_host_memalign(alignment, size); } /**************************************************************************** @@ -384,7 +384,7 @@ void mm_extend(struct mm_heap_s *heap, void *mem, size_t size, int mm_mallinfo(struct mm_heap_s *heap, struct mallinfo *info) { memset(info, 0, sizeof(struct mallinfo)); - host_mallinfo(&info->aordblks, &info->uordblks); + sim_host_mallinfo(&info->aordblks, &info->uordblks); return 0; } @@ -422,7 +422,7 @@ void mm_checkcorruption(struct mm_heap_s *heap) size_t mm_malloc_size(void *mem) { - return host_malloc_size(mem); + return sim_host_mallocsize(mem); } /**************************************************************************** @@ -455,7 +455,7 @@ void up_allocate_heap(void **heap_start, size_t *heap_size) * ARCH_HAVE_TEXT_HEAP mechanism can be an alternative. */ - uint8_t *sim_heap = host_alloc_heap(SIM_HEAP_SIZE); + uint8_t *sim_heap = sim_host_allocheap(SIM_HEAP_SIZE); *heap_start = sim_heap; *heap_size = SIM_HEAP_SIZE; diff --git a/arch/sim/src/sim/up_idle.c b/arch/sim/src/sim/sim_idle.c similarity index 97% rename from arch/sim/src/sim/up_idle.c rename to arch/sim/src/sim/sim_idle.c index 56af2ad2bd8..547f454b8b8 100644 --- a/arch/sim/src/sim/up_idle.c +++ b/arch/sim/src/sim/sim_idle.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_idle.c + * arch/sim/src/sim/sim_idle.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -27,7 +27,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -78,7 +78,7 @@ void up_idle(void) #ifdef CONFIG_ONESHOT /* Driver the simulated interval timer */ - up_timer_update(); + sim_timer_update(); #endif #ifdef CONFIG_PM diff --git a/arch/sim/src/sim/up_initialize.c b/arch/sim/src/sim/sim_initialize.c similarity index 92% rename from arch/sim/src/sim/up_initialize.c rename to arch/sim/src/sim/sim_initialize.c index 27a1264fbb5..b076af35ab4 100644 --- a/arch/sim/src/sim/up_initialize.c +++ b/arch/sim/src/sim/sim_initialize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_initialize.c + * arch/sim/src/sim/sim_initialize.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,15 +33,15 @@ #include -#include "up_internal.h" -#include "up_usrsock_host.h" +#include "sim_internal.h" +#include "sim_usrsock_host.h" /**************************************************************************** * Private Functions ****************************************************************************/ #ifndef CONFIG_DISABLE_ENVIRON -static void up_init_cmdline(void) +static void sim_init_cmdline(void) { char cmdline[ARG_MAX] = ""; int i; @@ -57,7 +57,7 @@ static void up_init_cmdline(void) #endif /**************************************************************************** - * Name: up_init_smartfs + * Name: sim_init_smartfs * * Description: * Initialize a simulated SPI FLASH block device m25p MTD driver and bind @@ -67,7 +67,7 @@ static void up_init_cmdline(void) #if defined(CONFIG_FS_SMARTFS) && defined(CONFIG_MTD_SMART) && \ (defined(CONFIG_SPI_FLASH) || defined(CONFIG_QSPI_FLASH)) -static void up_init_smartfs(void) +static void sim_init_smartfs(void) { #if defined(CONFIG_MTD_M25P) || defined(CONFIG_MTD_W25) || defined(CONFIG_MTD_SST26) struct mtd_dev_s *mtd; @@ -158,25 +158,25 @@ static void up_init_smartfs(void) } #endif -static int up_loop_task(int argc, char **argv) +static int sim_loop_task(int argc, char **argv) { while (1) { /* Handle UART data availability */ - up_uartloop(); + sim_uartloop(); #if defined(CONFIG_SIM_TOUCHSCREEN) || defined(CONFIG_SIM_AJOYSTICK) || \ defined(CONFIG_SIM_BUTTONS) /* Drive the X11 event loop */ - up_x11events(); + sim_x11events(); #endif #ifdef CONFIG_SIM_NETDEV /* Run the network if enabled */ - netdriver_loop(); + sim_netdriver_loop(); #endif #ifdef CONFIG_SIM_NETUSRSOCK @@ -184,11 +184,11 @@ static int up_loop_task(int argc, char **argv) #endif #ifdef CONFIG_RPTUN - up_rptun_loop(); + sim_rptun_loop(); #endif #ifdef CONFIG_SIM_HCISOCKET - bthcisock_loop(); + sim_bthcisock_loop(); #endif #ifdef CONFIG_SIM_SOUND @@ -246,24 +246,24 @@ void up_initialize(void) #endif #ifndef CONFIG_DISABLE_ENVIRON - up_init_cmdline(); + sim_init_cmdline(); #endif /* Register some tty-port to access tty-port on sim platform */ - up_uartinit(); + sim_uartinit(); #if defined(CONFIG_FS_FAT) && !defined(CONFIG_DISABLE_MOUNTPOINT) - up_registerblockdevice(); /* Our FAT ramdisk at /dev/ram0 */ + sim_registerblockdevice(); /* Our FAT ramdisk at /dev/ram0 */ #endif #ifdef CONFIG_SIM_NETDEV - netdriver_init(); /* Our "real" network driver */ + sim_netdriver_init(); /* Our "real" network driver */ #endif #if defined(CONFIG_FS_SMARTFS) && defined(CONFIG_MTD_SMART) && \ (defined(CONFIG_SPI_FLASH) || defined(CONFIG_QSPI_FLASH)) - up_init_smartfs(); + sim_init_smartfs(); #endif #ifdef CONFIG_SIM_SOUND @@ -273,5 +273,5 @@ void up_initialize(void) kthread_create("loop_task", SCHED_PRIORITY_MAX, CONFIG_DEFAULT_TASK_STACKSIZE, - up_loop_task, NULL); + sim_loop_task, NULL); } diff --git a/arch/sim/src/sim/up_initialstate.c b/arch/sim/src/sim/sim_initialstate.c similarity index 96% rename from arch/sim/src/sim/up_initialstate.c rename to arch/sim/src/sim/sim_initialstate.c index 408c88009e7..6b3f6968df4 100644 --- a/arch/sim/src/sim/up_initialstate.c +++ b/arch/sim/src/sim/sim_initialstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_initialstate.c + * arch/sim/src/sim/sim_initialstate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Functions @@ -69,7 +69,7 @@ void up_initial_state(struct tcb_s *tcb) * water marks. */ - up_stack_color(tcb->stack_alloc_ptr, 0); + sim_stack_color(tcb->stack_alloc_ptr, 0); #endif /* CONFIG_STACK_COLORATION */ } diff --git a/arch/sim/src/sim/up_internal.h b/arch/sim/src/sim/sim_internal.h similarity index 65% rename from arch/sim/src/sim/up_internal.h rename to arch/sim/src/sim/sim_internal.h index d417226aa46..24efeb6dcd7 100644 --- a/arch/sim/src/sim/up_internal.h +++ b/arch/sim/src/sim/sim_internal.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_internal.h + * arch/sim/src/sim/sim_internal.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_SIM_SRC_SIM_UP_INTERNAL_H -#define __ARCH_SIM_SRC_SIM_UP_INTERNAL_H +#ifndef __ARCH_SIM_SRC_SIM_INTERNAL_H +#define __ARCH_SIM_SRC_SIM_INTERNAL_H /**************************************************************************** * Included Files @@ -82,8 +82,8 @@ /* Macros to handle saving and restoring interrupt state ********************/ -#define up_savestate(regs) up_copyfullstate(regs, (xcpt_reg_t *)CURRENT_REGS) -#define up_restorestate(regs) (CURRENT_REGS = regs) +#define sim_savestate(regs) sim_copyfullstate(regs, (xcpt_reg_t *)CURRENT_REGS) +#define sim_restorestate(regs) (CURRENT_REGS = regs) /* File System Definitions **************************************************/ @@ -144,32 +144,32 @@ extern char **g_argv; /* Context switching */ -void up_copyfullstate(unsigned long *dest, unsigned long *src); -void *up_doirq(int irq, void *regs); +void sim_copyfullstate(unsigned long *dest, unsigned long *src); +void *sim_doirq(int irq, void *regs); /* up_hostmisc.c ************************************************************/ -void host_abort(int status); -int host_backtrace(void** array, int size); +void sim_host_abort(int status); +int sim_host_backtrace(void** array, int size); /* up_hostmemory.c **********************************************************/ -void *host_alloc_heap(size_t sz); -void *host_alloc_shmem(const char *name, size_t size, int master); -void host_free_shmem(void *mem); +void *sim_host_allocheap(size_t sz); +void *sim_host_allocshmem(const char *name, size_t size, int master); +void sim_host_freeshmem(void *mem); -size_t host_malloc_size(void *mem); -void *host_memalign(size_t alignment, size_t size); -void host_free(void *mem); -void *host_realloc(void *oldmem, size_t size); -void host_mallinfo(int *aordblks, int *uordblks); +size_t sim_host_mallocsize(void *mem); +void *sim_host_memalign(size_t alignment, size_t size); +void sim_host_free(void *mem); +void *sim_host_realloc(void *oldmem, size_t size); +void sim_host_mallinfo(int *aordblks, int *uordblks); /* up_hosttime.c ************************************************************/ -uint64_t host_gettime(bool rtc); -void host_sleep(uint64_t nsec); -void host_sleepuntil(uint64_t nsec); -int host_settimer(int *irq); +uint64_t sim_host_gettime(bool rtc); +void sim_host_sleep(uint64_t nsec); +void sim_host_sleepuntil(uint64_t nsec); +int sim_host_settimer(int *irq); /* up_sigdeliver.c **********************************************************/ @@ -186,20 +186,20 @@ void sim_send_ipi(int cpu); /* up_smpsignal.c ***********************************************************/ #ifdef CONFIG_SMP -void up_cpu_started(void); -int up_init_ipi(int irq); +void sim_cpu_started(void); +int sim_init_ipi(int irq); #endif /* up_oneshot.c *************************************************************/ #ifdef CONFIG_ONESHOT -void up_timer_update(void); +void sim_timer_update(void); #endif /* up_uart.c ****************************************************************/ -void up_uartinit(void); -void up_uartloop(void); +void sim_uartinit(void); +void sim_uartloop(void); /* up_simuart.c *************************************************************/ @@ -212,22 +212,22 @@ bool simuart_checkc(int fd); int simuart_setcflag(int fd, unsigned int cflag); int simuart_getcflag(int fd, unsigned int *cflag); -/* up_deviceimage.c *********************************************************/ +/* sim_deviceimage.c ********************************************************/ -char *up_deviceimage(void); -void up_registerblockdevice(void); +char *sim_deviceimage(void); +void sim_registerblockdevice(void); /* up_x11framebuffer.c ******************************************************/ #ifdef CONFIG_SIM_X11FB -int up_x11initialize(unsigned short width, unsigned short height, - void **fbmem, size_t *fblen, unsigned char *bpp, - unsigned short *stride); -void up_x11update(void); +int sim_x11initialize(unsigned short width, unsigned short height, + void **fbmem, size_t *fblen, unsigned char *bpp, + unsigned short *stride); +void sim_x11update(void); #ifdef CONFIG_FB_CMAP -int up_x11cmap(unsigned short first, unsigned short len, - unsigned char *red, unsigned char *green, - unsigned char *blue, unsigned char *transp); +int sim_x11cmap(unsigned short first, unsigned short len, + unsigned char *red, unsigned char *green, + unsigned char *blue, unsigned char *transp); #endif #endif @@ -242,15 +242,15 @@ int sim_tsc_uninitialize(void); #ifdef CONFIG_SIM_KEYBOARD int sim_kbd_initialize(void); -void up_kbdevent(uint32_t key, bool is_press); +void sim_kbdevent(uint32_t key, bool is_press); #endif /* up_eventloop.c ***********************************************************/ #if defined(CONFIG_SIM_TOUCHSCREEN) || defined(CONFIG_SIM_AJOYSTICK) || \ defined(CONFIG_ARCH_BUTTONS) || defined(CONFING_SIM_KEYBOARD) -void up_x11events(void); -void up_buttonevent(int x, int y, int buttons); +void sim_x11events(void); +void sim_buttonevent(int x, int y, int buttons); #endif /* up_ajoystick.c ***********************************************************/ @@ -262,78 +262,78 @@ int sim_ajoy_initialize(void); /* up_tapdev.c **************************************************************/ #if defined(CONFIG_SIM_NETDEV_TAP) && !defined(__CYGWIN__) -void tapdev_init(int devidx, void *priv, - void (*tx_done_intr_cb)(void *priv), - void (*rx_ready_intr_cb)(void *priv)); -int tapdev_avail(int devidx); -unsigned int tapdev_read(int devidx, unsigned char *buf, - unsigned int buflen); -void tapdev_send(int devidx, unsigned char *buf, unsigned int buflen); -void tapdev_ifup(int devidx, in_addr_t ifaddr); -void tapdev_ifdown(int devidx); +void sim_tapdev_init(int devidx, void *priv, + void (*tx_done_intr_cb)(void *priv), + void (*rx_ready_intr_cb)(void *priv)); +int sim_tapdev_avail(int devidx); +unsigned int sim_tapdev_read(int devidx, unsigned char *buf, + unsigned int buflen); +void sim_tapdev_send(int devidx, unsigned char *buf, unsigned int buflen); +void sim_tapdev_ifup(int devidx, in_addr_t ifaddr); +void sim_tapdev_ifdown(int devidx); -# define netdev_init(idx,priv,txcb,rxcb) tapdev_init(idx,priv,txcb,rxcb) -# define netdev_avail(idx) tapdev_avail(idx) -# define netdev_read(idx,buf,buflen) tapdev_read(idx,buf,buflen) -# define netdev_send(idx,buf,buflen) tapdev_send(idx,buf,buflen) -# define netdev_ifup(idx,ifaddr) tapdev_ifup(idx,ifaddr) -# define netdev_ifdown(idx) tapdev_ifdown(idx) +# define sim_netdev_init(idx,priv,txcb,rxcb) sim_tapdev_init(idx,priv,txcb,rxcb) +# define sim_netdev_avail(idx) sim_tapdev_avail(idx) +# define sim_netdev_read(idx,buf,buflen) sim_tapdev_read(idx,buf,buflen) +# define sim_netdev_send(idx,buf,buflen) sim_tapdev_send(idx,buf,buflen) +# define sim_netdev_ifup(idx,ifaddr) sim_tapdev_ifup(idx,ifaddr) +# define sim_netdev_ifdown(idx) sim_tapdev_ifdown(idx) #endif /* up_wpcap.c ***************************************************************/ #if defined(CONFIG_SIM_NETDEV_TAP) && defined(__CYGWIN__) -void wpcap_init(void *priv, - void (*tx_done_intr_cb)(void *priv), - void (*rx_ready_intr_cb)(void *priv)); -unsigned int wpcap_read(unsigned char *buf, unsigned int buflen); -void wpcap_send(unsigned char *buf, unsigned int buflen); +void sim_wpcap_init(void *priv, + void (*tx_done_intr_cb)(void *priv), + void (*rx_ready_intr_cb)(void *priv)); +unsigned int sim_wpcap_read(unsigned char *buf, unsigned int buflen); +void sim_wpcap_send(unsigned char *buf, unsigned int buflen); -# define netdev_init(idx,priv,txcb,rxcb) wpcap_init(priv,txcb,rxcb) -# define netdev_avail(idx) 1 -# define netdev_read(idx,buf,buflen) wpcap_read(buf,buflen) -# define netdev_send(idx,buf,buflen) wpcap_send(buf,buflen) -# define netdev_ifup(idx,ifaddr) {} -# define netdev_ifdown(idx) {} +# define sim_netdev_init(idx,priv,txcb,rxcb) sim_wpcap_init(priv,txcb,rxcb) +# define sim_netdev_avail(idx) 1 +# define sim_netdev_read(idx,buf,buflen) sim_wpcap_read(buf,buflen) +# define sim_netdev_send(idx,buf,buflen) sim_wpcap_send(buf,buflen) +# define sim_netdev_ifup(idx,ifaddr) {} +# define sim_netdev_ifdown(idx) {} #endif /* up_vpnkit.c **************************************************************/ #if defined(CONFIG_SIM_NETDEV_VPNKIT) -void vpnkit_init(void *priv, +void sim_vpnkit_init(void *priv, void (*tx_done_intr_cb)(void *priv), void (*rx_ready_intr_cb)(void *priv)); -int vpnkit_avail(void); -unsigned int vpnkit_read(unsigned char *buf, unsigned int buflen); -void vpnkit_send(unsigned char *buf, unsigned int buflen); +int sim_vpnkit_avail(void); +unsigned int sim_vpnkit_read(unsigned char *buf, unsigned int buflen); +void sim_vpnkit_send(unsigned char *buf, unsigned int buflen); -# define netdev_init(idx,priv,txcb,rxcb) vpnkit_init(priv,txcb,rxcb) -# define netdev_avail(idx) vpnkit_avail() -# define netdev_read(idx,buf,buflen) vpnkit_read(buf,buflen) -# define netdev_send(idx,buf,buflen) vpnkit_send(buf,buflen) -# define netdev_ifup(idx,ifaddr) {} -# define netdev_ifdown(idx) {} +# define sim_netdev_init(idx,priv,txcb,rxcb) sim_vpnkit_init(priv,txcb,rxcb) +# define sim_netdev_avail(idx) sim_vpnkit_avail() +# define sim_netdev_read(idx,buf,buflen) sim_vpnkit_read(buf,buflen) +# define sim_netdev_send(idx,buf,buflen) sim_vpnkit_send(buf,buflen) +# define sim_netdev_ifup(idx,ifaddr) {} +# define sim_netdev_ifdown(idx) {} #endif /* up_netdriver.c ***********************************************************/ -int netdriver_init(void); -void netdriver_setmacaddr(int devidx, unsigned char *macaddr); -void netdriver_setmtu(int devidx, int mtu); -void netdriver_loop(void); +int sim_netdriver_init(void); +void sim_netdriver_setmacaddr(int devidx, unsigned char *macaddr); +void sim_netdriver_setmtu(int devidx, int mtu); +void sim_netdriver_loop(void); /* up_rptun.c ***************************************************************/ #ifdef CONFIG_RPTUN -int up_rptun_init(const char *shmemname, const char *cpuname, bool master); -void up_rptun_loop(void); +int sim_rptun_init(const char *shmemname, const char *cpuname, bool master); +void sim_rptun_loop(void); #endif /* up_hcisocket.c ***********************************************************/ #ifdef CONFIG_SIM_HCISOCKET -int bthcisock_register(int dev_id); -int bthcisock_loop(void); +int sim_bthcisock_register(int dev_id); +int sim_bthcisock_loop(void); #endif /* up_audio.c ***************************************************************/ @@ -361,8 +361,8 @@ int sim_spi_uninitialize(struct spi_dev_s *dev); #ifdef CONFIG_STACK_COLORATION size_t sim_stack_check(void *alloc, size_t size); -void up_stack_color(void *stackbase, size_t nbytes); +void sim_stack_color(void *stackbase, size_t nbytes); #endif #endif /* __ASSEMBLY__ */ -#endif /* __ARCH_SIM_SRC_SIM_UP_INTERNAL_H */ +#endif /* __ARCH_SIM_SRC_SIM_INTERNAL_H */ diff --git a/arch/sim/src/sim/up_interruptcontext.c b/arch/sim/src/sim/sim_interruptcontext.c similarity index 95% rename from arch/sim/src/sim/up_interruptcontext.c rename to arch/sim/src/sim/sim_interruptcontext.c index 630941fdb80..ad570c3d05e 100644 --- a/arch/sim/src/sim/up_interruptcontext.c +++ b/arch/sim/src/sim/sim_interruptcontext.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_interruptcontext.c + * arch/sim/src/sim/sim_interruptcontext.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -27,7 +27,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Functions @@ -48,10 +48,10 @@ bool up_interrupt_context(void) } /**************************************************************************** - * Name: up_doirq + * Name: sim_doirq ****************************************************************************/ -void *up_doirq(int irq, void *context) +void *sim_doirq(int irq, void *context) { /* Allocate temporary context on the stack */ diff --git a/arch/sim/src/sim/up_keyboard.c b/arch/sim/src/sim/sim_keyboard.c similarity index 91% rename from arch/sim/src/sim/up_keyboard.c rename to arch/sim/src/sim/sim_keyboard.c index e2eb4367983..812e52f9a7c 100644 --- a/arch/sim/src/sim/up_keyboard.c +++ b/arch/sim/src/sim/sim_keyboard.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_keyboard.c + * arch/sim/src/sim/sim_keyboard.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -43,7 +43,7 @@ * Private Types ****************************************************************************/ -struct up_dev_s +struct sim_dev_s { int eventloop; struct keyboard_lowerhalf_s lower; @@ -57,7 +57,7 @@ struct up_dev_s * structure may as well be pre-allocated. */ -static struct up_dev_s g_simkeyboard; +static struct sim_dev_s g_simkeyboard; /**************************************************************************** * Public Functions @@ -70,7 +70,7 @@ static struct up_dev_s g_simkeyboard; int sim_kbd_initialize(void) { int ret; - struct up_dev_s *priv = &g_simkeyboard; + struct sim_dev_s *priv = &g_simkeyboard; memset(priv, 0, sizeof(*priv)); @@ -91,12 +91,12 @@ int sim_kbd_initialize(void) } /**************************************************************************** - * Name: up_kbdevent + * Name: sim_kbdevent ****************************************************************************/ -void up_kbdevent(uint32_t key, bool is_press) +void sim_kbdevent(uint32_t key, bool is_press) { - struct up_dev_s *priv = (struct up_dev_s *) &g_simkeyboard; + struct sim_dev_s *priv = (struct sim_dev_s *) &g_simkeyboard; uint32_t types[2] = { KEYBOARD_RELEASE, KEYBOARD_PRESS diff --git a/arch/sim/src/sim/up_lcd.c b/arch/sim/src/sim/sim_lcd.c similarity index 97% rename from arch/sim/src/sim/up_lcd.c rename to arch/sim/src/sim/sim_lcd.c index 64209306881..c71c72820a6 100644 --- a/arch/sim/src/sim/up_lcd.c +++ b/arch/sim/src/sim/sim_lcd.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_lcd.c + * arch/sim/src/sim/sim_lcd.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -35,7 +35,7 @@ #include #include #include -#include "up_internal.h" +#include "sim_internal.h" #if defined(CONFIG_SIM_X11FB) #include @@ -429,14 +429,14 @@ static int sim_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) } /**************************************************************************** - * Name: up_updatework + * Name: sim_updatework ****************************************************************************/ #ifdef CONFIG_SIM_X11FB -static void up_updatework(void *arg) +static void sim_updatework(void *arg) { - work_queue(LPWORK, &g_updatework, up_updatework, NULL, MSEC2TICK(33)); - up_x11update(); + work_queue(LPWORK, &g_updatework, sim_updatework, NULL, MSEC2TICK(33)); + sim_x11update(); } #endif @@ -461,13 +461,13 @@ int board_lcd_initialize(void) ginfo("Initializing\n"); #ifdef CONFIG_SIM_X11FB - ret = up_x11initialize(CONFIG_SIM_FBWIDTH, CONFIG_SIM_FBHEIGHT, + ret = sim_x11initialize(CONFIG_SIM_FBWIDTH, CONFIG_SIM_FBHEIGHT, (void**)&g_planeinfo.buffer, &g_fblen, &g_planeinfo.bpp, &g_stride); if (ret == OK) { - work_queue(LPWORK, &g_updatework, up_updatework, NULL, MSEC2TICK(33)); + work_queue(LPWORK, &g_updatework, sim_updatework, NULL, MSEC2TICK(33)); } #endif diff --git a/arch/sim/src/sim/up_macho_init.c b/arch/sim/src/sim/sim_macho_init.c similarity index 99% rename from arch/sim/src/sim/up_macho_init.c rename to arch/sim/src/sim/sim_macho_init.c index fe02e72dd23..1941985310e 100644 --- a/arch/sim/src/sim/up_macho_init.c +++ b/arch/sim/src/sim/sim_macho_init.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_macho_init.c + * arch/sim/src/sim/sim_macho_init.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sim/src/sim/up_netdriver.c b/arch/sim/src/sim/sim_netdriver.c similarity index 94% rename from arch/sim/src/sim/up_netdriver.c rename to arch/sim/src/sim/sim_netdriver.c index af9d1437d84..4b85c281fd2 100644 --- a/arch/sim/src/sim/up_netdriver.c +++ b/arch/sim/src/sim/sim_netdriver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_netdriver.c + * arch/sim/src/sim/sim_netdriver.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -70,7 +70,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Private Function Prototypes @@ -132,7 +132,7 @@ static void netdriver_reply(struct net_driver_s *dev) /* Send the packet */ NETDEV_TXPACKETS(dev); - netdev_send(devidx, dev->d_buf, dev->d_len); + sim_netdev_send(devidx, dev->d_buf, dev->d_len); NETDEV_TXDONE(dev); } } @@ -151,13 +151,13 @@ static void netdriver_recv_work(void *arg) * to prevent RX data stream congestion. */ - while (netdev_avail(devidx)) + while (sim_netdev_avail(devidx)) { - /* netdev_read will return 0 on a timeout event and > 0 + /* sim_netdev_read will return 0 on a timeout event and > 0 * on a data received event */ - dev->d_len = netdev_read(devidx, + dev->d_len = sim_netdev_read(devidx, (unsigned char *)dev->d_buf, dev->d_pktsize); if (dev->d_len > 0) @@ -233,7 +233,7 @@ static void netdriver_recv_work(void *arg) if (dev->d_len > 0) { - netdev_send(devidx, dev->d_buf, dev->d_len); + sim_netdev_send(devidx, dev->d_buf, dev->d_len); } } else @@ -293,7 +293,7 @@ static int netdriver_txpoll(struct net_driver_s *dev) /* Send the packet */ NETDEV_TXPACKETS(dev); - netdev_send(devidx, dev->d_buf, dev->d_len); + sim_netdev_send(devidx, dev->d_buf, dev->d_len); NETDEV_TXDONE(dev); } else @@ -321,7 +321,7 @@ static int netdriver_ifup(struct net_driver_s *dev) int devidx = (intptr_t)dev->d_private; UNUSED(devidx); - netdev_ifup(devidx, dev->d_ipaddr); + sim_netdev_ifup(devidx, dev->d_ipaddr); netdev_carrier_on(dev); return OK; } @@ -332,7 +332,7 @@ static int netdriver_ifdown(struct net_driver_s *dev) UNUSED(devidx); netdev_carrier_off(dev); - netdev_ifdown(devidx); + sim_netdev_ifdown(devidx); return OK; } @@ -386,7 +386,7 @@ static void netdriver_rxready_interrupt(void *priv) * Public Functions ****************************************************************************/ -int netdriver_init(void) +int sim_netdriver_init(void) { struct net_driver_s *dev; void *pktbuf; @@ -398,7 +398,7 @@ int netdriver_init(void) /* Internal initialization */ - netdev_init(devidx, dev, + sim_netdev_init(devidx, dev, netdriver_txdone_interrupt, netdriver_rxready_interrupt); @@ -433,23 +433,23 @@ int netdriver_init(void) return OK; } -void netdriver_setmacaddr(int devidx, unsigned char *macaddr) +void sim_netdriver_setmacaddr(int devidx, unsigned char *macaddr) { memcpy(g_sim_dev[devidx].d_mac.ether.ether_addr_octet, macaddr, IFHWADDRLEN); } -void netdriver_setmtu(int devidx, int mtu) +void sim_netdriver_setmtu(int devidx, int mtu) { g_sim_dev[devidx].d_pktsize = mtu + ETH_HDRLEN; } -void netdriver_loop(void) +void sim_netdriver_loop(void) { int devidx; for (devidx = 0; devidx < CONFIG_SIM_NETDEV_NUMBER; devidx++) { - if (work_available(&g_recv_work[devidx]) && netdev_avail(devidx)) + if (work_available(&g_recv_work[devidx]) && sim_netdev_avail(devidx)) { work_queue(LPWORK, &g_recv_work[devidx], netdriver_recv_work, &g_sim_dev[devidx], 0); diff --git a/arch/sim/src/sim/up_nputs.c b/arch/sim/src/sim/sim_nputs.c similarity index 98% rename from arch/sim/src/sim/up_nputs.c rename to arch/sim/src/sim/sim_nputs.c index 9e92abf85b3..fc262829230 100644 --- a/arch/sim/src/sim/up_nputs.c +++ b/arch/sim/src/sim/sim_nputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_nputs.c + * arch/sim/src/sim/sim_nputs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sim/src/sim/up_oneshot.c b/arch/sim/src/sim/sim_oneshot.c similarity index 97% rename from arch/sim/src/sim/up_oneshot.c rename to arch/sim/src/sim/sim_oneshot.c index ae0b1e72197..7a8aa0a97dc 100644 --- a/arch/sim/src/sim/up_oneshot.c +++ b/arch/sim/src/sim/sim_oneshot.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_oneshot.c + * arch/sim/src/sim/sim_oneshot.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -37,7 +37,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Private Types @@ -114,7 +114,7 @@ static inline void sim_timer_current(struct timespec *ts) uint64_t nsec; time_t sec; - nsec = host_gettime(false); + nsec = sim_host_gettime(false); sec = nsec / NSEC_PER_SEC; nsec -= sec * NSEC_PER_SEC; @@ -123,7 +123,7 @@ static inline void sim_timer_current(struct timespec *ts) } /**************************************************************************** - * Name: sim_timer_update + * Name: sim_timer_update_internal * * Description: * Ths function is called periodically to deliver the tick events to the @@ -131,7 +131,7 @@ static inline void sim_timer_current(struct timespec *ts) * ****************************************************************************/ -static void sim_timer_update(void) +static void sim_timer_update_internal(void) { sq_entry_t *entry; @@ -344,7 +344,7 @@ static int sim_current(struct oneshot_lowerhalf_s *lower, static int sim_alarm_handler(int irq, void *context, void *arg) { - sim_timer_update(); + sim_timer_update_internal(); return OK; } #endif /* CONFIG_SIM_WALLTIME_SIGNAL */ @@ -410,7 +410,7 @@ void up_timer_initialize(void) #ifdef CONFIG_SIM_WALLTIME_SIGNAL int host_alarm_irq; - host_settimer(&host_alarm_irq); + sim_host_settimer(&host_alarm_irq); /* Enable the alarm handler and attach the interrupt to the NuttX logic */ @@ -422,7 +422,7 @@ void up_timer_initialize(void) } /**************************************************************************** - * Name: up_timer_update + * Name: sim_timer_update * * Description: * Called from the IDLE loop to fake one timer tick. @@ -435,16 +435,16 @@ void up_timer_initialize(void) * ****************************************************************************/ -void up_timer_update(void) +void sim_timer_update(void) { static uint64_t until; /* Wait a bit so that the timing is close to the correct rate. */ until += NSEC_PER_TICK; - host_sleepuntil(until); + sim_host_sleepuntil(until); #ifdef CONFIG_SIM_WALLTIME_SLEEP - sim_timer_update(); + sim_timer_update_internal(); #endif } diff --git a/arch/sim/src/sim/up_releasepending.c b/arch/sim/src/sim/sim_releasepending.c similarity index 98% rename from arch/sim/src/sim/up_releasepending.c rename to arch/sim/src/sim/sim_releasepending.c index 1b664e62f03..8f6f5cadedb 100644 --- a/arch/sim/src/sim/up_releasepending.c +++ b/arch/sim/src/sim/sim_releasepending.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_releasepending.c + * arch/sim/src/sim/sim_releasepending.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/sim/src/sim/up_releasestack.c b/arch/sim/src/sim/sim_releasestack.c similarity index 98% rename from arch/sim/src/sim/up_releasestack.c rename to arch/sim/src/sim/sim_releasestack.c index 749cdd514be..e8a4fa1fa06 100644 --- a/arch/sim/src/sim/up_releasestack.c +++ b/arch/sim/src/sim/sim_releasestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_releasestack.c + * arch/sim/src/sim/sim_releasestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sim/src/sim/up_romgetc.c b/arch/sim/src/sim/sim_romgetc.c similarity index 98% rename from arch/sim/src/sim/up_romgetc.c rename to arch/sim/src/sim/sim_romgetc.c index c4cc3b50705..b3ef30cc98f 100644 --- a/arch/sim/src/sim/up_romgetc.c +++ b/arch/sim/src/sim/sim_romgetc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_romgetc.c + * arch/sim/src/sim/sim_romgetc.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sim/src/sim/up_rptun.c b/arch/sim/src/sim/sim_rptun.c similarity index 95% rename from arch/sim/src/sim/up_rptun.c rename to arch/sim/src/sim/sim_rptun.c index 5eb954d97d6..4250b45da1e 100644 --- a/arch/sim/src/sim/up_rptun.c +++ b/arch/sim/src/sim/sim_rptun.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_rptun.c + * arch/sim/src/sim/sim_rptun.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -26,7 +26,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Private Types @@ -91,8 +91,9 @@ sim_rptun_get_resource(struct rptun_dev_s *dev) while (priv->shmem == NULL) { - priv->shmem = host_alloc_shmem(priv->shmemname, sizeof(*priv->shmem), - priv->master); + priv->shmem = sim_host_allocshmem(priv->shmemname, + sizeof(*priv->shmem), + priv->master); usleep(1000); /* Master isn't ready, sleep and try again */ @@ -218,7 +219,7 @@ static struct list_node g_dev_list = LIST_INITIAL_VALUE(g_dev_list); * Public Functions ****************************************************************************/ -void up_rptun_loop(void) +void sim_rptun_loop(void) { struct sim_rptun_dev_s *dev; @@ -248,7 +249,7 @@ void up_rptun_loop(void) } } -int up_rptun_init(const char *shmemname, const char *cpuname, bool master) +int sim_rptun_init(const char *shmemname, const char *cpuname, bool master) { struct sim_rptun_dev_s *dev; int ret; diff --git a/arch/sim/src/sim/up_rtc.c b/arch/sim/src/sim/sim_rtc.c similarity index 97% rename from arch/sim/src/sim/up_rtc.c rename to arch/sim/src/sim/sim_rtc.c index 15723086e0a..757b4575a71 100644 --- a/arch/sim/src/sim/up_rtc.c +++ b/arch/sim/src/sim/sim_rtc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_rtc.c + * arch/sim/src/sim/sim_rtc.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -29,7 +29,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Private Function Prototypes @@ -69,7 +69,7 @@ static int sim_rtc_rdtime(struct rtc_lowerhalf_s *lower, uint64_t nsec; time_t sec; - nsec = host_gettime(true); + nsec = sim_host_gettime(true); nsec += g_sim_delta; sec = nsec / NSEC_PER_SEC; nsec -= sec * NSEC_PER_SEC; @@ -86,7 +86,7 @@ static int sim_rtc_settime(struct rtc_lowerhalf_s *lower, g_sim_delta = timegm((struct tm *)rtctime); g_sim_delta *= NSEC_PER_SEC; g_sim_delta += rtctime->tm_nsec; - g_sim_delta -= host_gettime(true); + g_sim_delta -= sim_host_gettime(true); return OK; } diff --git a/arch/sim/src/sim/up_schedulesigaction.c b/arch/sim/src/sim/sim_schedulesigaction.c similarity index 98% rename from arch/sim/src/sim/up_schedulesigaction.c rename to arch/sim/src/sim/sim_schedulesigaction.c index ce081cf5f69..d1a48d08f19 100644 --- a/arch/sim/src/sim/up_schedulesigaction.c +++ b/arch/sim/src/sim/sim_schedulesigaction.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_schedulesigaction.c + * arch/sim/src/sim/sim_schedulesigaction.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sim/src/sim/up_sigdeliver.c b/arch/sim/src/sim/sim_sigdeliver.c similarity index 98% rename from arch/sim/src/sim/up_sigdeliver.c rename to arch/sim/src/sim/sim_sigdeliver.c index 738a45f5fc9..fb3f0d9404f 100644 --- a/arch/sim/src/sim/up_sigdeliver.c +++ b/arch/sim/src/sim/sim_sigdeliver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_sigdeliver.c + * arch/sim/src/sim/sim_sigdeliver.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/sim/src/sim/up_smpsignal.c b/arch/sim/src/sim/sim_smpsignal.c similarity index 98% rename from arch/sim/src/sim/up_smpsignal.c rename to arch/sim/src/sim/sim_smpsignal.c index 54ba4aa8a35..851044646b9 100644 --- a/arch/sim/src/sim/up_smpsignal.c +++ b/arch/sim/src/sim/sim_smpsignal.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_smpsignal.c + * arch/sim/src/sim/sim_smpsignal.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "sim_internal.h" /* These spinlocks are used in the SMP configuration in order to implement * up_cpu_pause(). The protocol for CPUn to pause CPUm is as follows @@ -171,7 +171,7 @@ int up_cpu_paused(int cpu) * of the assigned task list for this CPU. */ - up_savestate(tcb->xcp.regs); + sim_savestate(tcb->xcp.regs); /* Wait for the spinlock to be released */ @@ -207,21 +207,21 @@ int up_cpu_paused(int cpu) * will be made when the interrupt returns. */ - up_restorestate(tcb->xcp.regs); + sim_restorestate(tcb->xcp.regs); spin_unlock(&g_cpu_wait[cpu]); return OK; } /**************************************************************************** - * Name: up_cpu_started + * Name: sim_cpu_started * * Description: * Notify the current cpu start successfully. * ****************************************************************************/ -void up_cpu_started(void) +void sim_cpu_started(void) { #ifdef CONFIG_SCHED_INSTRUMENTATION struct tcb_s *tcb = this_task(); @@ -277,7 +277,7 @@ int up_cpu_start(int cpu) } /**************************************************************************** - * Name: up_init_ipi + * Name: sim_init_ipi * * Description: * Attach the CPU pause request interrupt to the NuttX logic. @@ -289,7 +289,7 @@ int up_cpu_start(int cpu) * On success returns OK (0), otherwise a negative value. ****************************************************************************/ -int up_init_ipi(int irq) +int sim_init_ipi(int irq) { up_enable_irq(irq); return irq_attach(irq, sim_cpupause_handler, NULL); diff --git a/arch/sim/src/sim/up_stackframe.c b/arch/sim/src/sim/sim_stackframe.c similarity index 98% rename from arch/sim/src/sim/up_stackframe.c rename to arch/sim/src/sim/sim_stackframe.c index 850bfc9690e..36a430f9661 100644 --- a/arch/sim/src/sim/up_stackframe.c +++ b/arch/sim/src/sim/sim_stackframe.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_stackframe.c + * arch/sim/src/sim/sim_stackframe.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/sim/src/sim/up_touchscreen.c b/arch/sim/src/sim/sim_touchscreen.c similarity index 94% rename from arch/sim/src/sim/up_touchscreen.c rename to arch/sim/src/sim/sim_touchscreen.c index c271d309eef..5e23b2c0042 100644 --- a/arch/sim/src/sim/up_touchscreen.c +++ b/arch/sim/src/sim/sim_touchscreen.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_touchscreen.c + * arch/sim/src/sim/sim_touchscreen.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -55,7 +55,7 @@ /* This structure describes the state of one touchscreen driver instance */ -struct up_dev_s +struct sim_dev_s { int eventloop; uint8_t id; /* Current touch point ID */ @@ -72,7 +72,7 @@ struct up_dev_s * structure may as well be pre-allocated. */ -static struct up_dev_s g_simtouchscreen; +static struct sim_dev_s g_simtouchscreen; /**************************************************************************** * Public Functions @@ -96,7 +96,7 @@ static struct up_dev_s g_simtouchscreen; int sim_tsc_initialize(int minor) { - struct up_dev_s *priv = (struct up_dev_s *)&g_simtouchscreen; + struct sim_dev_s *priv = (struct sim_dev_s *)&g_simtouchscreen; char devname[DEV_NAMELEN]; int ret; @@ -108,7 +108,7 @@ int sim_tsc_initialize(int minor) /* Initialize the touchscreen device driver instance */ - memset(priv, 0, sizeof(struct up_dev_s)); + memset(priv, 0, sizeof(struct sim_dev_s)); priv->minor = minor; priv->lower.maxpoint = 1; @@ -150,7 +150,7 @@ int sim_tsc_initialize(int minor) int sim_tsc_uninitialize(void) { - struct up_dev_s *priv = (struct up_dev_s *)&g_simtouchscreen; + struct sim_dev_s *priv = (struct sim_dev_s *)&g_simtouchscreen; char devname[DEV_NAMELEN]; /* Stop the event loop (Hmm.. the caller must be sure that there are no @@ -171,12 +171,12 @@ int sim_tsc_uninitialize(void) } /**************************************************************************** - * Name: up_buttonevent + * Name: sim_buttonevent ****************************************************************************/ -void up_buttonevent(int x, int y, int buttons) +void sim_buttonevent(int x, int y, int buttons) { - struct up_dev_s *priv = (struct up_dev_s *)&g_simtouchscreen; + struct sim_dev_s *priv = (struct sim_dev_s *)&g_simtouchscreen; struct touch_sample_s sample; /* Sampled touch point data */ bool pendown; /* true: pen is down */ diff --git a/arch/sim/src/sim/up_uart.c b/arch/sim/src/sim/sim_uart.c similarity index 99% rename from arch/sim/src/sim/up_uart.c rename to arch/sim/src/sim/sim_uart.c index 545e49a6e36..a653bda7323 100644 --- a/arch/sim/src/sim/up_uart.c +++ b/arch/sim/src/sim/sim_uart.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_uart.c + * arch/sim/src/sim/sim_uart.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -29,7 +29,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" #if defined(USE_DEVCONSOLE) || CONFIG_SIM_UART_NUMBER > 0 /**************************************************************************** @@ -497,10 +497,10 @@ static bool tty_txempty(struct uart_dev_s *dev) ****************************************************************************/ /**************************************************************************** - * Name: up_uart + * Name: sim_uartinit ****************************************************************************/ -void up_uartinit(void) +void sim_uartinit(void) { #ifdef USE_DEVCONSOLE /* Start the simulated UART device */ @@ -530,10 +530,10 @@ void up_uartinit(void) } /**************************************************************************** - * Name: up_uartloop + * Name: sim_uartloop ****************************************************************************/ -void up_uartloop(void) +void sim_uartloop(void) { #ifdef USE_DEVCONSOLE if (simuart_checkc(0)) diff --git a/arch/sim/src/sim/up_unblocktask.c b/arch/sim/src/sim/sim_unblocktask.c similarity index 95% rename from arch/sim/src/sim/up_unblocktask.c rename to arch/sim/src/sim/sim_unblocktask.c index 08ed9d0e079..c372f87b690 100644 --- a/arch/sim/src/sim/up_unblocktask.c +++ b/arch/sim/src/sim/sim_unblocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_unblocktask.c + * arch/sim/src/sim/sim_unblocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include "clock/clock.h" #include "sched/sched.h" -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Functions @@ -68,7 +68,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * Just copy the CURRENT_REGS into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + sim_savestate(rtcb->xcp.regs); /* Update scheduler parameters */ @@ -80,7 +80,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) /* Then switch contexts */ - up_restorestate(tcb->xcp.regs); + sim_restorestate(tcb->xcp.regs); } /* Copy the exception context into the TCB of the task that was diff --git a/arch/sim/src/sim/up_usestack.c b/arch/sim/src/sim/sim_usestack.c similarity index 97% rename from arch/sim/src/sim/up_usestack.c rename to arch/sim/src/sim/sim_usestack.c index 8d3ffa88899..26ad5101403 100644 --- a/arch/sim/src/sim/up_usestack.c +++ b/arch/sim/src/sim/sim_usestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_usestack.c + * arch/sim/src/sim/sim_usestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Functions @@ -106,7 +106,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size) * water marks. */ - up_stack_color(tcb->stack_base_ptr, tcb->adj_stack_size); + sim_stack_color(tcb->stack_base_ptr, tcb->adj_stack_size); #endif return OK; diff --git a/arch/sim/src/sim/up_usrsock.c b/arch/sim/src/sim/sim_usrsock.c similarity index 99% rename from arch/sim/src/sim/up_usrsock.c rename to arch/sim/src/sim/sim_usrsock.c index 3e2a609426e..83f17827751 100644 --- a/arch/sim/src/sim/up_usrsock.c +++ b/arch/sim/src/sim/sim_usrsock.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_usrsock.c + * arch/sim/src/sim/sim_usrsock.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include -#include "up_usrsock_host.h" +#include "sim_usrsock_host.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/sim/src/sim/up_usrsock_host.h b/arch/sim/src/sim/sim_usrsock_host.h similarity index 98% rename from arch/sim/src/sim/up_usrsock_host.h rename to arch/sim/src/sim/sim_usrsock_host.h index e623ab25a0e..e23b9168a3a 100644 --- a/arch/sim/src/sim/up_usrsock_host.h +++ b/arch/sim/src/sim/sim_usrsock_host.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_usrsock_host.h + * arch/sim/src/sim/sim_usrsock_host.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -18,8 +18,8 @@ * ****************************************************************************/ -#ifndef __ARCH_SIM_SRC_SIM_UP_USRSOCK_HOST_H -#define __ARCH_SIM_SRC_SIM_UP_USRSOCK_HOST_H +#ifndef __ARCH_SIM_SRC_SIM_USRSOCK_HOST_H +#define __ARCH_SIM_SRC_SIM_USRSOCK_HOST_H /**************************************************************************** * Included Files @@ -314,4 +314,4 @@ int usrsock_host_ioctl(int fd, unsigned long request, ...); void usrsock_host_loop(void); #endif /* __SIM__ */ -#endif /* __ARCH_SIM_SRC_SIM_UP_USRSOCK_HOST_H */ +#endif /* __ARCH_SIM_SRC_SIM_USRSOCK_HOST_H */ diff --git a/arch/sim/src/sim/up_vfork.c b/arch/sim/src/sim/sim_vfork.c similarity index 99% rename from arch/sim/src/sim/up_vfork.c rename to arch/sim/src/sim/sim_vfork.c index 3945132e623..8d4b9c7bc4e 100644 --- a/arch/sim/src/sim/up_vfork.c +++ b/arch/sim/src/sim/sim_vfork.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_vfork.c + * arch/sim/src/sim/sim_vfork.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sim/src/sim/up_vfork_arm.S b/arch/sim/src/sim/sim_vfork_arm.S similarity index 99% rename from arch/sim/src/sim/up_vfork_arm.S rename to arch/sim/src/sim/sim_vfork_arm.S index a60faff6b69..29920dd3f92 100644 --- a/arch/sim/src/sim/up_vfork_arm.S +++ b/arch/sim/src/sim/sim_vfork_arm.S @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/sim/src/sim/up_vfork_arm.S + * arch/sim/src/sim/sim_vfork_arm.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sim/src/sim/up_vfork_arm64.S b/arch/sim/src/sim/sim_vfork_arm64.S similarity index 99% rename from arch/sim/src/sim/up_vfork_arm64.S rename to arch/sim/src/sim/sim_vfork_arm64.S index 1a863e1ec63..f0064ef1e5d 100644 --- a/arch/sim/src/sim/up_vfork_arm64.S +++ b/arch/sim/src/sim/sim_vfork_arm64.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/up_vfork_arm64.S + * arch/sim/src/sim/sim_vfork_arm64.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sim/src/sim/up_vfork_x86.S b/arch/sim/src/sim/sim_vfork_x86.S similarity index 99% rename from arch/sim/src/sim/up_vfork_x86.S rename to arch/sim/src/sim/sim_vfork_x86.S index fc152c20649..ff728247c3a 100644 --- a/arch/sim/src/sim/up_vfork_x86.S +++ b/arch/sim/src/sim/sim_vfork_x86.S @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/sim/src/sim/up_vfork_x86.S + * arch/sim/src/sim/sim_vfork_x86.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sim/src/sim/up_vfork_x86_64.S b/arch/sim/src/sim/sim_vfork_x86_64.S similarity index 99% rename from arch/sim/src/sim/up_vfork_x86_64.S rename to arch/sim/src/sim/sim_vfork_x86_64.S index 527678c5119..bf1ec71d5dd 100644 --- a/arch/sim/src/sim/up_vfork_x86_64.S +++ b/arch/sim/src/sim/sim_vfork_x86_64.S @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/sim/src/sim/up_vfork_x86_64.S + * arch/sim/src/sim/sim_vfork_x86_64.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sim/src/sim/vpnkit/negotiate.c b/arch/sim/src/sim/vpnkit/sim_negotiate.c similarity index 94% rename from arch/sim/src/sim/vpnkit/negotiate.c rename to arch/sim/src/sim/vpnkit/sim_negotiate.c index 3cb3e7ce570..4421ec06a0d 100644 --- a/arch/sim/src/sim/vpnkit/negotiate.c +++ b/arch/sim/src/sim/vpnkit/sim_negotiate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/vpnkit/negotiate.c + * arch/sim/src/sim/vpnkit/sim_negotiate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -45,16 +45,16 @@ #include #include -#include "protocol.h" +#include "sim_protocol.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ #define ERROR(fmt, ...) \ - syslog(LOG_ERR, "up_vpnkit: " fmt "\n", ##__VA_ARGS__) + syslog(LOG_ERR, "sim_vpnkit: " fmt "\n", ##__VA_ARGS__) #define INFO(fmt, ...) \ - syslog(LOG_ERR, "up_vpnkit: " fmt "\n", ##__VA_ARGS__) + syslog(LOG_ERR, "sim_vpnkit: " fmt "\n", ##__VA_ARGS__) /**************************************************************************** * Public Functions diff --git a/arch/sim/src/sim/vpnkit/protocol.c b/arch/sim/src/sim/vpnkit/sim_protocol.c similarity index 98% rename from arch/sim/src/sim/vpnkit/protocol.c rename to arch/sim/src/sim/vpnkit/sim_protocol.c index fe016956bc3..dd078b20361 100644 --- a/arch/sim/src/sim/vpnkit/protocol.c +++ b/arch/sim/src/sim/vpnkit/sim_protocol.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/vpnkit/protocol.c + * arch/sim/src/sim/vpnkit/sim_protocol.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -49,14 +49,14 @@ #include #include -#include "protocol.h" +#include "sim_protocol.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ #define ERROR(fmt, ...) \ - syslog(LOG_ERR, "up_vpnkit: " fmt "\n", ##__VA_ARGS__) + syslog(LOG_ERR, "sim_vpnkit: " fmt "\n", ##__VA_ARGS__) /**************************************************************************** * Public Data diff --git a/arch/sim/src/sim/vpnkit/protocol.h b/arch/sim/src/sim/vpnkit/sim_protocol.h similarity index 99% rename from arch/sim/src/sim/vpnkit/protocol.h rename to arch/sim/src/sim/vpnkit/sim_protocol.h index 04099a83e8b..9d1450e6063 100644 --- a/arch/sim/src/sim/vpnkit/protocol.h +++ b/arch/sim/src/sim/vpnkit/sim_protocol.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/vpnkit/protocol.h + * arch/sim/src/sim/vpnkit/sim_protocol.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sim/src/sim/win/up_hostirq.c b/arch/sim/src/sim/win/sim_hostirq.c similarity index 97% rename from arch/sim/src/sim/win/up_hostirq.c rename to arch/sim/src/sim/win/sim_hostirq.c index 2c22252cc17..bb3ce3d0859 100644 --- a/arch/sim/src/sim/win/up_hostirq.c +++ b/arch/sim/src/sim/win/sim_hostirq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/win/up_hostirq.c + * arch/sim/src/sim/win/sim_hostirq.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -25,7 +25,7 @@ #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Public Data diff --git a/arch/sim/src/sim/win/up_hostmemory.c b/arch/sim/src/sim/win/sim_hostmemory.c similarity index 82% rename from arch/sim/src/sim/win/up_hostmemory.c rename to arch/sim/src/sim/win/sim_hostmemory.c index 47ad9bc047d..ceade715f00 100644 --- a/arch/sim/src/sim/win/up_hostmemory.c +++ b/arch/sim/src/sim/win/sim_hostmemory.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/win/up_hostmemory.c + * arch/sim/src/sim/win/sim_hostmemory.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -29,19 +29,19 @@ ****************************************************************************/ /**************************************************************************** - * Name: host_alloc_heap + * Name: sim_host_allocheap * * Description: * Allocate executable memory for heap. * ****************************************************************************/ -void *host_alloc_heap(size_t sz) +void *sim_host_allocheap(size_t sz) { return _aligned_malloc(sz, 8); } -void *host_alloc_shmem(const char *name, size_t size, int master) +void *sim_host_allocshmem(const char *name, size_t size, int master) { HANDLE handle; void *mem; @@ -59,31 +59,31 @@ void *host_alloc_shmem(const char *name, size_t size, int master) return mem; } -void host_free_shmem(void *mem) +void sim_host_freeshmem(void *mem) { UnmapViewOfFile(mem); } -size_t host_malloc_size(void *mem) +size_t sim_host_mallocsize(void *mem) { return _msize(mem); } -void *host_memalign(size_t alignment, size_t size) +void *sim_host_memalign(size_t alignment, size_t size) { return _aligned_malloc(size, alignment); } -void host_free(void *mem) +void sim_host_free(void *mem) { _aligned_free(mem); } -void *host_realloc(void *oldmem, size_t size) +void *sim_host_realloc(void *oldmem, size_t size) { return _aligned_realloc(oldmem, size, 8); } -void host_mallinfo(int *aordblks, int *uordblks) +void sim_host_mallinfo(int *aordblks, int *uordblks) { } diff --git a/arch/sim/src/sim/win/up_hostmisc.c b/arch/sim/src/sim/win/sim_hostmisc.c similarity index 92% rename from arch/sim/src/sim/win/up_hostmisc.c rename to arch/sim/src/sim/win/sim_hostmisc.c index 795a9849a15..867fd9a8932 100644 --- a/arch/sim/src/sim/win/up_hostmisc.c +++ b/arch/sim/src/sim/win/sim_hostmisc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/win/up_hostmisc.c + * arch/sim/src/sim/win/sim_hostmisc.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -29,7 +29,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: host_abort + * Name: sim_host_abort * * Description: * Abort the simulation @@ -38,12 +38,12 @@ * status - Exit status to set ****************************************************************************/ -void host_abort(int status) +void sim_host_abort(int status) { ExitProcess(status); } -int host_backtrace(void** array, int size) +int sim_host_backtrace(void** array, int size) { return CaptureStackBackTrace(0, size, array, NULL); } diff --git a/arch/sim/src/sim/win/up_hosttime.c b/arch/sim/src/sim/win/sim_hosttime.c similarity index 91% rename from arch/sim/src/sim/win/up_hosttime.c rename to arch/sim/src/sim/win/sim_hosttime.c index cb857882e79..c6a50735225 100644 --- a/arch/sim/src/sim/win/up_hosttime.c +++ b/arch/sim/src/sim/win/sim_hosttime.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/win/up_hosttime.c + * arch/sim/src/sim/win/sim_hosttime.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -43,10 +43,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: host_gettime + * Name: sim_host_gettime ****************************************************************************/ -uint64_t host_gettime(bool rtc) +uint64_t sim_host_gettime(bool rtc) { static LARGE_INTEGER start; LARGE_INTEGER counter; @@ -75,10 +75,10 @@ uint64_t host_gettime(bool rtc) } /**************************************************************************** - * Name: host_sleep + * Name: sim_host_sleep ****************************************************************************/ -void host_sleep(uint64_t nsec) +void sim_host_sleep(uint64_t nsec) { LARGE_INTEGER due; HANDLE timer; @@ -99,22 +99,22 @@ void host_sleep(uint64_t nsec) } /**************************************************************************** - * Name: host_sleepuntil + * Name: sim_host_sleepuntil ****************************************************************************/ -void host_sleepuntil(uint64_t nsec) +void sim_host_sleepuntil(uint64_t nsec) { uint64_t now; - now = host_gettime(false); + now = sim_host_gettime(false); if (nsec > now) { - host_sleep(nsec - now); + sim_host_sleep(nsec - now); } } /**************************************************************************** - * Name: host_settimer + * Name: sim_host_settimer * * Description: * Set up a timer to send periodic signals. @@ -127,7 +127,7 @@ void host_sleepuntil(uint64_t nsec) * ****************************************************************************/ -int host_settimer(int *irq) +int sim_host_settimer(int *irq) { return -ENOSYS; } diff --git a/arch/sim/src/sim/win/up_simuart.c b/arch/sim/src/sim/win/sim_simuart.c similarity index 99% rename from arch/sim/src/sim/win/up_simuart.c rename to arch/sim/src/sim/win/sim_simuart.c index 9ce4c9ddfe7..902da107ba8 100644 --- a/arch/sim/src/sim/win/up_simuart.c +++ b/arch/sim/src/sim/win/sim_simuart.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sim/src/sim/win/up_simuart.c + * arch/sim/src/sim/win/sim_simuart.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sparc/include/syscall.h b/arch/sparc/include/syscall.h index e82f78956f9..b50b33804ed 100644 --- a/arch/sparc/include/syscall.h +++ b/arch/sparc/include/syscall.h @@ -65,30 +65,30 @@ /* SYS call 1: * - * void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function; + * void sparc_fullcontextrestore(uint32_t *restoreregs) noreturn_function; */ #define SYS_restore_context (1) -#define up_fullcontextrestore(restoreregs) \ +#define sparc_fullcontextrestore(restoreregs) \ sys_call1(SYS_restore_context, (uintptr_t)restoreregs) /* SYS call 2: * - * void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); + * void sparc_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); */ #define SYS_switch_context (2) -#define up_switchcontext(saveregs, restoreregs) \ +#define sparc_switchcontext(saveregs, restoreregs) \ sys_call2(SYS_switch_context, (uintptr_t)saveregs, (uintptr_t)restoreregs) #ifdef CONFIG_BUILD_KERNEL /* SYS call 3: * - * void up_syscall_return(void); + * void sparc_syscall_return(void); */ #define SYS_syscall_return (3) -#define up_syscall_return() sys_call0(SYS_syscall_return) +#define sparc_syscall_return() sys_call0(SYS_syscall_return) #endif #endif /* __ASSEMBLY__ */ @@ -120,7 +120,7 @@ extern "C" #endif /**************************************************************************** - * Name: up_syscall0 + * Name: sparc_syscall0 * * Description: * System call SYS_ argument and no additional parameters. @@ -130,7 +130,7 @@ extern "C" uintptr_t sys_call0(unsigned int nbr); /**************************************************************************** - * Name: up_syscall1 + * Name: sparc_syscall1 * * Description: * System call SYS_ argument and one additional parameter. @@ -140,7 +140,7 @@ uintptr_t sys_call0(unsigned int nbr); uintptr_t sys_call1(unsigned int nbr, uintptr_t parm1); /**************************************************************************** - * Name: up_syscall2 + * Name: sparc_syscall2 * * Description: * System call SYS_ argument and two additional parameters. @@ -150,7 +150,7 @@ uintptr_t sys_call1(unsigned int nbr, uintptr_t parm1); uintptr_t sys_call2(unsigned int nbr, uintptr_t parm1, uintptr_t parm2); /**************************************************************************** - * Name: up_syscall3 + * Name: sparc_syscall3 * * Description: * System call SYS_ argument and three additional parameters. @@ -161,7 +161,7 @@ uintptr_t sys_call3(unsigned int nbr, uintptr_t parm1, uintptr_t parm2, uintptr_t parm3); /**************************************************************************** - * Name: up_syscall4 + * Name: sparc_syscall4 * * Description: * System call SYS_ argument and four additional parameters. @@ -172,7 +172,7 @@ uintptr_t sys_call4(unsigned int nbr, uintptr_t parm1, uintptr_t parm2, uintptr_t parm3, uintptr_t parm4); /**************************************************************************** - * Name: up_syscall5 + * Name: sparc_syscall5 * * Description: * System call SYS_ argument and five additional parameters. diff --git a/arch/sparc/src/bm3803/Make.defs b/arch/sparc/src/bm3803/Make.defs index 558c3482365..120cb0554f2 100644 --- a/arch/sparc/src/bm3803/Make.defs +++ b/arch/sparc/src/bm3803/Make.defs @@ -18,7 +18,7 @@ # ############################################################################ -include common/Make.defs +include sparc_v8/Make.defs # The start-up, "head", file diff --git a/arch/sparc/src/bm3803/bm3803-irq.c b/arch/sparc/src/bm3803/bm3803-irq.c index 6971eeaa3f5..f3fd1941d7c 100644 --- a/arch/sparc/src/bm3803/bm3803-irq.c +++ b/arch/sparc/src/bm3803/bm3803-irq.c @@ -34,7 +34,7 @@ #include -#include "up_internal.h" +#include "sparc_internal.h" #include "bm3803.h" /**************************************************************************** @@ -82,8 +82,8 @@ void up_irqinitialize(void) /* Attach software interrupts */ - irq_attach(BM3803_IRQ_SW_SYSCALL_TA0, up_swint0, NULL); - irq_attach(BM3803_IRQ_SW_SYSCALL_TA8, up_swint1, NULL); + irq_attach(BM3803_IRQ_SW_SYSCALL_TA0, sparc_swint0, NULL); + irq_attach(BM3803_IRQ_SW_SYSCALL_TA8, sparc_swint1, NULL); /* And finally, enable interrupts */ @@ -167,14 +167,14 @@ void up_enable_irq(int irq) } /**************************************************************************** - * Name: up_pending_irq + * Name: sparc_pending_irq * * Description: * Return true if the interrupt is pending and unmasked. * ****************************************************************************/ -bool up_pending_irq(int irq) +bool sparc_pending_irq(int irq) { int bitno; uint16_t regval; @@ -215,14 +215,14 @@ bool up_pending_irq(int irq) } /**************************************************************************** - * Name: up_clrpend_irq + * Name: sparc_clrpend_irq * * Description: * Clear any pending interrupt * ****************************************************************************/ -void up_clrpend_irq(int irq) +void sparc_clrpend_irq(int irq) { int bitno; /* Acknowledge the interrupt by clearing the associated bit in the ITP diff --git a/arch/sparc/src/bm3803/bm3803-lowconsole.c b/arch/sparc/src/bm3803/bm3803-lowconsole.c index b0aaca32799..e89df0f1e12 100644 --- a/arch/sparc/src/bm3803/bm3803-lowconsole.c +++ b/arch/sparc/src/bm3803/bm3803-lowconsole.c @@ -32,7 +32,7 @@ #include -#include "up_internal.h" +#include "sparc_internal.h" #include "bm3803-uart.h" #include "bm3803.h" @@ -275,7 +275,7 @@ void uart3_configure(void) #endif /**************************************************************************** - * Name: up_consoleinit + * Name: sparc_consoleinit * * Description: * Initialize a console for debug output. This function is called very @@ -285,7 +285,7 @@ void uart3_configure(void) * ****************************************************************************/ -void up_consoleinit(void) +void sparc_consoleinit(void) { #ifdef HAVE_SERIAL_CONSOLE #if defined(CONFIG_UART1_SERIAL_CONSOLE) @@ -299,14 +299,14 @@ void up_consoleinit(void) } /**************************************************************************** - * Name: up_lowputc + * Name: sparc_lowputc * * Description: * Output one byte on the serial console * ****************************************************************************/ -void up_lowputc(char ch) +void sparc_lowputc(char ch) { #ifdef HAVE_SERIAL_CONSOLE #if defined(CONFIG_UART1_SERIAL_CONSOLE) diff --git a/arch/sparc/src/bm3803/bm3803-lowinit.c b/arch/sparc/src/bm3803/bm3803-lowinit.c index f7c372ef4af..6ed1c75ed1e 100644 --- a/arch/sparc/src/bm3803/bm3803-lowinit.c +++ b/arch/sparc/src/bm3803/bm3803-lowinit.c @@ -25,7 +25,7 @@ #include #include "bm3803-config.h" -#include "up_internal.h" +#include "sparc_internal.h" #include "bm3803.h" /**************************************************************************** @@ -61,7 +61,7 @@ ****************************************************************************/ #ifdef CONFIG_DEBUG_FEATURES -# define showprogress(c) up_lowputc(c) +# define showprogress(c) sparc_lowputc(c) #else # define showprogress(c) #endif @@ -86,7 +86,7 @@ void up_lowinit(void) /* Initialize a console (probably a serial console) */ - up_consoleinit(); + sparc_consoleinit(); showprogress('A'); @@ -105,7 +105,7 @@ void up_lowinit(void) */ #ifdef USE_EARLYSERIALINIT - up_earlyserialinit(); + sparc_earlyserialinit(); #endif /* Perform board-level initialization */ diff --git a/arch/sparc/src/bm3803/bm3803-serial.c b/arch/sparc/src/bm3803/bm3803-serial.c index e33165dc0f8..9e098c61c9f 100644 --- a/arch/sparc/src/bm3803/bm3803-serial.c +++ b/arch/sparc/src/bm3803/bm3803-serial.c @@ -44,7 +44,7 @@ #include -#include "up_internal.h" +#include "sparc_internal.h" #include "bm3803-config.h" #include "chip.h" #include "bm3803-uart.h" @@ -123,7 +123,7 @@ /* Common initialization logic will not not know that the all of the UARTs * have been disabled. So, as a result, we may still have to provide - * stub implementations of up_earlyserialinit(), up_serialinit(), and + * stub implementations of sparc_earlyserialinit(), sparc_serialinit(), and * up_putc(). */ @@ -807,18 +807,18 @@ static bool up_txempty(struct uart_dev_s *dev) ****************************************************************************/ /**************************************************************************** - * Name: up_earlyserialinit + * Name: sparc_earlyserialinit * * Description: * Performs the low level UART initialization early in debug so that the * serial console will be available during bootup. This must be called - * before up_serialinit. NOTE: This function depends on GPIO pin - * configuration performed in up_consoleinit() and main clock iniialization - * performed in up_clkinitialize(). + * before sparc_serialinit. NOTE: This function depends on GPIO pin + * configuration performed in sparc_consoleinit() and main clock + * iniialization performed in up_clkinitialize(). * ****************************************************************************/ -void up_earlyserialinit(void) +void sparc_earlyserialinit(void) { /* Disable interrupts from all UARTS. The console is enabled in * bm3803_consoleinit(). @@ -838,15 +838,15 @@ void up_earlyserialinit(void) } /**************************************************************************** - * Name: up_serialinit + * Name: sparc_serialinit * * Description: * Register serial console and serial ports. This assumes - * that up_earlyserialinit was called previously. + * that sparc_earlyserialinit was called previously. * ****************************************************************************/ -void up_serialinit(void) +void sparc_serialinit(void) { /* Register the console */ @@ -884,31 +884,31 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + sparc_lowputc('\r'); } - up_lowputc(ch); + sparc_lowputc(ch); up_restoreuartint(dev, imr); #endif return ch; } /**************************************************************************** - * Name: up_earlyserialinit, up_serialinit, and up_putc + * Name: sparc_earlyserialinit, sparc_serialinit, and up_putc * * Description: * stubs that may be needed. These stubs would be used if all UARTs are - * disabled. In that case, the logic in common/up_initialize() is not + * disabled. In that case, the logic in common/sparc_initialize() is not * smart enough to know that there are not UARTs and will still expect * these interfaces to be provided. * ****************************************************************************/ #else /* HAVE_UART_DEVICE */ -void up_earlyserialinit(void) +void sparc_earlyserialinit(void) { } -void up_serialinit(void) +void sparc_serialinit(void) { } @@ -937,10 +937,10 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + sparc_lowputc('\r'); } - up_lowputc(ch); + sparc_lowputc(ch); #endif return ch; } diff --git a/arch/sparc/src/bm3803/bm3803-timerisr.c b/arch/sparc/src/bm3803/bm3803-timerisr.c index fd0502a05f2..f7aabb91673 100644 --- a/arch/sparc/src/bm3803/bm3803-timerisr.c +++ b/arch/sparc/src/bm3803/bm3803-timerisr.c @@ -31,7 +31,7 @@ #include #include -#include "up_internal.h" +#include "sparc_internal.h" #include "bm3803.h" /**************************************************************************** @@ -81,7 +81,7 @@ static int bm3803_timerisr(int irq, uint32_t *regs, void *arg) { /* Clear the pending timer interrupt */ - up_clrpend_irq(BM3803_IRQ_TIMER1); + sparc_clrpend_irq(BM3803_IRQ_TIMER1); /* Process timer interrupt */ @@ -121,7 +121,7 @@ void up_timer_initialize(void) /* Configure the timer interrupt */ - up_clrpend_irq(BM3803_IRQ_TIMER1); + sparc_clrpend_irq(BM3803_IRQ_TIMER1); #ifdef CONFIG_ARCH_IRQPRIO up_prioritize_irq(BM3803_IRQ_TIMER1, CONFIG_BM3803_TIMER1PRIO); #endif diff --git a/arch/sparc/src/bm3803/bm3803.h b/arch/sparc/src/bm3803/bm3803.h index 3a80fe99cf2..225f6e8b6d2 100644 --- a/arch/sparc/src/bm3803/bm3803.h +++ b/arch/sparc/src/bm3803/bm3803.h @@ -468,7 +468,7 @@ void uart1_configure(void); void uart2_configure(void); void uart3_configure(void); /**************************************************************************** - * Name: up_consoleinit + * Name: sparc_consoleinit * * Description: * Initialize a console for debug output. This function is called very @@ -478,9 +478,9 @@ void uart3_configure(void); ****************************************************************************/ #ifdef HAVE_SERIAL_CONSOLE -void up_consoleinit(void); +void sparc_consoleinit(void); #else -# define up_consoleinit() +# define sparc_consoleinit() #endif /**************************************************************************** diff --git a/arch/sparc/src/bm3803/bm3803_exceptions.S b/arch/sparc/src/bm3803/bm3803_exceptions.S index d5a0f23a988..c6855112038 100644 --- a/arch/sparc/src/bm3803/bm3803_exceptions.S +++ b/arch/sparc/src/bm3803/bm3803_exceptions.S @@ -31,7 +31,7 @@ ****************************************************************************/ .global _ISR_Handler - .global up_doirq /* Dispatch an IRQ */ + .global sparc_doirq /* Dispatch an IRQ */ /* * void _ISR_Handler() @@ -197,7 +197,7 @@ fix_pil: ! o1 = 2nd arg = address of the ISF ! WAS LOADED WHEN ISF WAS SAVED!!! mov %l3, %o0 ! o0 = 1st arg = vector number - call up_doirq /* call ISR dispatcher */ + call sparc_doirq /* call ISR dispatcher */ nop /*==========================================================================*/ mov %l0, %psr ! **** DISABLE TRAPS **** diff --git a/arch/sparc/src/bm3803/bm3803_exti_gpio.c b/arch/sparc/src/bm3803/bm3803_exti_gpio.c index 5959d3a5ed4..df18a8a9e3d 100644 --- a/arch/sparc/src/bm3803/bm3803_exti_gpio.c +++ b/arch/sparc/src/bm3803/bm3803_exti_gpio.c @@ -33,7 +33,7 @@ #include -#include "up_internal.h" +#include "sparc_internal.h" #include "chip.h" #include "bm3803.h" /**************************************************************************** @@ -68,7 +68,7 @@ static int bm3803_exti0_isr(int irq, void *context, void *arg) /* Clear the pending interrupt */ - up_clrpend_irq(BM3803_IRQ_EXTERNAL_0); + sparc_clrpend_irq(BM3803_IRQ_EXTERNAL_0); /* And dispatch the interrupt to the handler */ @@ -99,7 +99,7 @@ static int bm3803_exti1_isr(int irq, void *context, void *arg) /* Clear the pending interrupt */ - up_clrpend_irq(BM3803_IRQ_EXTERNAL_1); + sparc_clrpend_irq(BM3803_IRQ_EXTERNAL_1); return ret; } @@ -120,7 +120,7 @@ static int bm3803_exti2_isr(int irq, void *context, void *arg) /* Clear the pending interrupt */ - up_clrpend_irq(BM3803_IRQ_EXTERNAL_2); + sparc_clrpend_irq(BM3803_IRQ_EXTERNAL_2); return ret; } @@ -141,7 +141,7 @@ static int bm3803_exti3_isr(int irq, void *context, void * arg) /* Clear the pending interrupt */ - up_clrpend_irq(BM3803_IRQ_EXTERNAL_3); + sparc_clrpend_irq(BM3803_IRQ_EXTERNAL_3); return ret; } diff --git a/arch/sparc/src/bm3803/bm3803_tim.c b/arch/sparc/src/bm3803/bm3803_tim.c index c608f2d5e75..9e5ae992332 100644 --- a/arch/sparc/src/bm3803/bm3803_tim.c +++ b/arch/sparc/src/bm3803/bm3803_tim.c @@ -37,7 +37,7 @@ #include #include "chip.h" -#include "up_internal.h" +#include "sparc_internal.h" #include "bm3803.h" #include "bm3803_tim.h" @@ -525,7 +525,7 @@ static void bm3803_tim_clrint(struct bm3803_tim_dev_s *dev, int source) break; } - up_clrpend_irq(vectorno); + sparc_clrpend_irq(vectorno); } /**************************************************************************** @@ -557,7 +557,7 @@ static int bm3803_tim_checkint(struct bm3803_tim_dev_s *dev, int source) return -EINVAL; } - return up_pending_irq(vectorno); + return sparc_pending_irq(vectorno); } /**************************************************************************** diff --git a/arch/sparc/src/bm3803/bm3803_wdg.c b/arch/sparc/src/bm3803/bm3803_wdg.c index 0147f5dde9e..92f9473307f 100644 --- a/arch/sparc/src/bm3803/bm3803_wdg.c +++ b/arch/sparc/src/bm3803/bm3803_wdg.c @@ -35,7 +35,7 @@ #include #include -#include "up_internal.h" +#include "sparc_internal.h" #include "bm3803_wdg.h" #if defined(CONFIG_WATCHDOG) && defined(CONFIG_BM3803_WDG) diff --git a/arch/sparc/src/bm3823/Make.defs b/arch/sparc/src/bm3823/Make.defs index 8a568ac5bdb..d6055a696da 100644 --- a/arch/sparc/src/bm3823/Make.defs +++ b/arch/sparc/src/bm3823/Make.defs @@ -18,22 +18,12 @@ # ############################################################################ -include common/Make.defs +include sparc_v8/Make.defs # The start-up, "head", file HEAD_ASRC += bm3823_head.S -# Configuration-dependent common files - -ifeq ($(CONFIG_ARCH_STACKDUMP),y) -CMN_CSRCS += up_dumpstate.c -endif - -ifeq ($(CONFIG_STACK_COLORATION),y) -CMN_CSRCS += up_checkstack.c -endif - # Required bm3823 files CHIP_ASRCS = bm3823_exceptions.S diff --git a/arch/sparc/src/bm3823/bm3823-irq.c b/arch/sparc/src/bm3823/bm3823-irq.c index 420a9e63436..3bd8f95963d 100644 --- a/arch/sparc/src/bm3823/bm3823-irq.c +++ b/arch/sparc/src/bm3823/bm3823-irq.c @@ -33,7 +33,7 @@ #include -#include "up_internal.h" +#include "sparc_internal.h" #include "bm3823.h" /**************************************************************************** @@ -87,8 +87,8 @@ void up_irqinitialize(void) /* Attach software interrupts */ - irq_attach(BM3823_IRQ_SW_SYSCALL_TA0, up_swint0, NULL); - irq_attach(BM3823_IRQ_SW_SYSCALL_TA8, up_swint1, NULL); + irq_attach(BM3823_IRQ_SW_SYSCALL_TA0, sparc_swint0, NULL); + irq_attach(BM3823_IRQ_SW_SYSCALL_TA8, sparc_swint1, NULL); /* And finally, enable interrupts */ @@ -172,14 +172,14 @@ void up_enable_irq(int irq) } /**************************************************************************** - * Name: up_pending_irq + * Name: sparc_pending_irq * * Description: * Return true if the interrupt is pending and unmasked. * ****************************************************************************/ -bool up_pending_irq(int irq) +bool sparc_pending_irq(int irq) { int bitno; uint16_t regval; @@ -220,14 +220,14 @@ bool up_pending_irq(int irq) } /**************************************************************************** - * Name: up_clrpend_irq + * Name: sparc_clrpend_irq * * Description: * Clear any pending interrupt * ****************************************************************************/ -void up_clrpend_irq(int irq) +void sparc_clrpend_irq(int irq) { int bitno; /* Acknowledge the interrupt by clearing the associated bit in the ITP diff --git a/arch/sparc/src/bm3823/bm3823-lowconsole.c b/arch/sparc/src/bm3823/bm3823-lowconsole.c index aef5e9f947f..c8a3f21f2ab 100644 --- a/arch/sparc/src/bm3823/bm3823-lowconsole.c +++ b/arch/sparc/src/bm3823/bm3823-lowconsole.c @@ -32,7 +32,7 @@ #include -#include "up_internal.h" +#include "sparc_internal.h" #include "bm3823-uart.h" #include "bm3823.h" @@ -258,7 +258,7 @@ void uart3_configure(void) #endif /**************************************************************************** - * Name: up_consoleinit + * Name: sparc_consoleinit * * Description: * Initialize a console for debug output. This function is called very @@ -267,7 +267,7 @@ void uart3_configure(void) * ****************************************************************************/ -void up_consoleinit(void) +void sparc_consoleinit(void) { #ifdef HAVE_SERIAL_CONSOLE # if defined(CONFIG_UART1_SERIAL_CONSOLE) @@ -281,14 +281,14 @@ void up_consoleinit(void) } /**************************************************************************** - * Name: up_lowputc + * Name: sparc_lowputc * * Description: * Output one byte on the serial console * ****************************************************************************/ -void up_lowputc(char ch) +void sparc_lowputc(char ch) { #ifdef HAVE_SERIAL_CONSOLE # if defined(CONFIG_UART1_SERIAL_CONSOLE) diff --git a/arch/sparc/src/bm3823/bm3823-lowinit.c b/arch/sparc/src/bm3823/bm3823-lowinit.c index 999eecd686a..87977014dc4 100644 --- a/arch/sparc/src/bm3823/bm3823-lowinit.c +++ b/arch/sparc/src/bm3823/bm3823-lowinit.c @@ -25,7 +25,7 @@ #include #include "bm3823-config.h" -#include "up_internal.h" +#include "sparc_internal.h" #include "bm3823.h" /**************************************************************************** @@ -83,7 +83,7 @@ ****************************************************************************/ #ifdef CONFIG_DEBUG_FEATURES -# define showprogress(c) up_lowputc(c) +# define showprogress(c) sparc_lowputc(c) #else # define showprogress(c) #endif @@ -139,7 +139,7 @@ void up_lowinit(void) /* Initialize a console (probably a serial console) */ - up_consoleinit(); + sparc_consoleinit(); showprogress('A'); @@ -158,7 +158,7 @@ void up_lowinit(void) */ #ifdef USE_EARLYSERIALINIT - up_earlyserialinit(); + sparc_earlyserialinit(); #endif /* Perform board-level initialization */ diff --git a/arch/sparc/src/bm3823/bm3823-serial.c b/arch/sparc/src/bm3823/bm3823-serial.c index 5c737a2c8fb..11ba11d3851 100644 --- a/arch/sparc/src/bm3823/bm3823-serial.c +++ b/arch/sparc/src/bm3823/bm3823-serial.c @@ -43,7 +43,7 @@ #include -#include "up_internal.h" +#include "sparc_internal.h" #include "bm3823-config.h" #include "chip.h" #include "bm3823-uart.h" @@ -122,7 +122,7 @@ /* Common initialization logic will not not know that the all of the UARTs * have been disabled. So, as a result, we may still have to provide - * stub implementations of up_earlyserialinit(), up_serialinit(), and + * stub implementations of sparc_earlyserialinit(), sparc_serialinit(), and * up_putc(). */ @@ -803,18 +803,18 @@ static bool up_txempty(struct uart_dev_s *dev) ****************************************************************************/ /**************************************************************************** - * Name: up_earlyserialinit + * Name: sparc_earlyserialinit * * Description: * Performs the low level UART initialization early in debug so that the * serial console will be available during bootup. This must be called - * before up_serialinit. NOTE: This function depends on GPIO pin - * configuration performed in up_consoleinit() and main clock iniialization - * performed in up_clkinitialize(). + * before sparc_serialinit. NOTE: This function depends on GPIO pin + * configuration performed in sparc_consoleinit() and main clock + * iniialization performed in up_clkinitialize(). * ****************************************************************************/ -void up_earlyserialinit(void) +void sparc_earlyserialinit(void) { /* Disable interrupts from all UARTS. The console is enabled in * bm3823_consoleinit(). @@ -834,15 +834,15 @@ void up_earlyserialinit(void) } /**************************************************************************** - * Name: up_serialinit + * Name: sparc_serialinit * * Description: * Register serial console and serial ports. This assumes - * that up_earlyserialinit was called previously. + * that sparc_earlyserialinit was called previously. * ****************************************************************************/ -void up_serialinit(void) +void sparc_serialinit(void) { /* Register the console */ @@ -880,31 +880,31 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + sparc_lowputc('\r'); } - up_lowputc(ch); + sparc_lowputc(ch); up_restoreuartint(dev, imr); #endif return ch; } /**************************************************************************** - * Name: up_earlyserialinit, up_serialinit, and up_putc + * Name: sparc_earlyserialinit, sparc_serialinit, and up_putc * * Description: * stubs that may be needed. These stubs would be used if all UARTs are - * disabled. In that case, the logic in common/up_initialize() is not + * disabled. In that case, the logic in common/sparc_initialize() is not * smart enough to know that there are not UARTs and will still expect * these interfaces to be provided. * ****************************************************************************/ #else /* HAVE_UART_DEVICE */ -void up_earlyserialinit(void) +void sparc_earlyserialinit(void) { } -void up_serialinit(void) +void sparc_serialinit(void) { } @@ -933,10 +933,10 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + sparc_lowputc('\r'); } - up_lowputc(ch); + sparc_lowputc(ch); #endif return ch; } diff --git a/arch/sparc/src/bm3823/bm3823-timerisr.c b/arch/sparc/src/bm3823/bm3823-timerisr.c index 76fd5baae85..95006b04a4c 100644 --- a/arch/sparc/src/bm3823/bm3823-timerisr.c +++ b/arch/sparc/src/bm3823/bm3823-timerisr.c @@ -31,7 +31,7 @@ #include #include -#include "up_internal.h" +#include "sparc_internal.h" #include "bm3823.h" /**************************************************************************** @@ -82,7 +82,7 @@ static int bm3823_timerisr(int irq, uint32_t *regs, void *arg) { /* Clear the pending timer interrupt */ - up_clrpend_irq(BM3823_IRQ_TIMER1); + sparc_clrpend_irq(BM3823_IRQ_TIMER1); /* Process timer interrupt */ @@ -122,7 +122,7 @@ void up_timer_initialize(void) /* Configure the timer interrupt */ - up_clrpend_irq(BM3823_IRQ_TIMER1); + sparc_clrpend_irq(BM3823_IRQ_TIMER1); #ifdef CONFIG_ARCH_IRQPRIO up_prioritize_irq(BM3823_IRQ_TIMER1, CONFIG_BM3823_TIMER1PRIO); #endif diff --git a/arch/sparc/src/bm3823/bm3823.h b/arch/sparc/src/bm3823/bm3823.h index afdab330624..944acc72a2d 100644 --- a/arch/sparc/src/bm3823/bm3823.h +++ b/arch/sparc/src/bm3823/bm3823.h @@ -548,7 +548,7 @@ void uart2_configure(void); void uart3_configure(void); /**************************************************************************** - * Name: up_consoleinit + * Name: sparc_consoleinit * * Description: * Initialize a console for debug output. This function is called very @@ -558,9 +558,9 @@ void uart3_configure(void); ****************************************************************************/ #ifdef HAVE_SERIAL_CONSOLE -void up_consoleinit(void); +void sparc_consoleinit(void); #else -# define up_consoleinit() +# define sparc_consoleinit() #endif /**************************************************************************** diff --git a/arch/sparc/src/bm3823/bm3823_exceptions.S b/arch/sparc/src/bm3823/bm3823_exceptions.S index 099eb0f6421..a7b6c93dbcc 100644 --- a/arch/sparc/src/bm3823/bm3823_exceptions.S +++ b/arch/sparc/src/bm3823/bm3823_exceptions.S @@ -31,7 +31,7 @@ ****************************************************************************/ .global _ISR_Handler - .global up_doirq /* Dispatch an IRQ */ + .global sparc_doirq /* Dispatch an IRQ */ /* * void _ISR_Handler() @@ -145,7 +145,7 @@ fix_pil: ! o1 = 2nd arg = address of the ISF ! WAS LOADED WHEN ISF WAS SAVED!!! mov %l3, %o0 ! o0 = 1st arg = vector number - call up_doirq /* call ISR dispatcher */ + call sparc_doirq /* call ISR dispatcher */ nop /*==========================================================================*/ mov %l0, %psr ! **** DISABLE TRAPS **** diff --git a/arch/sparc/src/common/Make.defs b/arch/sparc/src/common/Make.defs index 22dafd22877..3bcae0ca91c 100644 --- a/arch/sparc/src/common/Make.defs +++ b/arch/sparc/src/common/Make.defs @@ -20,25 +20,19 @@ # Common Sparc files (arch/sparc/src/common) -CMN_ASRCS = up_syscall.S -CMN_CSRCS = up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c up_systemreset.c -CMN_CSRCS += up_createstack.c up_doirq.c up_exit.c up_idle.c up_initialize.c -CMN_CSRCS += up_initialstate.c up_irq.c up_lowputs.c -CMN_CSRCS += up_mdelay.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c -CMN_CSRCS += up_nputs.c up_releasepending.c up_releasestack.c -CMN_CSRCS += up_schedulesigaction.c up_sigdeliver.c -CMN_CSRCS += up_stackframe.c up_swint1.c up_udelay.c up_unblocktask.c up_usestack.c +CMN_CSRCS += sparc_allocateheap.c sparc_assert.c +CMN_CSRCS += sparc_createstack.c sparc_exit.c sparc_idle.c sparc_initialize.c +CMN_CSRCS += sparc_lowputs.c sparc_mdelay.c +CMN_CSRCS += sparc_modifyreg8.c sparc_modifyreg16.c sparc_modifyreg32.c +CMN_CSRCS += sparc_nputs.c sparc_releasestack.c +CMN_CSRCS += sparc_stackframe.c sparc_udelay.c sparc_usestack.c # Configuration-dependent common files -ifeq ($(CONFIG_ARCH_STACKDUMP),y) -CMN_CSRCS += up_dumpstate.c -endif - ifeq ($(CONFIG_STACK_COLORATION),y) -CMN_CSRCS += up_checkstack.c +CMN_CSRCS += sparc_checkstack.c endif ifeq ($(CONFIG_SPINLOCK),y) - CMN_CSRCS += up_testset.c +CMN_CSRCS += sparc_testset.c endif diff --git a/arch/sparc/src/common/up_allocateheap.c b/arch/sparc/src/common/sparc_allocateheap.c similarity index 97% rename from arch/sparc/src/common/up_allocateheap.c rename to arch/sparc/src/common/sparc_allocateheap.c index 1419c4c421f..8cbea95345a 100644 --- a/arch/sparc/src/common/up_allocateheap.c +++ b/arch/sparc/src/common/sparc_allocateheap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/common/up_allocateheap.c + * arch/sparc/src/common/sparc_allocateheap.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include #include -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/sparc/src/common/up_assert.c b/arch/sparc/src/common/sparc_assert.c similarity index 98% rename from arch/sparc/src/common/up_assert.c rename to arch/sparc/src/common/sparc_assert.c index 001e2667bd7..b0b28263122 100644 --- a/arch/sparc/src/common/up_assert.c +++ b/arch/sparc/src/common/sparc_assert.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/common/up_assert.c + * arch/sparc/src/common/sparc_assert.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -38,7 +38,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -147,7 +147,7 @@ void up_assert(const char *filename, int lineno) filename, lineno); #endif - up_dumpstate(); + sparc_dumpstate(); /* Flush any buffered SYSLOG data (from the above) */ diff --git a/arch/sparc/src/common/up_checkstack.c b/arch/sparc/src/common/sparc_checkstack.c similarity index 96% rename from arch/sparc/src/common/up_checkstack.c rename to arch/sparc/src/common/sparc_checkstack.c index ff5b3d2b911..752a93fa17f 100644 --- a/arch/sparc/src/common/up_checkstack.c +++ b/arch/sparc/src/common/sparc_checkstack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/common/up_checkstack.c + * arch/sparc/src/common/sparc_checkstack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -35,7 +35,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "sparc_internal.h" #ifdef CONFIG_STACK_COLORATION @@ -140,14 +140,14 @@ size_t sparc_stack_check(void *stackbase, size_t nbytes) } /**************************************************************************** - * Name: up_stack_color + * Name: sparc_stack_color * * Description: * Write a well know value into the stack * ****************************************************************************/ -void up_stack_color(void *stackbase, size_t nbytes) +void sparc_stack_color(void *stackbase, size_t nbytes) { uint32_t *stkptr; uintptr_t stkend; @@ -221,7 +221,7 @@ ssize_t up_check_stack_remain(void) #if CONFIG_ARCH_INTERRUPTSTACK > 7 size_t up_check_intstack(void) { - return sparc_stack_check((void *)up_intstack_alloc(), + return sparc_stack_check((void *)sparc_intstack_alloc(), STACK_ALIGN_DOWN(CONFIG_ARCH_INTERRUPTSTACK)); } diff --git a/arch/sparc/src/common/up_createstack.c b/arch/sparc/src/common/sparc_createstack.c similarity index 97% rename from arch/sparc/src/common/up_createstack.c rename to arch/sparc/src/common/sparc_createstack.c index 6be87aa46b6..409e41a28fb 100644 --- a/arch/sparc/src/common/up_createstack.c +++ b/arch/sparc/src/common/sparc_createstack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/common/up_createstack.c + * arch/sparc/src/common/sparc_createstack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ #include #include -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Public Functions @@ -166,7 +166,7 @@ int up_create_stack(struct tcb_s *tcb, size_t stack_size, uint8_t ttype) * water marks. */ - up_stack_color(tcb->stack_base_ptr, tcb->adj_stack_size); + sparc_stack_color(tcb->stack_base_ptr, tcb->adj_stack_size); #endif /* CONFIG_STACK_COLORATION */ tcb->flags |= TCB_FLAG_FREE_STACK; diff --git a/arch/sparc/src/common/up_exit.c b/arch/sparc/src/common/sparc_exit.c similarity index 96% rename from arch/sparc/src/common/up_exit.c rename to arch/sparc/src/common/sparc_exit.c index 1b39938310d..2d47971813f 100644 --- a/arch/sparc/src/common/up_exit.c +++ b/arch/sparc/src/common/sparc_exit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/common/up_exit.c + * arch/sparc/src/common/sparc_exit.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -38,7 +38,7 @@ #include "task/task.h" #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -136,9 +136,9 @@ void up_exit(int status) /* Then switch contexts */ - up_fullcontextrestore(tcb->xcp.regs); + sparc_fullcontextrestore(tcb->xcp.regs); - /* up_fullcontextrestore() should not return but could if software + /* sparc_fullcontextrestore() should not return but could if software * interrupts are disabled. NOTE: Can't use DEBUGPANIC here because * that results in a GCC compilation warning: "No return function does * return" diff --git a/arch/sparc/src/common/up_idle.c b/arch/sparc/src/common/sparc_idle.c similarity index 97% rename from arch/sparc/src/common/up_idle.c rename to arch/sparc/src/common/sparc_idle.c index 3ca4df75c4a..422762e2dbb 100644 --- a/arch/sparc/src/common/up_idle.c +++ b/arch/sparc/src/common/sparc_idle.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/common/up_idle.c + * arch/sparc/src/common/sparc_idle.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -25,7 +25,7 @@ #include #include -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/sparc/src/common/up_initialize.c b/arch/sparc/src/common/sparc_initialize.c similarity index 91% rename from arch/sparc/src/common/up_initialize.c rename to arch/sparc/src/common/sparc_initialize.c index 769753e705b..a23a1380202 100644 --- a/arch/sparc/src/common/up_initialize.c +++ b/arch/sparc/src/common/sparc_initialize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/common/up_initialize.c + * arch/sparc/src/common/sparc_initialize.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -26,15 +26,15 @@ #include #include -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ /* Determine which (if any) console driver to use. This will probably cause - * up_serialinit to be incorrectly called if there is no USART configured to - * be an RS-232 device (see as an example arch/sparc/src/at32uc23/at32uc3 + * sparc_serialinit to be incorrectly called if there is no USART configured + * to be an RS-232 device (see as an example arch/sparc/src/at32uc23/at32uc3 * config.h) This will probably have to be revisited someday. * * If a console is enabled and no other console device is specified, then a @@ -103,7 +103,7 @@ volatile uint32_t *g_current_regs[CONFIG_SMP_NCPUS]; #if defined(CONFIG_STACK_COLORATION) && CONFIG_ARCH_INTERRUPTSTACK > 7 static inline void up_color_intstack(void) { - uint32_t *ptr = (uint32_t *)up_intstack_alloc(); + uint32_t *ptr = (uint32_t *)sparc_intstack_alloc(); ssize_t size; for (size = ((CONFIG_ARCH_INTERRUPTSTACK & ~7) * CONFIG_SMP_NCPUS); @@ -159,30 +159,30 @@ void up_initialize(void) /* Add any extra memory fragments to the memory manager */ - up_addregion(); + sparc_addregion(); #ifdef CONFIG_ARCH_DMA - /* Initialize the DMA subsystem if the weak function up_dma_initialize has - * been brought into the build + /* Initialize the DMA subsystem if the weak function sparc_dma_initialize + * has been brought into the build */ #ifdef CONFIG_HAVE_WEAKFUNCTIONS - if (up_dma_initialize) + if (sparc_dma_initialize) #endif { - up_dma_initialize(); + sparc_dma_initialize(); } #endif /* Initialize the serial device driver */ #ifdef USE_SERIALDRIVER - up_serialinit(); + sparc_serialinit(); #endif /* Initialize USB */ - up_usbinitialize(); + sparc_usbinitialize(); #if defined(ARCH_HAVE_LEDS) board_autoled_on(LED_IRQSENABLED); diff --git a/arch/sparc/src/common/up_internal.h b/arch/sparc/src/common/sparc_internal.h similarity index 88% rename from arch/sparc/src/common/up_internal.h rename to arch/sparc/src/common/sparc_internal.h index 873ba7781b6..7a49a8396e9 100644 --- a/arch/sparc/src/common/up_internal.h +++ b/arch/sparc/src/common/sparc_internal.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/common/up_internal.h + * arch/sparc/src/common/sparc_internal.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -177,37 +177,37 @@ void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits); /* Context switching */ -void up_copystate(uint32_t *dest, uint32_t *src); +void sparc_copystate(uint32_t *dest, uint32_t *src); /* Serial output */ -void up_lowputs(const char *str); +void sparc_lowputs(const char *str); /* Debug */ #ifdef CONFIG_ARCH_STACKDUMP -void up_dumpstate(void); +void sparc_dumpstate(void); #else -# define up_dumpstate() +# define sparc_dumpstate() #endif /* Software interrupt 0 handler */ -int up_swint0(int irq, void *context, void *arg); +int sparc_swint0(int irq, void *context, void *arg); /* Software interrupt 1 handler */ -int up_swint1(int irq, void *context, void *arg); +int sparc_swint1(int irq, void *context, void *arg); /* Signals */ -void up_sigdeliver(void); +void sparc_sigdeliver(void); /* Interrupt handling *******************************************************/ #if CONFIG_ARCH_INTERRUPTSTACK > 7 -uintptr_t up_intstack_alloc(void); -uintptr_t up_intstack_top(void); +uintptr_t sparc_intstack_alloc(void); +uintptr_t sparc_intstack_top(void); #endif /* Chip-specific functions **************************************************/ @@ -216,51 +216,51 @@ uintptr_t up_intstack_top(void); /* IRQs */ -bool up_pending_irq(int irq); -void up_clrpend_irq(int irq); +bool sparc_pending_irq(int irq); +void sparc_clrpend_irq(int irq); /* DMA */ #ifdef CONFIG_ARCH_DMA -void weak_function up_dma_initialize(void); +void weak_function sparc_dma_initialize(void); #endif /* Memory management */ #if CONFIG_MM_REGIONS > 1 -void up_addregion(void); +void sparc_addregion(void); #else -# define up_addregion() +# define sparc_addregion() #endif /* Serial output */ -void up_lowputc(char ch); -void up_earlyserialinit(void); -void up_serialinit(void); +void sparc_lowputc(char ch); +void sparc_earlyserialinit(void); +void sparc_serialinit(void); /* Network */ #if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) -void up_netinitialize(void); +void sparc_netinitialize(void); #else -# define up_netinitialize() +# define sparc_netinitialize() #endif /* USB */ #ifdef CONFIG_USBDEV -void up_usbinitialize(void); -void up_usbuninitialize(void); +void sparc_usbinitialize(void); +void sparc_usbuninitialize(void); #else -# define up_usbinitialize() -# define up_usbuninitialize() +# define sparc_usbinitialize() +# define sparc_usbuninitialize() #endif /* Debug ********************************************************************/ #ifdef CONFIG_STACK_COLORATION size_t sparc_stack_check(void *stackbase, size_t nbytes); -void up_stack_color(void *stackbase, size_t nbytes); +void sparc_stack_color(void *stackbase, size_t nbytes); #endif #endif /* __ASSEMBLY__ */ diff --git a/arch/renesas/src/common/up_lowputs.c b/arch/sparc/src/common/sparc_lowputs.c similarity index 93% rename from arch/renesas/src/common/up_lowputs.c rename to arch/sparc/src/common/sparc_lowputs.c index 532e0629d6d..d7514eb61a5 100644 --- a/arch/renesas/src/common/up_lowputs.c +++ b/arch/sparc/src/common/sparc_lowputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/renesas/src/common/up_lowputs.c + * arch/sparc/src/common/sparc_lowputs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -24,7 +24,7 @@ #include -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -43,17 +43,18 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_lowputs + * Name: sparc_lowputs * * Description: * This is a low-level helper function used to support debug. * ****************************************************************************/ -void up_lowputs(const char *str) +void sparc_lowputs(const char *str) { while (*str) { - up_lowputc(*str++); + sparc_lowputc(*str++); } } + diff --git a/arch/sparc/src/common/up_mdelay.c b/arch/sparc/src/common/sparc_mdelay.c similarity index 98% rename from arch/sparc/src/common/up_mdelay.c rename to arch/sparc/src/common/sparc_mdelay.c index d58a04c599a..63584e7e0f0 100644 --- a/arch/sparc/src/common/up_mdelay.c +++ b/arch/sparc/src/common/sparc_mdelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/common/up_mdelay.c + * arch/sparc/src/common/sparc_mdelay.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sparc/src/common/up_modifyreg16.c b/arch/sparc/src/common/sparc_modifyreg16.c similarity index 97% rename from arch/sparc/src/common/up_modifyreg16.c rename to arch/sparc/src/common/sparc_modifyreg16.c index 3b4a378a0a3..56b082dc5c1 100644 --- a/arch/sparc/src/common/up_modifyreg16.c +++ b/arch/sparc/src/common/sparc_modifyreg16.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/common/up_modifyreg16.c + * arch/sparc/src/common/sparc_modifyreg16.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include #include -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/sparc/src/common/up_modifyreg32.c b/arch/sparc/src/common/sparc_modifyreg32.c similarity index 97% rename from arch/sparc/src/common/up_modifyreg32.c rename to arch/sparc/src/common/sparc_modifyreg32.c index a3e26a3a82f..6fa80827eda 100644 --- a/arch/sparc/src/common/up_modifyreg32.c +++ b/arch/sparc/src/common/sparc_modifyreg32.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/common/up_modifyreg32.c + * arch/sparc/src/common/sparc_modifyreg32.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include #include -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/sparc/src/common/up_modifyreg8.c b/arch/sparc/src/common/sparc_modifyreg8.c similarity index 97% rename from arch/sparc/src/common/up_modifyreg8.c rename to arch/sparc/src/common/sparc_modifyreg8.c index 773c10527c2..d1e29710f43 100644 --- a/arch/sparc/src/common/up_modifyreg8.c +++ b/arch/sparc/src/common/sparc_modifyreg8.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/common/up_modifyreg8.c + * arch/sparc/src/common/sparc_modifyreg8.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include #include -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/renesas/src/common/up_nputs.c b/arch/sparc/src/common/sparc_nputs.c similarity index 98% rename from arch/renesas/src/common/up_nputs.c rename to arch/sparc/src/common/sparc_nputs.c index 61252cd8818..880c1f2d6bf 100644 --- a/arch/renesas/src/common/up_nputs.c +++ b/arch/sparc/src/common/sparc_nputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/renesas/src/common/up_nputs.c + * arch/sparc/src/common/sparc_nputs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sparc/src/common/up_releasestack.c b/arch/sparc/src/common/sparc_releasestack.c similarity index 98% rename from arch/sparc/src/common/up_releasestack.c rename to arch/sparc/src/common/sparc_releasestack.c index c125ab3d1ef..11d7027d625 100644 --- a/arch/sparc/src/common/up_releasestack.c +++ b/arch/sparc/src/common/sparc_releasestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/common/up_releasestack.c + * arch/sparc/src/common/sparc_releasestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Private Types diff --git a/arch/sparc/src/common/up_stackframe.c b/arch/sparc/src/common/sparc_stackframe.c similarity index 97% rename from arch/sparc/src/common/up_stackframe.c rename to arch/sparc/src/common/sparc_stackframe.c index 50ccf0b4897..79321d7ac0b 100644 --- a/arch/sparc/src/common/up_stackframe.c +++ b/arch/sparc/src/common/sparc_stackframe.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/common/up_stackframe.c + * arch/sparc/src/common/sparc_stackframe.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/sparc/src/common/up_testset.c b/arch/sparc/src/common/sparc_testset.c similarity index 99% rename from arch/sparc/src/common/up_testset.c rename to arch/sparc/src/common/sparc_testset.c index aed8b38b2d3..fdf946cb979 100644 --- a/arch/sparc/src/common/up_testset.c +++ b/arch/sparc/src/common/sparc_testset.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/common/up_testset.c + * arch/sparc/src/common/sparc_testset.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sparc/src/common/up_udelay.c b/arch/sparc/src/common/sparc_udelay.c similarity index 99% rename from arch/sparc/src/common/up_udelay.c rename to arch/sparc/src/common/sparc_udelay.c index 8fb3cb8a345..868e0387963 100644 --- a/arch/sparc/src/common/up_udelay.c +++ b/arch/sparc/src/common/sparc_udelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/common/up_udelay.c + * arch/sparc/src/common/sparc_udelay.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sparc/src/common/up_usestack.c b/arch/sparc/src/common/sparc_usestack.c similarity index 96% rename from arch/sparc/src/common/up_usestack.c rename to arch/sparc/src/common/sparc_usestack.c index cfc63b7ffac..3557e805263 100644 --- a/arch/sparc/src/common/up_usestack.c +++ b/arch/sparc/src/common/sparc_usestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/common/up_usestack.c + * arch/sparc/src/common/sparc_usestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Public Functions @@ -111,7 +111,7 @@ int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size) * water marks. */ - up_stack_color(tcb->stack_base_ptr, tcb->adj_stack_size); + sparc_stack_color(tcb->stack_base_ptr, tcb->adj_stack_size); #endif /* CONFIG_STACK_COLORATION */ return OK; diff --git a/arch/sparc/src/common/up_nputs.c b/arch/sparc/src/common/up_nputs.c deleted file mode 100644 index 58971be1acc..00000000000 --- a/arch/sparc/src/common/up_nputs.c +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** - * arch/sparc/src/common/up_nputs.c - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_nputs - * - * Description: - * This is a low-level helper function used to support debug. - * - ****************************************************************************/ - -void up_nputs(const char *str, size_t len) -{ - while (len-- > 0 && *str) - { - up_putc(*str++); - } -} diff --git a/arch/sparc/src/s698pm/Make.defs b/arch/sparc/src/s698pm/Make.defs index be95c64ee5c..c3ce0323c8b 100644 --- a/arch/sparc/src/s698pm/Make.defs +++ b/arch/sparc/src/s698pm/Make.defs @@ -18,7 +18,7 @@ # ############################################################################ -include common/Make.defs +include sparc_v8/Make.defs # The start-up, "head", file diff --git a/arch/sparc/src/s698pm/s698pm-irq.c b/arch/sparc/src/s698pm/s698pm-irq.c index 03e49907f3f..d8d717ffff0 100644 --- a/arch/sparc/src/s698pm/s698pm-irq.c +++ b/arch/sparc/src/s698pm/s698pm-irq.c @@ -34,7 +34,7 @@ #include -#include "up_internal.h" +#include "sparc_internal.h" #include "s698pm.h" /**************************************************************************** @@ -137,8 +137,8 @@ void up_irqinitialize(void) /* Attach software interrupts */ - irq_attach(S698PM_IRQ_SW_SYSCALL_TA0, up_swint0, NULL); - irq_attach(S698PM_IRQ_SW_SYSCALL_TA8, up_swint1, NULL); + irq_attach(S698PM_IRQ_SW_SYSCALL_TA0, sparc_swint0, NULL); + irq_attach(S698PM_IRQ_SW_SYSCALL_TA8, sparc_swint1, NULL); /* And finally, enable cpu interrupts */ @@ -359,14 +359,14 @@ void up_enable_irq(int irq) } /**************************************************************************** - * Name: up_pending_irq + * Name: sparc_pending_irq * * Description: * Return true if the interrupt is pending and unmasked. * ****************************************************************************/ -bool up_pending_irq(int irq) +bool sparc_pending_irq(int irq) { uintptr_t regaddr; uint16_t regval; @@ -416,14 +416,14 @@ bool up_pending_irq(int irq) } /**************************************************************************** - * Name: up_clrpend_irq + * Name: sparc_clrpend_irq * * Description: * Clear any pending interrupt * ****************************************************************************/ -void up_clrpend_irq(int irq) +void sparc_clrpend_irq(int irq) { int cpuint = IRQ_GETCPUINT(g_irqmap[irq]); @@ -510,7 +510,7 @@ int up_prioritize_irq(int irq, int priority) ****************************************************************************/ #if CONFIG_ARCH_INTERRUPTSTACK > 7 -uintptr_t up_intstack_top(void) +uintptr_t sparc_intstack_top(void) { #if defined(CONFIG_SMP) return g_cpu_intstack_top[up_cpu_index()]; @@ -530,7 +530,7 @@ uintptr_t up_intstack_top(void) ****************************************************************************/ #if CONFIG_ARCH_INTERRUPTSTACK > 7 -uintptr_t up_intstack_alloc(void) +uintptr_t sparc_intstack_alloc(void) { #if defined(CONFIG_SMP) return g_cpu_intstack_top[up_cpu_index()] - INTSTACK_SIZE; diff --git a/arch/sparc/src/s698pm/s698pm-lowconsole.c b/arch/sparc/src/s698pm/s698pm-lowconsole.c index 30ec44af0c9..3354db37398 100644 --- a/arch/sparc/src/s698pm/s698pm-lowconsole.c +++ b/arch/sparc/src/s698pm/s698pm-lowconsole.c @@ -32,7 +32,7 @@ #include -#include "up_internal.h" +#include "sparc_internal.h" #include "s698pm-uart.h" #include "s698pm.h" @@ -245,14 +245,14 @@ void s698pm_consoleinit(void) } /**************************************************************************** - * Name: up_lowputc + * Name: sparc_lowputc * * Description: * Output one byte on the serial console * ****************************************************************************/ -void up_lowputc(char ch) +void sparc_lowputc(char ch) { #ifdef HAVE_SERIAL_CONSOLE while ((s698pm_getreg(S698PM_CONSOLE_BASE, S698PM_UART_STATREG_OFFSET) & diff --git a/arch/sparc/src/s698pm/s698pm-lowinit.c b/arch/sparc/src/s698pm/s698pm-lowinit.c index 7e7b0f5ef1c..d2b1684ac9a 100644 --- a/arch/sparc/src/s698pm/s698pm-lowinit.c +++ b/arch/sparc/src/s698pm/s698pm-lowinit.c @@ -25,7 +25,7 @@ #include #include "s698pm-config.h" -#include "up_internal.h" +#include "sparc_internal.h" #include "s698pm.h" /**************************************************************************** @@ -61,7 +61,7 @@ ****************************************************************************/ #ifdef CONFIG_DEBUG_FEATURES -# define showprogress(c) up_lowputc(c) +# define showprogress(c) sparc_lowputc(c) #else # define showprogress(c) #endif @@ -105,7 +105,7 @@ void up_lowinit(void) */ #ifdef USE_EARLYSERIALINIT - up_earlyserialinit(); + sparc_earlyserialinit(); #endif /* Perform board-level initialization */ diff --git a/arch/sparc/src/s698pm/s698pm-serial.c b/arch/sparc/src/s698pm/s698pm-serial.c index 0486884eb1c..e4cc899d964 100644 --- a/arch/sparc/src/s698pm/s698pm-serial.c +++ b/arch/sparc/src/s698pm/s698pm-serial.c @@ -44,7 +44,7 @@ #include #include -#include "up_internal.h" +#include "sparc_internal.h" #include "s698pm-config.h" #include "chip.h" #include "s698pm-uart.h" @@ -146,7 +146,7 @@ /* Common initialization logic will not not know that the all of the UARTs * have been disabled. So, as a result, we may still have to provide - * stub implementations of up_earlyserialinit(), up_serialinit(), and + * stub implementations of sparc_earlyserialinit(), sparc_serialinit(), and * up_putc(). */ @@ -878,18 +878,18 @@ static bool up_txempty(struct uart_dev_s *dev) ****************************************************************************/ /**************************************************************************** - * Name: up_earlyserialinit + * Name: sparc_earlyserialinit * * Description: * Performs the low level UART initialization early in debug so that the * serial console will be available during bootup. This must be called - * before up_serialinit. NOTE: This function depends on GPIO pin - * configuration performed in up_consoleinit() and main clock iniialization - * performed in up_clkinitialize(). + * before sparc_serialinit. NOTE: This function depends on GPIO pin + * configuration performed in sparc_consoleinit() and main clock + * iniialization performed in up_clkinitialize(). * ****************************************************************************/ -void up_earlyserialinit(void) +void sparc_earlyserialinit(void) { /* Disable interrupts from all UARTS. The console is enabled in * s698pm_consoleinit(). @@ -914,15 +914,15 @@ void up_earlyserialinit(void) } /**************************************************************************** - * Name: up_serialinit + * Name: sparc_serialinit * * Description: * Register serial console and serial ports. This assumes - * that up_earlyserialinit was called previously. + * that sparc_earlyserialinit was called previously. * ****************************************************************************/ -void up_serialinit(void) +void sparc_serialinit(void) { /* Register the console */ @@ -966,31 +966,31 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + sparc_lowputc('\r'); } - up_lowputc(ch); + sparc_lowputc(ch); up_restoreuartint(dev, imr); #endif return ch; } /**************************************************************************** - * Name: up_earlyserialinit, up_serialinit, and up_putc + * Name: sparc_earlyserialinit, sparc_serialinit, and up_putc * * Description: * stubs that may be needed. These stubs would be used if all UARTs are - * disabled. In that case, the logic in common/up_initialize() is not + * disabled. In that case, the logic in common/sparc_initialize() is not * smart enough to know that there are not UARTs and will still expect * these interfaces to be provided. * ****************************************************************************/ #else /* HAVE_UART_DEVICE */ -void up_earlyserialinit(void) +void sparc_earlyserialinit(void) { } -void up_serialinit(void) +void sparc_serialinit(void) { } @@ -1019,10 +1019,10 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + sparc_lowputc('\r'); } - up_lowputc(ch); + sparc_lowputc(ch); #endif return ch; } diff --git a/arch/sparc/src/s698pm/s698pm-timerisr.c b/arch/sparc/src/s698pm/s698pm-timerisr.c index 1f37f47e999..d63aa38fc62 100644 --- a/arch/sparc/src/s698pm/s698pm-timerisr.c +++ b/arch/sparc/src/s698pm/s698pm-timerisr.c @@ -31,7 +31,7 @@ #include #include -#include "up_internal.h" +#include "sparc_internal.h" #include "s698pm.h" #include "s698pm_tim.h" #include "s698pm_irq.h" @@ -90,7 +90,7 @@ static int s698pm_timerisr(int irq, uint32_t *regs, void *arg) { /* Clear the pending timer interrupt */ - up_clrpend_irq(S698PM_IRQ_TIMER1); + sparc_clrpend_irq(S698PM_IRQ_TIMER1); /* Process timer interrupt */ @@ -136,7 +136,7 @@ void up_timer_initialize(void) /* Configure the timer interrupt */ - up_clrpend_irq(S698PM_IRQ_TIMER1); + sparc_clrpend_irq(S698PM_IRQ_TIMER1); /* Attach the timer interrupt vector */ diff --git a/arch/sparc/src/s698pm/s698pm_cpuidlestack.c b/arch/sparc/src/s698pm/s698pm_cpuidlestack.c index a0558b30de7..29868cb3cab 100644 --- a/arch/sparc/src/s698pm/s698pm_cpuidlestack.c +++ b/arch/sparc/src/s698pm/s698pm_cpuidlestack.c @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "sparc_internal.h" #include "s698pm.h" #ifdef CONFIG_SMP diff --git a/arch/sparc/src/s698pm/s698pm_cpuindex.c b/arch/sparc/src/s698pm/s698pm_cpuindex.c index d8018fd1a08..25e49f0fee4 100644 --- a/arch/sparc/src/s698pm/s698pm_cpuindex.c +++ b/arch/sparc/src/s698pm/s698pm_cpuindex.c @@ -29,7 +29,7 @@ #include #include -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/sparc/src/s698pm/s698pm_cpupause.c b/arch/sparc/src/s698pm/s698pm_cpupause.c index cd07c5a1489..dd372507377 100644 --- a/arch/sparc/src/s698pm/s698pm_cpupause.c +++ b/arch/sparc/src/s698pm/s698pm_cpupause.c @@ -35,7 +35,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "sparc_internal.h" #include "chip.h" /**************************************************************************** @@ -128,7 +128,7 @@ int up_cpu_paused(int cpu) * of the assigned task list for this CPU. */ - up_savestate(tcb->xcp.regs); + sparc_savestate(tcb->xcp.regs); /* Wait for the spinlock to be released */ @@ -155,7 +155,7 @@ int up_cpu_paused(int cpu) * will be made when the interrupt returns. */ - up_restorestate(tcb->xcp.regs); + sparc_restorestate(tcb->xcp.regs); spin_unlock(&g_cpu_wait[cpu]); diff --git a/arch/sparc/src/s698pm/s698pm_cpustart.c b/arch/sparc/src/s698pm/s698pm_cpustart.c index eb98358cc37..b8c1b2edf3e 100644 --- a/arch/sparc/src/s698pm/s698pm_cpustart.c +++ b/arch/sparc/src/s698pm/s698pm_cpustart.c @@ -36,7 +36,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "sparc_internal.h" #ifdef CONFIG_BUILD_KERNEL # include "s698pm_mmu.h" diff --git a/arch/sparc/src/s698pm/s698pm_exceptions.S b/arch/sparc/src/s698pm/s698pm_exceptions.S index 3423c52fcef..fe0eca4f2e8 100644 --- a/arch/sparc/src/s698pm/s698pm_exceptions.S +++ b/arch/sparc/src/s698pm/s698pm_exceptions.S @@ -49,7 +49,7 @@ #if defined(CONFIG_SMP) && CONFIG_ARCH_INTERRUPTSTACK > 7 .global g_cpu_intstack_top #endif /* CONFIG_SMP && CONFIG_ARCH_INTERRUPTSTACK > 7 */ - .global up_doirq /* Dispatch an IRQ */ + .global sparc_doirq /* Dispatch an IRQ */ .align 8 /* * void _ISR_Handler() @@ -247,7 +247,7 @@ do_irq: ! o1 = 2nd arg = address of the ISF ! WAS LOADED WHEN ISF WAS SAVED!!! mov %l3, %o0 ! o0 = 1st arg = vector number - call up_doirq /* call ISR dispatcher */ + call sparc_doirq /* call ISR dispatcher */ nop /*==========================================================================*/ mov %l0, %psr ! **** DISABLE TRAPS **** diff --git a/arch/sparc/src/s698pm/s698pm_tim.c b/arch/sparc/src/s698pm/s698pm_tim.c index 2147fbeb8d9..286afcd9110 100644 --- a/arch/sparc/src/s698pm/s698pm_tim.c +++ b/arch/sparc/src/s698pm/s698pm_tim.c @@ -37,7 +37,7 @@ #include #include "chip.h" -#include "up_internal.h" +#include "sparc_internal.h" #include "s698pm.h" #include "s698pm_tim.h" @@ -590,7 +590,7 @@ static void s698pm_tim_clrint(struct s698pm_tim_dev_s *dev, int source) break; } - up_clrpend_irq(vectorno); + sparc_clrpend_irq(vectorno); } /**************************************************************************** @@ -634,7 +634,7 @@ static int s698pm_tim_checkint(struct s698pm_tim_dev_s *dev, int source) return -EINVAL; } - return up_pending_irq(vectorno); + return sparc_pending_irq(vectorno); } /**************************************************************************** diff --git a/arch/sparc/src/sparc_v8/Make.defs b/arch/sparc/src/sparc_v8/Make.defs new file mode 100644 index 00000000000..a76b7c66d5c --- /dev/null +++ b/arch/sparc/src/sparc_v8/Make.defs @@ -0,0 +1,36 @@ +############################################################################ +# arch/sparc/src/sparc_v8/Make.defs +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +############################################################################ + +# Sparc_V8 files (arch/sparc/src/sparc_v8) + +include common/Make.defs + +CMN_ASRCS += sparc_v8_syscall.S +CMN_CSRCS += sparc_v8_blocktask.c sparc_v8_copystate.c sparc_v8_doirq.c +CMN_CSRCS += sparc_v8_initialstate.c sparc_v8_irq.c +CMN_CSRCS += sparc_v8_releasepending.c sparc_v8_schedulesigaction.c +CMN_CSRCS += sparc_v8_sigdeliver.c sparc_v8_swint1.c sparc_v8_systemreset.c +CMN_CSRCS += sparc_v8_unblocktask.c + +# Configuration-dependent common files + +ifeq ($(CONFIG_ARCH_STACKDUMP),y) +CMN_CSRCS += sparc_v8_dumpstate.c +endif diff --git a/arch/sparc/src/sparc_v8/sparc_v8.h b/arch/sparc/src/sparc_v8/sparc_v8.h index 95faba8b671..867a61f1d46 100644 --- a/arch/sparc/src/sparc_v8/sparc_v8.h +++ b/arch/sparc/src/sparc_v8/sparc_v8.h @@ -41,9 +41,9 @@ * state from the TCB. */ -#define up_restorestate(regs) (CURRENT_REGS = regs) +#define sparc_restorestate(regs) (CURRENT_REGS = regs) -#define up_savestate(regs) trap_flush_task(regs, (uint32_t*)CURRENT_REGS) +#define sparc_savestate(regs) trap_flush_task(regs, (uint32_t*)CURRENT_REGS) /**************************************************************************** * Public Types @@ -74,7 +74,7 @@ extern uint32_t g_idle_topstack; #ifndef __ASSEMBLY__ /**************************************************************************** - * Name: up_copystate + * Name: sparc_copystate * * Description: * Copy the contents of a register state save structure from one location to @@ -82,20 +82,20 @@ extern uint32_t g_idle_topstack; * ****************************************************************************/ -void up_copystate(uint32_t *dest, uint32_t *src); +void sparc_copystate(uint32_t *dest, uint32_t *src); void task_flush_trap(uint32_t *trap, uint32_t *task); void trap_flush_task(uint32_t *task, uint32_t *trap); /**************************************************************************** - * Name: up_doirq + * Name: sparc_doirq * * Description: * Dispatch an interrupt. * ****************************************************************************/ -uint32_t *up_doirq(int irq, uint32_t *regs); +uint32_t *sparc_doirq(int irq, uint32_t *regs); #endif /* __ASSEMBLY__ */ #endif /* __ARCH_SPARC_SRC_SPARC_V8_SPARC_V8_H */ diff --git a/arch/sparc/src/sparc_v8/up_blocktask.c b/arch/sparc/src/sparc_v8/sparc_v8_blocktask.c similarity index 91% rename from arch/sparc/src/sparc_v8/up_blocktask.c rename to arch/sparc/src/sparc_v8/sparc_v8_blocktask.c index c932da5a841..833ba8f669d 100644 --- a/arch/sparc/src/sparc_v8/up_blocktask.c +++ b/arch/sparc/src/sparc_v8/sparc_v8_blocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/sparc_v8/up_blocktask.c + * arch/sparc/src/sparc_v8/sparc_v8_blocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -35,7 +35,7 @@ #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Public Functions @@ -69,7 +69,7 @@ void up_block_task(struct tcb_s *rtcb) * Just copy the CURRENT_REGS into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + sparc_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. @@ -85,7 +85,7 @@ void up_block_task(struct tcb_s *rtcb) * changes will be made when the interrupt returns. */ - up_restorestate(rtcb->xcp.regs); + sparc_restorestate(rtcb->xcp.regs); } /* No, then we will need to perform the user context switch */ @@ -104,9 +104,9 @@ void up_block_task(struct tcb_s *rtcb) /* Then switch contexts */ - up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); + sparc_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the + /* sparc_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. diff --git a/arch/sparc/src/sparc_v8/up_copystate.c b/arch/sparc/src/sparc_v8/sparc_v8_copystate.c similarity index 94% rename from arch/sparc/src/sparc_v8/up_copystate.c rename to arch/sparc/src/sparc_v8/sparc_v8_copystate.c index c797e44dff9..b3ab92bef4e 100644 --- a/arch/sparc/src/sparc_v8/up_copystate.c +++ b/arch/sparc/src/sparc_v8/sparc_v8_copystate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/sparc_v8/up_copystate.c + * arch/sparc/src/sparc_v8/sparc_v8_copystate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -27,7 +27,7 @@ #include #include -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -46,12 +46,12 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_copystate + * Name: sparc_copystate ****************************************************************************/ /* Really just a memcpy */ -void up_copystate(uint32_t *dest, uint32_t *src) +void sparc_copystate(uint32_t *dest, uint32_t *src) { int i; diff --git a/arch/sparc/src/sparc_v8/up_doirq.c b/arch/sparc/src/sparc_v8/sparc_v8_doirq.c similarity index 97% rename from arch/sparc/src/sparc_v8/up_doirq.c rename to arch/sparc/src/sparc_v8/sparc_v8_doirq.c index 1ae4546bf59..1ddc9576998 100644 --- a/arch/sparc/src/sparc_v8/up_doirq.c +++ b/arch/sparc/src/sparc_v8/sparc_v8_doirq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/sparc_v8/up_doirq.c + * arch/sparc/src/sparc_v8/sparc_v8_doirq.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "sparc_internal.h" #include "group/group.h" /**************************************************************************** @@ -55,7 +55,7 @@ * Public Functions ****************************************************************************/ -uint32_t *up_doirq(int irq, uint32_t *regs) +uint32_t *sparc_doirq(int irq, uint32_t *regs) { board_autoled_on(LED_INIRQ); #ifdef CONFIG_SUPPRESS_INTERRUPTS diff --git a/arch/sparc/src/sparc_v8/up_dumpstate.c b/arch/sparc/src/sparc_v8/sparc_v8_dumpstate.c similarity index 97% rename from arch/sparc/src/sparc_v8/up_dumpstate.c rename to arch/sparc/src/sparc_v8/sparc_v8_dumpstate.c index 9bef8bedac9..bc1e498823e 100644 --- a/arch/sparc/src/sparc_v8/up_dumpstate.c +++ b/arch/sparc/src/sparc_v8/sparc_v8_dumpstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/sparc_v8/up_dumpstate.c + * arch/sparc/src/sparc_v8/sparc_v8_dumpstate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "sparc_internal.h" #ifdef CONFIG_ARCH_STACKDUMP @@ -90,10 +90,10 @@ static inline void up_registerdump(void) } /**************************************************************************** - * Name: up_dumpstate + * Name: sparc_dumpstate ****************************************************************************/ -void up_dumpstate(void) +void sparc_dumpstate(void) { struct tcb_s *rtcb = running_task(); uint32_t sp = up_getsp(); @@ -130,7 +130,7 @@ void up_dumpstate(void) /* Get the limits on the interrupt stack memory */ #if CONFIG_ARCH_INTERRUPTSTACK > 3 - istackbase = (uint32_t)up_intstack_alloc(); + istackbase = (uint32_t)sparc_intstack_alloc(); istacksize = (CONFIG_ARCH_INTERRUPTSTACK & ~3) - 4; /* Show interrupt stack info */ diff --git a/arch/sparc/src/sparc_v8/up_initialstate.c b/arch/sparc/src/sparc_v8/sparc_v8_initialstate.c similarity index 97% rename from arch/sparc/src/sparc_v8/up_initialstate.c rename to arch/sparc/src/sparc_v8/sparc_v8_initialstate.c index 502793ef6e8..f9f34e517f2 100644 --- a/arch/sparc/src/sparc_v8/up_initialstate.c +++ b/arch/sparc/src/sparc_v8/sparc_v8_initialstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/sparc_v8/up_initialstate.c + * arch/sparc/src/sparc_v8/sparc_v8_initialstate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -81,7 +81,7 @@ void up_initial_state(struct tcb_s *tcb) * water marks. */ - up_stack_color(tcb->stack_alloc_ptr, 0); + sparc_stack_color(tcb->stack_alloc_ptr, 0); #endif /* CONFIG_STACK_COLORATION */ } diff --git a/arch/sparc/src/sparc_v8/up_irq.c b/arch/sparc/src/sparc_v8/sparc_v8_irq.c similarity index 98% rename from arch/sparc/src/sparc_v8/up_irq.c rename to arch/sparc/src/sparc_v8/sparc_v8_irq.c index 8294ad9e75a..7e99d41e25c 100644 --- a/arch/sparc/src/sparc_v8/up_irq.c +++ b/arch/sparc/src/sparc_v8/sparc_v8_irq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/sparc_v8/up_irq.c + * arch/sparc/src/sparc_v8/sparc_v8_irq.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sparc/src/sparc_v8/up_releasepending.c b/arch/sparc/src/sparc_v8/sparc_v8_releasepending.c similarity index 91% rename from arch/sparc/src/sparc_v8/up_releasepending.c rename to arch/sparc/src/sparc_v8/sparc_v8_releasepending.c index c7e2af59d0e..ea95075dd6a 100644 --- a/arch/sparc/src/sparc_v8/up_releasepending.c +++ b/arch/sparc/src/sparc_v8/sparc_v8_releasepending.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/sparc_v8/up_releasepending.c + * arch/sparc/src/sparc_v8/sparc_v8_releasepending.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Public Functions @@ -74,7 +74,7 @@ void up_release_pending(void) * Just copy the CURRENT_REGS into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + sparc_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. @@ -88,7 +88,7 @@ void up_release_pending(void) /* Then switch contexts */ - up_restorestate(rtcb->xcp.regs); + sparc_restorestate(rtcb->xcp.regs); } /* No, then we will need to perform the user context switch */ @@ -105,9 +105,9 @@ void up_release_pending(void) * ready to run list. */ - up_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); + sparc_switchcontext(rtcb->xcp.regs, nexttcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the + /* sparc_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. diff --git a/arch/sparc/src/sparc_v8/up_romgetc.c b/arch/sparc/src/sparc_v8/sparc_v8_romgetc.c similarity index 98% rename from arch/sparc/src/sparc_v8/up_romgetc.c rename to arch/sparc/src/sparc_v8/sparc_v8_romgetc.c index f560808ff47..dfd5f4cf922 100644 --- a/arch/sparc/src/sparc_v8/up_romgetc.c +++ b/arch/sparc/src/sparc_v8/sparc_v8_romgetc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/sparc_v8/up_romgetc.c + * arch/sparc/src/sparc_v8/sparc_v8_romgetc.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/sparc/src/sparc_v8/up_schedulesigaction.c b/arch/sparc/src/sparc_v8/sparc_v8_schedulesigaction.c similarity index 93% rename from arch/sparc/src/sparc_v8/up_schedulesigaction.c rename to arch/sparc/src/sparc_v8/sparc_v8_schedulesigaction.c index ced7e6bc78a..d905ea134b4 100644 --- a/arch/sparc/src/sparc_v8/up_schedulesigaction.c +++ b/arch/sparc/src/sparc_v8/sparc_v8_schedulesigaction.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/sparc_v8/up_schedulesigaction.c + * arch/sparc/src/sparc_v8/sparc_v8_schedulesigaction.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Public Functions @@ -133,15 +133,15 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - CURRENT_REGS[REG_PC] = (uint32_t)up_sigdeliver; - CURRENT_REGS[REG_NPC] = (uint32_t)up_sigdeliver + 4; + CURRENT_REGS[REG_PC] = (uint32_t)sparc_sigdeliver; + CURRENT_REGS[REG_NPC] = (uint32_t)sparc_sigdeliver + 4; CURRENT_REGS[REG_PSR] |= SPARC_PSR_ET_MASK; /* And make sure that the saved context in the TCB * is the same as the interrupt return context. */ - up_savestate(tcb->xcp.regs); + sparc_savestate(tcb->xcp.regs); } } @@ -167,8 +167,8 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver; - tcb->xcp.regs[REG_NPC] = (uint32_t)up_sigdeliver + 4; + tcb->xcp.regs[REG_PC] = (uint32_t)sparc_sigdeliver; + tcb->xcp.regs[REG_NPC] = (uint32_t)sparc_sigdeliver + 4; tcb->xcp.regs[REG_PSR] |= SPARC_PSR_ET_MASK; } } @@ -261,8 +261,8 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * to be here. */ - tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver; - tcb->xcp.regs[REG_NPC] = (uint32_t)up_sigdeliver + 4; + tcb->xcp.regs[REG_PC] = (uint32_t)sparc_sigdeliver; + tcb->xcp.regs[REG_NPC] = (uint32_t)sparc_sigdeliver + 4; tcb->xcp.regs[REG_PSR] |= SPARC_PSR_ET_MASK; } else @@ -284,15 +284,15 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * privileged thread mode. */ - CURRENT_REGS[REG_PC] = (uint32_t)up_sigdeliver; - CURRENT_REGS[REG_NPC] = (uint32_t)up_sigdeliver + 4; + CURRENT_REGS[REG_PC] = (uint32_t)sparc_sigdeliver; + CURRENT_REGS[REG_NPC] = (uint32_t)sparc_sigdeliver + 4; CURRENT_REGS[REG_PSR] |= SPARC_PSR_ET_MASK; /* And make sure that the saved context in the TCB is the * same as the interrupt return context. */ - up_savestate(tcb->xcp.regs); + sparc_savestate(tcb->xcp.regs); } /* Increment the IRQ lock count so that when the task is @@ -347,8 +347,8 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * here. */ - tcb->xcp.regs[REG_PC] = (uint32_t)up_sigdeliver; - tcb->xcp.regs[REG_NPC] = (uint32_t)up_sigdeliver + 4; + tcb->xcp.regs[REG_PC] = (uint32_t)sparc_sigdeliver; + tcb->xcp.regs[REG_NPC] = (uint32_t)sparc_sigdeliver + 4; tcb->xcp.regs[REG_PSR] |= SPARC_PSR_ET_MASK; } } diff --git a/arch/sparc/src/sparc_v8/up_sigdeliver.c b/arch/sparc/src/sparc_v8/sparc_v8_sigdeliver.c similarity index 92% rename from arch/sparc/src/sparc_v8/up_sigdeliver.c rename to arch/sparc/src/sparc_v8/sparc_v8_sigdeliver.c index 835364f9cff..aadebc2f103 100644 --- a/arch/sparc/src/sparc_v8/up_sigdeliver.c +++ b/arch/sparc/src/sparc_v8/sparc_v8_sigdeliver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/sparc_v8/up_sigdeliver.c + * arch/sparc/src/sparc_v8/sparc_v8_sigdeliver.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -36,14 +36,14 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_sigdeliver + * Name: sparc_sigdeliver * * Description: * This is the a signal handling trampoline. When a signal action was @@ -52,7 +52,7 @@ * ****************************************************************************/ -void up_sigdeliver(void) +void sparc_sigdeliver(void) { struct tcb_s *rtcb = this_task(); @@ -82,7 +82,7 @@ void up_sigdeliver(void) /* Save the return state on the stack. */ - up_copystate(regs, rtcb->xcp.regs); + sparc_copystate(regs, rtcb->xcp.regs); #ifdef CONFIG_SMP /* In the SMP case, up_schedule_sigaction(0) will have incremented @@ -180,14 +180,14 @@ void up_sigdeliver(void) * unusal in two ways: * * 1. It is not a context switch between threads. Rather, - * up_fullcontextrestore must behave more it more like a longjmp + * sparc_fullcontextrestore must behave more it more like a longjmp * within the same task, using * he same stack. - * 2. In this case, up_fullcontextrestore is called with r12 pointing to - * a register save area on the stack to be destroyed. This is + * 2. In this case, sparc_fullcontextrestore is called with r12 pointing + * to a register save area on the stack to be destroyed. This is * dangerous because there is the very real possibility that the new * stack pointer might overlap with the register save area and hat - * stack usage in up_fullcontextrestore might corrupt the register + * stack usage in sparc_fullcontextrestore might corrupt the register * save data before the state is restored. At present, there does * not appear to be any stack overlap problems. If there were, then * adding 3 words to the size of register save structure size will @@ -195,5 +195,5 @@ void up_sigdeliver(void) */ board_autoled_off(LED_SIGNAL); - up_fullcontextrestore(regs); + sparc_fullcontextrestore(regs); } diff --git a/arch/sparc/src/sparc_v8/up_swint1.c b/arch/sparc/src/sparc_v8/sparc_v8_swint1.c similarity index 95% rename from arch/sparc/src/sparc_v8/up_swint1.c rename to arch/sparc/src/sparc_v8/sparc_v8_swint1.c index 1c690e74300..4e35b55318e 100644 --- a/arch/sparc/src/sparc_v8/up_swint1.c +++ b/arch/sparc/src/sparc_v8/sparc_v8_swint1.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/sparc_v8/up_swint1.c + * arch/sparc/src/sparc_v8/sparc_v8_swint1.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ #include -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Private Functions @@ -73,7 +73,7 @@ static void dispatch_syscall(void) ****************************************************************************/ /**************************************************************************** - * Name: up_swint1 + * Name: sparc_swint1 * * Description: * This is software interrupt 8 exception handler that performs context @@ -81,7 +81,7 @@ static void dispatch_syscall(void) * ****************************************************************************/ -int up_swint1(int irq, void *context, void *arg) +int sparc_swint1(int irq, void *context, void *arg) { uint32_t *regs = (uint32_t *)context; @@ -103,7 +103,8 @@ int up_swint1(int irq, void *context, void *arg) { /* A0=SYS_restore_context: This a restore context command: * - * void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function; + * void sparc_fullcontextrestore + * (uint32_t *restoreregs) noreturn_function; * * At this point, the following values are saved in context: * @@ -126,7 +127,8 @@ int up_swint1(int irq, void *context, void *arg) /* A0=SYS_switch_context: This a switch context command: * - * void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); + * void sparc_switchcontext(uint32_t *saveregs, + * uint32_t *restoreregs); * * At this point, the following values are saved in context: * diff --git a/arch/sparc/src/sparc_v8/up_syscall.S b/arch/sparc/src/sparc_v8/sparc_v8_syscall.S similarity index 86% rename from arch/sparc/src/sparc_v8/up_syscall.S rename to arch/sparc/src/sparc_v8/sparc_v8_syscall.S index b226dfd9dcd..c1a0880a869 100644 --- a/arch/sparc/src/sparc_v8/up_syscall.S +++ b/arch/sparc/src/sparc_v8/sparc_v8_syscall.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/sparc_v8/upsyscall_irq.S + * arch/sparc/src/sparc_v8/sparc_v8_syscall.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -26,13 +26,13 @@ #include -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Public Symbols ****************************************************************************/ - .file "up_syscall.S" + .file "sparc_v8_syscall.S" .global sys_call0 .global sys_call1 .global sys_call2 @@ -40,7 +40,7 @@ .global sys_call4 .global sys_call5 - .global up_swint0 + .global sparc_swint0 .global sparcsyscall_exit .global syscall_irqdis .global syscall_irqen @@ -58,7 +58,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_swint0 + * Name: sparc_swint0 * * Description: * This file contains emulated system calls using software trap 0. @@ -86,7 +86,7 @@ * g3 = additional exit code 2 */ -up_swint0: +sparc_swint0: ta 0 ! syscall 0, halt with %g1,%g2,%g3 info sparcsyscall_exit: @@ -141,15 +141,15 @@ syscall_irqen: rett %l2 + 4 /************************************************************************************ - * Name: up_syscall0, up_syscall1, up_syscall2, up_syscall3, up_syscall4, up_syscall5 + * Name: sparc_syscall0, sparc_syscall1, sparc_syscall2, sparc_syscall3, sparc_syscall4, sparc_syscall5 * * Description: - * up_syscall0 - System call SYS_ argument and no additional parameters. - * up_syscall1 - System call SYS_ argument and one additional parameter. - * up_syscall2 - System call SYS_ argument and two additional parameters. - * up_syscall3 - System call SYS_ argument and three additional parameters. - * up_syscall4 - System call SYS_ argument and four additional parameters. - * up_syscall5 - System call SYS_ argument and five additional parameters. + * sparc_syscall0 - System call SYS_ argument and no additional parameters. + * sparc_syscall1 - System call SYS_ argument and one additional parameter. + * sparc_syscall2 - System call SYS_ argument and two additional parameters. + * sparc_syscall3 - System call SYS_ argument and three additional parameters. + * sparc_syscall4 - System call SYS_ argument and four additional parameters. + * sparc_syscall5 - System call SYS_ argument and five additional parameters. * * Assumption: * All interrupts are disabled except for the software interrupts. diff --git a/arch/sparc/src/sparc_v8/up_systemreset.c b/arch/sparc/src/sparc_v8/sparc_v8_systemreset.c similarity index 96% rename from arch/sparc/src/sparc_v8/up_systemreset.c rename to arch/sparc/src/sparc_v8/sparc_v8_systemreset.c index adc0bf5e7db..f0ca069f051 100644 --- a/arch/sparc/src/sparc_v8/up_systemreset.c +++ b/arch/sparc/src/sparc_v8/sparc_v8_systemreset.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/sparc_v8/up_systemreset.c + * arch/sparc/src/sparc_v8/sparc_v8_systemreset.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -29,7 +29,7 @@ #include #include -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Private Functions diff --git a/arch/sparc/src/sparc_v8/up_unblocktask.c b/arch/sparc/src/sparc_v8/sparc_v8_unblocktask.c similarity index 91% rename from arch/sparc/src/sparc_v8/up_unblocktask.c rename to arch/sparc/src/sparc_v8/sparc_v8_unblocktask.c index b20b52a50ac..52496252e98 100644 --- a/arch/sparc/src/sparc_v8/up_unblocktask.c +++ b/arch/sparc/src/sparc_v8/sparc_v8_unblocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/sparc/src/sparc_v8/up_unblocktask.c + * arch/sparc/src/sparc_v8/sparc_v8_unblocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -35,7 +35,7 @@ #include "sched/sched.h" #include "group/group.h" #include "clock/clock.h" -#include "up_internal.h" +#include "sparc_internal.h" /**************************************************************************** * Public Functions @@ -69,7 +69,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * Just copy the CURRENT_REGS into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + sparc_savestate(rtcb->xcp.regs); /* Update scheduler parameters */ @@ -79,7 +79,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * changes will be made when the interrupt returns. */ - up_restorestate(tcb->xcp.regs); + sparc_restorestate(tcb->xcp.regs); } /* No, then we will need to perform the user context switch */ @@ -92,9 +92,9 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) /* Then switch contexts */ - up_switchcontext(rtcb->xcp.regs, tcb->xcp.regs); + sparc_switchcontext(rtcb->xcp.regs, tcb->xcp.regs); - /* up_switchcontext forces a context switch to the task at the + /* sparc_switchcontext forces a context switch to the task at the * head of the ready-to-run list. It does not 'return' in the * normal sense. When it does return, it is because the blocked * task is again ready to run and has execution priority. diff --git a/arch/x86/src/common/up_allocateheap.c b/arch/x86/src/common/x86_allocateheap.c similarity index 97% rename from arch/x86/src/common/up_allocateheap.c rename to arch/x86/src/common/x86_allocateheap.c index af267c18a91..c612dc90897 100644 --- a/arch/x86/src/common/up_allocateheap.c +++ b/arch/x86/src/common/x86_allocateheap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/common/up_allocateheap.c + * arch/x86/src/common/x86_allocateheap.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/x86/src/common/up_assert.c b/arch/x86/src/common/x86_assert.c similarity index 96% rename from arch/x86/src/common/up_assert.c rename to arch/x86/src/common/x86_assert.c index 9556cad9ad2..d20d3b7f7c7 100644 --- a/arch/x86/src/common/up_assert.c +++ b/arch/x86/src/common/x86_assert.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/common/up_assert.c + * arch/x86/src/common/x86_assert.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -39,7 +39,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -115,11 +115,11 @@ static int assert_tracecallback(struct usbtrace_s *trace, void *arg) #endif /**************************************************************************** - * Name: up_dumpstate + * Name: x86_dumpstate ****************************************************************************/ #ifdef CONFIG_ARCH_STACKDUMP -static void up_dumpstate(void) +static void x86_dumpstate(void) { struct tcb_s *rtcb = running_task(); uint32_t sp = up_getsp(); @@ -134,14 +134,14 @@ static void up_dumpstate(void) if (g_current_regs != NULL) { - up_registerdump((uint32_t *)g_current_regs); + x86_registerdump((uint32_t *)g_current_regs); } else { /* Capture and dump user registers by hand */ up_saveusercontext(s_last_regs); - up_registerdump(s_last_regs); + x86_registerdump(s_last_regs); } /* Get the limits on the user stack memory */ @@ -217,7 +217,7 @@ static void up_dumpstate(void) #endif } #else -# define up_dumpstate() +# define x86_dumpstate() #endif /**************************************************************************** @@ -281,7 +281,7 @@ void up_assert(const char *filename, int lineno) filename, lineno); #endif - up_dumpstate(); + x86_dumpstate(); /* Flush any buffered SYSLOG data (from the above) */ diff --git a/arch/x86/src/common/up_blocktask.c b/arch/x86/src/common/x86_blocktask.c similarity index 95% rename from arch/x86/src/common/up_blocktask.c rename to arch/x86/src/common/x86_blocktask.c index 0bcaccc60c9..b191a1ea3b3 100644 --- a/arch/x86/src/common/up_blocktask.c +++ b/arch/x86/src/common/x86_blocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/common/up_blocktask.c + * arch/x86/src/common/x86_blocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Public Functions @@ -68,7 +68,7 @@ void up_block_task(struct tcb_s *rtcb) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + x86_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. @@ -84,7 +84,7 @@ void up_block_task(struct tcb_s *rtcb) * changes will be made when the interrupt returns. */ - up_restorestate(rtcb->xcp.regs); + x86_restorestate(rtcb->xcp.regs); } /* Copy the user C context into the TCB at the (old) head of the @@ -116,6 +116,6 @@ void up_block_task(struct tcb_s *rtcb) /* Then switch contexts */ - up_fullcontextrestore(rtcb->xcp.regs); + x86_fullcontextrestore(rtcb->xcp.regs); } } diff --git a/arch/x86/src/common/up_copystate.c b/arch/x86/src/common/x86_copystate.c similarity index 94% rename from arch/x86/src/common/up_copystate.c rename to arch/x86/src/common/x86_copystate.c index a4433234b0c..213177217aa 100644 --- a/arch/x86/src/common/up_copystate.c +++ b/arch/x86/src/common/x86_copystate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/common/up_copystate.c + * arch/x86/src/common/x86_copystate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -27,7 +27,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -46,12 +46,12 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_undefinedinsn + * Name: x86_undefinedinsn ****************************************************************************/ /* A little faster than most memcpy's */ -void up_copystate(uint32_t *dest, uint32_t *src) +void x86_copystate(uint32_t *dest, uint32_t *src) { int i; diff --git a/arch/x86/src/common/up_exit.c b/arch/x86/src/common/x86_exit.c similarity index 97% rename from arch/x86/src/common/up_exit.c rename to arch/x86/src/common/x86_exit.c index 646a186a62f..2360fe3847a 100644 --- a/arch/x86/src/common/up_exit.c +++ b/arch/x86/src/common/x86_exit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/common/up_exit.c + * arch/x86/src/common/x86_exit.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -36,7 +36,7 @@ #include "task/task.h" #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -147,5 +147,5 @@ void up_exit(int status) /* Then switch contexts */ - up_fullcontextrestore(tcb->xcp.regs); + x86_fullcontextrestore(tcb->xcp.regs); } diff --git a/arch/x86/src/common/up_initialize.c b/arch/x86/src/common/x86_initialize.c similarity index 91% rename from arch/x86/src/common/up_initialize.c rename to arch/x86/src/common/x86_initialize.c index b3ea136f8c1..0cd1d25c9b0 100644 --- a/arch/x86/src/common/up_initialize.c +++ b/arch/x86/src/common/x86_initialize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/common/up_initialize.c + * arch/x86/src/common/x86_initialize.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -26,7 +26,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Public Functions @@ -53,7 +53,7 @@ void up_initialize(void) { /* Add any extra memory fragments to the memory manager */ - up_addregion(); + x86_addregion(); #ifdef CONFIG_PM /* Initialize the power management subsystem. This MCU-specific function @@ -66,30 +66,30 @@ void up_initialize(void) #endif #ifdef CONFIG_ARCH_DMA - /* Initialize the DMA subsystem if the weak function up_dma_initialize has + /* Initialize the DMA subsystem if the weak function x86_dma_initialize has * been brought into the build */ #ifdef CONFIG_HAVE_WEAKFUNCTIONS - if (up_dma_initialize) + if (x86_dma_initialize) #endif { - up_dma_initialize(); + x86_dma_initialize(); } #endif /* Initialize the serial device driver */ #ifdef USE_SERIALDRIVER - up_serialinit(); + x86_serialinit(); #endif /* Initialize the network */ - up_netinitialize(); + x86_netinitialize(); /* Initialize USB -- device and/or host */ - up_usbinitialize(); + x86_usbinitialize(); board_autoled_on(LED_IRQSENABLED); } diff --git a/arch/x86/src/common/up_internal.h b/arch/x86/src/common/x86_internal.h similarity index 87% rename from arch/x86/src/common/up_internal.h rename to arch/x86/src/common/x86_internal.h index fef9c6582c1..0d81692be88 100644 --- a/arch/x86/src/common/up_internal.h +++ b/arch/x86/src/common/x86_internal.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/common/up_internal.h + * arch/x86/src/common/x86_internal.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -96,7 +96,7 @@ * referenced is passed to get the state from the TCB. */ -#define up_restorestate(regs) (g_current_regs = regs) +#define x86_restorestate(regs) (g_current_regs = regs) /**************************************************************************** * Public Types @@ -164,53 +164,52 @@ void x86_boardinitialize(void); /* Defined in files with the same name as the function */ -void up_copystate(uint32_t *dest, uint32_t *src); -void up_savestate(uint32_t *regs); -void up_decodeirq(uint32_t *regs); +void x86_copystate(uint32_t *dest, uint32_t *src); +void x86_savestate(uint32_t *regs); +void x86_decodeirq(uint32_t *regs); #ifdef CONFIG_ARCH_DMA -void weak_function up_dma_initialize(void); +void weak_function x86_dma_initialize(void); #endif -void up_fullcontextrestore(uint32_t *restoreregs) noreturn_function; -void up_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); -void up_sigdeliver(void); -void up_lowputc(char ch); -void up_lowputs(const char *str); +void x86_fullcontextrestore(uint32_t *restoreregs) noreturn_function; +void x86_switchcontext(uint32_t *saveregs, uint32_t *restoreregs); +void x86_sigdeliver(void); +void x86_lowputc(char ch); +void x86_lowputs(const char *str); -void up_syscall(uint32_t *regs); -void up_registerdump(uint32_t *regs); +void x86_syscall(uint32_t *regs); +void x86_registerdump(uint32_t *regs); /* Defined in up_allocateheap.c */ #if CONFIG_MM_REGIONS > 1 -void up_addregion(void); +void x86_addregion(void); #else -# define up_addregion() +# define x86_addregion() #endif /* Defined in xyz_serial.c */ - #ifdef USE_EARLYSERIALINIT -void up_earlyserialinit(void); +void x86_earlyserialinit(void); #endif #ifdef USE_SERIALDRIVER -void up_serialinit(void); +void x86_serialinit(void); #endif -/* Defined in board/up_network.c */ +/* Defined in board/x86_network.c */ #if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) -void up_netinitialize(void); +void x86_netinitialize(void); #else -# define up_netinitialize() +# define x86_netinitialize() #endif #ifdef CONFIG_USBDEV -void up_usbinitialize(void); -void up_usbuninitialize(void); +void x86_usbinitialize(void); +void x86_usbuninitialize(void); #else -# define up_usbinitialize() -# define up_usbuninitialize() +# define x86_usbinitialize() +# define x86_usbuninitialize() #endif #endif /* __ASSEMBLY__ */ diff --git a/arch/avr/src/common/up_lowputs.c b/arch/x86/src/common/x86_lowputs.c similarity index 93% rename from arch/avr/src/common/up_lowputs.c rename to arch/x86/src/common/x86_lowputs.c index 96f8797c913..ad0e69a4e44 100644 --- a/arch/avr/src/common/up_lowputs.c +++ b/arch/x86/src/common/x86_lowputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/common/up_lowputs.c + * arch/x86/src/common/x86_lowputs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -24,7 +24,7 @@ #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -43,17 +43,17 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_lowputs + * Name: x86_lowputs * * Description: * This is a low-level helper function used to support debug. * ****************************************************************************/ -void up_lowputs(const char *str) +void x86_lowputs(const char *str) { while (*str) { - up_lowputc(*str++); + x86_lowputc(*str++); } } diff --git a/arch/x86/src/common/up_mdelay.c b/arch/x86/src/common/x86_mdelay.c similarity index 98% rename from arch/x86/src/common/up_mdelay.c rename to arch/x86/src/common/x86_mdelay.c index 577126beeb7..5140c361b1a 100644 --- a/arch/x86/src/common/up_mdelay.c +++ b/arch/x86/src/common/x86_mdelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/common/up_mdelay.c + * arch/x86/src/common/x86_mdelay.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/x86/src/common/up_modifyreg16.c b/arch/x86/src/common/x86_modifyreg16.c similarity index 97% rename from arch/x86/src/common/up_modifyreg16.c rename to arch/x86/src/common/x86_modifyreg16.c index be8fd0e6de0..8d7c2f6cc8c 100644 --- a/arch/x86/src/common/up_modifyreg16.c +++ b/arch/x86/src/common/x86_modifyreg16.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/common/up_modifyreg16.c + * arch/x86/src/common/x86_modifyreg16.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/x86/src/common/up_modifyreg32.c b/arch/x86/src/common/x86_modifyreg32.c similarity index 97% rename from arch/x86/src/common/up_modifyreg32.c rename to arch/x86/src/common/x86_modifyreg32.c index 6e20523dde1..d21e546c5eb 100644 --- a/arch/x86/src/common/up_modifyreg32.c +++ b/arch/x86/src/common/x86_modifyreg32.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/common/up_modifyreg32.c + * arch/x86/src/common/x86_modifyreg32.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/x86/src/common/up_modifyreg8.c b/arch/x86/src/common/x86_modifyreg8.c similarity index 97% rename from arch/x86/src/common/up_modifyreg8.c rename to arch/x86/src/common/x86_modifyreg8.c index 5d1cb5e7b4a..5672ae70d14 100644 --- a/arch/x86/src/common/up_modifyreg8.c +++ b/arch/x86/src/common/x86_modifyreg8.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/common/up_modifyreg8.c + * arch/x86/src/common/x86_modifyreg8.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/x86/src/common/up_nputs.c b/arch/x86/src/common/x86_nputs.c similarity index 98% rename from arch/x86/src/common/up_nputs.c rename to arch/x86/src/common/x86_nputs.c index d36f640462b..62b9cb1edc5 100644 --- a/arch/x86/src/common/up_nputs.c +++ b/arch/x86/src/common/x86_nputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/common/up_nputs.c + * arch/x86/src/common/x86_nputs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/x86/src/common/up_releasepending.c b/arch/x86/src/common/x86_releasepending.c similarity index 94% rename from arch/x86/src/common/up_releasepending.c rename to arch/x86/src/common/x86_releasepending.c index 5c03c37523f..f1818efdb11 100644 --- a/arch/x86/src/common/up_releasepending.c +++ b/arch/x86/src/common/x86_releasepending.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/common/up_releasepending.c + * arch/x86/src/common/x86_releasepending.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Public Functions @@ -74,7 +74,7 @@ void up_release_pending(void) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + x86_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. @@ -90,7 +90,7 @@ void up_release_pending(void) * changes will be made when the interrupt returns. */ - up_restorestate(rtcb->xcp.regs); + x86_restorestate(rtcb->xcp.regs); } /* Copy the exception context into the TCB of the task that @@ -122,7 +122,7 @@ void up_release_pending(void) /* Then switch contexts */ - up_fullcontextrestore(rtcb->xcp.regs); + x86_fullcontextrestore(rtcb->xcp.regs); } } } diff --git a/arch/avr/src/common/up_udelay.c b/arch/x86/src/common/x86_udelay.c similarity index 99% rename from arch/avr/src/common/up_udelay.c rename to arch/x86/src/common/x86_udelay.c index 11349bbb4d0..c6c393d8e26 100644 --- a/arch/avr/src/common/up_udelay.c +++ b/arch/x86/src/common/x86_udelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/avr/src/common/up_udelay.c + * arch/x86/src/common/x86_udelay.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/renesas/src/common/up_unblocktask.c b/arch/x86/src/common/x86_unblocktask.c similarity index 94% rename from arch/renesas/src/common/up_unblocktask.c rename to arch/x86/src/common/x86_unblocktask.c index de0987019c2..31be5813923 100644 --- a/arch/renesas/src/common/up_unblocktask.c +++ b/arch/x86/src/common/x86_unblocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/renesas/src/common/up_unblocktask.c + * arch/x86/src/common/x86_unblocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,7 +33,7 @@ #include "sched/sched.h" #include "group/group.h" #include "clock/clock.h" -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Public Functions @@ -67,7 +67,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + x86_savestate(rtcb->xcp.regs); /* Update scheduler parameters */ @@ -77,7 +77,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * changes will be made when the interrupt returns. */ - g_current_regs = tcb->xcp.regs; + x86_restorestate(tcb->xcp.regs); } /* We are not in an interrupt handler. Copy the user C context @@ -103,6 +103,6 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) /* Then switch contexts */ - up_fullcontextrestore(tcb->xcp.regs); + x86_fullcontextrestore(tcb->xcp.regs); } } diff --git a/arch/x86/src/i486/up_createstack.c b/arch/x86/src/i486/i486_createstack.c similarity index 99% rename from arch/x86/src/i486/up_createstack.c rename to arch/x86/src/i486/i486_createstack.c index c638ba83aee..2e22dff3510 100644 --- a/arch/x86/src/i486/up_createstack.c +++ b/arch/x86/src/i486/i486_createstack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/i486/up_createstack.c + * arch/x86/src/i486/i486_createstack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -37,7 +37,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Private Types diff --git a/arch/x86/src/i486/up_initialstate.c b/arch/x86/src/i486/i486_initialstate.c similarity index 98% rename from arch/x86/src/i486/up_initialstate.c rename to arch/x86/src/i486/i486_initialstate.c index 41d8dd3ac3a..f8c17a6b6f5 100644 --- a/arch/x86/src/i486/up_initialstate.c +++ b/arch/x86/src/i486/i486_initialstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/i486/up_initialstate.c + * arch/x86/src/i486/i486_initialstate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/x86/src/i486/up_irq.c b/arch/x86/src/i486/i486_irq.c similarity index 99% rename from arch/x86/src/i486/up_irq.c rename to arch/x86/src/i486/i486_irq.c index f8226907dd3..fc562261c1a 100644 --- a/arch/x86/src/i486/up_irq.c +++ b/arch/x86/src/i486/i486_irq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/i486/up_irq.c + * arch/x86/src/i486/i486_irq.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" #include "qemu.h" /**************************************************************************** diff --git a/arch/x86/src/i486/up_regdump.c b/arch/x86/src/i486/i486_regdump.c similarity index 94% rename from arch/x86/src/i486/up_regdump.c rename to arch/x86/src/i486/i486_regdump.c index 25423c3780f..70ff9f652fd 100644 --- a/arch/x86/src/i486/up_regdump.c +++ b/arch/x86/src/i486/i486_regdump.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/i486/up_regdump.c + * arch/x86/src/i486/i486_regdump.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -27,17 +27,17 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_registerdump + * Name: x86_registerdump ****************************************************************************/ -void up_registerdump(uint32_t *regs) +void x86_registerdump(uint32_t *regs) { _alert(" ds:%08x irq:%08x err:%08x\n", regs[REG_DS], regs[REG_IRQNO], regs[REG_ERRCODE]); diff --git a/arch/x86/src/i486/up_releasestack.c b/arch/x86/src/i486/i486_releasestack.c similarity index 98% rename from arch/x86/src/i486/up_releasestack.c rename to arch/x86/src/i486/i486_releasestack.c index 798638610e3..6c7e0ac002f 100644 --- a/arch/x86/src/i486/up_releasestack.c +++ b/arch/x86/src/i486/i486_releasestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/i486/up_releasestack.c + * arch/x86/src/i486/i486_releasestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Private Types diff --git a/arch/x86/src/i486/up_savestate.c b/arch/x86/src/i486/i486_savestate.c similarity index 93% rename from arch/x86/src/i486/up_savestate.c rename to arch/x86/src/i486/i486_savestate.c index 3984bb8fa26..f3d021cfa59 100644 --- a/arch/x86/src/i486/up_savestate.c +++ b/arch/x86/src/i486/i486_savestate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/i486/up_savestate.c + * arch/x86/src/i486/i486_savestate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -49,25 +49,25 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_savestate + * Name: x86_savestate * * Description: * This function saves the interrupt level context information in the - * TCB. This would just be a up_copystate but we have to handle one + * TCB. This would just be a x86_copystate but we have to handle one * special case. In the case where the privilege level changes, the * value of sp and ss will not be saved on stack by the interrupt handler. * So, in that case, we will have to fudge those values here. * ****************************************************************************/ -void up_savestate(uint32_t *regs) +void x86_savestate(uint32_t *regs) { uint8_t cpl; uint8_t rpl; /* First, just copy all of the registers */ - up_copystate(regs, (uint32_t *)g_current_regs); + x86_copystate(regs, (uint32_t *)g_current_regs); /* The RES_SP and REG_SS values will not be saved by the interrupt handling * logic if there is no change in privilege level. In that case, we will diff --git a/arch/x86/src/i486/up_schedulesigaction.c b/arch/x86/src/i486/i486_schedulesigaction.c similarity index 95% rename from arch/x86/src/i486/up_schedulesigaction.c rename to arch/x86/src/i486/i486_schedulesigaction.c index 317e43a924a..b50702e7653 100644 --- a/arch/x86/src/i486/up_schedulesigaction.c +++ b/arch/x86/src/i486/i486_schedulesigaction.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/i486/up_schedulesigaction.c + * arch/x86/src/i486/i486_schedulesigaction.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Public Functions @@ -124,14 +124,14 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - g_current_regs[REG_EIP] = (uint32_t)up_sigdeliver; + g_current_regs[REG_EIP] = (uint32_t)x86_sigdeliver; g_current_regs[REG_EFLAGS] = 0; /* And make sure that the saved context in the TCB * is the same as the interrupt return context. */ - up_savestate(tcb->xcp.regs); + x86_savestate(tcb->xcp.regs); } } @@ -156,7 +156,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - tcb->xcp.regs[REG_EIP] = (uint32_t)up_sigdeliver; + tcb->xcp.regs[REG_EIP] = (uint32_t)x86_sigdeliver; tcb->xcp.regs[REG_EFLAGS] = 0; } } diff --git a/arch/x86/src/i486/up_sigdeliver.c b/arch/x86/src/i486/i486_sigdeliver.c similarity index 94% rename from arch/x86/src/i486/up_sigdeliver.c rename to arch/x86/src/i486/i486_sigdeliver.c index f22a0f7b615..9ddf0ace415 100644 --- a/arch/x86/src/i486/up_sigdeliver.c +++ b/arch/x86/src/i486/i486_sigdeliver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/i486/up_sigdeliver.c + * arch/x86/src/i486/i486_sigdeliver.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -35,14 +35,14 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_sigdeliver + * Name: x86_sigdeliver * * Description: * This is the a signal handling trampoline. When a signal action was @@ -51,7 +51,7 @@ * ****************************************************************************/ -void up_sigdeliver(void) +void x86_sigdeliver(void) { struct tcb_s *rtcb = this_task(); uint32_t regs[XCPTCONTEXT_REGS]; @@ -64,7 +64,7 @@ void up_sigdeliver(void) /* Save the return state on the stack. */ - up_copystate(regs, rtcb->xcp.regs); + x86_copystate(regs, rtcb->xcp.regs); #ifndef CONFIG_SUPPRESS_INTERRUPTS /* Then make sure that interrupts are enabled. Signal handlers must always @@ -103,5 +103,5 @@ void up_sigdeliver(void) /* Then restore the correct state for this thread of execution. */ board_autoled_off(LED_SIGNAL); - up_fullcontextrestore(regs); + x86_fullcontextrestore(regs); } diff --git a/arch/x86/src/i486/up_stackframe.c b/arch/x86/src/i486/i486_stackframe.c similarity index 98% rename from arch/x86/src/i486/up_stackframe.c rename to arch/x86/src/i486/i486_stackframe.c index a3893e2c8e6..7e7bec31454 100644 --- a/arch/x86/src/i486/up_stackframe.c +++ b/arch/x86/src/i486/i486_stackframe.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/i486/up_stackframe.c + * arch/x86/src/i486/i486_stackframe.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/x86/src/i486/up_syscall6.S b/arch/x86/src/i486/i486_syscall6.S similarity index 97% rename from arch/x86/src/i486/up_syscall6.S rename to arch/x86/src/i486/i486_syscall6.S index b842d651fac..5715c2a6f55 100644 --- a/arch/x86/src/i486/up_syscall6.S +++ b/arch/x86/src/i486/i486_syscall6.S @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/i486/up_syscall6.S + * arch/x86/src/i486/i486_syscall6.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -22,7 +22,7 @@ * kernel development tutorials. */ - .file "up_syscall6.S" + .file "i486_syscall6.S" /**************************************************************************** * Included Files diff --git a/arch/x86/src/i486/up_usestack.c b/arch/x86/src/i486/i486_usestack.c similarity index 98% rename from arch/x86/src/i486/up_usestack.c rename to arch/x86/src/i486/i486_usestack.c index 221c5e2c5a6..0ee3929c6e3 100644 --- a/arch/x86/src/i486/up_usestack.c +++ b/arch/x86/src/i486/i486_usestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/i486/up_usestack.c + * arch/x86/src/i486/i486_usestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/x86/src/qemu/Make.defs b/arch/x86/src/qemu/Make.defs index 71d628213ea..30d4b2ca8bb 100644 --- a/arch/x86/src/qemu/Make.defs +++ b/arch/x86/src/qemu/Make.defs @@ -24,15 +24,17 @@ HEAD_ASRC = qemu_head.S # Common x86 and i486 files -CMN_ASRCS = i486_utils.S up_syscall6.S -CMN_CSRCS += up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c -CMN_CSRCS += up_createstack.c up_mdelay.c up_udelay.c up_exit.c -CMN_CSRCS += up_initialize.c up_initialstate.c -CMN_CSRCS += up_irq.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c -CMN_CSRCS += up_regdump.c up_releasepending.c up_releasestack.c -CMN_CSRCS += up_savestate.c up_sigdeliver.c -CMN_CSRCS += up_schedulesigaction.c up_stackframe.c up_unblocktask.c -CMN_CSRCS += up_usestack.c up_nputs.c +CMN_ASRCS = i486_utils.S i486_syscall6.S +CMN_CSRCS += i486_createstack.c i486_initialstate.c + +CMN_CSRCS += x86_allocateheap.c x86_assert.c x86_blocktask.c x86_copystate.c +CMN_CSRCS += x86_exit.c x86_initialize.c x86_mdelay.c x86_udelay.c +CMN_CSRCS += x86_modifyreg8.c x86_modifyreg16.c x86_modifyreg32.c +CMN_CSRCS += x86_nputs.c x86_releasepending.c x86_unblocktask.c +CMN_CSRCS += i486_irq.c i486_regdump.c i486_releasestack.c +CMN_CSRCS += i486_savestate.c i486_sigdeliver.c +CMN_CSRCS += i486_schedulesigaction.c i486_stackframe.c +CMN_CSRCS += i486_usestack.c # Required QEMU files diff --git a/arch/x86/src/qemu/chip.h b/arch/x86/src/qemu/chip.h index a7065e07011..f3b4778b245 100644 --- a/arch/x86/src/qemu/chip.h +++ b/arch/x86/src/qemu/chip.h @@ -56,4 +56,7 @@ * Public Functions Prototypes ************************************************************************************/ +void up_earlyserialinit(void); +void up_serialinit(void); + #endif /* __ARCH_X86_SRC_QEMU_CHIP_H */ diff --git a/arch/x86/src/qemu/qemu.h b/arch/x86/src/qemu/qemu.h index e316204dceb..06b19339bb4 100644 --- a/arch/x86/src/qemu/qemu.h +++ b/arch/x86/src/qemu/qemu.h @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" #include "chip.h" /**************************************************************************** diff --git a/arch/x86/src/qemu/qemu_fullcontextrestore.S b/arch/x86/src/qemu/qemu_fullcontextrestore.S index 8efb9b36cbc..3ba2816052f 100644 --- a/arch/x86/src/qemu/qemu_fullcontextrestore.S +++ b/arch/x86/src/qemu/qemu_fullcontextrestore.S @@ -24,7 +24,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" .file "qemu_fullcontextrestore.S" @@ -67,16 +67,16 @@ .text /************************************************************************** - * Name: up_fullcontextrestore + * Name: x86_fullcontextrestore * * Full C prototype: - * void up_fullcontextrestore(uint32_t *regs) noreturn_function; + * void x86_fullcontextrestore(uint32_t *regs) noreturn_function; * **************************************************************************/ - .globl up_fullcontextrestore - .type up_fullcontextrestore, @function -up_fullcontextrestore: + .globl x86_fullcontextrestore + .type x86_fullcontextrestore, @function +x86_fullcontextrestore: /* Fetch the pointer to the register save array in EAX. */ movl 4(%esp), %eax @@ -158,5 +158,5 @@ up_fullcontextrestore: popl %eax iret - .size up_fullcontextrestore, . - up_fullcontextrestore + .size x86_fullcontextrestore, . - x86_fullcontextrestore .end diff --git a/arch/x86/src/qemu/qemu_handlers.c b/arch/x86/src/qemu/qemu_handlers.c index aea36667124..7c04cf13aac 100644 --- a/arch/x86/src/qemu/qemu_handlers.c +++ b/arch/x86/src/qemu/qemu_handlers.c @@ -31,7 +31,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/x86/src/qemu/qemu_idle.c b/arch/x86/src/qemu/qemu_idle.c index 94f4b3617c7..7219235899f 100644 --- a/arch/x86/src/qemu/qemu_idle.c +++ b/arch/x86/src/qemu/qemu_idle.c @@ -25,7 +25,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/x86/src/qemu/qemu_lowputc.c b/arch/x86/src/qemu/qemu_lowputc.c index 668a400ae36..4f8628fd8cb 100644 --- a/arch/x86/src/qemu/qemu_lowputc.c +++ b/arch/x86/src/qemu/qemu_lowputc.c @@ -24,7 +24,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -69,14 +69,14 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_lowputc + * Name: x86_lowputc * * Description: * Output one byte on the serial console * ****************************************************************************/ -void up_lowputc(char ch) +void x86_lowputc(char ch) { /* Wait until the Transmitter Holding Register (THR) is empty. */ diff --git a/arch/x86/src/qemu/qemu_lowsetup.c b/arch/x86/src/qemu/qemu_lowsetup.c index 7150c0bc8f0..45e404778c2 100644 --- a/arch/x86/src/qemu/qemu_lowsetup.c +++ b/arch/x86/src/qemu/qemu_lowsetup.c @@ -27,7 +27,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -115,7 +115,7 @@ void up_lowsetup(void) /* Early serial driver initialization */ #ifdef USE_EARLYSERIALINIT - up_earlyserialinit(); + x86_earlyserialinit(); #endif /* Now perform board-specific initializations */ diff --git a/arch/x86/src/qemu/qemu_saveusercontext.S b/arch/x86/src/qemu/qemu_saveusercontext.S index d3c9ab437bc..3f2ff52e506 100644 --- a/arch/x86/src/qemu/qemu_saveusercontext.S +++ b/arch/x86/src/qemu/qemu_saveusercontext.S @@ -1,5 +1,5 @@ /************************************************************************** - * arch/x86/src/qemu/up_saveusercontext.S + * arch/x86/src/qemu/x86_saveusercontext.S * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -24,7 +24,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" .file "qemu_saveusercontext.S" diff --git a/arch/x86/src/qemu/qemu_serial.c b/arch/x86/src/qemu/qemu_serial.c index bddaae25495..f5f92281dcd 100644 --- a/arch/x86/src/qemu/qemu_serial.c +++ b/arch/x86/src/qemu/qemu_serial.c @@ -29,7 +29,8 @@ #include -#include "up_internal.h" +#include "chip.h" +#include "x86_internal.h" /* This is a "stub" file to support up_putc if no real serial driver is * configured. Normally, drivers/serial/uart_16550.c provides the serial @@ -80,11 +81,25 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + x86_lowputc('\r'); } - up_lowputc(ch); + x86_lowputc(ch); return ch; } #endif /* USE_SERIALDRIVER */ + +#ifdef USE_EARLYSERIALINIT +void x86_earlyserialinit(void) +{ + up_earlyserialinit(); +} +#endif + +#ifdef USE_SERIALDRIVER +void x86_serialinit(void) +{ + up_serialinit(); +} +#endif \ No newline at end of file diff --git a/arch/x86/src/qemu/qemu_timerisr.c b/arch/x86/src/qemu/qemu_timerisr.c index 09b483496ec..ee06950b9b7 100644 --- a/arch/x86/src/qemu/qemu_timerisr.c +++ b/arch/x86/src/qemu/qemu_timerisr.c @@ -39,7 +39,7 @@ #include #include "clock/clock.h" -#include "up_internal.h" +#include "x86_internal.h" #include "chip.h" #include "qemu.h" diff --git a/arch/x86/src/qemu/qemu_vectors.S b/arch/x86/src/qemu/qemu_vectors.S index 241ec6a1f5f..bf21f8fa902 100644 --- a/arch/x86/src/qemu/qemu_vectors.S +++ b/arch/x86/src/qemu/qemu_vectors.S @@ -235,13 +235,13 @@ irq_common: /* A context switch will be performed. EAX holds the address of the new * register save structure. * - * Jump to up_fullcontextrestore(). We perform a call here, but that function + * Jump to x86_fullcontextrestore(). We perform a call here, but that function * never returns. The address of the new register save block is the argument - * to the up_fullcontextrestore(). + * to the x86_fullcontextrestore(). */ push %eax - call up_fullcontextrestore + call x86_fullcontextrestore .Lnoswitch: pop %ebx /* Reload the original data segment descriptor */ diff --git a/arch/x86_64/src/common/up_lowputs.c b/arch/x86_64/src/common/up_lowputs.c deleted file mode 100644 index 062b6e3c5d4..00000000000 --- a/arch/x86_64/src/common/up_lowputs.c +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** - * arch/x86_64/src/common/up_lowputs.c - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include "up_internal.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_lowputs - * - * Description: - * This is a low-level helper function used to support debug. - * - ****************************************************************************/ - -void up_lowputs(const char *str) -{ - while (*str) - { - up_lowputc(*str++); - } -} diff --git a/arch/x86_64/src/common/up_mdelay.c b/arch/x86_64/src/common/up_mdelay.c deleted file mode 100644 index d4c30166327..00000000000 --- a/arch/x86_64/src/common/up_mdelay.c +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** - * arch/x86_64/src/common/up_mdelay.c - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_mdelay - * - * Description: - * Delay inline for the requested number of milliseconds. - * *** NOT multi-tasking friendly *** - * - * ASSUMPTIONS: - * The setting CONFIG_BOARD_LOOPSPERMSEC has been calibrated - * - ****************************************************************************/ - -void up_mdelay(unsigned int milliseconds) -{ - volatile int i; - volatile int j; - - for (i = 0; i < milliseconds; i++) - { - for (j = 0; j < CONFIG_BOARD_LOOPSPERMSEC; j++) - { - } - } -} diff --git a/arch/x86_64/src/common/up_nputs.c b/arch/x86_64/src/common/up_nputs.c deleted file mode 100644 index 5876d437774..00000000000 --- a/arch/x86_64/src/common/up_nputs.c +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** - * arch/x86_64/src/common/up_nputs.c - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include -#include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: up_nputs - * - * Description: - * This is a low-level helper function used to support debug. - * - ****************************************************************************/ - -void up_nputs(const char *str, size_t len) -{ - while (len-- > 0 && *str) - { - up_putc(*str++); - } -} diff --git a/arch/x86_64/src/common/up_allocateheap.c b/arch/x86_64/src/common/x86_64_allocateheap.c similarity index 97% rename from arch/x86_64/src/common/up_allocateheap.c rename to arch/x86_64/src/common/x86_64_allocateheap.c index 8c7a4a55385..b5893d8b120 100644 --- a/arch/x86_64/src/common/up_allocateheap.c +++ b/arch/x86_64/src/common/x86_64_allocateheap.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/common/up_allocateheap.c + * arch/x86_64/src/common/x86_64_allocateheap.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/x86_64/src/common/up_assert.c b/arch/x86_64/src/common/x86_64_assert.c similarity index 96% rename from arch/x86_64/src/common/up_assert.c rename to arch/x86_64/src/common/x86_64_assert.c index 6f2028c280d..92de529b69f 100644 --- a/arch/x86_64/src/common/up_assert.c +++ b/arch/x86_64/src/common/x86_64_assert.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/common/up_assert.c + * arch/x86_64/src/common/x86_64_assert.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -39,7 +39,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -109,11 +109,11 @@ static int assert_tracecallback(struct usbtrace_s *trace, void *arg) #endif /**************************************************************************** - * Name: up_dumpstate + * Name: x86_64_dumpstate ****************************************************************************/ #ifdef CONFIG_ARCH_STACKDUMP -static void up_dumpstate(void) +static void x86_64_dumpstate(void) { struct tcb_s *rtcb = running_task(); uint64_t sp = up_getsp(); @@ -194,7 +194,7 @@ static void up_dumpstate(void) if (g_current_regs != NULL) { - up_registerdump((uint64_t *)g_current_regs); + x86_64_registerdump((uint64_t *)g_current_regs); } #ifdef CONFIG_ARCH_USBDUMP @@ -204,7 +204,7 @@ static void up_dumpstate(void) #endif } #else -# define up_dumpstate() +# define x86_64_dumpstate() #endif /**************************************************************************** @@ -270,7 +270,7 @@ void up_assert(const char *filename, int lineno) filename, lineno); #endif - up_dumpstate(); + x86_64_dumpstate(); /* Flush any buffered SYSLOG data (from the above) */ diff --git a/arch/x86_64/src/common/up_blocktask.c b/arch/x86_64/src/common/x86_64_blocktask.c similarity index 92% rename from arch/x86_64/src/common/up_blocktask.c rename to arch/x86_64/src/common/x86_64_blocktask.c index 11d229fdbcd..60468e77d91 100644 --- a/arch/x86_64/src/common/up_blocktask.c +++ b/arch/x86_64/src/common/x86_64_blocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/common/up_blocktask.c + * arch/x86_64/src/common/x86_64_blocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Public Functions @@ -68,14 +68,14 @@ void up_block_task(struct tcb_s *rtcb) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + x86_64_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. */ rtcb = this_task(); - up_restore_auxstate(rtcb); + x86_64_restore_auxstate(rtcb); /* Reset scheduler parameters */ @@ -85,7 +85,7 @@ void up_block_task(struct tcb_s *rtcb) * changes will be made when the interrupt returns. */ - up_restorestate(rtcb->xcp.regs); + x86_64_restorestate(rtcb->xcp.regs); } /* Copy the user C context into the TCB at the (old) head of the @@ -100,7 +100,7 @@ void up_block_task(struct tcb_s *rtcb) */ rtcb = this_task(); - up_restore_auxstate(rtcb); + x86_64_restore_auxstate(rtcb); #ifdef CONFIG_ARCH_ADDRENV /* Make sure that the address environment for the previously @@ -117,6 +117,6 @@ void up_block_task(struct tcb_s *rtcb) /* Then switch contexts */ - up_fullcontextrestore(rtcb->xcp.regs); + x86_64_fullcontextrestore(rtcb->xcp.regs); } } diff --git a/arch/x86_64/src/common/up_copystate.c b/arch/x86_64/src/common/x86_64_copystate.c similarity index 93% rename from arch/x86_64/src/common/up_copystate.c rename to arch/x86_64/src/common/x86_64_copystate.c index dd4c8e3da3d..46fea2abf81 100644 --- a/arch/x86_64/src/common/up_copystate.c +++ b/arch/x86_64/src/common/x86_64_copystate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/common/up_copystate.c + * arch/x86_64/src/common/x86_64_copystate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -27,7 +27,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -46,12 +46,12 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_undefinedinsn + * Name: x86_64_undefinedinsn ****************************************************************************/ /* A little faster than most memcpy's */ -void up_copystate(uint64_t *dest, uint64_t *src) +void x86_64_copystate(uint64_t *dest, uint64_t *src) { int i; diff --git a/arch/x86_64/src/common/up_exit.c b/arch/x86_64/src/common/x86_64_exit.c similarity index 97% rename from arch/x86_64/src/common/up_exit.c rename to arch/x86_64/src/common/x86_64_exit.c index edb12220a2d..44d50bb4550 100644 --- a/arch/x86_64/src/common/up_exit.c +++ b/arch/x86_64/src/common/x86_64_exit.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/common/up_exit.c + * arch/x86_64/src/common/x86_64_exit.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -36,7 +36,7 @@ #include "task/task.h" #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -137,7 +137,7 @@ void up_exit(int status) /* Context switch, rearrange MMU */ - up_restore_auxstate(tcb); + x86_64_restore_auxstate(tcb); #ifdef CONFIG_ARCH_ADDRENV /* Make sure that the address environment for the previously running @@ -151,5 +151,5 @@ void up_exit(int status) /* Then switch contexts */ - up_fullcontextrestore(tcb->xcp.regs); + x86_64_fullcontextrestore(tcb->xcp.regs); } diff --git a/arch/x86_64/src/common/up_initialize.c b/arch/x86_64/src/common/x86_64_initialize.c similarity index 92% rename from arch/x86_64/src/common/up_initialize.c rename to arch/x86_64/src/common/x86_64_initialize.c index 6f72fa9b219..8d8d5ae4569 100644 --- a/arch/x86_64/src/common/up_initialize.c +++ b/arch/x86_64/src/common/x86_64_initialize.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/common/up_initialize.c + * arch/x86_64/src/common/x86_64_initialize.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -26,7 +26,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Private Functions @@ -84,7 +84,7 @@ void up_initialize(void) { /* Add any extra memory fragments to the memory manager */ - up_addregion(); + x86_64_addregion(); #ifdef CONFIG_PM /* Initialize the power management subsystem. This MCU-specific function @@ -97,30 +97,30 @@ void up_initialize(void) #endif #ifdef CONFIG_ARCH_DMA - /* Initialize the DMA subsystem if the weak function up_dma_initialize + /* Initialize the DMA subsystem if the weak function x86_64_dma_initialize * has been brought into the build */ #ifdef CONFIG_HAVE_WEAKFUNCTIONS - if (up_dma_initialize) + if (x86_64_dma_initialize) #endif { - up_dma_initialize(); + x86_64_dma_initialize(); } #endif /* Initialize the serial device driver */ #ifdef USE_SERIALDRIVER - up_serialinit(); + x86_64_serialinit(); #endif /* Initialize the network */ - up_netinitialize(); + x86_64_netinitialize(); /* Initialize USB -- device and/or host */ - up_usbinitialize(); + x86_64_usbinitialize(); board_autoled_on(LED_IRQSENABLED); } diff --git a/arch/x86_64/src/common/up_internal.h b/arch/x86_64/src/common/x86_64_internal.h similarity index 86% rename from arch/x86_64/src/common/up_internal.h rename to arch/x86_64/src/common/x86_64_internal.h index e2c370f0543..7046c0a9aae 100644 --- a/arch/x86_64/src/common/up_internal.h +++ b/arch/x86_64/src/common/x86_64_internal.h @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/common/up_internal.h + * arch/x86_64/src/common/x86_64_internal.h * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -115,7 +115,7 @@ * referenced is passed to get the state from the TCB. */ -#define up_restorestate(regs) (g_current_regs = regs) +#define x86_64_restorestate(regs) (g_current_regs = regs) /**************************************************************************** * Public Types @@ -184,55 +184,55 @@ void x86_64_boardinitialize(void); /* Defined in files with the same name as the function */ -void up_copystate(uint64_t *dest, uint64_t *src); -void up_savestate(uint64_t *regs); -void up_decodeirq(uint64_t *regs); +void x86_64_copystate(uint64_t *dest, uint64_t *src); +void x86_64_savestate(uint64_t *regs); +void x86_64_decodeirq(uint64_t *regs); #ifdef CONFIG_ARCH_DMA -void weak_function up_dmainitialize(void); +void weak_function x86_64_dmainitialize(void); #endif -void up_fullcontextrestore(uint64_t *restoreregs) noreturn_function; -void up_switchcontext(uint64_t *saveregs, uint64_t *restoreregs); -void up_sigdeliver(void); -void up_lowputc(char ch); -void up_lowputs(const char *str); -void up_restore_auxstate(struct tcb_s *rtcb); -void up_checktasks(void); +void x86_64_fullcontextrestore(uint64_t *restoreregs) noreturn_function; +void x86_64_switchcontext(uint64_t *saveregs, uint64_t *restoreregs); +void x86_64_sigdeliver(void); +void x86_64_lowputc(char ch); +void x86_64_lowputs(const char *str); +void x86_64_restore_auxstate(struct tcb_s *rtcb); +void x86_64_checktasks(void); -void up_syscall(uint64_t *regs); -void up_registerdump(uint64_t *regs); +void x86_64_syscall(uint64_t *regs); +void x86_64_registerdump(uint64_t *regs); /* Defined in up_allocateheap.c */ #if CONFIG_MM_REGIONS > 1 -void up_addregion(void); +void x86_64_addregion(void); #else -# define up_addregion() +# define x86_64_addregion() #endif /* Defined in xyz_serial.c */ -void up_earlyserialinit(void); -void up_serialinit(void); +void x86_64_earlyserialinit(void); +void x86_64_serialinit(void); /* Defined in xyz_timerisr.c */ void x86_64_timer_calibrate_freq(void); void x86_64_timer_initialize(void); -/* Defined in board/up_network.c */ +/* Defined in board/x86_64_network.c */ #ifdef CONFIG_NET -void up_netinitialize(void); +void x86_64_netinitialize(void); #else -# define up_netinitialize() +# define x86_64_netinitialize() #endif #ifdef CONFIG_USBDEV -void up_usbinitialize(void); -void up_usbuninitialize(void); +void x86_64_usbinitialize(void); +void x86_64_usbuninitialize(void); #else -# define up_usbinitialize() -# define up_usbuninitialize() +# define x86_64_usbinitialize() +# define x86_64_usbuninitialize() #endif #endif /* __ASSEMBLY__ */ diff --git a/arch/x86/src/common/up_lowputs.c b/arch/x86_64/src/common/x86_64_lowputs.c similarity index 92% rename from arch/x86/src/common/up_lowputs.c rename to arch/x86_64/src/common/x86_64_lowputs.c index 6c8b99ca310..682a1afe990 100644 --- a/arch/x86/src/common/up_lowputs.c +++ b/arch/x86_64/src/common/x86_64_lowputs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86/src/common/up_lowputs.c + * arch/x86_64/src/common/x86_64_lowputs.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -24,7 +24,7 @@ #include -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -43,17 +43,17 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_lowputs + * Name: x86_64_lowputs * * Description: * This is a low-level helper function used to support debug. * ****************************************************************************/ -void up_lowputs(const char *str) +void x86_64_lowputs(const char *str) { while (*str) { - up_lowputc(*str++); + x86_64_lowputc(*str++); } } diff --git a/arch/renesas/src/common/up_mdelay.c b/arch/x86_64/src/common/x86_64_mdelay.c similarity index 98% rename from arch/renesas/src/common/up_mdelay.c rename to arch/x86_64/src/common/x86_64_mdelay.c index d4a8c269d81..29d60cf96c5 100644 --- a/arch/renesas/src/common/up_mdelay.c +++ b/arch/x86_64/src/common/x86_64_mdelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/renesas/src/common/up_mdelay.c + * arch/x86_64/src/common/x86_64_mdelay.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/x86_64/src/common/up_modifyreg16.c b/arch/x86_64/src/common/x86_64_modifyreg16.c similarity index 97% rename from arch/x86_64/src/common/up_modifyreg16.c rename to arch/x86_64/src/common/x86_64_modifyreg16.c index a6b09ff487d..ee4b560db5b 100644 --- a/arch/x86_64/src/common/up_modifyreg16.c +++ b/arch/x86_64/src/common/x86_64_modifyreg16.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/common/up_modifyreg16.c + * arch/x86_64/src/common/x86_64_modifyreg16.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/x86_64/src/common/up_modifyreg32.c b/arch/x86_64/src/common/x86_64_modifyreg32.c similarity index 97% rename from arch/x86_64/src/common/up_modifyreg32.c rename to arch/x86_64/src/common/x86_64_modifyreg32.c index b8e8bf29e6e..e9fa4d98ae7 100644 --- a/arch/x86_64/src/common/up_modifyreg32.c +++ b/arch/x86_64/src/common/x86_64_modifyreg32.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/common/up_modifyreg32.c + * arch/x86_64/src/common/x86_64_modifyreg32.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/x86_64/src/common/up_modifyreg8.c b/arch/x86_64/src/common/x86_64_modifyreg8.c similarity index 97% rename from arch/x86_64/src/common/up_modifyreg8.c rename to arch/x86_64/src/common/x86_64_modifyreg8.c index ac9d7f9706d..ab61efa5ec4 100644 --- a/arch/x86_64/src/common/up_modifyreg8.c +++ b/arch/x86_64/src/common/x86_64_modifyreg8.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/common/up_modifyreg8.c + * arch/x86_64/src/common/x86_64_modifyreg8.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/x86_64/src/common/x86_64_nputs.c b/arch/x86_64/src/common/x86_64_nputs.c new file mode 100644 index 00000000000..84bce04090d --- /dev/null +++ b/arch/x86_64/src/common/x86_64_nputs.c @@ -0,0 +1,58 @@ +/**************************************************************************** + * arch/x86_64/src/common/x86_64_nputs.c + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: up_nputs + * + * Description: + * This is a low-level helper function used to support debug. + * + ****************************************************************************/ + +void up_nputs(const char *str, size_t len) +{ + while (len-- > 0 && *str) + { + up_putc(*str++); + } +} diff --git a/arch/x86_64/src/common/up_releasepending.c b/arch/x86_64/src/common/x86_64_releasepending.c similarity index 92% rename from arch/x86_64/src/common/up_releasepending.c rename to arch/x86_64/src/common/x86_64_releasepending.c index 0eba1577a4b..b94f6d5b894 100644 --- a/arch/x86_64/src/common/up_releasepending.c +++ b/arch/x86_64/src/common/x86_64_releasepending.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/common/up_releasepending.c + * arch/x86_64/src/common/x86_64_releasepending.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -31,7 +31,7 @@ #include "sched/sched.h" #include "group/group.h" -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Public Functions @@ -74,14 +74,14 @@ void up_release_pending(void) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + x86_64_savestate(rtcb->xcp.regs); /* Restore the exception context of the rtcb at the (new) head * of the ready-to-run task list. */ rtcb = this_task(); - up_restore_auxstate(rtcb); + x86_64_restore_auxstate(rtcb); /* Update scheduler parameters */ @@ -91,7 +91,7 @@ void up_release_pending(void) * changes will be made when the interrupt returns. */ - up_restorestate(rtcb->xcp.regs); + x86_64_restorestate(rtcb->xcp.regs); } /* Copy the exception context into the TCB of the task that @@ -107,7 +107,7 @@ void up_release_pending(void) */ rtcb = this_task(); - up_restore_auxstate(rtcb); + x86_64_restore_auxstate(rtcb); #ifdef CONFIG_ARCH_ADDRENV /* Make sure that the address environment for the previously @@ -124,7 +124,7 @@ void up_release_pending(void) /* Then switch contexts */ - up_fullcontextrestore(rtcb->xcp.regs); + x86_64_fullcontextrestore(rtcb->xcp.regs); } } } diff --git a/arch/x86_64/src/common/up_udelay.c b/arch/x86_64/src/common/x86_64_udelay.c similarity index 98% rename from arch/x86_64/src/common/up_udelay.c rename to arch/x86_64/src/common/x86_64_udelay.c index 1f42e787318..f4e0c62ec21 100644 --- a/arch/x86_64/src/common/up_udelay.c +++ b/arch/x86_64/src/common/x86_64_udelay.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/common/up_udelay.c + * arch/x86_64/src/common/x86_64_udelay.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/arch/x86_64/src/common/up_unblocktask.c b/arch/x86_64/src/common/x86_64_unblocktask.c similarity index 92% rename from arch/x86_64/src/common/up_unblocktask.c rename to arch/x86_64/src/common/x86_64_unblocktask.c index 5420cadc638..498edb7f304 100644 --- a/arch/x86_64/src/common/up_unblocktask.c +++ b/arch/x86_64/src/common/x86_64_unblocktask.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/common/up_unblocktask.c + * arch/x86_64/src/common/x86_64_unblocktask.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -35,7 +35,7 @@ #include "sched/sched.h" #include "group/group.h" #include "clock/clock.h" -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Public Functions @@ -69,9 +69,9 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * Just copy the g_current_regs into the OLD rtcb. */ - up_savestate(rtcb->xcp.regs); + x86_64_savestate(rtcb->xcp.regs); - up_restore_auxstate(tcb); + x86_64_restore_auxstate(tcb); /* Update scheduler parameters */ @@ -81,7 +81,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) * changes will be made when the interrupt returns. */ - up_restorestate(tcb->xcp.regs); + x86_64_restorestate(tcb->xcp.regs); } /* We are not in an interrupt handler. Copy the user C context @@ -92,7 +92,7 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) else if (!up_saveusercontext(rtcb->xcp.regs)) { - up_restore_auxstate(tcb); + x86_64_restore_auxstate(tcb); #ifdef CONFIG_ARCH_ADDRENV /* Make sure that the address environment for the previously @@ -109,6 +109,6 @@ void up_unblock_task(struct tcb_s *tcb, struct tcb_s *rtcb) /* Then switch contexts */ - up_fullcontextrestore(tcb->xcp.regs); + x86_64_fullcontextrestore(tcb->xcp.regs); } } diff --git a/arch/x86_64/src/intel64/Make.defs b/arch/x86_64/src/intel64/Make.defs index 09661b547a4..83c7a211735 100644 --- a/arch/x86_64/src/intel64/Make.defs +++ b/arch/x86_64/src/intel64/Make.defs @@ -20,16 +20,15 @@ # Common x86_64 and intel64 files -CMN_CSRCS += up_allocateheap.c up_assert.c up_blocktask.c up_copystate.c up_restore_auxstate.c -CMN_CSRCS += up_createstack.c up_mdelay.c up_udelay.c up_exit.c -CMN_CSRCS += up_initialize.c up_initialstate.c -CMN_CSRCS += up_irq.c up_modifyreg8.c up_modifyreg16.c up_modifyreg32.c -CMN_CSRCS += up_regdump.c up_releasepending.c up_releasestack.c -CMN_CSRCS += up_savestate.c up_sigdeliver.c -CMN_CSRCS += up_schedulesigaction.c up_stackframe.c up_unblocktask.c -CMN_CSRCS += up_usestack.c up_nputs.c -CMN_CSRCS += up_rtc.c -CMN_CSRCS += up_map_region.c +CMN_CSRCS += x86_64_allocateheap.c x86_64_assert.c x86_64_blocktask.c x86_64_copystate.c +CMN_CSRCS += x86_64_mdelay.c x86_64_udelay.c x86_64_exit.c x86_64_initialize.c +CMN_CSRCS += x86_64_modifyreg8.c x86_64_modifyreg16.c x86_64_modifyreg32.c x86_64_nputs.c +CMN_CSRCS += x86_64_releasepending.c x86_64_unblocktask.c +CMN_CSRCS += intel64_restore_auxstate.c intel64_createstack.c intel64_initialstate.c +CMN_CSRCS += intel64_regdump.c intel64_releasestack.c intel64_map_region.c +CMN_CSRCS += intel64_savestate.c intel64_sigdeliver.c +CMN_CSRCS += intel64_schedulesigaction.c intel64_stackframe.c +CMN_CSRCS += intel64_usestack.c intel64_irq.c intel64_rtc.c # Required Intel64 files diff --git a/arch/x86_64/src/intel64/chip.h b/arch/x86_64/src/intel64/chip.h index 07f62a96683..1de8ddb4b52 100644 --- a/arch/x86_64/src/intel64/chip.h +++ b/arch/x86_64/src/intel64/chip.h @@ -43,4 +43,9 @@ * Public Function Prototypes ************************************************************************************/ +/* Serial initial function defined in uart_16550.c */ + +extern void up_earlyserialinit(void); +extern void up_serialinit(void); + #endif /* __ARCH_X86_64_SRC_INTEL64_CHIP_H */ diff --git a/arch/x86_64/src/intel64/intel64.h b/arch/x86_64/src/intel64/intel64.h index 753d12c3ba0..0d0ae4aa8cf 100644 --- a/arch/x86_64/src/intel64/intel64.h +++ b/arch/x86_64/src/intel64/intel64.h @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" #include "chip.h" /************************************************************************************ diff --git a/arch/x86_64/src/intel64/intel64_check_capability.c b/arch/x86_64/src/intel64/intel64_check_capability.c index 93cf8d816ac..533a77566a2 100644 --- a/arch/x86_64/src/intel64/intel64_check_capability.c +++ b/arch/x86_64/src/intel64/intel64_check_capability.c @@ -27,7 +27,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/x86_64/src/intel64/up_createstack.c b/arch/x86_64/src/intel64/intel64_createstack.c similarity index 98% rename from arch/x86_64/src/intel64/up_createstack.c rename to arch/x86_64/src/intel64/intel64_createstack.c index d3653f8df2d..6649cb06c82 100644 --- a/arch/x86_64/src/intel64/up_createstack.c +++ b/arch/x86_64/src/intel64/intel64_createstack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/intel64/up_createstack.c + * arch/x86_64/src/intel64/intel64_createstack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -37,7 +37,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Private Types diff --git a/arch/x86_64/src/intel64/intel64_fullcontextrestore.S b/arch/x86_64/src/intel64/intel64_fullcontextrestore.S index 2ec121c0706..03c73797f77 100644 --- a/arch/x86_64/src/intel64/intel64_fullcontextrestore.S +++ b/arch/x86_64/src/intel64/intel64_fullcontextrestore.S @@ -24,7 +24,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" .file "intel64_fullcontextrestore.S" @@ -67,16 +67,16 @@ .text /************************************************************************** - * Name: up_fullcontextrestore + * Name: x86_64_fullcontextrestore * * Full C prototype: - * void up_fullcontextrestore(uint32_t *regs) noreturn_function; + * void x86_64_fullcontextrestore(uint32_t *regs) noreturn_function; * **************************************************************************/ - .globl up_fullcontextrestore - .type up_fullcontextrestore, @function -up_fullcontextrestore: + .globl x86_64_fullcontextrestore + .type x86_64_fullcontextrestore, @function +x86_64_fullcontextrestore: /* The pointer to the register save array in RDI. */ /* Disable interrupts now (the correct RFLAGS will be restored before we @@ -153,5 +153,5 @@ up_fullcontextrestore: popq %rdi iretq - .size up_fullcontextrestore, . - up_fullcontextrestore + .size x86_64_fullcontextrestore, . - x86_64_fullcontextrestore .end diff --git a/arch/x86_64/src/intel64/intel64_handlers.c b/arch/x86_64/src/intel64/intel64_handlers.c index 9367a705ce9..0acc90ce878 100644 --- a/arch/x86_64/src/intel64/intel64_handlers.c +++ b/arch/x86_64/src/intel64/intel64_handlers.c @@ -35,7 +35,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" #include "sched/sched.h" /**************************************************************************** @@ -170,7 +170,7 @@ uint64_t *isr_handler(uint64_t *regs, uint64_t irq) "with error code %" PRId64 ":\n", irq, regs[REG_ERRCODE]); - up_registerdump(regs); + x86_64_registerdump(regs); up_trash_cpu(); break; diff --git a/arch/x86_64/src/intel64/intel64_idle.c b/arch/x86_64/src/intel64/intel64_idle.c index c04292a0817..1996fce864e 100644 --- a/arch/x86_64/src/intel64/intel64_idle.c +++ b/arch/x86_64/src/intel64/intel64_idle.c @@ -25,7 +25,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/arch/x86_64/src/intel64/up_initialstate.c b/arch/x86_64/src/intel64/intel64_initialstate.c similarity index 98% rename from arch/x86_64/src/intel64/up_initialstate.c rename to arch/x86_64/src/intel64/intel64_initialstate.c index 66f61f95ddc..926c49c6125 100644 --- a/arch/x86_64/src/intel64/up_initialstate.c +++ b/arch/x86_64/src/intel64/intel64_initialstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/intel64/up_initialstate.c + * arch/x86_64/src/intel64/intel64_initialstate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" #include "sched/sched.h" /**************************************************************************** diff --git a/arch/x86_64/src/intel64/up_irq.c b/arch/x86_64/src/intel64/intel64_irq.c similarity index 99% rename from arch/x86_64/src/intel64/up_irq.c rename to arch/x86_64/src/intel64/intel64_irq.c index dfe3df7e69d..40a3b9c1733 100644 --- a/arch/x86_64/src/intel64/up_irq.c +++ b/arch/x86_64/src/intel64/intel64_irq.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/intel64/up_irq.c + * arch/x86_64/src/intel64/intel64_irq.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -36,7 +36,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" #include "intel64.h" /**************************************************************************** diff --git a/arch/x86_64/src/intel64/intel64_lowsetup.c b/arch/x86_64/src/intel64/intel64_lowsetup.c index e907d793b76..51f04e2009e 100644 --- a/arch/x86_64/src/intel64/intel64_lowsetup.c +++ b/arch/x86_64/src/intel64/intel64_lowsetup.c @@ -27,7 +27,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Pre-processor Definitions @@ -104,7 +104,7 @@ void up_lowsetup(void) /* Early serial driver initialization */ - up_earlyserialinit(); + x86_64_earlyserialinit(); x86_64_timer_calibrate_freq(); diff --git a/arch/x86_64/src/intel64/up_map_region.c b/arch/x86_64/src/intel64/intel64_map_region.c similarity index 96% rename from arch/x86_64/src/intel64/up_map_region.c rename to arch/x86_64/src/intel64/intel64_map_region.c index 4e27e90ff7b..789f382da7f 100644 --- a/arch/x86_64/src/intel64/up_map_region.c +++ b/arch/x86_64/src/intel64/intel64_map_region.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/intel64/up_map_region.c + * arch/x86_64/src/intel64/intel64_map_region.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -27,7 +27,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/x86_64/src/intel64/up_regdump.c b/arch/x86_64/src/intel64/intel64_regdump.c similarity index 97% rename from arch/x86_64/src/intel64/up_regdump.c rename to arch/x86_64/src/intel64/intel64_regdump.c index c8580d789f4..f6836372e74 100644 --- a/arch/x86_64/src/intel64/up_regdump.c +++ b/arch/x86_64/src/intel64/intel64_regdump.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/intel64/up_regdump.c + * arch/x86_64/src/intel64/intel64_regdump.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -28,14 +28,14 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_registerdump + * Name: x86_64_registerdump ****************************************************************************/ void print_mem(void *sp, size_t size) @@ -99,7 +99,7 @@ void backtrace(uint64_t rbp) } } -void up_registerdump(uint64_t *regs) +void x86_64_registerdump(uint64_t *regs) { uint64_t mxcsr; uint64_t cr2; diff --git a/arch/x86_64/src/intel64/up_releasestack.c b/arch/x86_64/src/intel64/intel64_releasestack.c similarity index 97% rename from arch/x86_64/src/intel64/up_releasestack.c rename to arch/x86_64/src/intel64/intel64_releasestack.c index 6636a2f4a6c..778492f0f5f 100644 --- a/arch/x86_64/src/intel64/up_releasestack.c +++ b/arch/x86_64/src/intel64/intel64_releasestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/intel64/up_releasestack.c + * arch/x86_64/src/intel64/intel64_releasestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" #include "arch/io.h" #include "arch/irq.h" diff --git a/arch/x86_64/src/intel64/up_restore_auxstate.c b/arch/x86_64/src/intel64/intel64_restore_auxstate.c similarity index 91% rename from arch/x86_64/src/intel64/up_restore_auxstate.c rename to arch/x86_64/src/intel64/intel64_restore_auxstate.c index ddd536b03db..27929aaf8c4 100644 --- a/arch/x86_64/src/intel64/up_restore_auxstate.c +++ b/arch/x86_64/src/intel64/intel64_restore_auxstate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/intel64/up_restore_auxstate.c + * arch/x86_64/src/intel64/intel64_restore_auxstate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -33,14 +33,14 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_restore_auxstate + * Name: x86_64_restore_auxstate * * Description: * This function performs some additional action required to complete the @@ -48,7 +48,7 @@ * ****************************************************************************/ -void up_restore_auxstate(struct tcb_s *rtcb) +void x86_64_restore_auxstate(struct tcb_s *rtcb) { /* Set PCID, avoid TLB flush */ diff --git a/arch/x86_64/src/intel64/intel64_rng.c b/arch/x86_64/src/intel64/intel64_rng.c index 957be6a0bcd..663e0b065d4 100644 --- a/arch/x86_64/src/intel64/intel64_rng.c +++ b/arch/x86_64/src/intel64/intel64_rng.c @@ -36,7 +36,7 @@ #include -#include "up_internal.h" +#include "x86_64_internal.h" #if defined(CONFIG_DEV_RANDOM) || defined(CONFIG_DEV_URANDOM_ARCH) diff --git a/arch/x86_64/src/intel64/up_rtc.c b/arch/x86_64/src/intel64/intel64_rtc.c similarity index 98% rename from arch/x86_64/src/intel64/up_rtc.c rename to arch/x86_64/src/intel64/intel64_rtc.c index 195a93e47ec..58ed8bc0cb8 100644 --- a/arch/x86_64/src/intel64/up_rtc.c +++ b/arch/x86_64/src/intel64/intel64_rtc.c @@ -1,5 +1,5 @@ /************************************************************************************ - * arch/x86_64/src/intel64/up_rtc.c + * arch/x86_64/src/intel64/intel64_rtc.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" /************************************************************************************ * Pre-processor Definitions diff --git a/arch/x86_64/src/intel64/up_savestate.c b/arch/x86_64/src/intel64/intel64_savestate.c similarity index 87% rename from arch/x86_64/src/intel64/up_savestate.c rename to arch/x86_64/src/intel64/intel64_savestate.c index b9b6baef41f..d7cd8332fab 100644 --- a/arch/x86_64/src/intel64/up_savestate.c +++ b/arch/x86_64/src/intel64/intel64_savestate.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/intel64/up_savestate.c + * arch/x86_64/src/intel64/intel64_savestate.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -29,22 +29,22 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_savestate + * Name: x86_64_savestate * * Description: * This function saves the interrupt level context information in the - * TCB. This would just be a up_copystate. + * TCB. This would just be a x86_64_copystate. * ****************************************************************************/ -void up_savestate(uint64_t *regs) +void x86_64_savestate(uint64_t *regs) { - up_copystate(regs, (uint64_t *)g_current_regs); + x86_64_copystate(regs, (uint64_t *)g_current_regs); } diff --git a/arch/x86_64/src/intel64/intel64_saveusercontext.S b/arch/x86_64/src/intel64/intel64_saveusercontext.S index 4c8479e25f7..17d2d2733f7 100644 --- a/arch/x86_64/src/intel64/intel64_saveusercontext.S +++ b/arch/x86_64/src/intel64/intel64_saveusercontext.S @@ -24,7 +24,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" .file "intel64_saveusercontext.S" diff --git a/arch/x86_64/src/intel64/up_schedulesigaction.c b/arch/x86_64/src/intel64/intel64_schedulesigaction.c similarity index 95% rename from arch/x86_64/src/intel64/up_schedulesigaction.c rename to arch/x86_64/src/intel64/intel64_schedulesigaction.c index d69e562d831..24ac9d92fd1 100644 --- a/arch/x86_64/src/intel64/up_schedulesigaction.c +++ b/arch/x86_64/src/intel64/intel64_schedulesigaction.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/intel64/up_schedulesigaction.c + * arch/x86_64/src/intel64/intel64_schedulesigaction.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Public Functions @@ -126,14 +126,14 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - g_current_regs[REG_RIP] = (uint64_t)up_sigdeliver; + g_current_regs[REG_RIP] = (uint64_t)x86_64_sigdeliver; g_current_regs[REG_RFLAGS] = 0; /* And make sure that the saved context in the TCB * is the same as the interrupt return context. */ - up_savestate(tcb->xcp.regs); + x86_64_savestate(tcb->xcp.regs); } } @@ -159,7 +159,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver) * disabled */ - tcb->xcp.regs[REG_RIP] = (uint64_t)up_sigdeliver; + tcb->xcp.regs[REG_RIP] = (uint64_t)x86_64_sigdeliver; tcb->xcp.regs[REG_RFLAGS] = 0; } } diff --git a/arch/x86_64/src/intel64/intel64_serial.c b/arch/x86_64/src/intel64/intel64_serial.c index e9fb04eccc1..3c395ea9498 100644 --- a/arch/x86_64/src/intel64/intel64_serial.c +++ b/arch/x86_64/src/intel64/intel64_serial.c @@ -29,7 +29,8 @@ #include -#include "up_internal.h" +#include "chip.h" +#include "x86_64_internal.h" /* This is a "stub" file to suppport up_putc if no real serial driver is * configured. Normally, drivers/serial/uart_16550.c provides the serial @@ -89,11 +90,21 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + x86_64_lowputc('\r'); } - up_lowputc(ch); + x86_64_lowputc(ch); return ch; } #endif /* USE_SERIALDRIVER */ + +void x86_64_earlyserialinit(void) +{ + up_earlyserialinit(); +} + +void x86_64_serialinit(void) +{ + up_serialinit(); +} diff --git a/arch/x86_64/src/intel64/up_sigdeliver.c b/arch/x86_64/src/intel64/intel64_sigdeliver.c similarity index 95% rename from arch/x86_64/src/intel64/up_sigdeliver.c rename to arch/x86_64/src/intel64/intel64_sigdeliver.c index dd79a48ed7f..0369480a4a1 100644 --- a/arch/x86_64/src/intel64/up_sigdeliver.c +++ b/arch/x86_64/src/intel64/intel64_sigdeliver.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/intel64/up_sigdeliver.c + * arch/x86_64/src/intel64/intel64_sigdeliver.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -35,14 +35,14 @@ #include #include "sched/sched.h" -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Public Functions ****************************************************************************/ /**************************************************************************** - * Name: up_sigdeliver + * Name: x86_64_sigdeliver * * Description: * This is the a signal handling trampoline. When a signal action was @@ -51,7 +51,7 @@ * ****************************************************************************/ -void up_sigdeliver(void) +void x86_64_sigdeliver(void) { struct tcb_s *rtcb = this_task(); sig_deliver_t sighandler; @@ -68,7 +68,7 @@ void up_sigdeliver(void) * by interrupt. */ - up_copystate(regs, rtcb->xcp.regs); + x86_64_copystate(regs, rtcb->xcp.regs); /* grab on a copy of the signal hander function pointer before any * possibility to be switched out. @@ -120,5 +120,5 @@ void up_sigdeliver(void) /* Then restore the correct state for this thread of execution. */ board_autoled_off(LED_SIGNAL); - up_fullcontextrestore(regs); + x86_64_fullcontextrestore(regs); } diff --git a/arch/x86_64/src/intel64/up_stackframe.c b/arch/x86_64/src/intel64/intel64_stackframe.c similarity index 97% rename from arch/x86_64/src/intel64/up_stackframe.c rename to arch/x86_64/src/intel64/intel64_stackframe.c index 60f7f544fc3..4ebc9c40665 100644 --- a/arch/x86_64/src/intel64/up_stackframe.c +++ b/arch/x86_64/src/intel64/intel64_stackframe.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/intel64/up_stackframe.c + * arch/x86_64/src/intel64/intel64_stackframe.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/x86_64/src/intel64/intel64_timerisr.c b/arch/x86_64/src/intel64/intel64_timerisr.c index bb9b0b642d3..e26ea619fac 100644 --- a/arch/x86_64/src/intel64/intel64_timerisr.c +++ b/arch/x86_64/src/intel64/intel64_timerisr.c @@ -34,7 +34,7 @@ #include #include "clock/clock.h" -#include "up_internal.h" +#include "x86_64_internal.h" #include diff --git a/arch/x86_64/src/intel64/up_usestack.c b/arch/x86_64/src/intel64/intel64_usestack.c similarity index 98% rename from arch/x86_64/src/intel64/up_usestack.c rename to arch/x86_64/src/intel64/intel64_usestack.c index 0f1bb4daebc..d05d89d1fd6 100644 --- a/arch/x86_64/src/intel64/up_usestack.c +++ b/arch/x86_64/src/intel64/intel64_usestack.c @@ -1,5 +1,5 @@ /**************************************************************************** - * arch/x86_64/src/intel64/up_usestack.c + * arch/x86_64/src/intel64/intel64_usestack.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with @@ -34,7 +34,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Public Functions diff --git a/arch/x86_64/src/intel64/intel64_vectors.S b/arch/x86_64/src/intel64/intel64_vectors.S index 74691686adb..efcf6dd7834 100644 --- a/arch/x86_64/src/intel64/intel64_vectors.S +++ b/arch/x86_64/src/intel64/intel64_vectors.S @@ -347,13 +347,13 @@ irq_common: /* A context swith will be performed. EAX holds the address of the new * register save structure. * - * Jump to up_fullcontextrestore(). We perform a call here, but that function + * Jump to x86_64_fullcontextrestore(). We perform a call here, but that function * never returns. The address of the new register save block is the argument - * to the up_fullcontextrestore(). + * to the x86_64_fullcontextrestore(). */ mov %rax, %rdi - call up_fullcontextrestore + call x86_64_fullcontextrestore .Lnoswitch: fxrstorq (%rsp) diff --git a/arch/xtensa/src/common/xtensa.h b/arch/xtensa/src/common/xtensa.h index 2590fb0467c..820707bf11f 100644 --- a/arch/xtensa/src/common/xtensa.h +++ b/arch/xtensa/src/common/xtensa.h @@ -212,7 +212,7 @@ void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits); /* Serial output */ -void up_lowputs(const char *str); +void xtensa_lowputs(const char *str); /* Debug */ @@ -297,26 +297,26 @@ xtensa_oneshot_initialize(uint32_t irq, uint32_t freq); /* Serial output */ -void up_lowputc(char ch); +void xtensa_lowputc(char ch); void xtensa_earlyserialinit(void); void xtensa_serialinit(void); /* Network */ #if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) -void up_netinitialize(void); +void xtensa_netinitialize(void); #else -# define up_netinitialize() +# define xtensa_netinitialize() #endif /* USB */ #ifdef CONFIG_USBDEV -void up_usbinitialize(void); -void up_usbuninitialize(void); +void xtensa_usbinitialize(void); +void xtensa_usbuninitialize(void); #else -# define up_usbinitialize() -# define up_usbuninitialize() +# define xtensa_usbinitialize() +# define xtensa_usbuninitialize() #endif /* Power management *********************************************************/ diff --git a/arch/xtensa/src/common/xtensa_initialize.c b/arch/xtensa/src/common/xtensa_initialize.c index 5719f05b5c8..c645005f9b7 100644 --- a/arch/xtensa/src/common/xtensa_initialize.c +++ b/arch/xtensa/src/common/xtensa_initialize.c @@ -141,11 +141,11 @@ void up_initialize(void) /* Initialize the network */ - up_netinitialize(); + xtensa_netinitialize(); /* Initialize USB -- device and/or host */ - up_usbinitialize(); + xtensa_usbinitialize(); board_autoled_on(LED_IRQSENABLED); } diff --git a/arch/xtensa/src/common/xtensa_lowputs.c b/arch/xtensa/src/common/xtensa_lowputs.c index f2749bcaac4..eb91db3e03b 100644 --- a/arch/xtensa/src/common/xtensa_lowputs.c +++ b/arch/xtensa/src/common/xtensa_lowputs.c @@ -31,17 +31,17 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_lowputs + * Name: xtensa_lowputs * * Description: * This is a low-level helper function used to support debug. * ****************************************************************************/ -void up_lowputs(const char *str) +void xtensa_lowputs(const char *str) { while (*str) { - up_lowputc(*str++); + xtensa_lowputc(*str++); } } diff --git a/arch/xtensa/src/common/xtensa_swint.c b/arch/xtensa/src/common/xtensa_swint.c index 682f65c6be0..90edfb5eed6 100644 --- a/arch/xtensa/src/common/xtensa_swint.c +++ b/arch/xtensa/src/common/xtensa_swint.c @@ -94,7 +94,7 @@ int xtensa_swint(int irq, void *context, void *arg) { /* A2=SYS_save_context: This is a save context command: * - * int xtensa_saveusercontext(uint32_t *saveregs); + * int up_saveusercontext(uint32_t *saveregs); * * At this point, the following values are saved in context: * @@ -163,7 +163,7 @@ int xtensa_swint(int irq, void *context, void *arg) /* A2=SYS_syscall_return: This is a syscall return command: * - * void up_syscall_return(void); + * void xtensa_syscall_return(void); * * At this point, the following values are saved in context: * diff --git a/arch/xtensa/src/esp32/esp32_emac.c b/arch/xtensa/src/esp32/esp32_emac.c index 5e4f6127037..cd2925b4ec8 100644 --- a/arch/xtensa/src/esp32/esp32_emac.c +++ b/arch/xtensa/src/esp32/esp32_emac.c @@ -2141,7 +2141,7 @@ error: } /**************************************************************************** - * Function: up_netinitialize + * Function: xtensa_netinitialize * * Description: * This is the "standard" network initialization logic called from the @@ -2156,7 +2156,7 @@ error: ****************************************************************************/ #if !defined(CONFIG_NETDEV_LATEINIT) -void up_netinitialize(void) +void xtensa_netinitialize(void) { esp32_emac_init(); } diff --git a/arch/xtensa/src/esp32/esp32_serial.c b/arch/xtensa/src/esp32/esp32_serial.c index 172c6e7715c..a1c303e5cb3 100644 --- a/arch/xtensa/src/esp32/esp32_serial.c +++ b/arch/xtensa/src/esp32/esp32_serial.c @@ -2018,7 +2018,7 @@ void esp32_lowsetup(void) * Description: * Performs the low level UART initialization early in debug so that the * serial console will be available during bootup. This must be called - * before up_serialinit. + * before xtensa_serialinit. * ****************************************************************************/ @@ -2053,7 +2053,7 @@ void xtensa_earlyserialinit(void) * * Description: * Register serial console and serial ports. This assumes - * that up_earlyserialinit was called previously. + * that xtensa_earlyserialinit was called previously. * ****************************************************************************/ diff --git a/arch/xtensa/src/esp32s2/esp32s2_lowputc.c b/arch/xtensa/src/esp32s2/esp32s2_lowputc.c index 4303046fb79..6ac310fb8b2 100644 --- a/arch/xtensa/src/esp32s2/esp32s2_lowputc.c +++ b/arch/xtensa/src/esp32s2/esp32s2_lowputc.c @@ -722,7 +722,7 @@ void esp32s2_lowputc_config_pins(const struct esp32s2_uart_s *priv) } /**************************************************************************** - * Name: up_lowputc + * Name: xtensa_lowputc * * Description: * Output one byte on the serial console. @@ -732,7 +732,7 @@ void esp32s2_lowputc_config_pins(const struct esp32s2_uart_s *priv) * ****************************************************************************/ -void up_lowputc(char ch) +void xtensa_lowputc(char ch) { #ifdef HAVE_SERIAL_CONSOLE diff --git a/arch/xtensa/src/esp32s2/esp32s2_serial.c b/arch/xtensa/src/esp32s2/esp32s2_serial.c index ee4c07888ea..63bf5048382 100644 --- a/arch/xtensa/src/esp32s2/esp32s2_serial.c +++ b/arch/xtensa/src/esp32s2/esp32s2_serial.c @@ -1084,10 +1084,10 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + xtensa_lowputc('\r'); } - up_lowputc(ch); + xtensa_lowputc(ch); esp32s2_lowputc_restore_all_uart_int(CONSOLE_DEV.priv, &int_status); #endif return ch; @@ -1100,7 +1100,7 @@ int up_putc(int ch) * * Description: * Stubs that may be needed. These stubs will be used if all UARTs are - * disabled. In that case, the logic in common/up_initialize() is not + * disabled. In that case, the logic in common/xtensa_initialize() is not * smart enough to know that there are not UARTs and will still expect * these interfaces to be provided. * This may be a special case where the upper and lower half serial layers diff --git a/arch/xtensa/src/esp32s2/esp32s2_start.c b/arch/xtensa/src/esp32s2/esp32s2_start.c index 223ec7d84a5..e538bba5fd2 100644 --- a/arch/xtensa/src/esp32s2/esp32s2_start.c +++ b/arch/xtensa/src/esp32s2/esp32s2_start.c @@ -47,7 +47,7 @@ ****************************************************************************/ #ifdef CONFIG_DEBUG_FEATURES -# define showprogress(c) up_lowputc(c) +# define showprogress(c) xtensa_lowputc(c) #else # define showprogress(c) #endif diff --git a/arch/xtensa/src/esp32s3/esp32s3_lowputc.c b/arch/xtensa/src/esp32s3/esp32s3_lowputc.c index d6299af7892..a2bec80622d 100644 --- a/arch/xtensa/src/esp32s3/esp32s3_lowputc.c +++ b/arch/xtensa/src/esp32s3/esp32s3_lowputc.c @@ -869,7 +869,7 @@ void esp32s3_lowputc_restore_pins(const struct esp32s3_uart_s *priv) } /**************************************************************************** - * Name: up_lowputc + * Name: xtensa_lowputc * * Description: * Output one byte on the serial console. @@ -879,7 +879,7 @@ void esp32s3_lowputc_restore_pins(const struct esp32s3_uart_s *priv) * ****************************************************************************/ -void up_lowputc(char ch) +void xtensa_lowputc(char ch) { #ifdef CONSOLE_UART diff --git a/arch/xtensa/src/esp32s3/esp32s3_serial.c b/arch/xtensa/src/esp32s3/esp32s3_serial.c index 30ea4a0aaf1..2070dabe716 100644 --- a/arch/xtensa/src/esp32s3/esp32s3_serial.c +++ b/arch/xtensa/src/esp32s3/esp32s3_serial.c @@ -1035,7 +1035,7 @@ static bool esp32s3_rxflowcontrol(struct uart_dev_s *dev, * Performs the low level UART initialization early in debug so that the * serial console will be available during bootup. This must be called * before xtensa_serialinit. NOTE: This function depends on GPIO pin - * configuration performed in up_consoleinit() and main clock + * configuration performed in xtensa_consoleinit() and main clock * initialization performed in up_clkinitialize(). * ****************************************************************************/ @@ -1118,10 +1118,10 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + xtensa_lowputc('\r'); } - up_lowputc((char)ch); + xtensa_lowputc((char)ch); #ifdef CONSOLE_UART esp32s3_lowputc_restore_all_uart_int(CONSOLE_DEV.priv, &int_status); @@ -1155,10 +1155,10 @@ int up_putc(int ch) { /* Add CR */ - up_lowputc('\r'); + xtensa_lowputc('\r'); } - up_lowputc(ch); + xtensa_lowputc(ch); #ifdef CONSOLE_UART esp32s3_lowputc_restore_all_uart_int(CONSOLE_DEV.priv, &int_status); diff --git a/arch/xtensa/src/esp32s3/esp32s3_start.c b/arch/xtensa/src/esp32s3/esp32s3_start.c index 2d961a2f9b4..910ab961710 100644 --- a/arch/xtensa/src/esp32s3/esp32s3_start.c +++ b/arch/xtensa/src/esp32s3/esp32s3_start.c @@ -47,7 +47,7 @@ ****************************************************************************/ #ifdef CONFIG_DEBUG_FEATURES -# define showprogress(c) up_lowputc(c) +# define showprogress(c) xtensa_lowputc(c) #else # define showprogress(c) #endif diff --git a/arch/z16/src/common/z16_internal.h b/arch/z16/src/common/z16_internal.h index 5b4920c7f9c..5b13b934bb4 100644 --- a/arch/z16/src/common/z16_internal.h +++ b/arch/z16/src/common/z16_internal.h @@ -87,7 +87,7 @@ #define IN_INTERRUPT (g_current_regs != NULL) #define SAVE_IRQCONTEXT(tcb) z16_copystate((tcb)->xcp.regs, (FAR chipreg_t*)g_current_regs) #define SET_IRQCONTEXT(tcb) do { g_current_regs = (tcb)->xcp.regs; } while (0) -#define SAVE_USERCONTEXT(tcb) z16_saveusercontext((tcb)->xcp.regs) +#define SAVE_USERCONTEXT(tcb) up_saveusercontext((tcb)->xcp.regs) #define RESTORE_USERCONTEXT(tcb) z16_restoreusercontext((tcb)->xcp.regs) #define SIGNAL_RETURN(regs) z16_restoreusercontext(regs) @@ -119,7 +119,6 @@ typedef void (*up_vector_t)(void); void z16_copystate(FAR chipreg_t *dest, FAR chipreg_t *src); FAR chipreg_t *z16_doirq(int irq, FAR chipreg_t *regs); void z16_restoreusercontext(FAR chipreg_t *regs); -int z16_saveusercontext(FAR chipreg_t *regs); void z16_sigdeliver(void); #if defined(CONFIG_Z16_LOWPUTC) || defined(CONFIG_Z16_LOWGETC) diff --git a/arch/z16/src/common/z16_registerdump.c b/arch/z16/src/common/z16_registerdump.c index 0e905f6024d..8c85dfc3ffe 100644 --- a/arch/z16/src/common/z16_registerdump.c +++ b/arch/z16/src/common/z16_registerdump.c @@ -55,7 +55,7 @@ void z16_registerdump(void) if (regs32 == NULL) { - z16_saveusercontext(s_last_regs); + up_saveusercontext(s_last_regs); regs32 = (FAR volatile uint32_t *)s_last_regs; } diff --git a/arch/z16/src/z16f/z16f_saveusercontext.S b/arch/z16/src/z16f/z16f_saveusercontext.S index bf1b2ae21d2..37f9d34f49b 100644 --- a/arch/z16/src/z16f/z16f_saveusercontext.S +++ b/arch/z16/src/z16f/z16f_saveusercontext.S @@ -30,7 +30,7 @@ * External References / External Definitions *************************************************************************/ - xdef _z16_saveusercontext + xdef _up_saveusercontext /************************************************************************* * Data Allocation @@ -44,7 +44,7 @@ *************************************************************************/ /************************************************************************* - * Name: z16_saveusercontext + * Name: up_saveusercontext * * Description: * Save the current user context. @@ -59,7 +59,7 @@ * *************************************************************************/ -_z16_saveusercontext: +_up_saveusercontext: /* Save the flags (needed to restore the interrupt state) */ ld.ub r3, Z16F_CNTRL_FLAGS /* Fetch the flags register (zero padded) */ diff --git a/arch/z80/src/common/z80_allocateheap.c b/arch/z80/src/common/z80_allocateheap.c index 47bf3a6a5c2..9b5858f062e 100644 --- a/arch/z80/src/common/z80_allocateheap.c +++ b/arch/z80/src/common/z80_allocateheap.c @@ -78,7 +78,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size) } /**************************************************************************** - * Name: up_addregions + * Name: z80_addregions * * Description: * Memory may be added in non-contiguous chunks. Additional chunks are @@ -87,7 +87,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size) ****************************************************************************/ #if CONFIG_MM_REGIONS > 1 -void up_addregion(void) +void z80_addregion(void) { kmm_addregion((FAR void *)CONFIG_HEAP2_BASE, CONFIG_HEAP2_SIZE); } diff --git a/arch/z80/src/common/z80_initialize.c b/arch/z80/src/common/z80_initialize.c index bf754ad9585..235974fc17f 100644 --- a/arch/z80/src/common/z80_initialize.c +++ b/arch/z80/src/common/z80_initialize.c @@ -69,7 +69,7 @@ void up_initialize(void) #if CONFIG_MM_REGIONS > 1 /* Add any extra memory fragments to the memory manager */ - up_addregion(); + z80_addregion(); #endif #ifdef CONFIG_PM @@ -98,7 +98,7 @@ void up_initialize(void) /* Initialize the network */ - up_netinitialize(); + z80_netinitialize(); board_autoled_on(LED_IRQSENABLED); } diff --git a/arch/z80/src/common/z80_internal.h b/arch/z80/src/common/z80_internal.h index 84367d6d18b..e4c3cbaae8d 100644 --- a/arch/z80/src/common/z80_internal.h +++ b/arch/z80/src/common/z80_internal.h @@ -123,24 +123,24 @@ void z80_serial_initialize(void); /* Architecture specific hook into the timer interrupt handler */ #ifdef CONFIG_ARCH_TIMERHOOK -void up_timerhook(void); +void z80_timerhook(void); #endif /* Defined in board/up_network.c */ #if defined(CONFIG_NET) && !defined(CONFIG_NETDEV_LATEINIT) -int up_netinitialize(void); -void up_netuninitialize(void); +int z80_netinitialize(void); +void z80_netuninitialize(void); # ifdef CONFIG_ARCH_MCFILTER -int up_multicastfilter(FAR struct net_driver_s *dev, FAR uint8_t *mac, +int z80_multicastfilter(FAR struct net_driver_s *dev, FAR uint8_t *mac, bool enable); # else -# define up_multicastfilter(dev, mac, enable) +# define z80_multicastfilter(dev, mac, enable) # endif #else -# define up_netinitialize() -# define up_netuninitialize() -# define up_multicastfilter(dev, mac, enable) +# define z80_netinitialize() +# define z80_netuninitialize() +# define z80_multicastfilter(dev, mac, enable) #endif /* Dump stack and registers */ diff --git a/arch/z80/src/ez80/ez80_emac.c b/arch/z80/src/ez80/ez80_emac.c index 7a8bd4dc834..1bbb0d1509c 100644 --- a/arch/z80/src/ez80/ez80_emac.c +++ b/arch/z80/src/ez80/ez80_emac.c @@ -2490,7 +2490,7 @@ errout: * ****************************************************************************/ -int up_netinitialize(void) +int z80_netinitialize(void) { FAR struct ez80emac_driver_s *priv = &g_emac; int ret; @@ -2548,12 +2548,12 @@ int up_netinitialize(void) return OK; errout: - up_netuninitialize(); + z80_netuninitialize(); return ret; } /**************************************************************************** - * Function: up_multicastfilter + * Function: z80_multicastfilter * * Description: * Add one MAC address to the multi-cast hash table @@ -2569,7 +2569,7 @@ errout: ****************************************************************************/ #ifdef CONFIG_ARCH_MCFILTER -int up_multicastfilter(FAR struct net_driver_s *dev, FAR uint8_t *mac, +int z80_multicastfilter(FAR struct net_driver_s *dev, FAR uint8_t *mac, bool enable) { FAR struct ez80emac_driver_s *priv = @@ -2611,7 +2611,7 @@ int up_multicastfilter(FAR struct net_driver_s *dev, FAR uint8_t *mac, #endif /**************************************************************************** - * Function: up_netuninitialize + * Function: z80_netuninitialize * * Description: * Un-initialize the Ethernet driver @@ -2626,7 +2626,7 @@ int up_multicastfilter(FAR struct net_driver_s *dev, FAR uint8_t *mac, * ****************************************************************************/ -void up_netuninitialize(void) +void z80_netuninitialize(void) { FAR struct ez80emac_driver_s *priv = &g_emac; diff --git a/arch/z80/src/ez80/ez80_registerdump.c b/arch/z80/src/ez80/ez80_registerdump.c index 313dcbfdbe5..a298b3dea62 100644 --- a/arch/z80/src/ez80/ez80_registerdump.c +++ b/arch/z80/src/ez80/ez80_registerdump.c @@ -54,7 +54,7 @@ void ez80_registerdump(void) if (regs == NULL) { - ez80_saveusercontext(s_last_regs); + up_saveusercontext(s_last_regs); regs = s_last_regs; } diff --git a/arch/z80/src/ez80/ez80_saveusercontext.asm b/arch/z80/src/ez80/ez80_saveusercontext.asm index 7bbada076be..b7d6aa2fbe6 100644 --- a/arch/z80/src/ez80/ez80_saveusercontext.asm +++ b/arch/z80/src/ez80/ez80_saveusercontext.asm @@ -26,7 +26,7 @@ ; Global Symbols Expported ;************************************************************************** - xdef _ez80_saveusercontext + xdef _up_saveusercontext ;************************************************************************* ; Constants @@ -86,10 +86,10 @@ SP_OFFSET equ 3*3 .assume ADL=1 ;************************************************************************* -; Name: z80_saveusercontext +; Name: up_saveusercontext ;************************************************************************* -_ez80_saveusercontext: +_up_saveusercontext: ; Set up a stack frame push ix ; Save IX and IY diff --git a/arch/z80/src/ez80/ez80_timerisr.c b/arch/z80/src/ez80/ez80_timerisr.c index 830fc7a8ab2..877ab4e13d5 100644 --- a/arch/z80/src/ez80/ez80_timerisr.c +++ b/arch/z80/src/ez80/ez80_timerisr.c @@ -115,7 +115,7 @@ static int ez80_timerisr(int irq, chipreg_t *regs, void *arg) #ifdef CONFIG_ARCH_TIMERHOOK /* Architecture specific hook into the timer interrupt handler */ - up_timerhook(); + z80_timerhook(); #endif return 0; diff --git a/arch/z80/src/ez80/switch.h b/arch/z80/src/ez80/switch.h index d66625a37d6..4d4a3051e38 100644 --- a/arch/z80/src/ez80/switch.h +++ b/arch/z80/src/ez80/switch.h @@ -89,7 +89,7 @@ * because only those registers normally saved in a C called need be stored. */ -#define SAVE_USERCONTEXT(tcb) ez80_saveusercontext((tcb)->xcp.regs) +#define SAVE_USERCONTEXT(tcb) up_saveusercontext((tcb)->xcp.regs) /* Restore the full context -- either a simple user state save or the full, * IRQ state save. @@ -133,7 +133,7 @@ void ez80_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src); /* Defined in ez80_saveusercontext.asm */ -int ez80_saveusercontext(FAR chipreg_t *regs); +int up_saveusercontext(FAR chipreg_t *regs); /* Defined in ez80_restorecontext.asm */ diff --git a/arch/z80/src/z180/switch.h b/arch/z80/src/z180/switch.h index 05789c42523..14ab93e6a2c 100644 --- a/arch/z80/src/z180/switch.h +++ b/arch/z80/src/z180/switch.h @@ -137,7 +137,7 @@ */ #define SAVE_USERCONTEXT(tcb) \ - z180_saveusercontext((tcb)->xcp.regs) + up_saveusercontext((tcb)->xcp.regs) /* Restore the full context -- either a simple user state save or the full, * IRQ state save. @@ -199,7 +199,7 @@ void z180_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src); /* Defined in z180_saveusercontext.asm */ -int z180_saveusercontext(FAR chipreg_t *regs); +int up_saveusercontext(FAR chipreg_t *regs); /* Defined in z180_restoreusercontext.asm */ diff --git a/arch/z80/src/z180/z180_lowserial.c b/arch/z80/src/z180/z180_lowserial.c index d4121dd82ea..80774a5bbaf 100644 --- a/arch/z80/src/z180/z180_lowserial.c +++ b/arch/z80/src/z180/z180_lowserial.c @@ -48,7 +48,7 @@ ****************************************************************************/ /**************************************************************************** - * Name: up_putc/up_lowputc + * Name: up_putc/z80_lowputc * * Description: * Low-level console output @@ -56,7 +56,7 @@ ****************************************************************************/ #ifdef USE_SERIALDRIVER -int up_lowputc(int ch) +int z80_lowputc(int ch) #else int up_putc(int ch) #endif diff --git a/arch/z80/src/z180/z180_registerdump.c b/arch/z80/src/z180/z180_registerdump.c index b361964dc0a..96610708a57 100644 --- a/arch/z80/src/z180/z180_registerdump.c +++ b/arch/z80/src/z180/z180_registerdump.c @@ -54,7 +54,7 @@ void z180_registerdump(void) if (regs == NULL) { - z180_saveusercontext(s_last_regs); + up_saveusercontext(s_last_regs); regs = s_last_regs; } diff --git a/arch/z80/src/z180/z180_saveusercontext.asm b/arch/z80/src/z180/z180_saveusercontext.asm index ec31d691a3e..b78a83640ab 100644 --- a/arch/z80/src/z180/z180_saveusercontext.asm +++ b/arch/z80/src/z180/z180_saveusercontext.asm @@ -44,11 +44,11 @@ SP_OFFSET == 6 ;************************************************************************* -; Name: z180_saveusercontext +; Name: up_saveusercontext ;************************************************************************* .area _CODE -_z180_saveusercontext: +_up_saveusercontext: ; Set up a stack frame push ix ; Save IX and IY diff --git a/arch/z80/src/z180/z180_scc.c b/arch/z80/src/z180/z180_scc.c index 47290171ef6..7f0c39f6be3 100644 --- a/arch/z80/src/z180/z180_scc.c +++ b/arch/z80/src/z180/z180_scc.c @@ -608,7 +608,7 @@ int up_putc(int ch) /* Disable [E]SCC interrupts and perform the low-level output */ z180_disableuartint(priv); - up_lowputc(ch); + z80_lowputc(ch); z180_restoreuartint(priv); return ch; #endif diff --git a/arch/z80/src/z180/z180_serial.h b/arch/z80/src/z180/z180_serial.h index 8dd720b6592..1999d0e72b1 100644 --- a/arch/z80/src/z180/z180_serial.h +++ b/arch/z80/src/z180/z180_serial.h @@ -49,7 +49,7 @@ void z180_putc(uint8_t ch) __naked; /**************************************************************************** - * Name: up_putc/up_lowputc + * Name: up_putc/z80_lowputc * * Description: * Low-level console output @@ -57,10 +57,10 @@ void z180_putc(uint8_t ch) __naked; ****************************************************************************/ #ifdef USE_SERIALDRIVER -int up_lowputc(int ch); +int z80_lowputc(int ch); #else int up_putc(int ch); -# define up_lowputc(ch) up_putc(ch) +# define z80_lowputc(ch) up_putc(ch) #endif #endif /* __ARCH_Z80_SRC_Z180_Z180_SERIAL_H */ diff --git a/arch/z80/src/z8/switch.h b/arch/z80/src/z8/switch.h index f0df11b46dd..0f8b778fe6b 100644 --- a/arch/z80/src/z8/switch.h +++ b/arch/z80/src/z8/switch.h @@ -149,7 +149,7 @@ */ #define SAVE_USERCONTEXT(tcb) \ - z8_saveusercontext((tcb)->xcp.regs) + up_saveusercontext((tcb)->xcp.regs) /* Restore the full context -- either a simple user state save or the full, * IRQ state save. @@ -217,7 +217,7 @@ void up_ack_irq(int irq); /* Defined in z8_saveusercontext.asm */ -int z8_saveusercontext(FAR chipreg_t *regs); +int up_saveusercontext(FAR chipreg_t *regs); /* Defined in z8_saveirqcontext.c */ diff --git a/arch/z80/src/z8/z8_registerdump.c b/arch/z80/src/z8/z8_registerdump.c index 0c081567d30..b4e4aac677a 100644 --- a/arch/z80/src/z8/z8_registerdump.c +++ b/arch/z80/src/z8/z8_registerdump.c @@ -106,7 +106,7 @@ void z8_registerdump(void) case Z8_IRQSTATE_NONE: default: - z8_saveusercontext(s_last_regs); + up_saveusercontext(s_last_regs); regs = s_last_regs; z8_dumpregs(regs); z8_dumpstate(regs[XCPT_SP], regs[XCPT_PC], diff --git a/arch/z80/src/z8/z8_restorecontext.S b/arch/z80/src/z8/z8_restorecontext.S index bb2f27518d4..a458585a64b 100644 --- a/arch/z80/src/z8/z8_restorecontext.S +++ b/arch/z80/src/z8/z8_restorecontext.S @@ -43,8 +43,8 @@ * * Description: * Restore the task context that was previously saved via - * _z8_saveusercontext() or by interrupt handling. Unlike the - * _z8_saveusercontext() counterpart, we do not know the context of the + * _up_saveusercontext() or by interrupt handling. Unlike the + * _up_saveusercontext() counterpart, we do not know the context of the * restored task and, hence, we must handle the worst case -- restore * everythihng. * diff --git a/arch/z80/src/z8/z8_saveusercontext.S b/arch/z80/src/z8/z8_saveusercontext.S index 30c9be3077c..1977d010e98 100644 --- a/arch/z80/src/z8/z8_saveusercontext.S +++ b/arch/z80/src/z8/z8_saveusercontext.S @@ -30,7 +30,7 @@ * Pre-processor Definitions **************************************************************************/ - xdef _z8_saveusercontext + xdef _up_saveusercontext /************************************************************************** * Code @@ -39,7 +39,7 @@ segment CODE /**************************************************************************** - * Name: _z8_saveusercontext + * Name: _up_saveusercontext * * Description: * Save the current state of the user thread. Since this function is @@ -63,7 +63,7 @@ * **************************************************************************/ -_z8_saveusercontext: +_up_saveusercontext: /* Get the rr6 = the current value of the stack pointer */ ldx r6, sph /* rr6 = stack pointer */ diff --git a/arch/z80/src/z80/switch.h b/arch/z80/src/z80/switch.h index 27df0895e64..aaf37dcd6c6 100644 --- a/arch/z80/src/z80/switch.h +++ b/arch/z80/src/z80/switch.h @@ -88,7 +88,7 @@ * because only those registers normally saved in a C called need be stored. */ -#define SAVE_USERCONTEXT(tcb) z80_saveusercontext((tcb)->xcp.regs) +#define SAVE_USERCONTEXT(tcb) up_saveusercontext((tcb)->xcp.regs) /* Restore the full context -- either a simple user state save or the full, * IRQ state save. @@ -132,7 +132,7 @@ void z80_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src); /* Defined in z80_saveusercontext.asm */ -int z80_saveusercontext(FAR chipreg_t *regs); +int up_saveusercontext(FAR chipreg_t *regs); /* Defined in z80_restoreusercontext.asm */ diff --git a/arch/z80/src/z80/z80_registerdump.c b/arch/z80/src/z80/z80_registerdump.c index d77e87de815..5bcfa69f571 100644 --- a/arch/z80/src/z80/z80_registerdump.c +++ b/arch/z80/src/z80/z80_registerdump.c @@ -54,7 +54,7 @@ void z80_registerdump(void) if (regs == NULL) { - z80_saveusercontext(s_last_regs); + up_saveusercontext(s_last_regs); regs = s_last_regs; } diff --git a/arch/z80/src/z80/z80_saveusercontext.asm b/arch/z80/src/z80/z80_saveusercontext.asm index 232b392f9cc..d7786fd7a9c 100644 --- a/arch/z80/src/z80/z80_saveusercontext.asm +++ b/arch/z80/src/z80/z80_saveusercontext.asm @@ -44,11 +44,11 @@ SP_OFFSET == 6 ;************************************************************************* -; Name: z80_saveusercontext +; Name: up_saveusercontext ;************************************************************************* .area _CODE -_z80_saveusercontext: +_up_saveusercontext: ; Set up a stack frame push ix ; Save IX and IY diff --git a/boards/avr/at32uc3/avr32dev1/src/avr32_boot.c b/boards/avr/at32uc3/avr32dev1/src/avr32_boot.c index a1c25718972..5581373d3aa 100644 --- a/boards/avr/at32uc3/avr32dev1/src/avr32_boot.c +++ b/boards/avr/at32uc3/avr32dev1/src/avr32_boot.c @@ -29,7 +29,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" #include "at32uc3.h" #include "avr32dev1.h" diff --git a/boards/avr/at90usb/micropendous3/src/at90usb_boot.c b/boards/avr/at90usb/micropendous3/src/at90usb_boot.c index 4efe0cf220a..2ae3c38a03d 100644 --- a/boards/avr/at90usb/micropendous3/src/at90usb_boot.c +++ b/boards/avr/at90usb/micropendous3/src/at90usb_boot.c @@ -28,7 +28,7 @@ #include -#include "up_internal.h" +#include "avr_internal.h" #include "at90usb.h" #include "micropendous3.h" diff --git a/boards/avr/at90usb/teensy-2.0/src/at90usb_boot.c b/boards/avr/at90usb/teensy-2.0/src/at90usb_boot.c index 1418fbb4840..6dd9e0b616b 100644 --- a/boards/avr/at90usb/teensy-2.0/src/at90usb_boot.c +++ b/boards/avr/at90usb/teensy-2.0/src/at90usb_boot.c @@ -28,7 +28,7 @@ #include -#include "up_internal.h" +#include "avr_internal.h" #include "at90usb.h" #include "teensy-20.h" diff --git a/boards/avr/at90usb/teensy-2.0/src/at90usb_leds.c b/boards/avr/at90usb/teensy-2.0/src/at90usb_leds.c index 0580bc4fde9..5074cc6dc26 100644 --- a/boards/avr/at90usb/teensy-2.0/src/at90usb_leds.c +++ b/boards/avr/at90usb/teensy-2.0/src/at90usb_leds.c @@ -30,7 +30,7 @@ #include -#include "up_internal.h" +#include "avr_internal.h" #include "at90usb.h" #include "teensy-20.h" diff --git a/boards/avr/at90usb/teensy-2.0/src/at90usb_spi.c b/boards/avr/at90usb/teensy-2.0/src/at90usb_spi.c index 204b7e26fb3..151f8954b67 100644 --- a/boards/avr/at90usb/teensy-2.0/src/at90usb_spi.c +++ b/boards/avr/at90usb/teensy-2.0/src/at90usb_spi.c @@ -32,7 +32,7 @@ #include #include -#include "up_internal.h" +#include "avr_internal.h" #include "chip.h" #include "at90usb.h" #include "teensy-20.h" diff --git a/boards/avr/atmega/amber/src/atmega_boot.c b/boards/avr/atmega/amber/src/atmega_boot.c index b7192b932f7..72fe9162840 100644 --- a/boards/avr/atmega/amber/src/atmega_boot.c +++ b/boards/avr/atmega/amber/src/atmega_boot.c @@ -28,7 +28,7 @@ #include -#include "up_internal.h" +#include "avr_internal.h" #include "atmega.h" #include "amber.h" diff --git a/boards/avr/atmega/arduino-mega2560/src/avr_boot.c b/boards/avr/atmega/arduino-mega2560/src/avr_boot.c index f4d03d72c06..161bf1db4dc 100644 --- a/boards/avr/atmega/arduino-mega2560/src/avr_boot.c +++ b/boards/avr/atmega/arduino-mega2560/src/avr_boot.c @@ -28,7 +28,7 @@ #include -#include "up_internal.h" +#include "avr_internal.h" #include "atmega.h" #include "arduino_mega2560.h" diff --git a/boards/avr/atmega/arduino-mega2560/src/avr_leds.c b/boards/avr/atmega/arduino-mega2560/src/avr_leds.c index 0d8980b1b9a..ff4f5d1e2af 100644 --- a/boards/avr/atmega/arduino-mega2560/src/avr_leds.c +++ b/boards/avr/atmega/arduino-mega2560/src/avr_leds.c @@ -28,7 +28,7 @@ #include -#include "up_internal.h" +#include "avr_internal.h" #include "atmega2560.h" #include "arduino_mega2560.h" diff --git a/boards/avr/atmega/moteino-mega/src/avr_boot.c b/boards/avr/atmega/moteino-mega/src/avr_boot.c index 8243a92a346..8fc3cfc45e8 100644 --- a/boards/avr/atmega/moteino-mega/src/avr_boot.c +++ b/boards/avr/atmega/moteino-mega/src/avr_boot.c @@ -28,7 +28,7 @@ #include -#include "up_internal.h" +#include "avr_internal.h" #include "atmega.h" #include "moteino_mega.h" diff --git a/boards/avr/atmega/moteino-mega/src/avr_leds.c b/boards/avr/atmega/moteino-mega/src/avr_leds.c index 0ec0f3bb34c..807afae106e 100644 --- a/boards/avr/atmega/moteino-mega/src/avr_leds.c +++ b/boards/avr/atmega/moteino-mega/src/avr_leds.c @@ -30,7 +30,7 @@ #include -#include "up_internal.h" +#include "avr_internal.h" #include "atmega.h" #include "moteino_mega.h" diff --git a/boards/or1k/mor1kx/or1k/src/or1k_autoled.c b/boards/or1k/mor1kx/or1k/src/or1k_autoled.c index d9365e7280e..79ed13c4b12 100644 --- a/boards/or1k/mor1kx/or1k/src/or1k_autoled.c +++ b/boards/or1k/mor1kx/or1k/src/or1k_autoled.c @@ -31,7 +31,7 @@ #include #include -#include "up_internal.h" +#include "or1k_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/boards/renesas/m16c/skp16c26/src/m16c_buttons.c b/boards/renesas/m16c/skp16c26/src/m16c_buttons.c index 22c098bd2be..f8961c3add2 100644 --- a/boards/renesas/m16c/skp16c26/src/m16c_buttons.c +++ b/boards/renesas/m16c/skp16c26/src/m16c_buttons.c @@ -29,7 +29,7 @@ #include #include "chip.h" -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/boards/renesas/m16c/skp16c26/src/m16c_lcd.c b/boards/renesas/m16c/skp16c26/src/m16c_lcd.c index fc558cae9a3..654a0604686 100644 --- a/boards/renesas/m16c/skp16c26/src/m16c_lcd.c +++ b/boards/renesas/m16c/skp16c26/src/m16c_lcd.c @@ -28,7 +28,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" #include "chip.h" #ifdef CONFIG_SLCD diff --git a/boards/renesas/m16c/skp16c26/src/m16c_lcdconsole.c b/boards/renesas/m16c/skp16c26/src/m16c_lcdconsole.c index 91df8a4365a..d0e5698f947 100644 --- a/boards/renesas/m16c/skp16c26/src/m16c_lcdconsole.c +++ b/boards/renesas/m16c/skp16c26/src/m16c_lcdconsole.c @@ -26,7 +26,7 @@ #include -#include "up_internal.h" +#include "renesas_internal.h" #include "skp16c26.h" /* Only use the LCD as a console if there are is no serial console */ diff --git a/boards/renesas/m16c/skp16c26/src/m16c_leds.c b/boards/renesas/m16c/skp16c26/src/m16c_leds.c index 244e4cb70ee..4337a623037 100644 --- a/boards/renesas/m16c/skp16c26/src/m16c_leds.c +++ b/boards/renesas/m16c/skp16c26/src/m16c_leds.c @@ -29,7 +29,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" #include "chip.h" #ifdef CONFIG_ARCH_LEDS diff --git a/boards/renesas/rx65n/rx65n-grrose/src/rx65n_sbram.c b/boards/renesas/rx65n/rx65n-grrose/src/rx65n_sbram.c index 5d1e306355a..b06f19e4d83 100644 --- a/boards/renesas/rx65n/rx65n-grrose/src/rx65n_sbram.c +++ b/boards/renesas/rx65n/rx65n-grrose/src/rx65n_sbram.c @@ -38,7 +38,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" #include "rx65n_sbram.h" #include "rx65n_grrose.h" #ifdef CONFIG_RX65N_SBRAM diff --git a/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_sbram.c b/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_sbram.c index 653ea7f3e3f..e1e1352dfe7 100644 --- a/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_sbram.c +++ b/boards/renesas/rx65n/rx65n-rsk2mb/src/rx65n_sbram.c @@ -38,7 +38,7 @@ #include #include -#include "up_internal.h" +#include "renesas_internal.h" #include "rx65n_sbram.h" #include "rx65n_rsk2mb.h" #ifdef CONFIG_RX65N_SBRAM diff --git a/boards/renesas/sh1/us7032evb1/src/sh1_leds.c b/boards/renesas/sh1/us7032evb1/src/sh1_leds.c index 28ec17d178e..be058b4abc7 100644 --- a/boards/renesas/sh1/us7032evb1/src/sh1_leds.c +++ b/boards/renesas/sh1/us7032evb1/src/sh1_leds.c @@ -29,7 +29,7 @@ #include #include "chip.h" -#include "up_internal.h" +#include "renesas_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/boards/sim/sim/sim/src/sim_bringup.c b/boards/sim/sim/sim/src/sim_bringup.c index bc94be89e3d..4234e1bad58 100644 --- a/boards/sim/sim/sim/src/sim_bringup.c +++ b/boards/sim/sim/sim/src/sim_bringup.c @@ -61,7 +61,7 @@ #include #endif -#include "up_internal.h" +#include "sim_internal.h" #include "sim.h" /**************************************************************************** @@ -364,10 +364,10 @@ int sim_bringup(void) #ifdef CONFIG_SIM_HCISOCKET /* Register the Host Bluetooth network device via HCI socket */ - ret = bthcisock_register(CONFIG_SIM_HCISOCKET_DEVID); + ret = sim_bthcisock_register(CONFIG_SIM_HCISOCKET_DEVID); if (ret < 0) { - syslog(LOG_ERR, "ERROR: bthcisock_register() failed: %d\n", ret); + syslog(LOG_ERR, "ERROR: sim_bthcisock_register() failed: %d\n", ret); } #endif @@ -447,9 +447,9 @@ int sim_bringup(void) #ifdef CONFIG_RPTUN #ifdef CONFIG_SIM_RPTUN_MASTER - up_rptun_init("server-proxy", "proxy", true); + sim_rptun_init("server-proxy", "proxy", true); #else - up_rptun_init("server-proxy", "server", false); + sim_rptun_init("server-proxy", "server", false); #endif #ifdef CONFIG_DEV_RPMSG diff --git a/boards/sim/sim/sim/src/sim_buttons.c b/boards/sim/sim/sim/src/sim_buttons.c index 478f8e7d6f4..6596cdbffdf 100644 --- a/boards/sim/sim/sim/src/sim_buttons.c +++ b/boards/sim/sim/sim/src/sim_buttons.c @@ -26,7 +26,7 @@ #include #include #include -#include "up_internal.h" +#include "sim_internal.h" /**************************************************************************** * Pre-processor Definitions diff --git a/boards/sparc/bm3803/xx3803/src/bm3803_boot.c b/boards/sparc/bm3803/xx3803/src/bm3803_boot.c index a916c28f765..f52f221b70c 100644 --- a/boards/sparc/bm3803/xx3803/src/bm3803_boot.c +++ b/boards/sparc/bm3803/xx3803/src/bm3803_boot.c @@ -28,7 +28,7 @@ #include -#include "up_internal.h" +#include "sparc_internal.h" #include "bm3803.h" #include "xx3803.h" diff --git a/boards/sparc/bm3823/xx3823/src/bm3823_boot.c b/boards/sparc/bm3823/xx3823/src/bm3823_boot.c index 97c5ac5186e..e16d73a84d4 100644 --- a/boards/sparc/bm3823/xx3823/src/bm3823_boot.c +++ b/boards/sparc/bm3823/xx3823/src/bm3823_boot.c @@ -28,7 +28,7 @@ #include -#include "up_internal.h" +#include "sparc_internal.h" #include "bm3823.h" #include "xx3823.h" diff --git a/boards/sparc/bm3823/xx3823/src/bm3823_leds.c b/boards/sparc/bm3823/xx3823/src/bm3823_leds.c index d1c0bcd1639..a18e52d039d 100644 --- a/boards/sparc/bm3823/xx3823/src/bm3823_leds.c +++ b/boards/sparc/bm3823/xx3823/src/bm3823_leds.c @@ -28,7 +28,7 @@ #include -#include "up_internal.h" +#include "sparc_internal.h" #include "bm3823.h" #include "xx3823.h" diff --git a/boards/x86/qemu/qemu-i486/src/qemu_appinit.c b/boards/x86/qemu/qemu-i486/src/qemu_appinit.c index 188a06c1ff3..7747cd572c3 100644 --- a/boards/x86/qemu/qemu-i486/src/qemu_appinit.c +++ b/boards/x86/qemu/qemu-i486/src/qemu_appinit.c @@ -29,7 +29,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" /**************************************************************************** * Public Functions diff --git a/boards/x86/qemu/qemu-i486/src/qemu_boot.c b/boards/x86/qemu/qemu-i486/src/qemu_boot.c index 88b41ec9fbc..b5eb29065ec 100644 --- a/boards/x86/qemu/qemu-i486/src/qemu_boot.c +++ b/boards/x86/qemu/qemu-i486/src/qemu_boot.c @@ -29,7 +29,7 @@ #include #include -#include "up_internal.h" +#include "x86_internal.h" #include "qemu.h" #include "qemu_i486.h" diff --git a/boards/x86_64/intel64/qemu-intel64/src/qemu_appinit.c b/boards/x86_64/intel64/qemu-intel64/src/qemu_appinit.c index 4158fb40112..26405803395 100644 --- a/boards/x86_64/intel64/qemu-intel64/src/qemu_appinit.c +++ b/boards/x86_64/intel64/qemu-intel64/src/qemu_appinit.c @@ -25,7 +25,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" #include "qemu_intel64.h" /**************************************************************************** diff --git a/boards/x86_64/intel64/qemu-intel64/src/qemu_boot.c b/boards/x86_64/intel64/qemu-intel64/src/qemu_boot.c index d0d76260ea7..32cdcb33ec9 100644 --- a/boards/x86_64/intel64/qemu-intel64/src/qemu_boot.c +++ b/boards/x86_64/intel64/qemu-intel64/src/qemu_boot.c @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" #include "qemu_intel64.h" /**************************************************************************** diff --git a/boards/x86_64/intel64/qemu-intel64/src/qemu_net.c b/boards/x86_64/intel64/qemu-intel64/src/qemu_net.c index 6241220771d..dda1751b0d9 100644 --- a/boards/x86_64/intel64/qemu-intel64/src/qemu_net.c +++ b/boards/x86_64/intel64/qemu-intel64/src/qemu_net.c @@ -30,7 +30,7 @@ #include #include -#include "up_internal.h" +#include "x86_64_internal.h" /**************************************************************************** * Pre-processor Definitions