powerpc: Add PowerPC Capabilities ELF note
Add the PowerPC name and the PPC_ELFNOTE_CAPABILITIES type in the kernel binary ELF note. This type is a bitmap that can be used to advertise kernel capabilities to userland. This patch also defines PPCCAP_ULTRAVISOR_BIT as being the bit zero. Suggested-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Claudio Carvalho <cclaudio@linux.ibm.com> [ maxiwell: Define the 'PowerPC' type in the elfnote.h ] Signed-off-by: Maxiwell S. Garcia <maxiwell@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20190829155021.2915-2-maxiwell@linux.ibm.com
This commit is contained in:

committed by
Michael Ellerman

parent
a102f139aa
commit
70ed86f4de
24
arch/powerpc/include/asm/elfnote.h
Normal file
24
arch/powerpc/include/asm/elfnote.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* PowerPC ELF notes.
|
||||
*
|
||||
* Copyright 2019, IBM Corporation
|
||||
*/
|
||||
|
||||
#ifndef __ASM_POWERPC_ELFNOTE_H__
|
||||
#define __ASM_POWERPC_ELFNOTE_H__
|
||||
|
||||
/*
|
||||
* These note types should live in a SHT_NOTE segment and have
|
||||
* "PowerPC" in the name field.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The capabilities supported/required by this kernel (bitmap).
|
||||
*
|
||||
* This type uses a bitmap as "desc" field. Each bit is described
|
||||
* in arch/powerpc/kernel/note.S
|
||||
*/
|
||||
#define PPC_ELFNOTE_CAPABILITIES 1
|
||||
|
||||
#endif /* __ASM_POWERPC_ELFNOTE_H__ */
|
Reference in New Issue
Block a user