Allow mips user to override memory size
This commit is contained in:
parent
d49d4a33da
commit
2c8d73598c
@ -1,3 +1,9 @@
|
|||||||
|
2002-02-01 Michael Meissner <meissner@redhat.com>
|
||||||
|
|
||||||
|
* mips/cma101.c (__sizemem_default): Allow user to specify the
|
||||||
|
memory size.
|
||||||
|
(__sizemem): Use it.
|
||||||
|
|
||||||
2002-01-24 Mark Salter <msalter@redhat.com>
|
2002-01-24 Mark Salter <msalter@redhat.com>
|
||||||
|
|
||||||
* arm/redboot-crt0.S: Use __get_memtop to put stack in high memory.
|
* arm/redboot-crt0.S: Use __get_memtop to put stack in high memory.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* cma101.c -- lo-level support for Cogent CMA101 development board.
|
* cma101.c -- lo-level support for Cogent CMA101 development board.
|
||||||
*
|
*
|
||||||
* Copyright (c) 1996, 2001 Cygnus Support
|
* Copyright (c) 1996, 2001, 2002 Cygnus Support
|
||||||
*
|
*
|
||||||
* The authors hereby grant permission to use, copy, modify, distribute,
|
* The authors hereby grant permission to use, copy, modify, distribute,
|
||||||
* and license this software and its documentation for any purpose, provided
|
* and license this software and its documentation for any purpose, provided
|
||||||
@ -179,6 +179,9 @@ extern unsigned int __buserr_count(void);
|
|||||||
extern void __default_buserr_handler(void);
|
extern void __default_buserr_handler(void);
|
||||||
extern void __restore_buserr_handler(void);
|
extern void __restore_buserr_handler(void);
|
||||||
|
|
||||||
|
/* Allow the user to provide his/her own defaults. */
|
||||||
|
unsigned int __sizemem_default;
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
__sizemem ()
|
__sizemem ()
|
||||||
{
|
{
|
||||||
@ -190,6 +193,11 @@ __sizemem ()
|
|||||||
char *endptr = (char *)&end;
|
char *endptr = (char *)&end;
|
||||||
int extra;
|
int extra;
|
||||||
|
|
||||||
|
/* If the linker script provided a value for the memory size (or the user
|
||||||
|
overrode it in a debugger), use that. */
|
||||||
|
if (__sizemem_default)
|
||||||
|
return __sizemem_default;
|
||||||
|
|
||||||
/* If we are running in kernel segment 0 (possibly cached), try sizing memory
|
/* If we are running in kernel segment 0 (possibly cached), try sizing memory
|
||||||
in kernel segment 1 (uncached) to avoid some problems with monitors. */
|
in kernel segment 1 (uncached) to avoid some problems with monitors. */
|
||||||
if (endptr >= K0BASE_ADDR && endptr < K1BASE_ADDR)
|
if (endptr >= K0BASE_ADDR && endptr < K1BASE_ADDR)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user