Commit Graph

49 Commits

Author SHA1 Message Date
Igor V. Kovalenko
2d74db1de3 Commit revised version of Igor Kovalenko's patch for detecting whether dictionary allocations have overrun the memory
buffer allocated for them.

Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@741 f158a5a8-5612-0410-a976-696ce0be7e32
2010-04-12 20:02:53 +00:00
Mark Cave-Ayland
34d5a76f7e Revert the parts of the last commit which changed the exception function to use an exception pointer as it isn't really
required. Update forthstrap to add a new -c option that when specified will direct the Forth kernel console output to a file 
and integrate this into the build system. By default, when a dictionary is built using a base dictionary then a new log file 
called <dict>-console.log will be generated to help debugging if the build fails.

Also update the exception handler in kernel/bootstrap.c so that it matches the entire range of error codes in 
forth/bootstrap/interpreter.fs.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@706 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-25 21:14:00 +00:00
Mark Cave-Ayland
a288b3044b Change the sysdebug exception() callback so that it is now a function pointer, rather than a function. This enables us to setup an appropriate exception handler
for the task in hand; in particular it allows us to distinguish between an error that occurs when attempting to execute a base dictionary, and an error that 
occurs when interpreting source.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@705 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-24 11:49:41 +00:00
Mark Cave-Ayland
5c73290696 Add source file and line number tracking to forthstrap to allow the user to locate forth errors much more easily. An example of the new output is given below:
build@zeno:~/src/openbios/openbios-devel.pre$ ./config/scripts/switch-arch cross-ppc; make
Configuring OpenBIOS on amd64 for cross-ppc
Initializing build tree obj-ppc...ok.
Creating target Makefile...ok.
Creating config files...ok.
Building OpenBIOS for ppc
Building...error:
 HOSTCC host/kernel/stack.o
 HOSTCC forthstrap
  GEN   bootstrap.dict
bootstrap.fs:339 - foo is not defined.



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@704 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-24 10:28:51 +00:00
Mark Cave-Ayland
feee9b0fd5 Correct comments in kernel/primitives.c as pointed out by ProgrammingKid and Andreas Färber.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@702 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 21:40:22 +00:00
Mark Cave-Ayland
cbb3d8bf5b Fix a debug whereby the debug banner was being printed to the debug output rather than the console.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@701 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 21:35:54 +00:00
Mark Cave-Ayland
1dbe55b8e4 Move the basic OpenBIOS configuration header files from include/openbios to include/.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@695 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 17:19:58 +00:00
Mark Cave-Ayland
c112720b01 Move the kernel header files into include/kernel to synchronise with the code directory structure.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@689 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-14 14:21:02 +00:00
Stefan Reinauer
99f0be82ab Another nice patch from Mark Cave-Ayland:
This patch corrects a couple of (minor) bugs in the Forth source 
debugger; firstly the number of wordlists is held in #order, rather than 
#vocs which is the total number of wordlists which can be held 
simultaneously.

Secondly, the initial interruptforth setting in kernel/bootstrap.c is 
actually wrong, but since this is reset by enterforth() it is not needed 
anyway. Hence this line can simply be removed.



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@623 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-20 19:04:41 +00:00
Stefan Reinauer
937bd232c7 findsemis_wordlist is only used by findsemis() so let's remove it from the
"API"

Signed-off-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@622 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-20 19:03:46 +00:00
Stefan Reinauer
51fb2e19c3 improve x@ and x! functions, at least x@ reads back what x! wrote, now.
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@620 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-20 16:37:41 +00:00
Stefan Reinauer
7176a93f04 fix typo
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@614 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-20 11:14:10 +00:00
Blue Swirl
d6aac5ffe2 Reworked version of Forth Source debugger (Mark Cave-Ayland)
This patch implements the following Forth words:

   debug <xt> - Mark word for debugging
   debug-off  - Unmark all words for debugging
   resume     - Return from subordinate Forth interpreter

The source debugger also implements the following commands when it has
been activated:

   Up - Unmark current word for debugging, mark parent and continue
   Down - Mark next word for debugging
   Trace - Continue execution until end of word displaying
           debug information
   Rstack - Display contents of the Rstack
   Forth - Launch subordinate Forth interpreter

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@611 f158a5a8-5612-0410-a976-696ce0be7e32
2009-11-15 21:03:51 +00:00
Blue Swirl
9162f1b584 Introduce quiet build
Make forthstrap quiet by default. Use generic rules when possible, unify
the rules and cleanup white space. Use ld flag --whole-archive to avoid
some local rule use. We can also remove some hacks introduced to avoid
missing symbols.

Fix problems brought in by ld flag --whole-archive:
 * x86: fix missing nvram symbols
 * PPC: disable misc.S build for qemu (conflicts with our libgcc)

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@556 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-17 16:58:42 +00:00
Blue Swirl
d4b64752eb Improve version number handling
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@533 f158a5a8-5612-0410-a976-696ce0be7e32
2009-08-02 18:20:53 +00:00
Blue Swirl
f13e795c12 Implement /x FCode (Mark Cave-Ayland)
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@495 f158a5a8-5612-0410-a976-696ce0be7e32
2009-05-23 15:31:31 +00:00
Blue Swirl
aa0441b762 Fix gcc 4.3 warning
git-svn-id: svn://coreboot.org/openbios/openbios-devel@454 f158a5a8-5612-0410-a976-696ce0be7e32
2009-02-16 18:38:07 +00:00
Blue Swirl
a4a1319305 Fix Sparc64 cross compilation in 32 bit environment, closes #17
git-svn-id: svn://coreboot.org/openbios/openbios-devel@436 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-31 16:42:01 +00:00
Blue Swirl
c683b2e5bd Exit with nonzero status if there are errors
git-svn-id: svn://coreboot.org/openbios/openbios-devel@435 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-31 13:33:07 +00:00
Blue Swirl
3af23c3fdc Suppress OpenBSD linker warning
git-svn-id: svn://coreboot.org/openbios/openbios-devel@417 f158a5a8-5612-0410-a976-696ce0be7e32
2009-01-17 20:28:21 +00:00
Blue Swirl
69508e66a1 Make words array static and change the definition to a stricter one
git-svn-id: svn://coreboot.org/openbios/openbios-devel@310 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-23 10:12:09 +00:00
Blue Swirl
d7208a6daf Fix Sparse warnings
git-svn-id: svn://coreboot.org/openbios/openbios-devel@296 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-20 18:36:23 +00:00
Blue Swirl
7e21fc929d Fix almost all remaining warnings
git-svn-id: svn://coreboot.org/openbios/openbios-devel@294 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-20 17:15:47 +00:00
Blue Swirl
c5d270009e Warning fixes for Sparc32, Sparc64, PPC
Fix warnings that would be caused by gcc flag -Wwrite-strings and
-Wmissing-prototypes. Also fix most PPC specific warnings.


git-svn-id: svn://coreboot.org/openbios/openbios-devel@288 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-14 12:54:23 +00:00
Blue Swirl
a757800a01 Remove unnecessary trailing newlines
git-svn-id: svn://coreboot.org/openbios/openbios-devel@285 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-13 09:26:41 +00:00
Blue Swirl
58ca864765 Delete extra whitespace at the end of line, which annoys quilt
git-svn-id: svn://coreboot.org/openbios/openbios-devel@284 f158a5a8-5612-0410-a976-696ce0be7e32
2008-12-11 20:30:53 +00:00
Blue Swirl
d4eec07d55 Fix some more warnings
git-svn-id: svn://coreboot.org/openbios/openbios-devel@275 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-30 13:42:11 +00:00
Blue Swirl
bf0c6b1c38 Fix most warnings from Sparse
git-svn-id: svn://coreboot.org/openbios/openbios-devel@274 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-30 11:54:01 +00:00
Blue Swirl
a0cabb495a Fix most print format warnings
git-svn-id: svn://coreboot.org/openbios/openbios-devel@272 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-29 16:24:51 +00:00
Blue Swirl
f34790fc87 Fix some warnings
git-svn-id: svn://coreboot.org/openbios/openbios-devel@269 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-29 13:10:17 +00:00
Blue Swirl
2070f7e584 Delete unnecessary definition
git-svn-id: svn://coreboot.org/openbios/openbios-devel@268 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-28 20:28:23 +00:00
Laurent Vivier
c619e7c4a1 Define the ISA io base according machine type.
Signed-off-by: Laurent Vivier <Laurent@lvivier.info> 
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/openbios/openbios-devel@254 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-24 12:19:05 +00:00
Laurent Vivier
71033f7bb8 This patch allows me to compile openbios using the cross-pcc target
on amd64 host.

Signed-off-by: Laurent Vivier <Laurent@lvivier.info>
Acked-by: Stefan Reinauer <stepan@coresystems.de>



git-svn-id: svn://coreboot.org/openbios/openbios-devel@251 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-24 12:13:40 +00:00
Blue Swirl
7e8e34ae70 Fix compilation on OpenBSD: avoid accidental system include file use
git-svn-id: svn://coreboot.org/openbios/openbios-devel@246 f158a5a8-5612-0410-a976-696ce0be7e32
2008-11-08 09:10:52 +00:00
Blue Swirl
c76de95466 Fix memory corruption problems reported by glibc
git-svn-id: svn://coreboot.org/openbios/openbios-devel@139 f158a5a8-5612-0410-a976-696ce0be7e32
2007-05-05 10:03:56 +00:00
Stefan Reinauer
74666ba799 int-fixes part II
git-svn-id: svn://coreboot.org/openbios/openbios-devel@85 f158a5a8-5612-0410-a976-696ce0be7e32
2006-09-14 16:29:48 +00:00
Stefan Reinauer
1a34b8a360 64bit fixes from blueswirl
git-svn-id: svn://coreboot.org/openbios/openbios-devel@83 f158a5a8-5612-0410-a976-696ce0be7e32
2006-09-14 15:06:38 +00:00
Stefan Reinauer
83a3c5d996 blueswirl's latest console patches.
git-svn-id: svn://coreboot.org/openbios/openbios-devel@72 f158a5a8-5612-0410-a976-696ce0be7e32
2006-07-28 21:44:07 +00:00
Stefan Reinauer
e492087dbe 64-bit fixes
General 64-bit fixes and a hack for x86 to Sparc64 crosscompiling problem,
where x86 misses 128-bit types.



git-svn-id: svn://coreboot.org/openbios/openbios-devel@68 f158a5a8-5612-0410-a976-696ce0be7e32
2006-07-18 21:42:16 +00:00
Stefan Reinauer
b03ab3d3ae - Cleanup compiler warnings etc.
- add crosscflags from previous patch ;)


git-svn-id: svn://coreboot.org/openbios/openbios-devel@67 f158a5a8-5612-0410-a976-696ce0be7e32
2006-07-18 21:38:42 +00:00
Stefan Reinauer
b623837257 Automatic cross-compiler flags
Detect cross-compiling flags (CROSSCFLAGS) automatically based on endian
and word size differences.



git-svn-id: svn://coreboot.org/openbios/openbios-devel@66 f158a5a8-5612-0410-a976-696ce0be7e32
2006-07-18 21:35:55 +00:00
Stefan Reinauer
172438f171 - update dates
- fix address output of ls


git-svn-id: svn://coreboot.org/openbios/openbios-devel@34 f158a5a8-5612-0410-a976-696ce0be7e32
2006-05-26 11:14:20 +00:00
Stefan Reinauer
2eaec36c50 drop io from bootstrap and exception stuff from non-bootstrap compiles.
git-svn-id: svn://coreboot.org/openbios/openbios-devel@28 f158a5a8-5612-0410-a976-696ce0be7e32
2006-05-22 22:36:01 +00:00
Stefan Reinauer
1ab6b463ad latest sparc32 patch from Blueswirl
git-svn-id: svn://coreboot.org/openbios/openbios-devel@13 f158a5a8-5612-0410-a976-696ce0be7e32
2006-05-07 16:40:13 +00:00
Stefan Reinauer
d80454d07a new sparc patch from blueswirl
git-svn-id: svn://coreboot.org/openbios/openbios-devel@12 f158a5a8-5612-0410-a976-696ce0be7e32
2006-05-06 21:33:36 +00:00
Stefan Reinauer
6c8c248488 dumb typo
git-svn-id: svn://coreboot.org/openbios/openbios-devel@8 f158a5a8-5612-0410-a976-696ce0be7e32
2006-05-05 11:01:31 +00:00
Stefan Reinauer
8e89ccf89e more of the sparc32 port by Blue Swirl <blueswir1@hotmail.com>
git-svn-id: svn://coreboot.org/openbios/openbios-devel@4 f158a5a8-5612-0410-a976-696ce0be7e32
2006-05-04 22:07:30 +00:00
Stefan Reinauer
790e50099c clean out some warnings.
git-svn-id: svn://coreboot.org/openbios/openbios-devel@2 f158a5a8-5612-0410-a976-696ce0be7e32
2006-04-26 15:14:50 +00:00
Stefan Reinauer
5c9eb9b45b initial import of openbios--main--1.0--patch-26
git-svn-id: svn://coreboot.org/openbios/openbios-devel@1 f158a5a8-5612-0410-a976-696ce0be7e32
2006-04-26 15:08:19 +00:00