coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
smm.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-only */
2
3
#include <
stddef.h
>
4
#include <
stdint.h
>
5
#include <
cpu/x86/smm.h
>
6
7
/*
8
* calls into SMM with the given cmd and subcmd in eax, and arg in ebx
9
*
10
* static inline because the resulting assembly is often smaller than
11
* the call sequence due to constant folding.
12
*/
13
static
inline
u32
call_smm
(
u8
cmd,
u8
subcmd,
void
*
arg
)
14
{
15
u32
res = 0;
16
__asm__ __volatile__ (
17
"outb %b0, %3"
18
:
"=a"
(res)
19
:
"a"
((subcmd << 8) | cmd),
"b"
(
arg
),
"i"
(
APM_CNT
));
20
return
res;
21
}
call_smm
static u32 call_smm(u8 cmd, u8 subcmd, void *arg)
Definition:
smm.h:13
smm.h
APM_CNT
#define APM_CNT
Definition:
smm.h:19
arg
struct bootblock_arg arg
Definition:
decompressor.c:22
stddef.h
stdint.h
u32
uint32_t u32
Definition:
stdint.h:51
u8
uint8_t u8
Definition:
stdint.h:45
src
arch
x86
include
smm.h
Generated by
1.9.1