x86: bios: Synchronize stack between real and protected mode
[oweals/u-boot.git] / arch / x86 / cpu / ioapic.c
1 /*
2  * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
3  *
4  * SPDX-License-Identifier:     GPL-2.0+
5  */
6
7 #include <common.h>
8 #include <asm/io.h>
9 #include <asm/ioapic.h>
10
11 u32 io_apic_read(u32 reg)
12 {
13         writel(reg, IO_APIC_INDEX);
14         return readl(IO_APIC_DATA);
15 }
16
17 void io_apic_write(u32 reg, u32 val)
18 {
19         writel(reg, IO_APIC_INDEX);
20         writel(val, IO_APIC_DATA);
21 }