This patchset is aimed at unifying the code used to preserve CPU context
when switching from client programs into Forth, via either the CIF or
interrupt handlers.
It is part of a longer process to enable access to saved CPU context state
from within Forth which will eventually enable proper implementation of the
init-program and go words.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland(a)ilande.co.uk>
Mark Cave-Ayland (8):
SPARC64: create proper stack frame when entering client …
[View More]interface
SPARC64: introduce new Forth context stack (fcstack) for CPU contexts
SPARC64: switch client interface over to use new Forth context stack
SPARC64: switch IMMU/DMMU miss handlers over to use new Forth context
stack
SPARC64: move client interface stack inline to the new Forth context
stack
SPARC64: move IMMU/DMMU miss handler stacks inline to the new Forth
context stack
SPARC64: reorganise IMMU/DMMU trap context structure
SPARC64: rearrange saved state window order
openbios-devel/arch/sparc64/call-client.S | 218 +++++----------------
openbios-devel/arch/sparc64/context.c | 4 +
openbios-devel/arch/sparc64/cpustate.h | 244 +++++++++++++++++++++++
openbios-devel/arch/sparc64/ldscript | 5 +
openbios-devel/arch/sparc64/vectors.S | 300 ++++++-----------------------
openbios-devel/include/arch/sparc64/io.h | 2 +-
6 files changed, 367 insertions(+), 406 deletions(-)
create mode 100644 openbios-devel/arch/sparc64/cpustate.h
--
1.7.10.4
[View Less]
On 24/11/15 09:01, Alfonso Gamboa wrote:
> These images are definitely helpful, however what would be really useful
> to know is exactly what the modules in question do:
>
> - Multiprocessing (maybe uses a currently unimplemented CPU instruction
> to facilitate faster multitasking?)
>
> - Open Transport ASLM Modules (no idea what these do)
>
> - Apple Audio Extension Module (is this just a standard sound driver or
> other? I did get …
[View More]a backtrace once suggesting that it was trying to
> access digital CDROM audio which is why it crashed. Then again if it
> thinks that the CDROM is a HD then that's not going to help too much
> here either).
>
> The "Multiprocessing" folder contains a file named "Apple CPU Plugins"
> of type cpup. Looking at the resource "cpups", it seems to contain code
> to supplement the OS to support various newer CPUs and architectures.
> The resources in the file are named (and contain):
>
> PowerSurge2PPlugin:
> "hammerhead" (old clone computers based off multiple PPC 604I believe)
>
> G3Plugin:
> Powerbook1,1
>
> Core99Plugin:
> uni-north
> keylargo
> PowerMac2,1
> PowerMac2,2
> PowerMac3,4
> PowerMac3,5
> PowerMac4,1
> PowerBook3,3
> PowerBook3,4
Now the mac99 machine defines itself as "PowerMac3,1" so that might
suggest that it is something in the keylargo/uni-north code that is
causing the problem. Is there a way to somehow disable the individual
resources in the Core99Plugin in order to determine which one is the
culprit?
> The "Open Transport ASLM Modules" file seem to be a collection of shared
> libraries, since many programs, once this file is removed from the
> extensions folder, refuses to run, for example Apple System Profiler.
> OTLib$NBPScnr, OTLib$SerIAB are some examples of shared libraries
> contained within this file. This is verified from the book "Sad Macs,
> Bombs, and Other Disasters: And what to Do about Them By Ted Landau
> , see https://goo.gl/TVm9Tt"
>
> I will do more research.
A good starting point is the "Apple Audio Extension Module" since that
seems to cause havoc on load. Do you know any good tutorials on how to
debug an extension module on load i.e. how to step through its
initialisation? Unfortunately there doesn't seem to be much related
documentation around these days.
ATB,
Mark.
[View Less]
On 24/11/15 05:23, Alfonso Gamboa wrote:
> Here are some links I packaged for the emaculation forum, included is an
> image with macsbug installed already. I had success booting to desktop.
>
> Note: it seems as time goes by, booting several times using the ISO
> images corrupts them, resulting in failed boots with crashes at the boot
> splash screen. Crashes will continue until you replace them with fresh
> ones from the zip files. Reasons as to why are unknown at …
[View More]this time.
Yeah I noticed when booting from a CDROM that my open windows are
remembered across sessions(!). This makes me think that OS 9 thinks the
HFS volume is a HD rather than a CDROM and so mounts it read/write on
boot. How would I find this out in OS9?
> Resedit, Stuffit, Toast, Disk Copy, utilities in an ISO to mount within
> QEMU:
> http://bebop.gtxent.com/qemu_os9_utilities.iso.zip
>
> MacOS 9.2.2 bootable image(extensions all removed):
> http://bebop.gtxent.com/os922_uni.iso.zip
>
> MacOS 9.2.1 bootable image(extensions all removed):
> http://bebop.gtxent.com/os92_test.iso.zip
>
> MacOS 9.2.1 bootable image with macsbug (extensions all removed):
> http://bebop.gtxent.com/os92_test_macsbug.iso.zip
These images are definitely helpful, however what would be really useful
to know is exactly what the modules in question do:
- Multiprocessing (maybe uses a currently unimplemented CPU instruction
to facilitate faster multitasking?)
- Open Transport ASLM Modules (no idea what these do)
- Apple Audio Extension Module (is this just a standard sound driver or
other? I did get a backtrace once suggesting that it was trying to
access digital CDROM audio which is why it crashed. Then again if it
thinks that the CDROM is a HD then that's not going to help too much
here either).
ATB,
Mark.
[View Less]
On 20/11/15 17:06, Alfonso Gamboa wrote:
> booting into MacOS9 with qemu to the Desktop is now possible, see:
>
> http://www.emaculation.com/forum/viewtopic.php?f=34&t=7047&start=250
>
> Some issues, remain, certain extensions crash on boot.
Hi Alfonso,
Has there been any progress at all as to which extensions may be causing
the crashes?
ATB,
Mark.
Hi all,
openbios fails to build with gcc 5.2 cross compilers. This is using fedora 23
packages. There's a bug here with complete info:
https://bugzilla.redhat.com/show_bug.cgi?id=1282890
The error is:
powerpc64-linux-gnu-gcc $EXTRACFLAGS -m32 -msoft-float -fno-builtin-bcopy
-fno-builtin-log2 -Os -g -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH
-USWAP_ENDIANNESS -Wall -Wredundant-decls -Wshadow -Wpointer-arith
-Wstrict-prototypes -Wmissing-declarations -Wundef -Wendif-labels
-Wstrict-aliasing -…
[View More]Wwrite-strings -Wmissing-prototypes -Wnested-externs
-Werror -MMD -MP -MT target/arch/ppc/qemu/ofmem.o -MF
'target/arch/ppc/qemu/ofmem.d' -I/root/openbios/openbios-1.1/include
-I/root/openbios/openbios-1.1/kernel/include -I./target/include -c -o
target/arch/ppc/qemu/ofmem.o /root/openbios/openbios-1.1/arch/ppc/qemu/ofmem.c
/tmp/ccznzzOd.s: Assembler messages:
/tmp/ccznzzOd.s:551: Error: missing operand
rules.mak:309: recipe for target 'target/arch/ppc/qemu/ofmem.o' failed
make[1]: *** [target/arch/ppc/qemu/ofmem.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/root/openbios/openbios-1.1/obj-ppc'
Makefile:32: recipe for target 'subdir-ppc' failed
make: *** [subdir-ppc] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.DSB86j (%build)
David Howells' commented in the bug with a suggested fix... but I don't even
have a setup to test openbios so I'd prefer if someone else cooks up the patch :)
Thanks,
Cole
[View Less]
On Fri, 20 Nov 2015, Alfonso Gamboa wrote:
> booting into MacOS9 with qemu to the Desktop is now possible, see:
>
> http://www.emaculation.com/forum/viewtopic.php?f=34&t=7047&start=250
Very nice.
> On Nov 20, 2015 7:46 AM, "Programmingkid" <programmingkidx(a)gmail.com> wrote:
>> I use to have the same belief until Mark set me straight. We are only
>> making an emulator of a new world Mac, not a simulator of a PowerMac3,1.
>> This means we might be …
[View More]able to get away with not exactly mirroring a real
>> Mac. The fact that Mac OS 9 can boot up at all does give me hope we are on
>> the right path.
I'm clear on that but what I've meant was that we probably have to make a
closer emulation of the real PowerMac (not one to one but close enough) to
make OSes written for that hardware happy. I think we are missing some i2c
and gpio emulation that these OSes might expect but I'm not sure.
One thing that might help to hint at what's missing is to compile QEMU
with DEBUG_UNASSIGNED (this will generate a lot of logs) and try to find
out what is accessed that is not emulated.
Regards,
BALATON Zoltan
[View Less]
I built Cormac O'Brien's QEMU repo for Mac OS 9 and tried to boot my Mac OS 10.4 boot cd. Mac OS 10.4's kernel panics because of a CUDA problem. I did use the mac99 target. Here is the error message:
panic(cpu 0 caller 0x16E786CC): CUDA - TODO CHECK FOR TRANSACTION TYPE AND ERROR
This is the command I used: ./ppc-softmmu/qemu-system-ppc -boot d -cdrom ~/tiger.iso -prom-env boot-args=-v -usb -M mac99
I think there is still something wrong with CUDA. But we might not have to "fix" it. When …
[View More]we use the mac99 target, the PowerMac3,1 Macintosh system is what we are trying to emulate. My sources indicate that the PowerMac3,1 doesn't have a CUDA chip. This chip is used for ADB communications. Using it only on the BeigeG3 target makes sense.
My sources for the PowerMac3,1 system is this link: http://www.everymac.com/systems/apple/powermac_g4/specs/powermac_g4_350_agp…
and this device tree:
PowerMac G4 device tree
ff839ab8: /cpus
ff839ce8: /PowerPC,G4@0
ff83a060: /l2-cache
ff83ab58: /chosen
ff83ace8: /memory@0
ff83af00: /openprom
ff83b008: /client-services
ff83c1a8: /rom@ff800000
ff83c330: /boot-rom@fff00000
ff83c4a8: /macos
ff83c528: /options
ff83c5a8: /aliases
ff83cec8: /packages
ff83cf30: /deblocker
ff83d798: /disk-label
ff83e198: /obp-tftp
ff8439f0: /mac-parts
ff844850: /mac-files
ff847540: /hfs-plus-files
ff84c1c8: /fat-files
ff84def8: /iso-9660-files
ff84eb00: /bootinfo-loader
ff8507a0: /xcoff-loader
ff8511b8: /pe-loader
ff851b90: /elf-loader
ff8531c0: /usb-hid-class
ff8554d8: /usb-ms-class
ff8576a8: /sbp2-disk
ff858ac0: /ata-disk
ff859cd8: /atapi-disk
ff85b348: /bootpath-search
ff861b68: /terminal-emulator
ff861c00: /psuedo-hid
ff861c88: /keyboard
ff862308: /mouse
ff862820: /multiboot
ff86e7f0: /diagnostics
ff86e858: /tools-node
ff8704b8: /rtas
ff8706b8: /nvram@fff04000
ff871180: /uni-n@f8000000
ff8713c8: /i2c@f8001000
ff871b10: /cereal
ff8721c0: /pci@f0000000
ff898cd0: /uni-north-agp@b
ff898f40: /ATY,Rage128Ps@10
ff873268: /pci@f2000000
ff8742d8: /pci-bridge@d
ff876368: /mac-io@7
ff8773a0: /interrupt-controller@40000
ff877548: /gpio@50
ff877630: /extint-gpio1
ff8777c8: /programmer-switch
ff877900: /escc-legacy@12000
ff877af8: /ch-a@12004
ff877c78: /ch-b@12000
ff877df8: /escc@13000
ff878000: /ch-a@13020
ff8789a8: /ch-b@13000
ff8792c0: /davbus@14000
ff879540: /sound
ff879c40: /timer@15000
ff879da8: /via-pmu@16000
ff87ccf0: /rtc
ff87d3e0: /power-mgt
ff8bf378: /usb-power-mgt
ff87d648: /i2c@18000
ff87ded8: /cereal
ff87e5a0: /ata-4@1f000
ff880318: /disk
ff8809e8: /ata-3@20000
ff882760: /disk
ff882da8: /ata-3@21000
ff884b20: /disk
ff8864c8: /ethernet@4
ff888690: /usb@8
ff88dd50: /usb@9
ff8be3f0: /hub@1
ff8be580: /keyboard@1
ff893410: /firewire@a
ff8752e8: /pci@f4000000
ff8bb128: /ethernet@f
[View Less]
This series of patches allows to build openbios on a
powerpc64 host. It has been tested with the following targets:
ppc, sparc32, sparc64. It has also been tested on x86_64 host
with the same targets.
v2: remove patches 3/5 and 4/5 of the first series and replace it
with patch 4/4. We don't include the system includes using
full pathname but use '-iquote' intead of '-I'
A preliminary patch is needed for fcode-utils, as "toke" is
broken on big endian architecture:
diff -ru fcode-utils/…
[View More]toke/scanner.c fcode-utils-new/toke/scanner.c
--- fcode-utils/toke/scanner.c 2006-10-30 09:48:28.000000000 +0100
+++ fcode-utils-new/toke/scanner.c 2015-10-19 00:21:43.417373690 +0200
@@ -1625,7 +1625,7 @@
void user_message( tic_param_t pfield )
{
- char delim = (char)pfield.deflt_elem ;
+ char delim = (char)pfield.fw_token ;
handle_user_message( delim, TRUE);
}
@@ -5295,7 +5295,7 @@
void process_remark( tic_param_t pfield )
{
- char until_char = (char)pfield.deflt_elem ;
+ char until_char = (char)pfield.fw_token ;
unsigned int start_lineno = lineno;
#ifdef DEBUG_SCANNER
Laurent Vivier (4):
switch-arch: factorize code to compute architecture properties.
switch-arch: compute base arch and allow native compiler for 32bit
and 64bit.
switch-arch: as for powerpc64, select sparc64 compiler to compile
sparc32
bootstrap: don't include files from target/include as system includes.
Makefile.target | 2 +-
config/scripts/switch-arch | 85 +++++++++++++++++++++++++---------------------
include/arch/ppc/types.h | 8 -----
3 files changed, 48 insertions(+), 47 deletions(-)
--
2.4.3
[View Less]