Commit Graph

29 Commits

Author SHA1 Message Date
Elliot Nunn
b28fd136c0 waaay neater 2018-07-28 14:20:23 +08:00
Elliot Nunn
2194a99638 lots of architectural work 2018-07-27 16:41:59 +08:00
Elliot Nunn
dbf0af7ab9 everything perfect except one last MR table 2018-07-24 19:43:17 +08:00
Elliot Nunn
90b71fe94e nearly perfect except fdp 2018-07-15 19:59:56 +08:00
Elliot Nunn
062a081398 looks decent throughout 2018-07-15 19:29:31 +08:00
Elliot Nunn
5fd5b541aa fix EmuKCallTblPtrLogical 2018-07-15 19:18:16 +08:00
Elliot Nunn
681bd4e52f neaten kdp 2018-07-15 19:13:45 +08:00
Elliot Nunn
74ad98c3d4 and more inforecord sizes 2018-07-15 18:28:08 +08:00
Elliot Nunn
e11b02a8a8 neaten
neaten structures and delete old files
2018-07-15 18:10:37 +08:00
Elliot Nunn
f106b59fda fixes 2018-07-15 17:34:52 +08:00
Elliot Nunn
7b62fa404d more 2018-07-15 17:20:35 +08:00
Elliot Nunn
f1b71713d3 second crack at init code 2018-07-15 01:31:15 +08:00
Elliot Nunn
4d3f6fe0b2 intelligent structures 2018-07-09 16:13:00 +08:00
Elliot Nunn
f0e290f709 Split up NKInterrupts.s 2018-07-04 19:28:34 +08:00
Elliot Nunn
933bd48f01 Auto-generate per-file function lists 2018-06-30 16:07:38 +08:00
DBJ314
3e05ffda22 Understand NK entry point better 2018-06-28 22:08:28 +08:00
Elliot Nunn
0470029cac Clarify exceptions 2018-06-19 15:06:03 +08:00
Elliot Nunn
6c199998f0 Lots of work on Address Spaces 2018-04-27 21:52:08 +08:00
Elliot Nunn
3302c1ba99 Identify all accesses to the Primary System Area
Whenever a field was added to the end of the Primary System Area (PSA)
record, the offsets of all other fields would change. When reversing NK
version 02.27, I noticed that 32 bytes had been added to the end of the
PSA between 02.27 and 02.28. To build a byte-perfect 02.27, all
references to PSA fields must therefore use the record definition in
NKPublic.s instead of a numeric offset.

In this commit, all PSA references are identified by field name (_FFF if
the field has not yet been reversed).
2018-04-22 19:00:29 +08:00
Elliot Nunn
dd4e2ef845 Reverse PPC-68k context switching (incomplete) 2018-04-15 17:00:11 +08:00
Elliot Nunn
4c0e5221f1 Remove unnecessary static branch hints
These + and - characters in a branch mnemonic can cause the assembler to
produce conditional branch instructions with that hint the branch
predictor. The default for forward branches is -, and for backward
branches is +. If a mnemonic is issued with the opposite sign, then bit
10 of the instruction (the LSB of the BO field) is set.

My long-retired "ppcdisasm" script inserted these hints unconditionally,
despite 98% of them not being required. The code is much cleaner now.

I read in some old MPW release notes that PPCAsm and PPCLink together
exhibit a quirk when linking conditional branches to imported symbols.
PPCAsm always assembles these conditional branches as if they were
forward branches (that is, a + hint will always set the hint bit, and a
- hint will never). I hoped to use this property to divine whether the
NanoKernel was linked from one or many assembly files, but I was
frustrated by the lack of conditional branches between files.
2018-04-15 16:52:14 +08:00
Elliot Nunn
e2e519b863 Remove junk from old disassembler 2018-03-31 16:19:41 +08:00
Elliot Nunn
123c1e4bee Work on the scheduler and interrupt handling code 2018-03-30 10:27:12 +08:00
Elliot Nunn
fb06fc2b80 Reverse the NanoKernel pool allocator 2018-03-30 09:56:08 +08:00
Elliot Nunn
c7d4cdd367 Reverse power management functions
This is part of the work to get the mini running well. The
kcPowerDispatch and kcCacheDispatch entry points were explored. The dead
code implementing a Timer "Heartbeat" was also used to label some
structures better.
2018-03-17 20:24:02 +08:00
Elliot Nunn
9722f8ba5e Start to reverse the legacy VM subsystem 2018-02-18 01:24:21 +08:00
Elliot Nunn
7fdc813d8f Reverse userspace sync primitives
Namely queues, semaphores, critical regions, event groups and
"notifications". The MP calls implementing these services have been
named after their MPLibrary wrapper functions. This convention will be
followed in the future (no more NKCreateEvent).
2018-02-18 01:24:20 +08:00
Elliot Nunn
f0696e5ceb Fix a mistake with the coherence group structure
There is a global linked list of all coherence groups. Coherence groups
and CPUs have a one-to-many relationship.
2018-02-18 01:24:20 +08:00
Elliot Nunn
c5c5b784cb Initial commit 2018-02-18 01:24:10 +08:00