Booting 9.0 RC2

Marcel Moolenaar marcel at
Thu Nov 17 16:25:27 UTC 2011

On Nov 17, 2011, at 2:49 AM, Marc Lörner wrote:

> Hello Marcel,
> good news: loader starts now.
> Unfortunately I got the same problems that you have with Machine-Checks on
> the early booting stage with GENERIC.
> I did some investigation in code and code-changes and I probably found the
> cause: 
> In __start (locore.S) you try to store PA of bootinfo block to pa_bootinfo
> which seems to reside in kernel-text space
> => DATA-ACCESS-RIGHTS fault because text-space is pinned in DTR with AR_RX.
> (c.f. mmu_setup_paged calling mmu_wire in the loader code)

Yup. I fixed the the loader already. I played with having the kernel
apply relocations with translation disabled, but for some reason that
didn't work, so I'll leave the whole kernel text mapped RX for later.

> After changing this kernel started, at least I now got output on console.
> Unfortunately the next hang is in sapic_create accessing sa->sa_register
> which seems to be NULL, at least I got NULL as returnvalue of pmap_mapdev.

I tightened the pmap_mapdev function to make sure we don't mix and
match cached vs uncached accesses. The function now expects the
memory to be described in the EFI memory map. You should have gotten
a message about that. Either "... not covered by memory descriptor"
or "... is in DRAM". I assume the first, for which the following

Index: ia64/ia64/pmap.c
--- ia64/ia64/pmap.c    (.../head/sys)  (revision 225405)
+++ ia64/ia64/pmap.c    (.../projects/altix/sys)        (revision 227522)
@@ -2261,7 +2261,7 @@
        if (md == NULL) {
                printf("%s: [%#lx..%#lx] not covered by memory descriptor\n",
                    __func__, pa, pa + sz - 1);
-               return (NULL);
+               return ((void *)IA64_PHYS_TO_RR6(pa));
        if (md->md_type == EFI_MD_TYPE_FREE) {

BTW: Do you have the latest firmware?

> Hope this helps to get FreeBSD GENERIC working again on Montecito platforms,

It's wasn't broken in such generic terms. I have Montecito and Montvale
machines and FreeBSD works on them for the most part :-)

There are still some known issues, but in general we're getting better
with every release.

Marcel Moolenaar
marcel at

More information about the freebsd-ia64 mailing list