As a start, I've taken the milo-2.0 palcode sources for EB164
(which appear to be almost identical, but slightly newer version
of the ones shipped with EBSDK2.0) and have tried to build them
with linux tools. Several strange (and fatal) errors seem to
creep in during assembly though...
Firstly, the assembler doesn't seem to understand the locked physical
variants of the 21164 hw_ld instruction, even when using the -m21164
flag. i.e.
dc21164.h:
/*
** Physical mode load-lock and store-conditional variants of
** HW_LD and HW_ST.
*/
#define ldq_lp hw_ldq/pl
#define stq_cp hw_stq/pc
But, more worryingly, several instructions seem to get silently
misassembled: (The following examples are both from osfpal.S in
the example EB164 palcode)
e.g.
Itb_LdVpte:
ld_vpte p0, 0(p0) // Fetch the level 3 PTE (may fault)
becomes:
gas-2.6AXP [00000190] 0x6D081000 hw_ld/q $8,0x0000($8)
gas-EBSDK [00000190] 0x6D081800 hw_ld/q $8,0x0800($8)
(Despite the fact that the EBSDK disassemblers don't appear to
understand the instruction either!)
e.g.
ldah v0, 0xFFF0(zero) // v0 <- 0.FFF0.0000
zap v0, 0xE0, v0 // Get base address of CBOX IPRs
becomes:
gas-2.6AXP [000051E4] 0x241F0000 ldah $0,0x0000($31)
[000051E8] 0x481C1600 zap $0,0xe0,$0
gas-EBSDK [000051E4] 0x241FFFF0 ldah $0,0xfff0($31)
[000051E8] 0x481C1600 zap $0,0xe0,$0
The second example has a particularly disastrous effect on the PALcode!
If anybody knows of a version of GAS, or a patch which would
solve these problems, I would be very grateful!
Thanks,
Paul