From f829d131adc5f0ec4aa079d4b8c0d65ea578cdb1 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Fri, 2 Mar 2012 20:59:34 -0300 Subject: [PATCH] m1/patches/rtems/: fix SOFTUSB_PMEM_SIZE --- m1/patches/rtems/fix-pmem-size.patch | 24 ++++++++++++++++++++++++ m1/patches/rtems/series | 1 + 2 files changed, 25 insertions(+) create mode 100644 m1/patches/rtems/fix-pmem-size.patch diff --git a/m1/patches/rtems/fix-pmem-size.patch b/m1/patches/rtems/fix-pmem-size.patch new file mode 100644 index 0000000..b0dc65b --- /dev/null +++ b/m1/patches/rtems/fix-pmem-size.patch @@ -0,0 +1,24 @@ +We increased PMEM to 8 kB but never updated SOFTUSB_PMEM_SIZE. +This didn't have much of an effect because all we used it for was +to zero unused program memory - which we should never touch +anyway. + +But now that "usb load" in FN uses SOFTUSB_PMEM_SIZE, this caused +it to silently truncate the firmware, producing rather puzzling +effects. + +- Werner + +Index: rtems/c/src/lib/libbsp/lm32/milkymist/include/system_conf.h +=================================================================== +--- rtems.orig/c/src/lib/libbsp/lm32/milkymist/include/system_conf.h 2012-03-02 20:35:36.000000000 -0300 ++++ rtems/c/src/lib/libbsp/lm32/milkymist/include/system_conf.h 2012-03-02 20:41:02.000000000 -0300 +@@ -155,7 +155,7 @@ + #define MM_SOFTUSB_PMEM_BASE (0xa0000000) + #define MM_SOFTUSB_DMEM_BASE (0xa0020000) + +-#define SOFTUSB_PMEM_SIZE (1 << 12) ++#define SOFTUSB_PMEM_SIZE (1 << 13) + #define SOFTUSB_DMEM_SIZE (1 << 13) + + /* PFPU */ diff --git a/m1/patches/rtems/series b/m1/patches/rtems/series index 8357d06..c80d3c6 100644 --- a/m1/patches/rtems/series +++ b/m1/patches/rtems/series @@ -24,3 +24,4 @@ fix-dns-in-dhcp.patch # https://www.rtems.org/bugzilla/show_bug.cgi?id=1841 export-shell-fns.patch # https://www.rtems.org/bugzilla/show_bug.cgi?id=2030 bootp-dhcp-cleanup.patch # https://www.rtems.org/bugzilla/show_bug.cgi?id=2031 usb-firmware-ioctl.patch # https://www.rtems.org/bugzilla/show_bug.cgi?id=2032 +fix-pmem-size.patch