Commit Graph

17 Commits

Author SHA1 Message Date
Andreas Färber
ead25906f6 Don't assume that pointer and cell size are identical, part 2
Do the double-dereference in two cell2pointer steps
to avoid garbage in the high 32 address bits on ppc64.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@930 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-30 15:44:08 +00:00
Andreas Färber
380cd335cc Don't assume that pointer and cell size are identical, part 1
On ppc64, cell size is 32 bits but pointers are 64-bit.
Thus, direct casts result in warnings, treated as errors.

Use [u]intptr_t cast or cell2pointer and pointer2cell macros as necessary.

v2:
* Drop changes related to physical addresses since physical addresses may be
  wider than pointers (e.g., 36 bits on sparc32, as pointed out by Blue).
* Drop changes to cell2pointer() and pointer2cell() for now.

Signed-off-by: Andreas Färber <andreas.faerber@web.de>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@922 f158a5a8-5612-0410-a976-696ce0be7e32
2010-10-25 20:48:45 +00:00
Mark Cave-Ayland
fc58e30c96 Create a C wrapper around the Forth key word to be used in the debugger instead of calling availchar()/getchar(). Using this
wrapper means that the debugger now works correctly under PPC.

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


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@822 f158a5a8-5612-0410-a976-696ce0be7e32
2010-07-25 17:34:13 +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
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
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
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
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
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
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
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
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
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