iPXE
Macros | Functions
mp.c File Reference

Multiprocessor functions. More...

#include <ipxe/timer.h>
#include <ipxe/mp.h>

Go to the source code of this file.

Macros

#define MP_MAX_CPUID_WAIT_MS   10
 Time to wait for application processors. More...
 

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
 
unsigned int mp_boot_cpuid (void)
 Get boot CPU identifier. More...
 
unsigned int mp_max_cpuid (void)
 Get maximum CPU identifier. More...
 

Detailed Description

Multiprocessor functions.

Definition in file mp.c.

Macro Definition Documentation

◆ MP_MAX_CPUID_WAIT_MS

#define MP_MAX_CPUID_WAIT_MS   10

Time to wait for application processors.

Definition at line 36 of file mp.c.

Function Documentation

◆ FILE_LICENCE()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ mp_boot_cpuid()

unsigned int mp_boot_cpuid ( void  )

Get boot CPU identifier.

Return values
idBoot CPU identifier

Definition at line 43 of file mp.c.

43  {
44  unsigned int max = 0;
45 
46  /* Update maximum to accommodate boot processor */
48  DBGC ( &mp_call, "MP boot processor ID is %#x\n", max );
49 
50  return max;
51 }
#define max(x, y)
Definition: ath.h:39
#define DBGC(...)
Definition: compiler.h:505
void __asmcall mp_call(mp_addr_t func, mp_addr_t opaque)
Call a multiprocessor function from C code on the current CPU.
mp_func_t mp_update_max_cpuid
Update maximum observed CPU identifier.
void mp_exec_boot(mp_func_t func, void *opaque)
Execute a multiprocessor function on the boot processor.

References DBGC, max, mp_call(), mp_exec_boot(), and mp_update_max_cpuid.

Referenced by mp_max_cpuid(), and ucode_update_all().

◆ mp_max_cpuid()

unsigned int mp_max_cpuid ( void  )

Get maximum CPU identifier.

Return values
maxMaximum CPU identifier

Definition at line 58 of file mp.c.

58  {
59  unsigned int max = mp_boot_cpuid();
60 
61  /* Update maximum to accommodate application processors */
64  DBGC ( &mp_call, "MP observed maximum CPU ID is %#x\n", max );
65 
66  return max;
67 }
#define MP_MAX_CPUID_WAIT_MS
Time to wait for application processors.
Definition: mp.c:36
#define max(x, y)
Definition: ath.h:39
#define DBGC(...)
Definition: compiler.h:505
void mp_start_all(mp_func_t func, void *opaque)
Start a multiprocessor function on all application processors.
void __asmcall mp_call(mp_addr_t func, mp_addr_t opaque)
Call a multiprocessor function from C code on the current CPU.
mp_func_t mp_update_max_cpuid
Update maximum observed CPU identifier.
unsigned int mp_boot_cpuid(void)
Get boot CPU identifier.
Definition: mp.c:43
void mdelay(unsigned long msecs)
Delay for a fixed number of milliseconds.
Definition: timer.c:78

References DBGC, max, mdelay(), mp_boot_cpuid(), mp_call(), MP_MAX_CPUID_WAIT_MS, mp_start_all(), and mp_update_max_cpuid.

Referenced by ucode_update_all().