@azonenberg@ioc.exchange
@azonenberg@ioc.exchange avatar

azonenberg

@azonenberg@ioc.exchange

Security and open source at the hardware/software interface. Embedded sec @ IOActive. Lead dev of ngscopeclient/libscopehal. GHz probe designer. Open source networking hardware. "So others may live"

Toots searchable on tootfinder.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

foone, to random
@foone@digipres.club avatar

I should be able to charge my phone over PoE from my laptop. I don't know why it would have this feature, but it should

azonenberg,
@azonenberg@ioc.exchange avatar

@foone I would love a laptop with dual mode PoE that can either power peripherals from the laptop, or charge the laptop.

aud, to random

Gonna write a JavaScript interpreter that becomes exponentially slower the more lines of JS code it has to load

people need to learn

azonenberg,
@azonenberg@ioc.exchange avatar

@aud new optimization technique: eval( <2 MB obfuscated minified one-liner> )

azonenberg, to random
@azonenberg@ioc.exchange avatar

Finally got around to making a proper image version of the meme.

azonenberg,
@azonenberg@ioc.exchange avatar

@felix In my case, I was building a robust log-structured data store that needed to be able to recover from flash memory corruption caused by the device losing power or being reset in the middle of a flash write.

The problem is, this particular MCU has ECC flash and will return a bus fault (rather than garbage data) if you get an uncorrectable error.

So in order to verify the contents of a flash object before allowing the application to use it, I need to verify the CRC and ECC with faults turned off, then return either null or a pointer to the valid data.

The alternative would have been to let it hard fault, figure out why if it did, and try to recover afterwards, but this seemed like the better option keeping the fault handling logic local to the code that handled the possibly-tainted flash sectors.

azonenberg,
@azonenberg@ioc.exchange avatar

@felix DMA for the CRC32 would be doable but I'm not sure what happens to the CPU if a DMA has a bus fault. I've never tried or read the appropriate part of the datasheet.

That said, I'd still need to be able to recover from other faults like corrupted metadata regions in the flash, and DMA for reading the object log makes little sense.

azonenberg,
@azonenberg@ioc.exchange avatar

New horrible idea: use some combination of RAII wrappers and macros to make a "unsafe" block for C++ that disables and re-enables data faults within the active scope.

{
unsafe
//do stuff that might segfault here
}

azonenberg, (edited )
@azonenberg@ioc.exchange avatar

class FaultDisabler
{
public:
FaultDisabler() { sr = SCB_DisableDataFaults(); }
~FaultDisabler() { SCB_EnableDataFaults(sr);}
protected:
uint32_t sr;
};

unsafe FaultDisabler fd;

azonenberg,
@azonenberg@ioc.exchange avatar

@whitequark is this sufficiently cursed to earn your eldritch horror seal of approval?

azonenberg,
@azonenberg@ioc.exchange avatar

@whitequark I meant more the "i wrote code so memory unsafe i needed to add the unsafe keyword to c++ for it to work"

azonenberg,
@azonenberg@ioc.exchange avatar

@whitequark Yeah I'm only accessing valid memory locations. I just sometimes get a PSLVERR or whatever the AXI equivalent is in return.

azonenberg,
@azonenberg@ioc.exchange avatar

@whitequark Testing it out, seems to do what I wanted so far...

azonenberg,
@azonenberg@ioc.exchange avatar

@Xilokar @felix STM32L4 and H7 are the near term platforms. But probably a lot of other newer STM32s too.

azonenberg,
@azonenberg@ioc.exchange avatar

@Xilokar @felix Yeah I actually am building a power-loss fuzzer for validating this code more extensively. Basically two STM32's with one controlling reset and a load switch to the second.

DUT will be reading and writing flash in a loop and checking that all transactions atomically succeed or fail and there's no segfaults.

azonenberg,
@azonenberg@ioc.exchange avatar

@Xilokar @felix It's 10K for these parts and that's one of the reasons microkvs is a log structured FS (many object writes -> one flash P/E cycle).

That said, the power loss fuzzer board is something I intend to test to destruction to check, among other things, how it fails in the case of media wear-out.

But the STM32L431 is 2 kB per flash erase block and I have 128 erase blocks, I think, to work with.

So i can test a 2-block KVS to destruction then repeat another test regimen at a different flash block and get a lot of testing done before I completely fry the chip.

At which point I can hot air it off (just a 32qfn) and put on another if the situation dictates. And the worn out one will become microscope food.

azonenberg,
@azonenberg@ioc.exchange avatar

@Xilokar @felix ECC block size is 8 bytes (STM32L431) and 32 bytes (STM32H735) for my two main MCUs of interest.

MicroKVS is a log structured design that ping-pongs two flash blocks, appending data objects to one block (metadata storage in the start of the block then object content in the rest) until it's full, then moving the latest version of each object to the second block and erasing the first.

It's the smallest, simplest design you can get while still having power loss protection (i.e. you need a minimum of two erase blocks).

azonenberg,
@azonenberg@ioc.exchange avatar

@nolanl I actually made two versions. The newer one declares it in an "if" scope: if(FaultDisabler fd; 1)

azonenberg,
@azonenberg@ioc.exchange avatar

@nolanl Which looks more like the Rust version, or the general c++ control flow.

The old version, if you look carefully, had the "unsafe" as the first line inside the curly braces and not used as a control statement.

gsuberland, to random
@gsuberland@chaos.social avatar

I have, at long last, finished my teardown work for the day. Bye, EMF, it's been fun!

azonenberg,
@azonenberg@ioc.exchange avatar

@gsuberland Just gonna leave that crop circle there for the locals to wonder about?

niconiconi, to random

Some people, when confronted with a problem, think “I know, I’ll use a parallel interface.” Now they have a Problem[7:0] and a ProblemAddr[15:0].

azonenberg,
@azonenberg@ioc.exchange avatar

@niconiconi Others think "No, I'll use a serial interface".

Now they have a D16.2 D18.3 D15.3 D2.3 D12.3 D5.3 D13.3

18+ foone, to random
@foone@digipres.club avatar

I finally figured out what's wrong with my dryer!
There's no drum to put the clothes in. This is a rookie mistake, Samsung.

azonenberg,
@azonenberg@ioc.exchange avatar

@foone (Blendtec guy voice)

Will it keyboard? That is the question.

azonenberg, to random
@azonenberg@ioc.exchange avatar

Has there ever been a (non nuclear) prototype/demo version of project PACER constructed?

I'm picturing a big pile of thermite charges or large firecrackers or something being fed into a sealed tank full of molten salt a few meters across.

aeva, to random
@aeva@mastodon.gamedev.place avatar

ok I got another recording of the thing finally. This was recorded on a faster computer than my laptop, so unfortunately it doesn't have the really cool long convergence artifact thing going on. I really hate what the video encoding is doing here, but such is life.

it's a video of a rotating abstract ring thingy that is light by several lights which create colorful shadows. the video encoding is terrible, but it looks ok I guess

azonenberg,
@azonenberg@ioc.exchange avatar

@aeva I read this as "for new reindeer" and was wondering what kind of arctic/Christmas themed game you were working on.

tnt, to random
@tnt@chaos.social avatar

Finally taped-out a personal project on 🎉

This is a differential receiver that should hopefully work up to 500 MBps. ATM it doesn't have any CDR or anything, it just takes clk/data pair and gearbox down 1:16 ... Having some CDR is next 😅

azonenberg,
@azonenberg@ioc.exchange avatar

@tnt @dsvf I have no idea about PHY or PLL analog design but will gladly help with RTL for line coding, gearboxing, 8b10b or 64b66b block sync, etc.

Are you building a transmitter too?

azonenberg, to random
@azonenberg@ioc.exchange avatar

New thread on my big ongoing embedded project since the other one was getting too big.

To recap, this is a pilot project for a bunch of my future open hardware T&M and networking projects, validating a common platform that a lot of the future stuff is going to run on.

The primary problem it's trying to address is that I have a lot of instrumentation with trigger in/out ports, sometimes at different voltage levels, and I don't always have the same instrument sourcing the trigger every time.

So rather than moving around cables all the time and adding splitters, attenuators, amplifiers, etc. to the trigger signals I decided to make a dedicated device using an old XC7K70T-2FBG484 I had lying around.

Of course, as with any project, there was feature creep.

I'm standardizing on +48V DC for powering all of my future projects as it's high enough to move a lot of power but low enough to be mostly safe to work around live. So I needed to design and validate an intermediate bus converter to bring the 48 down to something like 12 for the rest of the system to use.

The FPGA has four 10G transceiver pairs on it. I used one for 10GbE (not that I need the bandwidth, but I was low on RJ45 ports on this bench and had some free SFP drops) and the rest are hooked up to front panel SMA ports (awaiting cables to go from PCB to panel) to generate PRBSes for instrument deskew.

Since I'm pinning out the transceivers and am planning to build a BERT eventually, I added BERT functionality to the firmware as well (still need to finish a few things but it's mostly usable now).

And since I have transceivers and access to all of the scope triggers, it would be dumb not to build a CDR trigger mode as well. That's in progress.

azonenberg,
@azonenberg@ioc.exchange avatar

Speaking of new feature development, here we go! First light on the CDR logic analyzer features, capturing a 10Gbase-R Ethernet frame via the front panel SERDES ports.

This is a quick and dirty test with a lot of manual processing, waveform dumped to CSV then imported, the trigger is hard coded (64/66b data frame at the midpoint of the 512K point capture), etc.

But it validates the acquisition subsystem on the FPGA so now I can start working on building out the scopehal-side driver for this (I have no idea how the API is going to handle something that's simultaneously a scope and a BERT and more, there's a bunch of refactoring needed to handle this sort of thing...)

azonenberg,
@azonenberg@ioc.exchange avatar

Ok yeah a bunch of long overdue yaks in libscopehal are going to need to get shaved to implement this.

(rolls up sleeves and plugs in electric shears)

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • thenastyranch
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • ngwrru68w68
  • provamag3
  • magazineikmin
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • JUstTest
  • All magazines