diff --git a/lib/libpt/pt.asm b/lib/libpt/pt.asm index a329120f..ee56f06c 100644 --- a/lib/libpt/pt.asm +++ b/lib/libpt/pt.asm @@ -17,7 +17,7 @@ _PtPatternPos set mt_data+mt_PatternPos _PtInstallCIA: movem.l d2-d7/a2-a6,-(sp) st.b d0 - suba.l a0,a0 + move.l _ExcVecBase,a0 lea $dff000,a6 bsr _mt_install_cia movem.l (sp)+,d2-d7/a2-a6 diff --git a/system/kernel/memory.c b/system/kernel/memory.c index d565827c..26213032 100644 --- a/system/kernel/memory.c +++ b/system/kernel/memory.c @@ -199,6 +199,7 @@ void AddMemory(void *ptr, u_int size, u_int attributes) { u_int sz = (uintptr_t)end - (uintptr_t)ar->start; WordT *bt = ar->start; + Assume(ar != NULL); Assume(end > (void *)ar->start + FREEBLK_SZ); ar->succ = NULL; diff --git a/system/loader.c b/system/loader.c index e56c05d6..82764b96 100644 --- a/system/loader.c +++ b/system/loader.c @@ -41,7 +41,8 @@ void Loader(BootDataT *bd) { for (i = 0; i < bd->bd_nregions; i++) { MemRegionT *mr = &bd->bd_region[i]; - AddMemory((void *)mr->mr_lower, mr->mr_upper - mr->mr_lower, mr->mr_attr); + uintptr_t lower = mr->mr_lower ? mr->mr_lower : 1; + AddMemory((void *)lower, mr->mr_upper - lower, mr->mr_attr); } }