Skip to content

Commit

Permalink
Update on 23 Oct 2023. Expand to see details.
Browse files Browse the repository at this point in the history
52c60057 Update headers and readme for 6.3.0 release.
5360ad52 Host H264 frame support.
4b097e80 Add javascript to codeql detection
70278ae3 Fixed use after free issues.
5560620e Improved standalone enum transfer flow. Turn off ASIX in standalone build. Im...
39a01206 Improved host HID clients (mouse/keyboard/remote control) deactivation sequence.
be2c7fd5 Improved standalone host CDC ACM control and data instance link management (MSRC 81489,81570)
c2368eb2 Improved AC AS management and error handing.
b9c23b38 PIMA Host/device optional interrupt endpoint support and host unused semaphore removal.
34ca3af9 Removed interface link in class linked to device.
5d3c9dd0 Improved endpoints get error handling (host CDC-ECM/ACM, storage). Moved stor...
71b08ad1 Improved host audio descriptors validation
4717e3f1 Enable weekly pipeline build to avoid CodeQL expiration
ca408b54 Checked XML tag nesting depth in Pictbridge object parsing
c300a00c Limited pictbridge array element to hexa output array size.
0e644aaa Reject fake CDC-ECM data interface not located next to its control interface.
911007a9 Improved host HID usage handling.
d0576877 Enable dummy check of python for CodeQL
2761e105 Fixed some split transfer issue.
db0dbeda Added packet length validation for received nx packet.
f5007249 Fix PIMA issues on data set extraction
3ec66399 Fixing device RNDIS bugs with zero copy
1ec77d6b Fix device HID issue when adding class memory man and zero copy.
d52e55c0 Add zero copy support in device printer
a5cb883f Added zero copy support in device CDC_ECM and RNDIS
1f967ae2 Enable codeql in onebranch pipeline
de265dbc Enable zero copy for device audio and video
53aee275 Refined memory management to reduce overhead.
  • Loading branch information
xiaocq2001 committed Oct 23, 2023
1 parent 7c928b4 commit 26585e4
Show file tree
Hide file tree
Showing 347 changed files with 3,847 additions and 2,588 deletions.
2 changes: 2 additions & 0 deletions common/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ target_sources(${PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_LIST_DIR}/src/ux_utility_memory_copy.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_utility_memory_free.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_utility_memory_free_block_best_get.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_utility_memory_byte_pool_create.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_utility_memory_byte_pool_search.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_utility_memory_set.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_utility_mutex_create.c
${CMAKE_CURRENT_LIST_DIR}/src/ux_utility_mutex_delete.c
Expand Down
1,068 changes: 549 additions & 519 deletions common/core/inc/ux_api.h

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions common/core/inc/ux_device_class_dpump.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_device_class_dpump.h PORTABLE C */
/* 6.x */
/* 6.3.0 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
Expand All @@ -50,10 +50,10 @@
/* 01-31-2022 Chaoqiong Xiao Modified comment(s), */
/* added standalone support, */
/* resulting in version 6.1.10 */
/* xx-xx-xxxx Chaoqiong Xiao Modified comment(s), */
/* 10-31-2023 Chaoqiong Xiao Modified comment(s), */
/* added a new mode to manage */
/* endpoint buffer in classes, */
/* resulting in version 6.x */
/* resulting in version 6.3.0 */
/* */
/**************************************************************************/

Expand Down
6 changes: 3 additions & 3 deletions common/core/inc/ux_device_stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_device_stack.h PORTABLE C */
/* 6.x */
/* 6.3.0 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
Expand Down Expand Up @@ -53,9 +53,9 @@
/* fixed parameter/variable */
/* names conflict C++ keyword, */
/* resulting in version 6.1.12 */
/* xx-xx-xxxx Chaoqiong Xiao Modified comment(s), */
/* 10-31-2023 Chaoqiong Xiao Modified comment(s), */
/* added error checks support, */
/* resulting in version 6.x */
/* resulting in version 6.3.0 */
/* */
/**************************************************************************/

Expand Down
6 changes: 3 additions & 3 deletions common/core/inc/ux_host_stack.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_host_stack.h PORTABLE C */
/* 6.x */
/* 6.3.0 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
Expand Down Expand Up @@ -65,9 +65,9 @@
/* names conflict C++ keyword, */
/* added standalone HUB, */
/* resulting in version 6.1.12 */
/* xx-xx-xxxx Chaoqiong Xiao Modified comment(s), */
/* 10-31-2023 Chaoqiong Xiao Modified comment(s), */
/* added error checks support, */
/* resulting in version 6.x */
/* resulting in version 6.3.0 */
/* */
/**************************************************************************/

Expand Down
6 changes: 3 additions & 3 deletions common/core/inc/ux_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_system.h PORTABLE C */
/* 6.x */
/* 6.3.0 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
Expand All @@ -53,9 +53,9 @@
/* 04-25-2022 Chaoqiong Xiao Modified comment(s), */
/* added device CCID name, */
/* resulting in version 6.1.11 */
/* xx-xx-xxxx Chaoqiong Xiao Modified comment(s), */
/* 10-31-2023 Chaoqiong Xiao Modified comment(s), */
/* added error checks support, */
/* resulting in version 6.x */
/* resulting in version 6.3.0 */
/* */
/**************************************************************************/

Expand Down
34 changes: 28 additions & 6 deletions common/core/inc/ux_user_sample.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
/* PORT SPECIFIC C INFORMATION RELEASE */
/* */
/* ux_user.h PORTABLE C */
/* 6.x */
/* 6.3.0 */
/* */
/* AUTHOR */
/* */
Expand Down Expand Up @@ -99,14 +99,15 @@
/* added option to enable */
/* basic USBX error checking, */
/* resulting in version 6.2.1 */
/* xx-xx-xxxx Xiuwen Cai, CQ Xiao Modified comment(s), */
/* 10-31-2023 Xiuwen Cai, CQ Xiao Modified comment(s), */
/* refined memory management, */
/* added zero copy support */
/* in many device classes, */
/* added a new mode to manage */
/* endpoint buffer in classes, */
/* added option for get string */
/* requests with zero wIndex, */
/* resulting in version 6.x */
/* resulting in version 6.3.0 */
/* */
/**************************************************************************/

Expand Down Expand Up @@ -141,8 +142,8 @@
also refer to ux_port.h for descriptions on each of these options. */

/* Defined, this value represents minimal allocated memory alignment in number of bytes.
The default is UX_ALIGN_16 (0x0f) to align allocated memory to 16 bytes. */
/* #define UX_ALIGN_MIN UX_ALIGN_16 */
The default is UX_ALIGN_8 (0x07) to align allocated memory to 8 bytes. */
/* #define UX_ALIGN_MIN UX_ALIGN_8 */

/* Defined, this value represents how many ticks per seconds for a specific hardware platform.
The default is 1000 indicating 1 tick per millisecond. */
Expand Down Expand Up @@ -239,7 +240,7 @@
*/
/* #define UX_DEVICE_CLASS_CDC_ACM_ZERO_COPY */

/* Defined, it enables zero copy and flexible queue support (works if HID owns endpoint buffer).
/* Defined, it enables device HID zero copy and flexible queue support (works if HID owns endpoint buffer).
Enabled, the internal queue buffer is directly used for transfer, the APIs are kept to keep
backword compatibility, to AVOID KEEPING BUFFERS IN APPLICATION.
Flexible queue introduces initialization parameter _event_max_number and _event_max_length,
Expand All @@ -252,6 +253,27 @@
*/
/* #define UX_DEVICE_CLASS_HID_ZERO_COPY */

/* Defined, it enables device CDC_ECM zero copy support (works if CDC_ECM owns endpoint buffer).
Enabled, it requires that the NX IP default packet pool is in cache safe area, and buffer max
size is larger than UX_DEVICE_CLASS_CDC_ECM_ETHERNET_PACKET_SIZE (1536).
*/
/* #define UX_DEVICE_CLASS_CDC_ECM_ZERO_COPY */

/* Defined, it enables device RNDIS zero copy support (works if RNDIS owns endpoint buffer).
Enabled, it requires that the NX IP default packet pool is in cache safe area, and buffer max
size is larger than UX_DEVICE_CLASS_RNDIS_MAX_PACKET_TRANSFER_SIZE (1600).
*/
/* #define UX_DEVICE_CLASS_RNDIS_ZERO_COPY */

/* Defined, it enables zero copy support (works if PRINTER owns endpoint buffer).
Defined, it enables zero copy for bulk in/out endpoints (write/read). In this case, the endpoint
buffer is not allocated in class, application must provide the buffer for read/write, and the
buffer must meet device controller driver (DCD) buffer requirements (e.g., aligned and cache
safe if buffer is for DMA).
*/
/* #define UX_DEVICE_CLASS_PRINTER_ZERO_COPY */


/* Defined, this value represents the maximum number of bytes that can be received or transmitted
on any endpoint. This value cannot be less than the maximum packet size of any endpoint. The default
is 4096 bytes but can be reduced in memory constrained environments. For cd-rom support in the storage
Expand Down
44 changes: 23 additions & 21 deletions common/core/inc/ux_utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

/**************************************************************************/
/**************************************************************************/
/** */
/** USBX Component */
/** */
/** USBX Component */
/** */
/** Utility */
/** */
Expand All @@ -26,20 +26,20 @@
/* COMPONENT DEFINITION RELEASE */
/* */
/* ux_utility.h PORTABLE C */
/* 6.x */
/* 6.3.0 */
/* AUTHOR */
/* */
/* Chaoqiong Xiao, Microsoft Corporation */
/* */
/* DESCRIPTION */
/* */
/* */
/* This file contains all the header and extern functions used by the */
/* USBX components that utilize utility functions. */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* USBX components that utilize utility functions. */
/* */
/* RELEASE HISTORY */
/* */
/* DATE NAME DESCRIPTION */
/* */
/* 05-19-2020 Chaoqiong Xiao Initial Version 6.0 */
/* 09-30-2020 Chaoqiong Xiao Modified comment(s), */
/* added timer delete, used UX */
Expand All @@ -57,10 +57,11 @@
/* added macros for RTOS calls,*/
/* fixed OHCI PRSC issue, */
/* resulting in version 6.1.12 */
/* xx-xx-xxxx Chaoqiong Xiao Modified comment(s), */
/* 10-31-2023 Chaoqiong Xiao Modified comment(s), */
/* refined memory management, */
/* added new function to check */
/* parsed size of descriptor, */
/* resulting in version 6.x */
/* resulting in version 6.3.0 */
/* */
/**************************************************************************/

Expand All @@ -86,9 +87,10 @@ VOID _ux_utility_memory_copy(VOID *memory_destination, VOID *memory_
VOID _ux_utility_memory_free(VOID *memory);
ULONG _ux_utility_string_length_get(UCHAR *string);
UINT _ux_utility_string_length_check(UCHAR *input_string, UINT *string_length_ptr, UINT max_string_length);
UX_MEMORY_BLOCK *_ux_utility_memory_free_block_best_get(ULONG memory_cache_flag, ULONG memory_size_requested);
UCHAR *_ux_utility_memory_byte_pool_search(UX_MEMORY_BYTE_POOL *pool_ptr, ULONG memory_size);
UINT _ux_utility_memory_byte_pool_create(UX_MEMORY_BYTE_POOL *pool_ptr, VOID *pool_start, ULONG pool_size);
VOID _ux_utility_memory_set(VOID *destination, UCHAR value, ULONG length);
ULONG _ux_utility_pci_class_scan(ULONG pci_class, ULONG bus_number, ULONG device_number,
ULONG _ux_utility_pci_class_scan(ULONG pci_class, ULONG bus_number, ULONG device_number,
ULONG function_number, ULONG *current_bus_number,
ULONG *current_device_number, ULONG *current_function_number);
ULONG _ux_utility_pci_read(ULONG bus_number, ULONG device_number, ULONG function_number,
Expand Down Expand Up @@ -116,9 +118,9 @@ UINT _ux_utility_semaphore_create(UX_SEMAPHORE *semaphore, CHAR *sem
UINT _ux_utility_semaphore_delete(UX_SEMAPHORE *semaphore);
UINT _ux_utility_semaphore_get(UX_SEMAPHORE *semaphore, ULONG semaphore_signal);
UINT _ux_utility_semaphore_put(UX_SEMAPHORE *semaphore);
UINT _ux_utility_thread_create(UX_THREAD *thread_ptr, CHAR *name,
UINT _ux_utility_thread_create(UX_THREAD *thread_ptr, CHAR *name,
VOID (*entry_function)(ULONG), ULONG entry_input,
VOID *stack_start, ULONG stack_size,
VOID *stack_start, ULONG stack_size,
UINT priority, UINT preempt_threshold,
ULONG time_slice, UINT auto_start);
UINT _ux_utility_thread_delete(UX_THREAD *thread_ptr);
Expand All @@ -129,12 +131,12 @@ UINT _ux_utility_thread_sleep(ULONG ticks);
UINT _ux_utility_thread_suspend(UX_THREAD *thread_ptr);
UX_THREAD *_ux_utility_thread_identify(VOID);
UINT _ux_utility_timer_create(UX_TIMER *timer, CHAR *timer_name, VOID (*expiration_function) (ULONG),
ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks,
ULONG expiration_input, ULONG initial_ticks, ULONG reschedule_ticks,
UINT activation_flag);
UINT _ux_utility_timer_delete(UX_TIMER *timer);
UINT _ux_utility_event_flags_create(UX_EVENT_FLAGS_GROUP*group_ptr, CHAR *name);
UINT _ux_utility_event_flags_delete(UX_EVENT_FLAGS_GROUP*group_ptr);
UINT _ux_utility_event_flags_get(UX_EVENT_FLAGS_GROUP*group_ptr, ULONG requested_flags,
UINT _ux_utility_event_flags_get(UX_EVENT_FLAGS_GROUP*group_ptr, ULONG requested_flags,
UINT get_option, ULONG *actual_flags_ptr, ULONG wait_option);
UINT _ux_utility_event_flags_set(UX_EVENT_FLAGS_GROUP*group_ptr, ULONG flags_to_set,
UINT set_option);
Expand Down Expand Up @@ -399,7 +401,7 @@ VOID* _ux_utility_memory_allocate_add_safe(ULONG align,ULONG cache,UL


/* Define the system API mappings.
Note: this section is only applicable to
Note: this section is only applicable to
application source code, hence the conditional that turns off this
stuff when the include file is processed by the ThreadX source. */

Expand Down Expand Up @@ -450,8 +452,8 @@ VOID* _ux_utility_memory_allocate_add_safe(ULONG align,ULONG cache,UL
#define ux_utility_event_flags_set _ux_utility_event_flags_set
#define ux_utility_unicode_to_string _ux_utility_unicode_to_string
#define ux_utility_string_to_unicode _ux_utility_string_to_unicode
#define ux_utility_delay_ms _ux_utility_delay_ms
#define ux_utility_error_callback_register _ux_utility_error_callback_register
#define ux_utility_delay_ms _ux_utility_delay_ms
#define ux_utility_error_callback_register _ux_utility_error_callback_register
#define ux_system_error_handler _ux_system_error_handler

#define ux_utility_time_get _ux_utility_time_get
Expand Down
Loading

0 comments on commit 26585e4

Please sign in to comment.