mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
x86: qemu: move x86 specific operations out of qfw core
The original implementation of qfw includes several x86 specific operations, like directly calling outb/inb and using some inline assembly code which prevents it being ported to other architectures. This patch adds callback functions and moves those to arch/x86/ Signed-off-by: Miao Yan <yanmiaobest@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
@@ -7,11 +7,6 @@
|
||||
#ifndef __FW_CFG__
|
||||
#define __FW_CFG__
|
||||
|
||||
#define FW_CONTROL_PORT 0x510
|
||||
#define FW_DATA_PORT 0x511
|
||||
#define FW_DMA_PORT_LOW 0x514
|
||||
#define FW_DMA_PORT_HIGH 0x518
|
||||
|
||||
#include <linux/list.h>
|
||||
|
||||
enum qemu_fwcfg_items {
|
||||
@@ -97,6 +92,12 @@ struct fw_cfg_dma_access {
|
||||
__be64 address;
|
||||
};
|
||||
|
||||
struct fw_cfg_arch_ops {
|
||||
void (*arch_read_pio)(uint16_t selector, uint32_t size,
|
||||
void *address);
|
||||
void (*arch_read_dma)(struct fw_cfg_dma_access *dma);
|
||||
};
|
||||
|
||||
struct bios_linker_entry {
|
||||
__le32 command;
|
||||
union {
|
||||
@@ -148,8 +149,10 @@ struct bios_linker_entry {
|
||||
|
||||
/**
|
||||
* Initialize QEMU fw_cfg interface
|
||||
*
|
||||
* @ops: arch specific read operations
|
||||
*/
|
||||
void qemu_fwcfg_init(void);
|
||||
void qemu_fwcfg_init(struct fw_cfg_arch_ops *ops);
|
||||
|
||||
void qemu_fwcfg_read_entry(uint16_t entry, uint32_t length, void *address);
|
||||
int qemu_fwcfg_read_firmware_list(void);
|
||||
|
||||
Reference in New Issue
Block a user