Commit Graph

13 Commits

Author SHA1 Message Date
DBJ314
0bd13db3d2 fix fatal bug in MPCall_83 2018-04-20 20:00:34 -04: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
fb06fc2b80 Reverse the NanoKernel pool allocator 2018-03-30 09:56:08 +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
73c3eece94 Insert calls to known linked-list macros
The presence of InitList, InsertAsNext, InsertAsPrev and RemoveFromList
calls should make some hitherto unexplored code easier to read.
2018-02-18 01:24:19 +08:00
Elliot Nunn
4d5929ffd8 Reverse Area-related MP calls
- MPCreateArea
- MPCreateAliasArea
- MPSetAreaBackingProvider
- MPSetAreaAccess (only renamed from KC...)
2018-02-18 01:24:19 +08:00
Elliot Nunn
423b809e87 Update Area struct
Most Area fields and flags now have meaningful names, thanks largely to
Daniel's reversal work.
2018-02-18 01:24:19 +08:00
Elliot Nunn
fba585b5e3 Use new _AssertAndRelease macro
This is the usual way to release a lock. Most MP calls employ it
indirectly, through their return path.
2018-02-18 01:24:19 +08:00
Elliot Nunn
b27256fbb6 Reverse Event Group MP calls 2018-02-18 01:24:18 +08:00
Elliot Nunn
c5c5b784cb Initial commit 2018-02-18 01:24:10 +08:00