NTB: "Split ntb_hw_intel and ntb_transport drivers"
This Linux commit was more or less a rewrite. Unfortunately, the commit log does not give a lot of context for the rewrite. I have tried to faithfully follow the changes made upstream, including matching function names where possible, while churning the FreeBSD driver as little as possible. This is the bulk of the rewrite. There are two groups of changes to follow in separate commits: fleshing out the rest of the changes to xeon_setup_b2b_mw(), and some changes to if_ntb. Yes, this is a big patch (3 files changed, 416 insertions(+), 237 deletions(-)), but the Linux patch was 13 files changed, 2,589 additions(+) and 2,195 deletions(-). Original Linux commit log: Change ntb_hw_intel to use the new NTB hardware abstraction layer. Split ntb_transport into its own driver. Change it to use the new NTB hardware abstraction layer. Authored by: Allen Hubbe Obtained from: Linux (e26a5843) (Dual BSD/GPL driver) Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
parent
9e1ae3c3f5
commit
fe1a66fccf
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
||||
/*-
|
||||
* Copyright (C) 2013 Intel Corporation
|
||||
* Copyright (C) 2015 EMC Corporation
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -71,10 +72,11 @@ int ntb_write_remote_spad(struct ntb_softc *ntb, unsigned int idx,
|
||||
int ntb_read_remote_spad(struct ntb_softc *ntb, unsigned int idx,
|
||||
uint32_t *val);
|
||||
void *ntb_get_mw_vbase(struct ntb_softc *ntb, unsigned int mw);
|
||||
vm_paddr_t ntb_get_mw_pbase(struct ntb_softc *ntb, unsigned int mw);
|
||||
bus_addr_t ntb_get_mw_pbase(struct ntb_softc *ntb, unsigned int mw);
|
||||
u_long ntb_get_mw_size(struct ntb_softc *ntb, unsigned int mw);
|
||||
void ntb_set_mw_addr(struct ntb_softc *ntb, unsigned int mw, uint64_t addr);
|
||||
void ntb_ring_doorbell(struct ntb_softc *ntb, unsigned int db);
|
||||
bus_addr_t ntb_get_peer_db_addr(struct ntb_softc *ntb, vm_size_t *sz_out);
|
||||
bool ntb_query_link_status(struct ntb_softc *ntb);
|
||||
device_t ntb_get_device(struct ntb_softc *ntb);
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*-
|
||||
* Copyright (C) 2013 Intel Corporation
|
||||
* Copyright (C) 2015 EMC Corporation
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@ -150,14 +151,19 @@
|
||||
#define NTB_DEV_USD 0
|
||||
|
||||
/* All addresses are in low 32-bit space so 32-bit BARs can function */
|
||||
#define XEON_B2B_BAR0_USD_ADDR 0x2100000cull
|
||||
#define XEON_B2B_BAR2_USD_ADDR 0x4100000cull
|
||||
#define XEON_B2B_BAR4_USD_ADDR 0x8100000cull
|
||||
#define XEON_B2B_BAR5_USD_ADDR 0xa100000cull
|
||||
#define XEON_B2B_BAR0_DSD_ADDR 0x2000000cull
|
||||
#define XEON_B2B_BAR2_DSD_ADDR 0x4000000cull
|
||||
#define XEON_B2B_BAR4_DSD_ADDR 0x8000000cull
|
||||
#define XEON_B2B_BAR5_DSD_ADDR 0xa000000cull
|
||||
#define XEON_B2B_BAR0_USD_ADDR 0x1000000000000000ull
|
||||
#define XEON_B2B_BAR2_USD_ADDR64 0x2000000000000000ull
|
||||
#define XEON_B2B_BAR4_USD_ADDR64 0x4000000000000000ull
|
||||
#define XEON_B2B_BAR4_USD_ADDR32 0x20000000ull
|
||||
#define XEON_B2B_BAR5_USD_ADDR32 0x40000000ull
|
||||
#define XEON_B2B_BAR0_DSD_ADDR 0x9000000000000000ull
|
||||
#define XEON_B2B_BAR2_DSD_ADDR64 0xa000000000000000ull
|
||||
#define XEON_B2B_BAR4_DSD_ADDR64 0xc000000000000000ull
|
||||
#define XEON_B2B_BAR4_DSD_ADDR32 0xa0000000ull
|
||||
#define XEON_B2B_BAR5_DSD_ADDR32 0xc0000000ull
|
||||
|
||||
/* The peer ntb secondary config space is 32KB fixed size */
|
||||
#define XEON_B2B_MIN_SIZE 0x8000
|
||||
|
||||
/* XEON Shadowed MMIO Space */
|
||||
#define XEON_SHADOW_PDOORBELL_OFFSET 0x60
|
||||
|
Loading…
x
Reference in New Issue
Block a user