[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] [PATCH] Disable memory protection if the PMMU is not present



On 01/10/13 22:17, Miro Kropáček wrote:
Hi everybody,

today I managed to crash my MMU on Aranym for 1000th time so here I am, with a patch fixing it. Namely it does:

- cleans up some unused code and activates real 040 instructions instead of dc.w (we've got assemblers mature enough for years)
- makes memory protection active on Aranym by default again
- first reads mint.ini and *then* tries to override its values (namely no_mem_prot flag) - checks (very simply) if the PMMU is present on CPU, overrides no_mem_prot if it is not - makes the CT60 PMMU hack actually visible, before no_mem_prot was always overriden by mint.ini - fixes the boot menu -- current code has several bugs ('6' doesn't work, yes/no are cycled in 3 key strokes, illegal indexes for debug output, ...)

Before anyone tells me how stupid my patch is -- the proposed method for PMMU presence is only a beginning before I or someone else comes with something better (obviously, you need to setup the PMMU, write to a logical address and check on which physical address it is written, not trivial stuff).

Btw I'm surprised how few people use the boot menu, the mentioned bugs must have been there for months at least.. (first I thought it's Aranym's bug -- of course, always blame emulators first ;) -- but then I tested it on real hardware and voila)

Tested on CT60, Aranym MMU on/off and seems to work OK. Feel free to comment/improve.

Miro,

Thanks for these. I think it's best to commit these as seperate patches rather than one big one so it's easier to dissect later.

I don't want to mess anything up, so if you can do it, that'd be great. Otherwise. I'll take a deeper look at the weekend.

Alan.