Skip to content

Commit

Permalink
level 5.0.2663
Browse files Browse the repository at this point in the history
  • Loading branch information
vageline committed Mar 29, 2018
1 parent 77703da commit a447c6e
Show file tree
Hide file tree
Showing 109 changed files with 7,775 additions and 2,654 deletions.
6 changes: 3 additions & 3 deletions config.linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ configure:
installsb: default
ifneq ($(CXLFLASH_ALL),no)
${MAKE} -j10 test_pass
${MAKE} install_code
${MAKE} install_image
${MAKE} install_test
endif
${MAKE} install_code
@echo ""
@echo "INSTALLing from $(SURELOCKROOT)"
@sudo -E $(SURELOCKROOT)/src/build/install/resources/cflash_installsb $(SURELOCKROOT)
Expand All @@ -106,8 +106,8 @@ $(shell mkdir -p ${SURELOCKROOT}/obj/tests)
endif

#setup package version
VERSIONMAJOR=4
VERSIONMINOR=3
VERSIONMAJOR=5
VERSIONMINOR=0
SOVER=-0

FS=$(findstring surelock-sw, ${SURELOCKROOT})
Expand Down
2 changes: 1 addition & 1 deletion debian/compat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10
9
50 changes: 43 additions & 7 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,22 +1,58 @@
Source: cxlflash
Maintainer: IBM Corp. <[email protected]>
Uploaders: Rodrigo R. Galvao <[email protected]>
Maintainer: Ubuntu Developers <[email protected]>
XSBC-Original-Maintainer: IBM Corp. <[email protected]>
Uploaders: Rodrigo R. Galvao <[email protected]>,
Section: utils
XS-Autobuild: yes
Priority: optional
Standards-Version: 4.0.1
Build-Depends: debhelper (>=10), dh-systemd, doxygen, linux-libc-dev, libudev-dev, libcxl-dev, help2man
Build-Depends: debhelper (>= 9),
dh-systemd,
doxygen,
help2man,
libcxl-dev,
libudev-dev,
linux-libc-dev,
Homepage: https://github.com/open-power
Vcs-Browser: https://github.com/open-power/capiflash.git
Vcs-Browser: https://github.com/open-power/capiflash
Vcs-Git: https://github.com/open-power/capiflash.git

Package: cxlflash
Architecture: ppc64 ppc64el
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}
Conflicts: ibmcapikv
Replaces: ibmcapikv
Depends: libcxlflash0 (= ${binary:Version}),
${misc:Depends},
${perl:Depends},
${shlibs:Depends},
Conflicts: ibmcapikv,
Replaces: ibmcapikv,
Description: IBM Capiflash IO Data Engine
This provides IO and utility support for IBM Capiflash adapters,
and includes a NoSQL Software Interface. The latest
adapter firmware updates are provided separately
in cxlflashimage.

Package: libcxlflash0
Section: libs
Architecture: ppc64 ppc64el
Depends: ${misc:Depends},
${shlibs:Depends},
Description: IBM Capiflash IO Data Engine libraries
This provides IO and utility support for IBM Capiflash adapters,
and includes a NoSQL Software Interface. The latest
adapter firmware updates are provided separately
in cxlflashimage.
.
This package contains all the runtime libraries.

Package: libcxlflash-dev
Section: libdevel
Architecture: ppc64 ppc64el
Depends: libcxlflash0 (= ${binary:Version}),
${misc:Depends},
Description: IBM Capiflash IO Data Engine development files
This provides IO and utility support for IBM Capiflash adapters,
and includes a NoSQL Software Interface. The latest
adapter firmware updates are provided separately
in cxlflashimage.
.
This package contains all development files for cxlflash.
18 changes: 18 additions & 0 deletions debian/control.add
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

Package: cxlflash-test
Architecture: ppc64 ppc64el
Depends: cxlflash (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
Description: IBM Capiflash IO Data Engine Tests
This provides an infrastructure for testing IBM capiflash adapters.
Included is an automated Functional Verification Test framework.
The capiflash IO path, and the NoSQL Software Interface are tested.

Package: cxlflashimage
Architecture: ppc64 ppc64el
Depends: cxlflash (= ${binary:Version}), ${misc:Depends}
Conflicts: afuimage
Replaces: afuimage
Description: IBM Capiflash IO Data Engine Images
This provides an infrastructure for downloading firmware updates
to IBM capiflash adapters. Included is the download framework
and the firmware images.
1 change: 1 addition & 0 deletions debian/cxlflash-test.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./pkg/test_root/* /
4 changes: 3 additions & 1 deletion debian/cxlflash.install
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
./pkg/install_root/* /
./pkg/install_root/lib/* /lib
./pkg/install_root/usr/bin/* /usr/bin
./pkg/install_root/usr/share/* /usr/share
2 changes: 2 additions & 0 deletions debian/cxlflashimage.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
./pkg/afu_root/lib/* /lib
./pkg/afu_root/usr/* /usr
7 changes: 7 additions & 0 deletions debian/libcxlflash-dev.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
./pkg/install_root/usr/include/* /usr/include
./pkg/install_root/usr/lib/libafu.so /usr/lib
./pkg/install_root/usr/lib/libarkalloc.so /usr/lib
./pkg/install_root/usr/lib/libarkdb.so /usr/lib
./pkg/install_root/usr/lib/libcflsh_block.so /usr/lib
./pkg/install_root/usr/lib/libcflshcom.so /usr/lib
./pkg/install_root/usr/lib/libprov.so /usr/lib
1 change: 1 addition & 0 deletions debian/libcxlflash0.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./pkg/install_root/usr/lib/*-*.so /usr/lib
2 changes: 2 additions & 0 deletions debian/libcxlflash0.lintian-overrides
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# -there are multiple libraries installed with the libcflsh0 package
libcxlflash0: package-name-doesnt-match-sonames
18 changes: 8 additions & 10 deletions debian/cxlflash.symbols → debian/libcxlflash0.symbols
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
libafu-0.so cxlflash #MINVER#
libafu-0.so libcxlflash0 #MINVER#
afu_map@Base 4.3~
afu_mmio_read_dw@Base 4.3~
afu_mmio_read_sw@Base 4.3~
Expand All @@ -9,11 +9,11 @@ libafu-0.so cxlflash #MINVER#
afu_wait@Base 4.3~
create_and_open_dev@Base 4.3~
create_dev@Base 4.3~
libarkalloc-0.so cxlflash #MINVER#
libarkalloc-0.so libcxlflash0 #MINVER#
zfree@Base 4.3~
zmalloc@Base 4.3~
zrealloc@Base 4.3~
libarkdb-0.so cxlflash #MINVER#
libarkdb-0.so libcxlflash0 #MINVER#
ARK_MAX_LEN@Base 4.3~
REVISION_arkdb_gitrev@Base 4.3~
REVISION_arkdb_timestamp@Base 4.3~
Expand All @@ -23,7 +23,6 @@ libarkdb-0.so cxlflash #MINVER#
ardes@Base 4.3~
ark_actual@Base 4.3~
ark_allocated@Base 4.3~
ark_anyreturn@Base 4.3~
ark_check_persistence@Base 4.3~
ark_connect@Base 4.3~
ark_connect_verbose@Base 4.3~
Expand Down Expand Up @@ -51,6 +50,7 @@ libarkdb-0.so cxlflash #MINVER#
ark_flush@Base 4.3~
ark_fork@Base 4.3~
ark_fork_done@Base 4.3~
ark_free_resources@Base 5.0~
ark_get@Base 4.3~
ark_get_async_cb@Base 4.3~
ark_get_async_tag@Base 4.3~
Expand All @@ -62,7 +62,6 @@ libarkdb-0.so cxlflash #MINVER#
ark_next_async_tag@Base 4.3~
ark_next_pool@Base 4.3~
ark_null_async_cb@Base 4.3~
ark_null_async_tag@Base 4.3~
ark_persist@Base 4.3~
ark_persist_stats@Base 4.3~
ark_persistence_calc@Base 4.3~
Expand Down Expand Up @@ -129,7 +128,6 @@ libarkdb-0.so cxlflash #MINVER#
cl_parse@Base 4.3~
cleanup_task_memory@Base 4.3~
csv_parse@Base 4.3~
do_mem_fastpath@Base 4.3~
ea_async_io@Base 4.3~
ea_async_io_harvest@Base 4.3~
ea_async_io_schedule@Base 4.3~
Expand All @@ -138,6 +136,7 @@ libarkdb-0.so cxlflash #MINVER#
ea_read@Base 4.3~
ea_resize@Base 4.3~
ea_write@Base 4.3~
get_task_state@Base 5.0~
hash_free@Base 4.3~
hash_hash@Base 4.3~
hash_new@Base 4.3~
Expand All @@ -150,7 +149,6 @@ libarkdb-0.so cxlflash #MINVER#
ht_pos@Base 4.3~
ht_set@Base 4.3~
ht_vldp@Base 4.3~
init_task_state@Base 4.3~
iv_delete@Base 4.3~
iv_get@Base 4.3~
iv_new@Base 4.3~
Expand Down Expand Up @@ -193,7 +191,7 @@ libarkdb-0.so cxlflash #MINVER#
vi_dec64@Base 4.3~
vi_enc64@Base 4.3~
x@Base 4.3~
libcflsh_block-0.so cxlflash #MINVER#
libcflsh_block-0.so libcxlflash0 #MINVER#
cblk_aread@Base 4.3~
cblk_aresult@Base 4.3~
cblk_aunmap@Base 4.3~
Expand Down Expand Up @@ -233,7 +231,7 @@ libcflsh_block-0.so cxlflash #MINVER#
cblk_term@Base 4.3~
cblk_unmap@Base 4.3~
cblk_write@Base 4.3~
libcflshcom-0.so cxlflash #MINVER#
libcflshcom-0.so libcxlflash0 #MINVER#
cflash_build_scsi_inquiry@Base 4.3~
cflash_build_scsi_mode_select_10@Base 4.3~
cflash_build_scsi_mode_sense_10@Base 4.3~
Expand All @@ -248,7 +246,7 @@ libcflshcom-0.so cxlflash #MINVER#
cflash_process_scsi_report_luns@Base 4.3~
dumppage@Base 4.3~
hexdump@Base 4.3~
libprov-0.so cxlflash #MINVER#
libprov-0.so libcxlflash0 #MINVER#
g_traceE@Base 4.3~
g_traceF@Base 4.3~
g_traceI@Base 4.3~
Expand Down
10 changes: 10 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,13 @@ unexport CUSTOMFLAGS

%:
dh $@ --with=systemd

override_dh_auto_install:
dh_auto_install
# We need to create symlinks for all the libraries we export for use
# in the -dev package, making sure developers by default build against
# the newest SOVER.
(cd $(CURDIR)/pkg/install_root/usr/lib/ && for i in *-*.so; do \
ln -sf $$i $${i%-*.so}.so; \
done)

58 changes: 53 additions & 5 deletions src/afu/cxl_afu_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#define debug(fmt, ...) do { if (DEBUG) fprintf(stderr,fmt,__VA_ARGS__); fflush(stderr);} while (0)
#define debug0(fmt) do { if (DEBUG) fprintf(stderr,fmt); fflush(stderr);} while (0)

uint64_t portmask=0;

void print_64(FILE *f, int a, uint64_t v) {
if (v != 0xFFFFFFFFFFFFFFFF)
Expand Down Expand Up @@ -124,32 +125,71 @@ void print_version(FILE *f, struct cxl_afu_h *afu)
get_str(version, r);
fprintf(f," NVMe0 Version = %s\n",version);
}
addr = 4 * (__u64) ((0x2012710>>2) & ~0x1); // Force 8byte align
addr = 4 * (__u64) ((0x2060710>>2) & ~0x1); // Force 8byte align
cxl_mmio_read64(afu,addr,&r);
if (r != -1l) {
get_str(version, r);
fprintf(f," NVMe0 NEXT = %s\n",version);
}
addr = 4 * (__u64) ((0x2012700>>2) & ~0x1); // Force 8byte align
addr = 4 * (__u64) ((0x2060700>>2) & ~0x1); // Force 8byte align
cxl_mmio_read64(afu,addr,&r);
if (r != -1l) {fprintf(f," NVMe0 STATUS = 0x%lx\n", r);}

fprintf(f,"\n");
addr = 4 * (__u64) ((0x2080708>>2) & ~0x1); // Force 8byte align
addr = 4 * (__u64) ((0x2013708>>2) & ~0x1); // Force 8byte align
cxl_mmio_read64(afu,addr,&r);
if (r != -1l) {
get_str(version, r);
fprintf(f," NVMe1 Version = %s\n",version);
}
addr = 4 * (__u64) ((0x2013710>>2) & ~0x1); // Force 8byte align
addr = 4 * (__u64) ((0x2080710>>2) & ~0x1); // Force 8byte align
cxl_mmio_read64(afu,addr,&r);
if (r != -1l) {
get_str(version, r);
fprintf(f," NVMe1 NEXT = %s\n",version);
}
addr = 4 * (__u64) ((0x2013700>>2) & ~0x1); // Force 8byte align
addr = 4 * (__u64) ((0x2080700>>2) & ~0x1); // Force 8byte align
cxl_mmio_read64(afu,addr,&r);
if (r != -1l) {fprintf(f," NVMe1 STATUS = 0x%lx\n", r);}

if (portmask != 0xf) {goto done;}

fprintf(f,"\n");
addr = 4 * (__u64) ((0x20A0708>>2) & ~0x1); // Force 8byte align
cxl_mmio_read64(afu,addr,&r);
if (r != -1l) {
get_str(version, r);
fprintf(f," NVMe2 Version = %s\n",version);
}
addr = 4 * (__u64) ((0x20A0710>>2) & ~0x1); // Force 8byte align
cxl_mmio_read64(afu,addr,&r);
if (r != -1l) {
get_str(version, r);
fprintf(f," NVMe2 NEXT = %s\n",version);
}
addr = 4 * (__u64) ((0x20A0700>>2) & ~0x1); // Force 8byte align
cxl_mmio_read64(afu,addr,&r);
if (r != -1l) {fprintf(f," NVMe2 STATUS = 0x%lx\n", r);}

fprintf(f,"\n");
addr = 4 * (__u64) ((0x20C0708>>2) & ~0x1); // Force 8byte align
cxl_mmio_read64(afu,addr,&r);
if (r != -1l) {
get_str(version, r);
fprintf(f," NVMe3 Version = %s\n",version);
}
addr = 4 * (__u64) ((0x20C0710>>2) & ~0x1); // Force 8byte align
cxl_mmio_read64(afu,addr,&r);
if (r != -1l) {
get_str(version, r);
fprintf(f," NVMe3 NEXT = %s\n",version);
}
addr = 4 * (__u64) ((0x20C0700>>2) & ~0x1); // Force 8byte align
cxl_mmio_read64(afu,addr,&r);
if (r != -1l) {fprintf(f," NVMe3 STATUS = 0x%lx\n", r);}

done:
return;
}

int main(int argc, char **argv) {
Expand Down Expand Up @@ -193,6 +233,9 @@ int main(int argc, char **argv) {
debug0 ("Installing libcxl SIGBUS handler\n");
cxl_mmio_install_sigbus_handler();

__u64 addr = 4 * (0x80400C & ~ 0x1);
cxl_mmio_read64(afu,addr,(__u64 *)&portmask);

FILE *f = stdout;
print_version(f,afu);
if (argv[2] && strncmp(argv[2],"-v",2)==0) {return 0;}
Expand All @@ -205,6 +248,11 @@ int main(int argc, char **argv) {
dump_afu_dbg(f,afu);
dump_fc_dbg(f,afu,0);
dump_fc_dbg(f,afu,1);
if (portmask==0xf)
{
dump_fc_dbg(f,afu,2);
dump_fc_dbg(f,afu,3);
}
return 0;
}

Loading

0 comments on commit a447c6e

Please sign in to comment.