What is an invalid ASID ?

Mark Millard marklmi at yahoo.com
Mon Nov 11 19:47:20 UTC 2019



On 2019-Nov-11, at 08:03, bob prohaska <fbsd at www.zefox.net> wrote:

> While building world on a Pi3 running -current  at r354546 the machine
> reported 
> panic: invalid ASID
> 
> For now he machine has restarted and resumed buildworld.
> 
> Is there a glossary somewhere that offers a description of ASID?

Looks like it is arm terminology instead of FreeBSD-specific terminology,
though FreeBSD would have its specific style of use of such. Quoting from
a document about armv8:

QUOTE
Each TLB entry typically contains not only physical and virtual addresses, but also attributes such as memory type, cache policies, access permissions, the Address Space ID (ASID), and the Virtual Machine ID (VMID).
END QUOTE

From what I see there is FreeBSD code around like:



 * A pmap's cookie encodes an ASID and epoch number.  Cookies for reserved
 * ASIDs have a negative epoch number, specifically, INT_MIN.  Cookies for
 * dynamically allocated ASIDs have a non-negative epoch number.
 *
 * An invalid ASID is represented by -1.

. . .

#define	ASID_TO_OPERAND(asid)	({					\
	KASSERT((asid) != -1, ("invalid ASID"));			\
	(uint64_t)(asid) << ASID_TO_OPERAND_SHIFT;			\
})



It looks like a backtrace from such a panic might be of interest to the
folks dealing with such areas.

===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)



More information about the freebsd-arm mailing list