arm_memory_workspace.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <errno.h>
#include <string.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <ctype.h>
#include <unistd.h>
#include "dbg_msg.h"
#include "jt_arm.h"
#include "jt_flash.h"
#include "arm_gdbstub.h"
#include "arm_memory_mmap.h"
#include "arm_memory_workspace.h"
#include "jt_instr.h"



Detailed Description

Function Documentation

struct memMap* getWorkSpace ( void   )  [read]
int is_workspace_big_enough ( uint32_t  length  ) 

Check is workspace length is big enough to hold the dcc-target-support routines.

length workspace length
true = 1; false = 0


Referenced by activateMemMap(), and changeWorkSpaceMode().

void changeWorkSpaceMode ( int  mode  ) 

Change the mode of current workspace.
mode = 0 -> deativate RAM as workspace
mode = 1 -> aktivate Top of RAM as workspace if not an extra workspace is already given
mode = 2 -> aktivate Bottom of RAM as workspace if not an extra workspace is already given
mode = 3 -> aktivate lower part of last RAM as workspace if not an extra workspace is already given
mode = 4 -> aktivate higher part of first RAM as workspace if not an extra workspace is already given

mode new mode of workspace RAM

References memMap::baseAddr, BOTTOM_OF_RAM_WORKSPACE, CB_ACTION_INPROCESS, DBG_LEVEL_GDB_ARM_INFO, DBG_LEVEL_GDB_ARM_WARN, dbgPrintf(), memMapHead::firstMapEntry, memMap::MemBufferType::Workspace::info, is_workspace_big_enough(), memMap::length, memMap::memBufferType, MMAP_T_RAM, MMAP_T_WORKSPACE, memMap::nextMap, memMapHead::numberOfEntrys, memMap::MemBufferType::Workspace::offset, RAM_PAGE_SIZE, memMap::MemBufferType::Workspace::state, TOP_OF_RAM_WORKSPACE, memMap::type, memMap::MemBufferType::Workspace, WORKSPACE_SEGMENT_SIZE, and WORKSPACE_UNTESTED.

Referenced by activateMemMap(), and gdb_monitor_Rcmd().

int useWorkspace ( int  algo,
uint32_t  addr,
unsigned  length 

Transfers a given algorithm-program to the workspace of the target machine.

algo Enum ID of the target algorithm we like to transfer
addr Base address of the data we like to modify or check
length Length of the data we like to modify or check
Return values:
0 on sucsess else error number
1 algorithm not yet supported
2 not usefull to transfer algorithm
4 target algorithm has an align failure
5 there is no workspace

References memMap::baseAddr, bit_nset, bit_set, bit_test, memMap::MemBuffer::Byte, DBG_LEVEL_GDB_ARM_ERROR, DBG_LEVEL_GDB_ARM_WARN, dbgPrintf(), disable_workspace_size_test, getWorkSpace(), jtag_arm_ReadWord(), jtag_arm_ReadWordMemory(), jtag_arm_WriteMemoryBuf(), jtag_arm_WriteWord(), memMap::length, memMap::memBuffer, memMap::memBufferType, MIN_DCC_DATA_SIZE, MMAP_T_RAM, memMap::MemBufferType::Workspace::offset, memMap::MemBufferType::Ram, RAM_PAGE_SIZE, memMap::MemBufferType::Ram::readPageBitmap, memMap::MemBufferType::Workspace::state, transactionActivate(), transactionCreate(), transactionErase(), transactionExecute(), memMap::type, memMap::MemBufferType::Workspace, WORKSPACE_ALGO_CHECK, WORKSPACE_ALGO_CORTEX_CHECK, WORKSPACE_ALGO_DUMMY, WORKSPACE_ALGO_FLASH_AMD_16_B, WORKSPACE_ALGO_FLASH_AMD_16_L, WORKSPACE_ALGO_FLASH_AMD_32_B, WORKSPACE_ALGO_FLASH_AMD_32_L, WORKSPACE_ALGO_FLASH_AMD_8_B, WORKSPACE_ALGO_FLASH_AMD_8_L, WORKSPACE_ALGO_FLASH_ATMEL, WORKSPACE_ALGO_FLASH_PHILIPS, WORKSPACE_ALGO_FLASH_STM32, WORKSPACE_ALGO_FLASH_STM32_OPTERASE, WORKSPACE_ALGO_FLASH_STR7, WORKSPACE_ALGO_FLASH_STR9, WORKSPACE_ALGO_READ, WORKSPACE_ALGO_WRITE, WORKSPACE_BROKEN, WORKSPACE_FREE, WORKSPACE_SEGMENT_SIZE, WORKSPACE_UNTESTED, and memMap::MemBufferType::Ram::writeByteBitmap.

Referenced by atmelFlashClearGPNVM(), atmelFlashErase(), atmelFlashEraseAndProgram(), atmelFlashLock(), atmelFlashProgramOnly(), atmelFlashSetGPNVM(), atmelFlashUnlock(), gdb_check_memory_block(), gdb_dcc_dummy(), gdb_read_memory_block(), gdb_writeback_memory_block(), philipsFlashEraseAllUnlocked(), philipsFlashLock(), philipsFlashProgram(), philipsFlashUnlock(), prog_flash_amd16(), prog_flash_amd32(), prog_flash_amd8(), stm32f10xOptionByteflashEraseSector(), stm32FlashProgram(), str7FlashErase(), str7FlashProgram(), str9FlashErase(), and str9FlashProgram().

Variable Documentation

disable check if it is reasonable to write data via work space program that is running at the target

Referenced by useWorkspace(), and verifyFlashCB_read_sector().

This file is part of the documentation for JTAG-GDB Server for ARM .

Generated on Mon Feb 15 21:23:21 2010 by doxygen 1.6.2.