mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-16 08:13:17 +00:00
83d290c56f
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
86 lines
2.2 KiB
C
86 lines
2.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Copyright (c) 2015 Gooogle, Inc
|
|
* Written by Simon Glass <sjg@chromium.org>
|
|
*/
|
|
|
|
#ifndef _ASM_SIPI_H
|
|
#define _ASM_SIPI_H
|
|
|
|
#define AP_DEFAULT_BASE 0x30000
|
|
#define AP_DEFAULT_SIZE 0x10000
|
|
|
|
#ifndef __ASSEMBLER__
|
|
|
|
/**
|
|
* struct sipi_params_16bit - 16-bit SIPI entry-point parameters
|
|
*
|
|
* These are set up in the same space as the SIPI 16-bit code so that each AP
|
|
* can access the parameters when it boots.
|
|
*
|
|
* Each of these must be set up for the AP to boot, except @segment which is
|
|
* set in the assembly code.
|
|
*
|
|
* @ap_start: 32-bit SIPI entry point for U-Boot
|
|
* @segment: Code segment for U-Boot
|
|
* @pad: Padding (not used)
|
|
* @gdt_limit: U-Boot GDT limit (X86_GDT_SIZE - 1)
|
|
* @gdt: U-Boot GDT (gd->arch.gdt)
|
|
* @unused: Not used
|
|
*/
|
|
struct __packed sipi_params_16bit {
|
|
u32 ap_start;
|
|
u16 segment;
|
|
u16 pad;
|
|
u16 gdt_limit;
|
|
u32 gdt;
|
|
u16 unused;
|
|
};
|
|
|
|
/**
|
|
* struct sipi_params - 32-bit SIP entry-point parameters
|
|
*
|
|
* These are used by the AP init code and must be set up before the APs start.
|
|
* The members must match with the sipi_params layout in sipi_vector.S.
|
|
*
|
|
* The stack area extends down from @stack_top, with @stack_size allocated
|
|
* for each AP.
|
|
*
|
|
* @idt_ptr: Interrupt descriptor table pointer
|
|
* @stack_top: Top of the AP stack area
|
|
* @stack_size: Size of each AP's stack
|
|
* @microcode_lock: Used to ensure only one AP loads microcode at once
|
|
* 0xffffffff enables parallel loading.
|
|
* @microcode_ptr: Pointer to microcode, or 0 if none
|
|
* @msr_table_ptr: Pointer to saved MSRs, a list of struct saved_msr
|
|
* @msr_count: Number of saved MSRs
|
|
* @c_handler: C function to call once early init is complete
|
|
* @ap_count: Shared atomic value to allocate CPU indexes
|
|
*/
|
|
struct sipi_params {
|
|
u32 idt_ptr;
|
|
u32 stack_top;
|
|
u32 stack_size;
|
|
u32 microcode_lock;
|
|
u32 microcode_ptr;
|
|
u32 msr_table_ptr;
|
|
u32 msr_count;
|
|
u32 c_handler;
|
|
atomic_t ap_count;
|
|
};
|
|
|
|
/* 16-bit AP entry point */
|
|
void ap_start16(void);
|
|
|
|
/* end of 16-bit code/data, marks the region to be copied to SIP vector */
|
|
void ap_start16_code_end(void);
|
|
|
|
/* 32-bit AP entry point */
|
|
void ap_start(void);
|
|
|
|
extern char sipi_params_16bit[];
|
|
extern char sipi_params[];
|
|
|
|
#endif /* __ASSEMBLER__ */
|
|
|
|
#endif
|