source: trunk/libs/newlib/src/libgloss/mips/nullmon.c @ 686

Last change on this file since 686 was 444, checked in by satin@…, 7 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 2.4 KB
Line 
1/* nullmon.c - Stub or monitor services.
2 *
3 * Copyright (c) 1998 Cygnus Support
4 *
5 * The authors hereby grant permission to use, copy, modify, distribute,
6 * and license this software and its documentation for any purpose, provided
7 * that existing copyright notices are retained in all copies and that this
8 * notice is included verbatim in any distributions. No written agreement,
9 * license, or royalty fee is required for any of the authorized uses.
10 * Modifications to this software may be copyrighted by their authors
11 * and need not follow the licensing terms described here, provided that
12 * the new terms are clearly indicated on the first page of each file where
13 * they apply.
14 */
15
16/* This is a ROMSTUB
17    Various libraries in libgloss may reference board specific services.
18   These are often performed by system calls and by rom specific
19   interfaces such as dvemon.c This file defines the null interface in
20   which the rom monitor either does not exist or is not used.
21   Linking with this file supports applications which only exercise
22   the processor, specifically, the GDB test suite.
23   By linking this object in rather than a monitor specific support
24   we can insure that the testsuite will run without references or
25   linkages to nonexistent monitor services.
26   Similarly, every service provided by this file muse be provided by all
27   monitor speciifc interfaces.
28   PLEASE DO NOT MAKE THIS FILE SPECIFIC TO ANY MONITOR
29 */   
30
31/* This form is giving linker relocation errors */
32#if ! defined(BOARD_MEM_SIZE)
33#define BOARD_MEM_SIZE 0x100000 /* About a megabyte */
34#endif
35extern char _ftext[]; /* Defined in nullmon.ld */
36extern char _end[];   /* Defined in nullmon.ld */
37
38#if defined(FIXME_WARNINGS)
39#warning("FIXME: struct s_mem belongs in a header file")
40#endif
41struct s_mem
42{ unsigned int size;
43  unsigned int icsize;
44  unsigned int dcsize;
45};
46
47void
48get_mem_info (mem)
49     struct s_mem *mem;
50{
51  mem->size = BOARD_MEM_SIZE - (_end - _ftext);
52}
53
54/*  SYSTEM INTERFACE
55  Since we are defining a NULL operating environment here, I am
56  entering the stub definitions for the GNUpro libraries, System Calls.
57  I would rather not to even pretend to support these functions but, they
58  get pulled in by other libraries.
59*/
60 
61int read(int file, char * ptr , int len) {   return 0 ; }
62int close (int file) { return -1 ; }
63int write(int file , char * ptr, int len) { return 0 ; }
64/*eof*/
Note: See TracBrowser for help on using the repository browser.