[OpenBIOS] r483 - dev/16550pkg
svn at openbios.org
svn at openbios.org
Sun Jul 22 10:49:28 CEST 2007
Author: wmb
Date: 2007-07-22 10:49:28 +0200 (Sun, 22 Jul 2007)
New Revision: 483
Modified:
dev/16550pkg/16550.fth
Log:
serial driver - Fixed a bug caused by a name conflict between
x86 "msr@" and PowerPC "msr@", which are not compatible.
The net result was that the OFW "com1" driver did not work
at all on x86.
Modified: dev/16550pkg/16550.fth
===================================================================
--- dev/16550pkg/16550.fth 2007-07-22 01:17:56 UTC (rev 482)
+++ dev/16550pkg/16550.fth 2007-07-22 08:49:28 UTC (rev 483)
@@ -12,12 +12,14 @@
0 instance value uart-base \ Virtual address of UART; set later
: uart-base-adr ( -- adr )
- [ifdef] msr@
uart-base
- msr@ h# 30 and 0= if h# fff and io-base + then
- [else]
- uart-base
- [then]
+\ The following code is a PowerPC-specific hack that
+\ handles the case where memory mapping is turned off
+\ (in which case the 0x30 bit in MSR is 0). Note that
+\ the PowerPC msr@ is not compatible with the x86 msr at .
+\ [ifdef] msr@
+\ msr@ h# 30 and 0= if h# fff and io-base + then
+\ [then]
;
: uart@ ( reg# -- byte ) uart-base-adr + rb@ ; \ Read from a UART register
: uart! ( byte reg# -- ) uart-base-adr + rb! ; \ Write to a UART register
More information about the OpenBIOS
mailing list