Skip to content

Commit

Permalink
Release v1.3.8 (aws#408)
Browse files Browse the repository at this point in the history
* Update xocl_bo.c

* Update xocl_drv.c

* Update hdk_version.txt

* Update RELEASE_NOTES.md

* Update ERRATA.md

* Update description.json

* Update .gitmodules

* Remove all drivers before running runtime/driver tests to get into a clean state
  • Loading branch information
kristopk authored Jun 11, 2018
1 parent 7dc2bee commit 7f1e767
Show file tree
Hide file tree
Showing 12 changed files with 57 additions and 52 deletions.
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
[submodule "SDAccel/examples/xilinx_2017.4"]
path = SDAccel/examples/xilinx_2017.4
url = https://github.com/Xilinx/SDAccel_Examples.git
branch = aws_2017.4
3 changes: 0 additions & 3 deletions ERRATA.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,4 @@
## Known Bugs/Issues

* AXI-L Interface ordering - The v071417d3 shell has an issues that impacts transaction ordering on the AXI-L interfaces (BAR1, OCL, SDA) only. The Shell should preserve PCIe ordering rules on these interfaces, but there is an issue where a read request may pass a previous write request. The shell terminates a write when the data is transferred on the W channel (WVALID/WREADY) rather than wait for the response on the B channel. A CL workaround for this issue is to backpressure reads (deassert ARREADY) when there are any writes pending.
* Linux kernel 3.10.0-862.2.3.el7.x86_64. By default, the AWS Developer AMI GUI setup script updates the kernel version. We have provided a patch to prevent kernel updates during GUI setup. Instead of running the setup_gui.sh as documented/included within the developer AMI, please use the patched script as shown below:
$curl https://s3.amazonaws.com/aws-fpga-developer-ami/1.4.0/Scripts/setup_gui.sh -o /home/centos/src/scripts/setup_gui.sh
$/home/centos/src/scripts/setup_gui.sh

3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
* 1 DDR controller implemented in the SH (always available)
* 3 DDR controllers implemented in the CL (configurable number of implemented controllers allowed)

## Release 1.3.8 (See [ERRATA](./ERRATA.md) for unsupported features)
* Fixed SDAccel XOCL driver compile fails that occur on linux kernels greater than 3.10.0-693.21.1.el7.x86_64

## Release 1.3.7 (See [ERRATA](./ERRATA.md) for unsupported features)
* Support for Xilinx SDx/Vivado 2017.1 and Xilinx [SDx](https://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_4/ug1238-sdx-rnil.pdf)/[Vivado](https://www.xilinx.com/support/documentation/sw_manuals/xilinx2017_4/ug973-vivado-release-notes-install-license.pdf) 2017.4 . * This release supports Xilinx SDx 2017.4 and 2017.1. The HDK and SDAccel setup scripts configure the development environment based on the tool version found in the PATH environment variable.
* FPGA developer kit version is listed in [hdk_version.txt](./hdk/hdk_version.txt)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
"date" : "MAY2018",
"version": "0.9",
"description": "Test Example"
},
}
]
}
2 changes: 1 addition & 1 deletion SDAccel/tests/test_run_sdaccel_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def setup_class(cls):
return

def teardown_method(self, test_method):
aws_fpga_test_utils.remove_xdma_driver()
aws_fpga_test_utils.remove_all_drivers()

def test_run_sdaccel_example(self, examplePath, rteName, xilinxVersion):

Expand Down
2 changes: 1 addition & 1 deletion hdk/hdk_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
HDK_VERSION=1.3.7
HDK_VERSION=1.3.8
42 changes: 13 additions & 29 deletions hdk/tests/test_load_afi.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ def setup_class(cls):
assert AwsFpgaTestBase.running_on_f1_instance(), 'This test must be run on an F1 instance. Instance type={}'.format(aws_fpga_test_utils.get_instance_type())
return

def setup_method(self, test_method):
aws_fpga_test_utils.remove_all_drivers()

def teardown_method(self, test_method):
aws_fpga_test_utils.remove_edma_driver()
aws_fpga_test_utils.remove_all_drivers()

def get_agfi(self, cl, xilinxVersion, option_tag):
'''
Expand Down Expand Up @@ -264,41 +267,22 @@ def base_test(self, cl, agfi, afi, install_edma_driver, slots_to_test, option_ta
(rc, stdout_lines, stderr_lines) = self.run_cmd("cd {}/hdk/cl/examples/{}/software/runtime && make -f Makefile SDK_DIR={}/sdk".format(self.WORKSPACE, cl, self.WORKSPACE))
assert rc == 0, "Runtime software build failed."

if install_edma_driver:
# Uninstall drivers just in case a previous test left them installed
aws_fpga_test_utils.remove_edma_driver()
aws_fpga_test_utils.remove_xdma_driver()

# Load the AFI onto all available FPGAs
# This is required for the EDMA driver to correctly installfor all slots
# We do this because otherwise installation on slots 1-7 doesn't seem to work.
logger.info("Loading the AFI into all slots before installing EDMA driver")
for slot in range(self.num_slots):
self.load_agfi(cl, agfi, afi, slot)
# Load the AFI onto all available FPGAs
# This is required for the EDMA driver to correctly install for all slots
# We do this because otherwise installation on slots 1-7 doesn't seem to work.
logger.info("Loading the AFI into all slots")
for slot in slots_to_test:
self.load_agfi(cl, agfi, afi, slot)

if install_edma_driver:
aws_fpga_test_utils.install_edma_driver()
# Make sure that driver was installed on all slots
for slot in range(self.num_slots):
device_name = "/dev/edma{}_queue_0".format(slot)
assert os.path.exists(device_name), "EDMA driver not installed on slot {}".format(slot)
else:
# Load the AFI onto all the slots to be tested
for slot in slots_to_test:
self.load_agfi(cl, agfi, afi, slot)

for slot in slots_to_test:
logger.info("Running runtime software on slot {}".format(slot))
self.check_runtime_software(cl, slot)

if install_edma_driver:
logger.info("Removing EDMA driver")
aws_fpga_test_utils.remove_edma_driver()

for slot in range(self.num_slots):
self.fpga_clear_local_image(slot)
else:
for slot in slots_to_test:
self.fpga_clear_local_image(slot)
for slot in slots_to_test:
self.fpga_clear_local_image(slot)

def test_precompiled_cl_dram_dma(self, xilinxVersion):
cl = 'cl_dram_dma'
Expand Down
8 changes: 6 additions & 2 deletions sdk/linux_kernel_drivers/xocl/xocl_bo.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
#include "xocl_ioctl.h"
#include "xocl_xdma.h"

#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 13, 0)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) || \
(defined(RHEL_RELEASE_CODE) && \
RHEL_RELEASE_CODE >=RHEL_RELEASE_VERSION(7,5)))
static inline void drm_free_large(void *ptr)
{
kvfree(ptr);
Expand All @@ -49,7 +51,9 @@ static inline int xocl_drm_mm_insert_node(struct drm_mm *mm,
struct drm_mm_node *node,
u64 size)
{
#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 13, 0)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) || \
(defined(RHEL_RELEASE_CODE) && \
RHEL_RELEASE_CODE >=RHEL_RELEASE_VERSION(7,5)))
return drm_mm_insert_node_generic(mm, node, size, PAGE_SIZE, 0, 0);
#else
return drm_mm_insert_node_generic(mm, node, size, PAGE_SIZE, 0, 0, 0);
Expand Down
16 changes: 10 additions & 6 deletions sdk/linux_kernel_drivers/xocl/xocl_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,9 @@ static int xocl_drm_unload(struct drm_device *drm)
return 0;
}

#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 13, 0)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) || \
(defined(RHEL_RELEASE_CODE) && \
RHEL_RELEASE_CODE >=RHEL_RELEASE_VERSION(7,5)))
static void xocl_drm_unload2(struct drm_device *drm)
{
xocl_drm_unload(drm);
Expand Down Expand Up @@ -420,7 +422,7 @@ int xocl_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
}
}

#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 13, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
int xocl_gem_fault2(struct vm_fault *vmf)
{
return xocl_gem_fault(vmf->vma, vmf);
Expand Down Expand Up @@ -567,7 +569,7 @@ static const struct file_operations xocl_driver_fops = {
};

static const struct vm_operations_struct xocl_vm_ops = {
#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 13, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
.fault = xocl_gem_fault2,
#else
.fault = xocl_gem_fault,
Expand All @@ -582,7 +584,9 @@ static struct drm_driver xocl_drm_driver = {
.postclose = xocl_client_release,
.open = xocl_client_open,
.load = xocl_drm_load,
#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 13, 0)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) || \
(defined(RHEL_RELEASE_CODE) && \
RHEL_RELEASE_CODE >=RHEL_RELEASE_VERSION(7,5)))
.unload = xocl_drm_unload2,
#else
.unload = xocl_drm_unload,
Expand Down Expand Up @@ -740,7 +744,7 @@ void xocl_reset_notify(struct pci_dev *pdev, bool prepare)
}
EXPORT_SYMBOL_GPL(xocl_reset_notify);

#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 13, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
static void xocl_reset_prepare(struct pci_dev *pdev)
{
xocl_reset_notify(pdev, true);
Expand All @@ -756,7 +760,7 @@ static const struct pci_error_handlers xocl_err_handler = {
.error_detected = xocl_error_detected,
.slot_reset = xocl_slot_reset,
.resume = xocl_error_resume,
#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 13, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0)
.reset_prepare = xocl_reset_prepare,
.reset_done = xocl_reset_done,
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0)
Expand Down
7 changes: 2 additions & 5 deletions sdk/tests/test_edma.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,10 @@ def setup_class(cls):
return

def setup_method(self, test_method):
aws_fpga_test_utils.remove_edma_driver()
aws_fpga_test_utils.remove_xdma_driver()
aws_fpga_test_utils.remove_all_drivers()

def teardown_method(self, test_method):
aws_fpga_test_utils.remove_edma_driver()
aws_fpga_test_utils.remove_xdma_driver()

aws_fpga_test_utils.remove_all_drivers()

def test_unittest(self):
self.load_msix_workaround(slot=0)
Expand Down
6 changes: 2 additions & 4 deletions sdk/tests/test_xdma.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,10 @@ def setup_class(cls):
return

def setup_method(self, test_method):
aws_fpga_test_utils.remove_edma_driver()
aws_fpga_test_utils.remove_xdma_driver()
aws_fpga_test_utils.remove_all_drivers()

def teardown_method(self, test_method):
aws_fpga_test_utils.remove_edma_driver()
aws_fpga_test_utils.remove_xdma_driver()
aws_fpga_test_utils.remove_all_drivers()

def test_install(self):
aws_fpga_test_utils.install_xdma_driver()
Expand Down
17 changes: 17 additions & 0 deletions shared/lib/aws_fpga_test_utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,23 @@ def install_xdma_driver():
make && \
sudo insmod xdma.ko poll_mode=1') == 0

def remove_xocl_driver():
logger.info("Removing the xocl driver.")
# This fails if the driver isn't installed
os.system('sudo rmmod xocl')

xocl_driver_ko_list = find_files_in_path('/lib/modules', 'xocl.ko')
for xocl_ko in xocl_driver_ko_list:
logger.info("Removing {}".format(xocl_ko))
assert os.system("sudo rm -f {}".format(xocl_ko)) == 0

assert os.system('sudo rm -f /etc/udev/rules.d/10-xocl.rules') == 0

def remove_all_drivers():
remove_xdma_driver()
remove_edma_driver()
remove_xocl_driver()

class FpgaLocalImage:
def __init__(self):
self.type = None
Expand Down

0 comments on commit 7f1e767

Please sign in to comment.