Any low-level #SPARC #SPARC64 #UltraSPARC gurus around? I want to know why my code doesn't exit.
https://gist.github.com/bitofhope/b47b09e9923504a453b00cd4ee228d0a
TIL that #SPARC64 is still being developed and manufaturered, and is fully open and royalty-free.
If #SPARC is an open ISA, why don't we hear more about it, and see more hobby projects featuring it?
…continues reading…
Oh man, both manufacturers are/have already discontinued it :blobcatsad:
Wait so to enter The Land of Little Endian™ I just need to set PSTATE.CLE and PSTATE.TLE to 1?
Like so:
```
rdpr %pstate, %g1
// Bit 8 is TLE, bit 9 is CLE
or %g1, 0b1_1_00_0_0_0_0_0_0, %g1
wrpr %g1, %g0, %pstate
// Now the processor's running in LE
```
Right? No need to do jumps or other rituals? :cirnothinking:
So I feel like there's a mistake in the `SAV09R1459912` revision of SPARCv9 spec, but it's not listed in the errata page*, so I'm gonna post it here as a reminder to myself... :blobcatpeekaboo:
In section G.3 "Synthetic Instructions" it says that `iprefetch [label]` expands to `bn,a,pt %xcc, [label]`. It should probably expand to `bn,pt %xcc, [label]` instead (i.e, without the annul directive).
Putting in the annul directive would mean that the next instruction after the `iprefetch` wouldn't be run by the processor, which is probably not what you wanted.
So here's what I did to convince it to install in a guest ldom, in detail:
- Create the disk image.
- Supply the correct partition table (here I use Linux' fdisk, there should be a way to do it from other OSes too but I'm too lazy so I just sshfs-ed into the image storage from my PC): `fdisk [disk-image-file]`; then enter `s` command.
- Delete all the partitions except partition 3 (whole disk).
- Create a single partition, starting at sector 63 up till the end. Save the partition table.
- Boot the Solaris installer. If installing Solaris 10, use ZFS as the root FS.
- This is important: Install to the slice that was prepared earlier, *DO NOT CHOOSE THE WHOLE DISK OPTION* as it'll wreck the geometry info.
- Continue as usual; select software, enter stuff, etc.
- After finishing, boot into slice `c` of the Solaris disk, e.g `boot disk:c` (you might want to set it in PROM for convenience).
I suppose I better tag this as #solaris #sparc #sparc64 #ldom too for visibility :blobcatpeekaboo:
#ldom #sparc64 #sparc #solaris
From OSA2011, Section 7.17, Compare and Branch:
> For optimal performance, CBcond should not be the next sequential instruction executed after any other control transfer instruction (including another CBcond).
So if the instruction before a CBcond is another CBcond, then it must be padded by something else...
(with other branches there's the delay slot that serves the same purpose)
... but if the instruction after a CBcond is a branch that is *not* a CBcond, do I need to put the padding too?
For example, in this case:
cxbe %o1, %o2, somewhere
retl
nop
Do I need to put something between the cxbe and retl to get good performance?
https://www.oracle.com/servers/technologies/opensparc-overview.html
Irregular reminder that SPARC T1 and SPARC T2 HDL sources and docs are available under GPL :cirnouwu:
So I found out that if your CPU already has the usual sets of optimizations (pipelining, multi-issue, OoO, etc.) then you can be very sloppy with delay slot handling and just stuff a nop in it and you wouldn't suffer any performance loss.
That is, the following code:
xx # Suppose that this is eligible to be moved to the delay slot
branch
nop # The delay slot
Will run just as fast as this:
branch
xx # The delay slot
Though, of course, filling the slots will reduce code size, which might help performance by having smaller binaries that fits better in the cache.
/me crying... I didn't knew #sparc64 stations firmware download needs paid support from Oracle. And I bought those from ebay.... Any way to get around this? (I have a T2000 and a T3-1)
@stebby Nice. Gl. I've been meaning to pick up a g4 or g5 system myself to play around with. As soon as my first paycheck comes in from this new job I'm gonna finally restore my #sparc64 sunblade 100 workstation (and upgrade it to 2GB of ram in the process).
Idk what it is exactly, but having grown up with #x86 being universal I've a morbid curiosity for other arches (especially big endian ones). Currently typing this from an #aarch64 laptop (although sadly on linux not bsd).
#openbsd #aarch64 #x86 #sparc64
I finally ditched #ZNC. It had three new releases since I last checked, and two of them fixed RCE. I now only have #XMPP, and thanks to #biboumi, I can just reach all my IRC channels from XMPP like native MUCs. And now I even have history, across my devices, thanks to #MAM!
The only reason I didn't do it earlier is that #biboumi crashed on #SPARC64 as soon as it would throw and catch an exception. But I finally found the reason: It linked against botan2, which used a different libstdc++.
#znc #xmpp #biboumi #mam #sparc64
@badger #OpenBSD has supported (unsure how fresh or usable it is today) logical domains (LDOM) on #sparc64. you can find Tx000 series rackmount machines for reasonable prices on eBay -- however their power/performance ratio is abysmal compared to more recent offerings.
see: http://www.h-i-r.net/2017/05/logical-domains-on-sunfire-t2000-with.html