OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 526 to Rev 527
    Reverse comparison

Rev 526 → Rev 527

/openrisc/trunk/gnu-src/newlib-1.18.0/newlib/libc/machine/or32/include/or1k-support.h
0,0 → 1,101
/* OR1K support defines
Copyright (C) 2011, ORSoC AB
Copyright (C) 2008, 2010 Embecosm Limited
Contributor Julius Baxter <julius.baxter@orsoc.se>
Contributor Jeremy Bennett <jeremy.bennett@embecosm.com>
This file is part of Newlib.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>. */
/* -------------------------------------------------------------------------- */
/* This program is commented throughout in a fashion suitable for processing
with Doxygen. */
/* -------------------------------------------------------------------------- */
 
/* This machine configuration matches the Or1ksim configuration file in this
directory. */
 
#ifndef OR1K_NEWLIB_SUPPORT__H
#define OR1K_NEWLIB_SUPPORT__H
 
/*! External symbols from each board's object file */
extern unsigned long _board_clk_freq;
 
extern unsigned long _board_uart_base;
extern unsigned long _board_uart_baud;
extern unsigned long _board_uart_irq;
 
/*! Check if board has UART - test base address */
#define BOARD_HAS_UART (_board_uart_base)
 
/*! l.nop constants */
#define NOP_NOP 0x0000 /* Normal nop instruction */
#define NOP_EXIT 0x0001 /* End of simulation */
#define NOP_REPORT 0x0002 /* Simple report */
/*#define NOP_PRINTF 0x0003 Simprintf instruction (obsolete)*/
#define NOP_PUTC 0x0004 /* JPB: Simputc instruction */
#define NOP_CNT_RESET 0x0005 /* Reset statistics counters */
#define NOP_GET_TICKS 0x0006 /* JPB: Get # ticks running */
#define NOP_GET_PS 0x0007 /* JPB: Get picosecs/cycle */
#define NOP_REPORT_FIRST 0x0400 /* Report with number */
#define NOP_REPORT_LAST 0x03ff /* Report with number */
 
/*! Register access macro */
#define REG8(add) *((volatile unsigned char *) (add))
#define REG16(add) *((volatile unsigned short *) (add))
#define REG32(add) *((volatile unsigned long *) (add))
 
/*! Interrupt control function prototypes */
void or1k_interrupt_handler_add(int, void(*)(void*));
void or1k_interrupt_enable(int);
void or1k_interrupt_disable(int);
 
/*! Exception handler insertion prototype */
void or1k_exception_handler_add(int, void (*)(void));
 
/*! SPR access prototypes */
void or1k_mtspr (unsigned long int spr,
unsigned long int value);
unsigned long int or1k_mfspr (unsigned long int spr);
 
/*! Simulator prototypes */
void or1k_report (unsigned long int value);
 
/*! Cache control prototypes */
void or1k_icache_enable(void);
void or1k_icache_disable(void);
void or1k_icache_flush(unsigned long);
void or1k_dcache_enable(void);
void or1k_dcache_disable(void);
void or1k_dcache_flush(unsigned long);
 
/*! MMU control prototypes */
void or1k_immu_enable(void);
void or1k_immu_disable(void);
void or1k_dmmu_enable(void);
void or1k_dmmu_disable(void);
 
/*! Timer prototypes */
void or1k_timer_init(unsigned int hz);
void or1k_timer_enable(void);
void or1k_timer_disable(void);
unsigned long or1k_timer_get_ticks(void);
void or1k_timer_reset_ticks(void);
 
/*! Utility function prototypes */
unsigned long int or1k_rand(void);
 
#endif /* OR1K_NEWLIB_SUPPORT__H */
/openrisc/trunk/gnu-src/newlib-1.18.0/newlib/libc/machine/or32/or1k-support.c
19,7 → 19,7
You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>. */
 
#include "or1k-newlib-support.h"
#include "or1k-support.h"
#include "spr-defs.h"
 
/* Board-specific CPU clk HZ value */
/openrisc/trunk/gnu-src/newlib-1.18.0/libgloss/or32/read.c
32,7 → 32,7
#include <errno.h>
#include <unistd.h>
 
#include "or1k-newlib-support.h"
#include "or1k-support.h"
 
#undef errno
extern int errno;
/openrisc/trunk/gnu-src/newlib-1.18.0/libgloss/or32/lseek.c
1,4 → 1,4
/* lseek-uart.c. Implementation of the _lseek syscall for newlib with UART
/* lseek.c. Implementation of the _lseek syscall for newlib
 
Copyright (C) 2004, Jacob Bower
Copyright (C) 2010, Embecosm Limited <info@embecosm.com>
32,7 → 32,7
#include <errno.h>
#include <unistd.h>
 
#include "or1k-newlib-support.h"
#include "or1k-support.h"
 
#undef errno
extern int errno;
/openrisc/trunk/gnu-src/newlib-1.18.0/libgloss/or32/_exit.c
29,7 → 29,7
with Doxygen. */
/* -------------------------------------------------------------------------- */
 
#include "or1k-newlib-support.h"
#include "or1k-support.h"
 
 
/* -------------------------------------------------------------------------- */
/openrisc/trunk/gnu-src/newlib-1.18.0/libgloss/or32/uart.c
29,7 → 29,7
with Doxygen. */
/* -------------------------------------------------------------------------- */
 
#include "or1k-newlib-support.h"
#include "or1k-support.h"
#include "uart.h"
 
/*! Macro to access a UART register */
/openrisc/trunk/gnu-src/newlib-1.18.0/libgloss/or32/isatty.c
1,4 → 1,4
/* isatty-uart.c. Implementation of the _isatty syscall for newlib with UART
/* isatty.c. Implementation of the _isatty syscall for newlib
 
Copyright (C) 2004, Jacob Bower
Copyright (C) 2010, Embecosm Limited <info@embecosm.com>
32,7 → 32,7
#include <errno.h>
#include <unistd.h>
 
#include "or1k-newlib-support.h"
#include "or1k-support.h"
 
#undef ERRNO
extern int errno;
/openrisc/trunk/gnu-src/newlib-1.18.0/libgloss/or32/fstat.c
1,4 → 1,4
/* fstat-uart.c. Implementation of the _fstat syscall for newlib with UART
/* fstat.c Implementation of the _fstat syscall for newlib
 
Copyright (C) 2004, Jacob Bower
Copyright (C) 2010, Embecosm Limited <info@embecosm.com>
33,7 → 33,7
#include <sys/stat.h>
#include <unistd.h>
 
#include "or1k-newlib-support.h"
#include "or1k-support.h"
 
#undef errno
extern int errno;
/openrisc/trunk/gnu-src/newlib-1.18.0/libgloss/or32/write.c
32,7 → 32,7
#include <errno.h>
#include <unistd.h>
 
#include "or1k-newlib-support.h"
#include "or1k-support.h"
 
 
#undef errno

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.