mirror of
https://github.com/apache/nuttx.git
synced 2026-05-15 21:19:09 +08:00
Correcting banked vs. non-banked issues (there are more)
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3320 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
############################################################################
|
||||
# arch/hc/src/Makefile
|
||||
#
|
||||
# Copyright (C) 2009 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -52,6 +52,14 @@
|
||||
* Private Definitions
|
||||
**************************************************************************/
|
||||
|
||||
#ifdef CONFIG_HCS12_NONBANKED
|
||||
# define CALL jsr
|
||||
# define RETURN rts
|
||||
#else
|
||||
# define CALL call
|
||||
# define RETURN rtc
|
||||
#endif
|
||||
|
||||
/* Select SCI parameters for the selected console */
|
||||
|
||||
#if defined(CONFIG_SCI0_SERIAL_CONSOLE)
|
||||
@@ -166,7 +174,7 @@ up_lowsetup:
|
||||
|
||||
#endif /* CONFIG_HCS12_SERIALMON */
|
||||
#endif /* HAVE_SERIAL_CONSOLE */
|
||||
rts
|
||||
RETURN
|
||||
.size up_lowsetup, . - up_lowsetup
|
||||
|
||||
/**************************************************************************
|
||||
@@ -207,11 +215,11 @@ up_lowputc:
|
||||
#endif /* HCS12_CONSOLE_BITS == 9 */
|
||||
|
||||
stab (HCS12_CONSOLE_BASE+HCS12_SCI_DRL_OFFSET)
|
||||
rts
|
||||
RETURN
|
||||
|
||||
#endif /* !CONFIG_HCS12_SERIALMON */
|
||||
#else
|
||||
rts
|
||||
RETURN
|
||||
#endif /* HAVE_SERIAL_CONSOLE */
|
||||
.size up_lowputc, . - up_lowputc
|
||||
.end
|
||||
|
||||
@@ -48,6 +48,14 @@
|
||||
* Private Definitions
|
||||
**************************************************************************/
|
||||
|
||||
#ifdef CONFIG_HCS12_NONBANKED
|
||||
# define CALL jsr
|
||||
# define RETURN rts
|
||||
#else
|
||||
# define CALL call
|
||||
# define RETURN rtc
|
||||
#endif
|
||||
|
||||
/**************************************************************************
|
||||
* Private Types
|
||||
**************************************************************************/
|
||||
@@ -176,6 +184,6 @@ up_saveusercontext:
|
||||
#endif
|
||||
clra
|
||||
clrb
|
||||
rts
|
||||
RETURN
|
||||
.size up_saveusercontext, . - up_saveusercontext
|
||||
.end
|
||||
|
||||
@@ -51,6 +51,14 @@
|
||||
* Private Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_HCS12_NONBANKED
|
||||
# define CALL jsr
|
||||
# define RETURN rts
|
||||
#else
|
||||
# define CALL call
|
||||
# define RETURN rtc
|
||||
#endif
|
||||
|
||||
#define INITRG_REG (MMC_INITRG_REG(HCS12_REG_BASE))
|
||||
#define INITRM_MAP (MMC_INITRM_RAM(HCS12_SRAM_BASE)|MMC_INITRM_RAMHAL)
|
||||
#define INITEE_EE (MMC_INITEE_EE(HCS12_EEPROM_BASE)|MMC_INITEE_EEON)
|
||||
@@ -79,11 +87,7 @@
|
||||
#ifdef CONFIG_HCS12_SERIALMON
|
||||
jsr #PutChar
|
||||
#else
|
||||
#ifdef CONFIG_HCS12_NONBANKED
|
||||
jsr up_lowputc
|
||||
#else
|
||||
call up_lowputc
|
||||
#endif
|
||||
CALL up_lowputc
|
||||
#endif
|
||||
#endif
|
||||
.endm
|
||||
@@ -107,8 +111,8 @@
|
||||
movb #INITRM_MAP, HCS12_MMC_INITRM /* Set RAM position to 0x2000-0x3fff */
|
||||
movb #INITEE_EE, HCS12_MMC_INITEE /* Set EEPROM position to 0x0800 */
|
||||
|
||||
/* In the non-banked mode, PPAGE is set to 0x3d to create a contiguous, 48Kb
|
||||
* .text address space.
|
||||
/* In the non-banked mode, PPAGE is set to 0x3d to create a (non-contiguous),
|
||||
* fixed, 48Kb .text address space.
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_HCS12_NONBANKED
|
||||
@@ -176,11 +180,7 @@ __start:
|
||||
/* Perform early, low-level initialization */
|
||||
|
||||
#ifndef CONFIG_HCS12_SERIALMON
|
||||
#ifdef CONFIG_HCS12_NONBANKED
|
||||
jsr up_lowsetup
|
||||
#else
|
||||
call up_lowsetup
|
||||
#endif
|
||||
CALL up_lowsetup
|
||||
#endif
|
||||
showprogress 'A'
|
||||
|
||||
@@ -219,21 +219,13 @@ __start:
|
||||
|
||||
/* Perform early board-level initialization */
|
||||
|
||||
#ifdef CONFIG_HCS12_NONBANKED
|
||||
jsr hcs12_boardinitialize
|
||||
#else
|
||||
call hcs12_boardinitialize
|
||||
#endif
|
||||
CALL hcs12_boardinitialize
|
||||
showprogress 'D'
|
||||
|
||||
/* Now, start the OS */
|
||||
|
||||
showprogress '\n'
|
||||
#ifdef CONFIG_HCS12_NONBANKED
|
||||
jsr os_start
|
||||
#else
|
||||
call os_start
|
||||
#endif
|
||||
CALL os_start
|
||||
bra __start
|
||||
|
||||
/* Variables:
|
||||
@@ -259,7 +251,6 @@ __start:
|
||||
.hword _edata
|
||||
.size __start, .-__start
|
||||
|
||||
|
||||
/************************************************************************************
|
||||
* .rodata
|
||||
************************************************************************************/
|
||||
|
||||
@@ -45,6 +45,14 @@
|
||||
* Pre-processor Definitions
|
||||
************************************************************************************/
|
||||
|
||||
#ifdef CONFIG_HCS12_NONBANKED
|
||||
# define CALL jsr
|
||||
# define RETURN rts
|
||||
#else
|
||||
# define CALL call
|
||||
# define RETURN rtc
|
||||
#endif
|
||||
|
||||
/************************************************************************************
|
||||
* Global Symbols
|
||||
************************************************************************************/
|
||||
@@ -161,7 +169,7 @@ hcs12_vectors:
|
||||
* .text
|
||||
************************************************************************************/
|
||||
|
||||
.text
|
||||
.section nonbanked, "x"
|
||||
.type handlers, function
|
||||
handlers:
|
||||
|
||||
@@ -301,7 +309,7 @@ vcommon:
|
||||
/* Recover the IRQ number and call up_doirq() */
|
||||
|
||||
ldab .Lbsave
|
||||
bsr up_doirq
|
||||
CALL up_doirq
|
||||
leas 2, sp
|
||||
|
||||
/* Check if the return value in d is the same as regs parameter passed in the TOS */
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/****************************************************************************
|
||||
* drivers/net/skeleton.c
|
||||
*
|
||||
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
Reference in New Issue
Block a user