message
stringlengths
6
474
diff
stringlengths
8
5.22k
cooja: remove non-required build flags These flags are no longer required after the mapfile dependency was removed from Cooja.
@@ -53,8 +53,8 @@ ifeq ($(HOST_OS),Darwin) else JAVA_OS_NAME = linux CC = gcc - CFLAGS += -fPIC -fcommon - LDFLAGS += -shared -Wl,-zdefs -Wl,-Map=$(MAPFILE) + CFLAGS += -fPIC + LDFLAGS += -shared -Wl,-zdefs LDFLAGS += -Wl,-T$(CONTIKI_NG_RELOC_PLATFORM_DIR)/cooja/cooja.ld endif @@ -107,10 +107,6 @@ CFLAGSNO += -Werror endif CFLAGS += $(CFLAGSNO) -# Set build/cooja/mtype<NNN>.map as mapfile for the final link. The rest -# of the rule resides in Makefile.include. -$(BUILD_DIR_BOARD)/%.$(TARGET): MAPFILE = $(LIBNAME:.cooja=.map) - # This is mtype<NNN>.o which is built from mtype.c with # CLASSNAME passed from the environment by Cooja. MTYPE_OBJ = $(LIBNAME:.cooja=.o)
Use path variables: cc26x0-cc13x0
-CPU_ABS_PATH = arch/cpu/cc26x0-cc13x0 +CPU_ABS_PATH = $(CONTIKI_NG_ARCH_CPU_DIR)/cc26x0-cc13x0 TI_XXWARE = $(CONTIKI_CPU)/$(TI_XXWARE_PATH) ifeq (,$(wildcard $(TI_XXWARE)/*)) @@ -57,7 +57,7 @@ ifdef PORT BSL_FLAGS += -p $(PORT) endif -BSL = $(CONTIKI)/tools/cc2538-bsl/cc2538-bsl.py +BSL = $(CONTIKI_NG_TOOLS_DIR)/cc2538-bsl/cc2538-bsl.py ### Always re-build ieee-addr.o in case the command line passes a new NODEID FORCE: @@ -82,7 +82,7 @@ STACK_SIZE = 0 @$(SIZE) -A $< | egrep "data|bss" | awk '{s+=$$2} END {s=s+$(STACK_SIZE); f=$(RAM_SIZE)-s; printf "[RAM] used %6d, free %6d\n",s,f;}' @$(SIZE) -A $< | egrep "text|isr_vector" | awk '{s+=$$2} END {f=$(FLASH_SIZE)-s; printf "[Flash] used %6d, free %6d\n",s,f;}' -include $(ARCH_PATH)/cpu/arm/cortex-m/cm3/Makefile.cm3 +include $(CONTIKI)/$(CONTIKI_NG_CM3_DIR)/Makefile.cm3 ifeq ($(BOARD_SUPPORTS_BSL),1) %.upload: $(OUT_BIN)
Sidebar: do not crash on lastUpdated sorting
@@ -20,11 +20,11 @@ function sidebarSort( const lastUpdated = (a: string, b: string) => { const aAssoc = associations[a]; const bAssoc = associations[b]; - const aModule = aAssoc?.metadata?.module || aAssoc?.["app-name"]; - const bModule = bAssoc?.metadata?.module || bAssoc?.["app-name"]; + const aAppName = aAssoc?.["app-name"]; + const bAppName = bAssoc?.["app-name"]; - const aUpdated = apps[aModule].lastUpdated(a); - const bUpdated = apps[bModule].lastUpdated(b); + const aUpdated = apps[aAppName].lastUpdated(a); + const bUpdated = apps[bAppName].lastUpdated(b); return bUpdated - aUpdated || alphabetical(a, b); };
SOVERSION bump to version 2.8.4
@@ -63,7 +63,7 @@ set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_ # set version of the library set(LIBYANG_MAJOR_SOVERSION 2) set(LIBYANG_MINOR_SOVERSION 8) -set(LIBYANG_MICRO_SOVERSION 3) +set(LIBYANG_MICRO_SOVERSION 4) set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION}) set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
tp: remove comments
@@ -176,11 +176,6 @@ int flb_tp_thread_start_all(struct flb_tp *tp) int flb_tp_thread_stop(struct flb_tp *tp, struct flb_tp_thread *th) { - //int ret; - //(void) pthread_t tid; - //(void) struct flb_worker *w; - - return 0; }
Docs: Re-add measurements of single key presses
@@ -6159,6 +6159,9 @@ functioning. Feature highlights: it is possible to set a slightly lower value on faster platforms and slightly higher value on slower platforms for more responsive input. + Pressing keys one after the other results in delays of at least \texttt{6} and + \texttt{10} milliseconds for the same platforms. + \emph{Note}: Some platforms may require different values, higher or lower. For example, when detecting key misses in OpenCanopy try increasing this value (e.g. to \texttt{10}), and when detecting key stall, try decreasing this value.
Return upon CLASS error
@@ -381,6 +381,7 @@ static void ccl_cosmology_compute_power_class(ccl_cosmology * cosmo, int * statu *status = CCL_ERROR_CLASS; strcpy(cosmo->status_message ,"ccl_power.c: ccl_cosmology_compute_power_class(): Error computing CLASS power spectrum\n"); ccl_free_class_structs(cosmo, &ba,&th,&pt,&tr,&pm,&sp,&nl,&le,status); + return; } gsl_spline2d * log_power = gsl_spline2d_alloc(PLIN_SPLINE_TYPE, nk,na); int pwstatus = gsl_spline2d_init(log_power, x, z, y2d_lin,nk,na); @@ -415,6 +416,7 @@ static void ccl_cosmology_compute_power_class(ccl_cosmology * cosmo, int * statu *status = CCL_ERROR_CLASS; strcpy(cosmo->status_message ,"ccl_power.c: ccl_cosmology_compute_power_class(): Error computing CLASS power spectrum\n"); ccl_free_class_structs(cosmo, &ba,&th,&pt,&tr,&pm,&sp,&nl,&le,status); + return; } gsl_spline2d * log_power_nl = gsl_spline2d_alloc(PNL_SPLINE_TYPE, nk,na); @@ -440,6 +442,7 @@ static void ccl_cosmology_compute_power_class(ccl_cosmology * cosmo, int * statu free(y2d_lin); free(z); } + } /*------ ROUTINE: tsqr_BBKS -----
Fix incorrect method for FLT_CTL_CREATE
@@ -53,9 +53,16 @@ typedef struct _FILTER_PORT_EA } FILTER_PORT_EA, *PFILTER_PORT_EA; #define FLT_PORT_EA_NAME "FLTPORT" + +typedef struct _FILTER_LOADUNLOAD +{ + USHORT Length; + WCHAR Name[ANYSIZE_ARRAY]; +} FILTER_LOADUNLOAD, *PFILTER_LOADUNLOAD; + #define FLT_CTL_LOAD CTL_CODE(FILE_DEVICE_DISK_FILE_SYSTEM, 1, METHOD_BUFFERED, FILE_WRITE_ACCESS) #define FLT_CTL_UNLOAD CTL_CODE(FILE_DEVICE_DISK_FILE_SYSTEM, 2, METHOD_BUFFERED, FILE_WRITE_ACCESS) -#define FLT_CTL_CREATE CTL_CODE(FILE_DEVICE_DISK_FILE_SYSTEM, 3, METHOD_NEITHER, FILE_READ_ACCESS) +#define FLT_CTL_CREATE CTL_CODE(FILE_DEVICE_DISK_FILE_SYSTEM, 3, METHOD_BUFFERED, FILE_READ_ACCESS) #define FLT_CTL_ATTACH CTL_CODE(FILE_DEVICE_DISK_FILE_SYSTEM, 4, METHOD_BUFFERED, FILE_WRITE_ACCESS) #define FLT_CTL_DETATCH CTL_CODE(FILE_DEVICE_DISK_FILE_SYSTEM, 5, METHOD_BUFFERED, FILE_WRITE_ACCESS) #define FLT_CTL_SEND_MESSAGE CTL_CODE(FILE_DEVICE_DISK_FILE_SYSTEM, 6, METHOD_NEITHER, FILE_WRITE_ACCESS)
test: fix coverity & improper use of negative values
@@ -122,7 +122,8 @@ static int validate_client_hello(BIO *wbio) int cookie_found = 0; unsigned int u = 0; - len = BIO_get_mem_data(wbio, (char **)&data); + if ((len = BIO_get_mem_data(wbio, (char **)&data)) < 0) + return 0; if (!PACKET_buf_init(&pkt, data, len)) return 0; @@ -391,6 +392,9 @@ static int validate_ccs(BIO *wbio) unsigned int u; len = BIO_get_mem_data(wbio, (char **)&data); + if (len < 0) + return 0; + if (!PACKET_buf_init(&pkt, data, len)) return 0;
[scripts][x86] spiff up the qemu x86 script to handle a virtio disk and net device
@@ -8,6 +8,8 @@ function HELP { echo "-l : legacy mode build (386 emulated machine)" echo "-m <memory in MB>" echo "-s <number of cpus>" + echo "-d <disk image> : a virtio block device" + echo "-n : a virtio network device" echo "-g : with graphics" echo "-k : use KVM" echo "-h for help" @@ -19,18 +21,23 @@ DO_64BIT=0 DO_LEGACY=0 DO_GRAPHICS=0 DO_KVM=0 +DO_DISK=0 +DISK_IMAGE="" +DO_NET=0 MEMSIZE=0 SMP=1 SUDO="" MAKE_VARS="" -while getopts 6gklm:s:h FLAG; do +while getopts 6d:gklm:ns:h FLAG; do case $FLAG in 6) DO_64BIT=1;; + d) DO_DISK=1; DISK_IMAGE=$OPTARG;; g) DO_GRAPHICS=1;; k) DO_KVM=1;; l) DO_LEGACY=1;; m) MEMSIZE=$OPTARG;; + n) DO_NET=1;; s) SMP=$OPTARG;; h) HELP;; \?) @@ -56,7 +63,7 @@ else QEMU="qemu-system-i386" PROJECT="pc-x86-test" CPU=qemu32 - MACHINE=pc + MACHINE=q35 fi if (( $DO_LEGACY )); then @@ -69,16 +76,41 @@ else fi fi -ARGS=" -cpu $CPU -m $MEMSIZE -smp $SMP -machine $MACHINE -kernel build-${PROJECT}/lk.elf" +ARGS="" +if (( $DO_KVM )); then + ARGS+=" -enable-kvm -cpu host" +else + ARGS+=" -cpu $CPU" +fi +ARGS+=" -m $MEMSIZE -smp $SMP -machine $MACHINE -kernel build-${PROJECT}/lk.elf" + +ARGS+=" -device isa-debug-exit,iobase=0xf4,iosize=0x04" +# Override the SeaBIOS serial port to keep it from outputting +# a terminal reset on start. +ARGS+=" -fw_cfg name=etc/sercon-port,string=0" if (( ! $DO_GRAPHICS )); then ARGS+=" -nographic" else - ARGS+=" -serial stdio" + ARGS+=" -serial stdio -vga std" fi -if (( $DO_KVM )); then - ARGS+=" -enable-kvm -cpu host" +if (( $DO_DISK )); then + if (( ! $DO_LEGACY )); then + ARGS+=" -drive if=none,file=${DISK_IMAGE},id=blk -device virtio-blk-pci,drive=blk" + else + ARGS+=" -hda ${DISK_IMAGE}" + fi +fi +if (( $DO_NET )); then + if (( ! $DO_LEGACY )); then + ARGS+=" -netdev user,id=vmnic,hostname=qemu -device virtio-net-pci,netdev=vmnic" + else + echo "implement legacy + network config" + exit 1 + fi +else + ARGS+=" -nic none" fi $DIR/make-parallel $MAKE_VARS $PROJECT &&
tls: allow picotls to use secp elliptic curves Fix typos in macros for elliptic curves over prime field. Type: fix Fixes:
@@ -117,13 +117,13 @@ picotls_start_listen (tls_ctx_t * lctx) #ifdef PTLS_OPENSSL_HAVE_X25519 &ptls_openssl_x25519, #endif -#ifdef PTLS_OPENSSL_HAVE_SECP256r1 +#ifdef PTLS_OPENSSL_HAVE_SECP256R1 &ptls_openssl_secp256r1, #endif -#ifdef PTLS_OPENSSL_HAVE_SECP384r1 +#ifdef PTLS_OPENSSL_HAVE_SECP384R1 &ptls_openssl_secp384r1, #endif -#ifdef PTLS_OPENSSL_HAVE_SECP521r1 +#ifdef PTLS_OPENSSL_HAVE_SECP521R1 &ptls_openssl_secp521r1 #endif };
fix typo and remove duplicate macro
@@ -103,10 +103,6 @@ extern "C" { RSA_pkey_ctx_ctrl(ctx, (EVP_PKEY_OP_SIGN|EVP_PKEY_OP_VERIFY), \ EVP_PKEY_CTRL_GET_RSA_PSS_SALTLEN, 0, plen) -# define EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(ctx, len) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_KEYGEN, \ - EVP_PKEY_CTRL_RSA_PSS_SALTLEN, len, NULL) - # define EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, bits) \ RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_KEYGEN, \ EVP_PKEY_CTRL_RSA_KEYGEN_BITS, bits, NULL) @@ -143,9 +139,9 @@ extern "C" { EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ EVP_PKEY_CTRL_GET_RSA_OAEP_LABEL, 0, (void *)l) -# define EVP_PKEY_CTX_rsa_pss_key_digest(ctx, md) \ - EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSAi_PSS, \ - EVP_PKEY_OP_TYPE_CRYPT, EVP_PKEY_CTRL_MD, \ +# define EVP_PKEY_CTX_rsa_pss_keygen_md(ctx, md) \ + EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, \ + EVP_PKEY_OP_TYPE_KEYGEN, EVP_PKEY_CTRL_MD, \ 0, (void *)md) # define EVP_PKEY_CTRL_RSA_PADDING (EVP_PKEY_ALG_CTRL + 1)
[test] Add an infinite recursive call test
@@ -514,10 +514,13 @@ function infiniteLoop() end return t end +function infiniteCall() + infiniteCall() +end function catch() return pcall(infiniteLoop) end -abi.register(infiniteLoop, catch)` +abi.register(infiniteLoop, infiniteCall, catch)` err = bc.ConnectBlock( NewLuaTxAccount("ktlee", 100), @@ -557,6 +560,23 @@ abi.register(infiniteLoop, catch)` if err != nil && !strings.Contains(err.Error(), errMsg) { t.Error(err) } + + err = bc.ConnectBlock( + NewLuaTxCall( + "ktlee", + "loop", + 0, + `{"Name":"infiniteCall"}`, + ), + ) + errMsg = "stack overflow" + if err == nil { + t.Errorf("expected: %s", errMsg) + } + if err != nil && !strings.Contains(err.Error(), errMsg) { + t.Error(err) + } + } func TestUpdateSize(t *testing.T) {
docs(grid) typo fix
@@ -27,7 +27,7 @@ With the following functions you can easily set a Grid layout on any parent. ### Grid descriptors -First you need to describe the size of rows and columns. It can be done by declaring 2 arrays and the the track sizes in them. The last element must be `LV_GRID_TEMPLATE_LAST`. +First you need to describe the size of rows and columns. It can be done by declaring 2 arrays and the track sizes in them. The last element must be `LV_GRID_TEMPLATE_LAST`. For example: ```
TEST: Adapt test/evp_pkey_provided_test.c to check the key size This is for the case where we build keys from user data
@@ -126,7 +126,10 @@ static int test_fromdata_rsa(void) goto err; if (!TEST_true(EVP_PKEY_key_fromdata_init(ctx)) - || !TEST_true(EVP_PKEY_fromdata(ctx, &pk, fromdata_params))) + || !TEST_true(EVP_PKEY_fromdata(ctx, &pk, fromdata_params)) + || !TEST_int_eq(EVP_PKEY_bits(pk), 32) + || !TEST_int_eq(EVP_PKEY_security_bits(pk), 8) + || !TEST_int_eq(EVP_PKEY_size(pk), 4)) goto err; ret = test_print_key_using_pem(pk) @@ -176,7 +179,10 @@ static int test_fromdata_dh(void) goto err; if (!TEST_true(EVP_PKEY_key_fromdata_init(ctx)) - || !TEST_true(EVP_PKEY_fromdata(ctx, &pk, fromdata_params))) + || !TEST_true(EVP_PKEY_fromdata(ctx, &pk, fromdata_params)) + || !TEST_int_eq(EVP_PKEY_bits(pk), 32) + || !TEST_int_eq(EVP_PKEY_security_bits(pk), 0) /* Missing Q */ + || !TEST_int_eq(EVP_PKEY_size(pk), 4)) goto err; ret = test_print_key_using_pem(pk)
modpupdevices: return Color enum, not ints
@@ -60,22 +60,14 @@ STATIC mp_obj_t pupdevices_ColorAndDistSensor_color(mp_obj_t self_in) { pb_iodevice_assert_type_id(self->iodev, PBIO_IODEV_TYPE_ID_COLOR_DIST_SENSOR); switch(pupdevices_ColorAndDistSensor_combined_mode(self->iodev, 0)) { - case 0: - return mp_obj_new_int(PBIO_LIGHT_COLOR_BLACK); - case 3: - return mp_obj_new_int(PBIO_LIGHT_COLOR_BLUE); - case 5: - return mp_obj_new_int(PBIO_LIGHT_COLOR_GREEN); - case 7: - return mp_obj_new_int(PBIO_LIGHT_COLOR_YELLOW); - case 8: - return mp_obj_new_int(PBIO_LIGHT_COLOR_ORANGE); - case 9: - return mp_obj_new_int(PBIO_LIGHT_COLOR_RED); - case 10: - return mp_obj_new_int(PBIO_LIGHT_COLOR_WHITE); - default: - return mp_const_none; + case 1: return MP_OBJ_FROM_PTR(&pb_const_black); + case 3: return MP_OBJ_FROM_PTR(&pb_const_blue); + case 5: return MP_OBJ_FROM_PTR(&pb_const_green); + case 7: return MP_OBJ_FROM_PTR(&pb_const_yellow); + case 8: return MP_OBJ_FROM_PTR(&pb_const_orange); + case 9: return MP_OBJ_FROM_PTR(&pb_const_red); + case 10: return MP_OBJ_FROM_PTR(&pb_const_white); + default: return mp_const_none; } } STATIC MP_DEFINE_CONST_FUN_OBJ_1(pupdevices_ColorAndDistSensor_color_obj, pupdevices_ColorAndDistSensor_color);
Ensure env vars aren't messed up for future tests after tls.
@@ -131,17 +131,18 @@ endtest # # tls # +# This was written to ensure that #761 stays fixed starttest tls -export SCOPE_EVENT_DEST=tcp://127.0.0.1:9109 -export SCOPE_EVENT_TLS_ENABLE=true -export SCOPE_EVENT_TLS_VALIDATE_SERVER=false -export SCOPE_EVENT_TLS_CA_CERT_PATH=/usr/local/scope/cert.pm # tcpserver receives over a tls session cd /usr/local/scope ./tcpserver -t 9109 > $EVT_FILE & -# ldscope will send over tls session +# run ldscope with a ton of env vars to send over tls session + SCOPE_EVENT_DEST=tcp://127.0.0.1:9109 \ + SCOPE_EVENT_TLS_ENABLE=true \ + SCOPE_EVENT_TLS_VALIDATE_SERVER=false \ + SCOPE_EVENT_TLS_CA_CERT_PATH=/usr/local/scope/cert.pm \ ldscope ps -ef retval=$?
ansi: properly implement imaxabs() and imaxdiv()
static const char *__mlibc_digits = "0123456789abcdefghijklmnopqrstuvwxyz"; -intmax_t imaxabs(intmax_t) { - __ensure(!"Not implemented"); - __builtin_unreachable(); +intmax_t imaxabs(intmax_t num) { + return num < 0 ? -num : num; } -imaxdiv_t imaxdiv(intmax_t, intmax_t) { - __ensure(!"Not implemented"); - __builtin_unreachable(); +imaxdiv_t imaxdiv(intmax_t number, intmax_t denom) { + imaxdiv_t r; + r.quot = number / denom; + r.rem = number % denom; + return r; } template <class T> T strtoxmax(const char *it, char **out, int base) {
Remove unnecessary usage of $(wildcard )
@@ -227,7 +227,7 @@ else ifeq ($(MAKE_ROUTING),MAKE_ROUTING_NULLROUTING) MODULES += os/net/routing/nullrouting endif -MODULEDIRS = $(MODULES_REL) ${wildcard ${addprefix $(CONTIKI)/, $(MODULES)}} +MODULEDIRS = $(MODULES_REL) ${addprefix $(CONTIKI)/, $(MODULES)} UNIQUEMODULES = $(call uniq,$(MODULEDIRS)) MODULES_SOURCES = ${foreach d, $(MODULEDIRS), ${subst ${d}/,,${wildcard $(d)/*.c}}} CONTIKI_SOURCEFILES += $(MODULES_SOURCES)
tests: fix DEBUG=attach multiple worker config Type: fix
@@ -6,6 +6,7 @@ import sys from sanity_run_vpp import SanityTestCase from shutil import rmtree +from cpu_config import available_cpus gdb_path = '/usr/bin/gdb' @@ -40,6 +41,8 @@ def start_vpp_in_gdb(): rmtree(SanityTestCase.tempdir) print("Creating temp dir '%s'." % SanityTestCase.tempdir) os.mkdir(SanityTestCase.tempdir) + SanityTestCase.assign_cpus( + available_cpus[:SanityTestCase.get_cpus_required()]) SanityTestCase.setUpConstants() vpp_cmdline = SanityTestCase.vpp_cmdline if os.getenv("VPP_IN_GDB_CMDLINE", "y").lower() in ["1", "y", "yes"]:
Fix missing DebugInformationFormat when symbols are set to full
function m.debugInformationFormat(cfg) local value local tool, toolVersion = p.config.toolset(cfg) - if (cfg.symbols == p.ON) or (cfg.symbols == "FastLink") then + if (cfg.symbols == p.ON) or (cfg.symbols == "FastLink") or (cfg.symbols == "Full") then if cfg.debugformat == "c7" then value = "OldStyle" elseif (cfg.architecture == "x86_64" and _ACTION < "vs2015") or
Package: Bootstrap Premake in cloned repository
os.rmdir(pkgName) print("Cloning source code") - z = os.executef("git clone .. %s", pkgName) + local z = execQuiet("git clone .. %s -b %s --recurse-submodules", pkgName, branch) if not z then error("clone failed", 0) end os.chdir(pkgName) - z = os.executef("git checkout %s", branch) - if not z then - error("unable to checkout branch " .. branch, 0) - end +-- +-- Bootstrap Premake in the newly cloned repository +-- - z = os.executef("git submodule update --init") + print("Bootstraping Premake...") + if os.ishost("windows") then + z = execQuiet("Bootstrap.bat") + else + local os_map = { + linux = "linux", + macosx = "osx", + } + z = execQuiet("make -j -f Bootstrap.mak %s", os_map[os.host()]) + end if not z then - error("unable to clone submodules", 0) + error("Failed to Bootstrap Premake", 0) end + local premakeBin = path.translate("bin/release/Premake5") --
Display of path was not working properly in playback/record in windows
@@ -48,6 +48,7 @@ int g_playback_mode = 0; char g_recordings_dir[PATH_MAX]; char g_recording_filename[PATH_MAX]; char g_recording_fullpath[PATH_MAX]; +CHAR16 g_recording_fullpath_u[PATH_MAX]; typedef enum { DefaultMode, @@ -79,6 +80,8 @@ EFI_STATUS init_protocol_shell_parameters_protocol(int argc, char *argv[]) char *p_tok_context = NULL; int new_argv_index = 1; int stripped_args = 0; + int x = 0; + UINTN length = 0; if (argc > MAX_INPUT_PARAMS) { return EFI_INVALID_PARAMETER; } @@ -187,8 +190,12 @@ EFI_STATUS init_protocol_shell_parameters_protocol(int argc, char *argv[]) if (g_playback_mode || g_record_mode) { if (DefaultMode == g_rec_file_creation_mode || UserSpecifiedDir == g_rec_file_creation_mode) + { + length = strlen(g_recordings_dir); + if (g_recordings_dir[length - 1] != '/') { strcat_s(g_recordings_dir, PATH_MAX, "/"); + } os_mkdir(g_recordings_dir); strcpy_s(g_recording_fullpath, PATH_MAX, g_recordings_dir); strcat_s(g_recording_fullpath, PATH_MAX, g_recording_filename); @@ -199,6 +206,18 @@ EFI_STATUS init_protocol_shell_parameters_protocol(int argc, char *argv[]) os_mkdir(g_recording_fullpath); } + length = strlen(g_recording_fullpath); + for (x = 0; x < length; x++) + { +#ifdef _MSC_VER + if (g_recording_fullpath[x] == '/') g_recording_fullpath[x] = '\\'; +#else + if (g_recording_fullpath[x] == '\\') g_recording_fullpath[x] = '/'; +#endif + } + + AsciiStrnToUnicodeStrS(g_recording_fullpath, PATH_MAX, g_recording_fullpath_u, PATH_MAX, &length); + if (g_record_mode) { EFI_STATUS rc; @@ -206,25 +225,25 @@ EFI_STATUS init_protocol_shell_parameters_protocol(int argc, char *argv[]) //are consolidated to the same file. if (EFI_SUCCESS != (rc = init_record_file(g_recording_fullpath))) { - wprintf(L"Failed to initialize the following recording file.\n%s\n", g_recording_fullpath); + wprintf(L"Failed to initialize the following recording file.\n" FORMAT_STR L"\n", g_recording_fullpath_u); return EFI_LOAD_ERROR; } else { - wprintf(L"Recording to file: %s\n", g_recording_fullpath); + wprintf(L"Recording to file: " FORMAT_STR L"\n", g_recording_fullpath_u); } } if (g_playback_mode) { - if (-1 == access(g_recording_fullpath, F_OK)) + if (-1 == access(g_recording_fullpath_u, F_OK)) { - wprintf(L"The following playback file does not exist.\n%s\n", g_recording_fullpath); + wprintf(L"The following playback file does not exist.\n" FORMAT_STR L"\n", g_recording_fullpath_u); return EFI_LOAD_ERROR; } else { - wprintf(L"Playing back from file: %s\n", g_recording_fullpath); + wprintf(L"Playing back from file: " FORMAT_STR L"\n", g_recording_fullpath_u); } } }
Don't set Xiaomi battery automatically to 100 %, wait for reports Use null if unknown.
@@ -2158,7 +2158,7 @@ static int sqliteLoadAllSensorsCallback(void *user, int ncols, char **colval , c if (!sensor.modelId().startsWith(QLatin1String("lumi.ctrl_ln2"))) { item = sensor.addItem(DataTypeUInt8, RConfigBattery); - item->setValue(100); + //item->setValue(100); // wait for report } if (!sensor.item(RStateTemperature) &&
fix ide compile error
@@ -210,10 +210,10 @@ G_END_DECLS #define SUPPORT_PC9821 #define SUPPORT_CRT31KHZ #endif -#define SUPPORT_IDEIO #else #define SUPPORT_CRT15KHZ #endif +#define SUPPORT_IDEIO #if !defined(SUPPORT_PC9821) #define SUPPORT_BMS #endif
Update doc/std/image-decoders.md
@@ -21,7 +21,7 @@ wuffs_base__io_buffer src = etc; wuffs_gif__decoder* dec = etc; wuffs_base__image_config ic; -const char* status = wuffs_gif__decoder__decode_image_config(dec, &ic, &src); +wuffs_base__status status = wuffs_gif__decoder__decode_image_config(dec, &ic, &src); // Error checking (inspecting the status variable) is not shown, for brevity. // See the example programs, listed below, for how to handle errors. @@ -31,7 +31,7 @@ wuffs_base__pixel_buffer pb = etc; while (true) { wuffs_base__frame_config fc; status = wuffs_gif__decoder__decode_frame_config(dec, &fc, &src); - if (status == wuffs_base__note__end_of_data) { + if (status.repr == wuffs_base__note__end_of_data) { break; } // Ditto re error checking. @@ -113,12 +113,18 @@ caller can go back to the `decode_image_config` method. ## Implementations +- [std/bmp](/std/bmp) - [std/gif](/std/gif) +- [std/nie](/std/nie) +- [std/png](/std/png) +- [std/wbmp](/std/wbmp) ## Examples +- [example/convert-to-nia](/example/convert-to-nia) - [example/gifplayer](/example/gifplayer) +- [example/imageviewer](/example/imageviewer) Examples in other repositories:
do not reconnect if there is a FatalError
@@ -14,6 +14,7 @@ import { SSEOptions, PokeHandlers, Message, + FatalError, } from './types'; import { hexString } from './utils'; @@ -291,7 +292,7 @@ export class Urbit { }, onerror: (error) => { console.warn(error); - if (this.errorCount++ < 4) { + if (!(error instanceof FatalError) && this.errorCount++ < 4) { this.onRetry && this.onRetry(); return Math.pow(2, this.errorCount - 1) * 750; } @@ -311,6 +312,9 @@ export class Urbit { * */ reset() { + if(this.verbose) { + console.log('resetting'); + } this.delete(); this.abort.abort(); this.abort = new AbortController();
Updated last four PMU functions to return void.
@@ -185,12 +185,12 @@ __STATIC_INLINE uint32_t ARM_PMU_Get_CCNTR(void); __STATIC_INLINE uint32_t ARM_PMU_Get_EVCNTR(uint32_t num); __STATIC_INLINE uint32_t ARM_PMU_CNTR_Get_OVSSET(uint32_t mask); -__STATIC_INLINE uint32_t ARM_PMU_CNTR_Set_OVSCLR(uint32_t mask); +__STATIC_INLINE void ARM_PMU_CNTR_Set_OVSCLR(uint32_t mask); -__STATIC_INLINE uint32_t ARM_PMU_Set_INTSET(uint32_t mask); -__STATIC_INLINE uint32_t ARM_PMU_Set_INTCLR(uint32_t mask); +__STATIC_INLINE void ARM_PMU_Set_INTSET(uint32_t mask); +__STATIC_INLINE void ARM_PMU_Set_INTCLR(uint32_t mask); -__STATIC_INLINE uint32_t ARM_PMU_CNTR_Increment(uint32_t mask); +__STATIC_INLINE void ARM_PMU_CNTR_Increment(uint32_t mask); /** \brief Enable the PMU @@ -295,7 +295,7 @@ __STATIC_INLINE uint32_t ARM_PMU_Get_CNTR_OVS(void) - event counters (0-30) - cycle counter */ -__STATIC_INLINE uint32_t ARM_PMU_Set_CNTR_OVS(uint32_t mask) +__STATIC_INLINE void ARM_PMU_Set_CNTR_OVS(uint32_t mask) { PMU->OVSCLR = mask; } @@ -307,7 +307,7 @@ __STATIC_INLINE uint32_t ARM_PMU_Set_CNTR_OVS(uint32_t mask) - event counters (0-30) - cycle counter */ -__STATIC_INLINE uint32_t ARM_PMU_Set_CNTR_IRQ_Enable(uint32_t mask) +__STATIC_INLINE void ARM_PMU_Set_CNTR_IRQ_Enable(uint32_t mask) { PMU->INTENSET = mask; } @@ -319,7 +319,7 @@ __STATIC_INLINE uint32_t ARM_PMU_Set_CNTR_IRQ_Enable(uint32_t mask) - event counters (0-30) - cycle counter */ -__STATIC_INLINE uint32_t ARM_PMU_Set_CNTR_IRQ_Disable(uint32_t mask) +__STATIC_INLINE void ARM_PMU_Set_CNTR_IRQ_Disable(uint32_t mask) { PMU->INTENCLR = mask; } @@ -329,7 +329,7 @@ __STATIC_INLINE uint32_t ARM_PMU_Set_CNTR_IRQ_Disable(uint32_t mask) \param [in] mask Counters to increment \note Software increment bits for one or more event counters (0-30) */ -__STATIC_INLINE uint32_t ARM_PMU_CNTR_Increment(uint32_t mask) +__STATIC_INLINE void ARM_PMU_CNTR_Increment(uint32_t mask) { PMU->SWINC = mask; }
clean depended on distclean => now it's otherway round
@@ -224,6 +224,7 @@ $(PICOBJDIR)/%.o : $(LIBDIR)/%.c # Linking $(BINDIR)/$(AGENT): create_obj_dir_structure $(AGENT_OBJECTS) $(BINDIR) + @echo "Linking: $(BIN_PATH) " @$(LINKER) $(AGENT_OBJECTS) $(AGENT_LFLAGS) -o $@ @echo "Linking "$@" complete!" @@ -622,7 +623,7 @@ create_picobj_dir_structure: $(PICOBJDIR) # Cleaners .PHONY: clean -clean: cleanobj cleanapi cleanpackage cleantest distclean +clean: cleanobj cleanapi cleanpackage cleantest .PHONY: cleanobj cleanobj: @@ -667,7 +668,7 @@ cleanpackage: cleantest: @$(rm) -r $(TESTBINDIR) -.PHONY: distclean +.PHONY: distclean clean distclean: cleanobj @$(rm) -r $(BINDIR) @$(rm) -r $(MANDIR)
doccords: deco remove double comment
:> %hello :> %world :> -++ say-goodbye :< say bye to someone +++ say-goodbye :> describe product of function :> |= :> .txt: departing friend
Update SceFace (add some NIDs)
@@ -1085,6 +1085,8 @@ modules: sceFaceAttribute: 0x67F0585A sceFaceAttributeGetWorkingMemorySize: 0xA905A467 sceFaceDetection: 0xF3045394 + sceFaceDetectionEx: 0xD9603C69 + sceFaceDetectionGetDefaultParam: 0xE5689BD1 sceFaceDetectionGetWorkingMemorySize: 0xF24B851D sceFaceDetectionLocal: 0x7D71725D sceFaceEstimatePoseRegion: 0xF7E4EC1F
Disable fork safety by default.
@@ -82,7 +82,7 @@ option(OPTION_BUILD_SCRIPTS "Build scripts." ON) option(OPTION_BUILD_SERIALS "Build serials." ON) option(OPTION_BUILD_DETOURS "Build detours." ON) option(OPTION_BUILD_PORTS "Build ports." OFF) -option(OPTION_FORK_SAFE "Enable fork safety." ON) +option(OPTION_FORK_SAFE "Enable fork safety." OFF) option(OPTION_THREAD_SAFE "Enable thread safety." OFF) option(OPTION_COVERAGE "Enable coverage." OFF)
refactor: improve the code clarity
void ** ntl_malloc_init (size_t nelems, size_t elem_size, void (*init)(void * elem_p)) { - char * p = (char *)malloc((nelems + 1) * sizeof(void *) // indices + void ** p = malloc((nelems + 1) * sizeof(void *) // indices + nelems * elem_size); // elements - char * elem_start = p + (nelems + 1) * sizeof(void *); - void ** array = (void **)p; + char * elem_start = (char *)(p + nelems + 1); size_t i; for (i = 0; i < nelems; i++) { + p[i] = (void *)elem_start; if (init) - init(elem_start); + init(p[i]); - array[i] = (void *)elem_start; elem_start += elem_size; } - array[i] = 0; - return array; + p[nelems] = 0; + return p; } void ** @@ -33,7 +32,7 @@ void ** ntl_calloc_init (size_t nelems, size_t elem_size, void (*init)(void * elem_p)) { void ** p = ntl_malloc_init(nelems, elem_size, NULL); - char * elem_start = (char *)p + ((nelems + 1) * sizeof(void *)); + char * elem_start = (char *)(p + nelems + 1); memset(elem_start, 0, nelems * elem_size); if (init) { for (int i = 0; p[i]; i++)
proxy: exposed resp:elapsed() I'm a bit concerned that the compile warning popped up only after I started changing something else. Need to upgrade my OS again? :(
@@ -984,6 +984,7 @@ int proxy_register_libs(void *ctx, LIBEVENT_THREAD *t, void *state) { {"vlen", mcplib_response_vlen}, {"code", mcplib_response_code}, {"line", mcplib_response_line}, + {"elapsed", mcplib_response_elapsed}, {"__gc", mcplib_response_gc}, {NULL, NULL} };
py/objobject: object___init__: Accept (and ignore) any args. In CPython, whether function accepts just 1 arg, or any depends on whether object's type defines __init__ method (if not, any args are accepted). TODO: Re-add such a check.
@@ -42,11 +42,13 @@ STATIC mp_obj_t object_make_new(const mp_obj_type_t *type, size_t n_args, size_t } #if MICROPY_CPYTHON_COMPAT -STATIC mp_obj_t object___init__(mp_obj_t self) { - (void)self; +STATIC mp_obj_t object___init__(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs) { + (void)n_args; + (void)args; + (void)kwargs; return mp_const_none; } -STATIC MP_DEFINE_CONST_FUN_OBJ_1(object___init___obj, object___init__); +STATIC MP_DEFINE_CONST_FUN_OBJ_KW(object___init___obj, 1, object___init__); STATIC mp_obj_t object___new__(size_t n_args, const mp_obj_t *args, mp_map_t *kwargs) { size_t n_kw = kwargs->used;
Fix compile errors encountered on Windows.
@@ -202,9 +202,23 @@ avtANSYSFileFormat::ActivateTimestep() // Changed interface to InterpretFormatString to accept field count arg. // **************************************************************************** +int +get_errno() +{ + int eno = 0; +#ifdef WIN32 + _get_errno(&eno); +#else + eno = errno; +#endif + return eno; +} + + + #define CHECK_COORD_COMPONENT(Coord) \ do { \ - int _errno = errno; \ + int _errno = get_errno(); \ char msg[512] = "Further warnings will be supressed"; \ if (_errno != 0 && invalidCoordCompWarning++ < 5) \ { \ @@ -674,7 +688,7 @@ avtANSYSFileFormat::InterpretFormatString(char *line, int numFields, expectedLineLength = 0; bool keepGoing = true; bool first = true; - bool isStdNBLOCKFmt = numFields==6 && strncasecmp(line, "(3i8,6e16.9)", 12)==0; + bool isStdNBLOCKFmt = numFields==6 && STRNCASECMP(line, "(3i8,6e16.9)", 12)==0; while(keepGoing) { int linelen = 0;
BugID:17865306: Allow to build apps that moved to test/develop
@@ -20,6 +20,7 @@ COMPONENT_DIRECTORIES := . \ network \ tools \ test \ + test/develop \ device \ security @@ -280,7 +281,7 @@ $(foreach comp, $(COMPONENTS), $(if $(wildcard $(APPDIR)/$(comp) $(CUBE_AOS_DIR) # Find the matching platform and application from the build string components PLATFORM_FULL :=$(strip $(foreach comp,$(subst .,/,$(COMPONENTS)),$(if $(wildcard $(SOURCE_ROOT)board/$(comp)),$(comp),))) -APP_FULL :=$(strip $(foreach comp,$(subst .,/,$(COMPONENTS)),$(if $(wildcard $(APPDIR)/$(comp) $(SOURCE_ROOT)app/example/$(comp) $(SOURCE_ROOT)app/profile/$(comp) $(SOURCE_ROOT)$(comp)),$(comp),))) +APP_FULL :=$(strip $(foreach comp,$(subst .,/,$(COMPONENTS)),$(if $(wildcard $(APPDIR)/$(comp) $(SOURCE_ROOT)app/example/$(comp) $(SOURCE_ROOT)app/profile/$(comp) $(SOURCE_ROOT)$(comp) $(SOURCE_ROOT)test/develop/$(comp)),$(comp),))) PLATFORM :=$(notdir $(PLATFORM_FULL)) APP :=$(notdir $(APP_FULL))
Look at color-supported for Color key in TXT record (Issue
@@ -1928,7 +1928,7 @@ register_printer( if (!is_print3d) { TXTRecordSetValue(&ipp_txt, "product", (uint8_t)strlen(product), product); - TXTRecordSetValue(&ipp_txt, "Color", 1, printer->pinfo.ppm_color ? "T" : "F"); + TXTRecordSetValue(&ipp_txt, "Color", 1, ippGetBoolean(ippFindAttribute(printer->pinfo.attrs, "color-supported", IPP_TAG_BOOLEAN), 0) ? "T" : "F"); TXTRecordSetValue(&ipp_txt, "Duplex", 1, printer->pinfo.duplex ? "T" : "F"); if (printer->pinfo.make) TXTRecordSetValue(&ipp_txt, "usb_MFG", (uint8_t)strlen(printer->pinfo.make), printer->pinfo.make);
fixed, added cmake variables to mark as advanced and separated mark as advanced into 2 categories
@@ -398,6 +398,12 @@ set ( mark_as_advanced ( FORCE # The following settings might be relevant to a few users: + DISCOUNT_DIR + DREDD_EXECUTABLE + GO_EXECUTABLE + Qt5QmlModels_DIR + TARGET_LUA_CMOD_FOLDER + TARGET_LUA_LMOD_FOLDER GTEST_ROOT BUILD_GMOCK BUILD_GTEST @@ -417,6 +423,8 @@ mark_as_advanced ( LIBGCRYPT_INCLUDE_DIR XercesC_DIR OPENSSL_INCLUDE_DIR +) +mark_as_advanced_protected_from_user ( LUA_EXECUTABLE # The following settings are internal (not to be changed by users): FEDORA CARGO_EXECUTABLE @@ -473,4 +481,5 @@ mark_as_advanced ( GLib_LIBRARY LibGit2_VERSION_HEADER libuv_VERSION_HEADER - Qt5Svg_DIR) + Qt5Svg_DIR +)
Do not strip PYTEST binaries built with -d Note: mandatory check (NEED_CHECK) was skipped
@@ -912,7 +912,9 @@ module PYTEST_BIN: PYTEST_COMMON { ### Is only used together with the macro END() ### Documentation: https://wiki.yandex-team.ru/yatool/test/#testynapytest module PYTEST: PYTEST_BIN { - + when ($BUILD_TYPE == "DEBUG") { + NO_STRIP=yes + } } module GTEST: BASE_PROGRAM {
bugfix for legacy board
@@ -21,7 +21,7 @@ int detect_with_pull(GPIO_TypeDef *GPIO, int pin, int mode) { set_gpio_pullup(GPIO, pin, mode); for (volatile int i=0; i<PULL_EFFECTIVE_DELAY; i++); int ret = get_gpio_input(GPIO, pin); - set_gpio_pullup(GPIOB, pin, PULL_NONE); + set_gpio_pullup(GPIO, pin, PULL_NONE); return ret; } @@ -45,6 +45,11 @@ void detect() { // check if the ESP is trying to put me in boot mode is_entering_bootmode = !detect_with_pull(GPIOB, 0, PULL_UP); +#else + // need to do this for early detect + is_giant_panda = 0; + revision = PANDA_REV_AB; + is_entering_bootmode = 0; #endif } @@ -417,9 +422,9 @@ void early() { GPIOA->ODR = 0; GPIOB->ODR = 0; GPIOC->ODR = 0; GPIOA->PUPDR = 0; GPIOB->PUPDR = 0; GPIOC->PUPDR = 0; - #ifdef PANDA detect(); + #ifdef PANDA // enable the ESP, disable ESP boot mode // unless we are on a giant panda, then there's no ESP if (is_giant_panda) {
Update highlevel-bindings.md
@@ -33,7 +33,7 @@ preserving the goals. If you decide to write a binding, proceed with this tutorial. If not, designing an API to meet our goals is up to you. While designing the API you should keep in mind that you can -always utilise the code-generator like the C API does. +always use code-generator (`kdb gen`) templates like the C API does. ## How to write Bindings
Support Xiaomi special attribute 0xff02 (2) Fix processing the attribute, the reading of 'length' is only used by datatype character string.
@@ -8119,7 +8119,11 @@ void DeRestPluginPrivate::handleZclAttributeReportIndicationXiaomiSpecial(const quint16 a; stream >> a; stream >> dataType; + + if (dataType == deCONZ::ZclCharacterString) + { stream >> length; + } if (a == 0xff01 && dataType == deCONZ::ZclCharacterString) {
Improved PHP configure test.
# Copyright (C) NGINX, Inc. +$echo "checking for PHP ..." >> $NXT_AUTOCONF_ERR + +nxt_found=no + NXT_PHP_CONFIG="${NXT_PHP}-config" + +if /bin/sh -c "${NXT_PHP_CONFIG} --version" >> $NXT_AUTOCONF_ERR 2>&1; then + NXT_PHP_VERSION="`${NXT_PHP_CONFIG} --version`" NXT_PHP_INCLUDE="`${NXT_PHP_CONFIG} --includes`" NXT_PHP_LIB="-lphp${NXT_PHP_VERSION%%.*}" @@ -14,7 +21,8 @@ nxt_feature_name=NXT_HAVE_PHP nxt_feature_run=no nxt_feature_incs="${NXT_PHP_INCLUDE}" nxt_feature_libs="${NXT_PHP_LIB} ${NXT_PHP_LIBS}" -nxt_feature_test="#include <php.h> + nxt_feature_test=" + #include <php.h> #include <php_main.h> int main() { @@ -23,15 +31,17 @@ nxt_feature_test="#include <php.h> }" . auto/feature +fi if [ $nxt_found = no ]; then + $echo "checking for PHP ..." $echo - $echo $0: error: no php found. + $echo $0: error: no PHP found. $echo exit 1; fi -$echo " + php version: ${NXT_PHP_VERSION}" +$echo " + PHP version: ${NXT_PHP_VERSION}" NXT_PHP_MODULE_SRCS=" \ src/nxt_php_sapi.c \
Fix PhGetRemoteMappedImageDirectoryEntry reading invalid image data
@@ -656,6 +656,7 @@ BOOLEAN PhGetRemoteMappedImageDirectoryEntry( NTSTATUS status; PIMAGE_DATA_DIRECTORY dataDirectory; PVOID dataBuffer; + PVOID dataLength; if (RemoteMappedImage->Magic == IMAGE_NT_OPTIONAL_HDR32_MAGIC) { @@ -684,13 +685,17 @@ BOOLEAN PhGetRemoteMappedImageDirectoryEntry( return FALSE; } - dataBuffer = PhAllocate(dataDirectory->Size); + if (!(dataDirectory->VirtualAddress && dataDirectory->Size)) + return FALSE; + + dataLength = dataDirectory->Size; + dataBuffer = PhAllocate(dataLength); status = ReadVirtualMemoryCallback( ProcessHandle, PTR_ADD_OFFSET(RemoteMappedImage->ViewBase, dataDirectory->VirtualAddress), dataBuffer, - dataDirectory->Size, + dataLength, NULL ); @@ -700,10 +705,10 @@ BOOLEAN PhGetRemoteMappedImageDirectoryEntry( return FALSE; } + if (DataBuffer) *DataBuffer = dataBuffer; - if (DataLength) - *DataLength = dataDirectory->Size; + *DataLength = dataLength; return TRUE; }
Removing extra fields, MVP is signal quality parameters
@@ -530,7 +530,6 @@ definitions: If a cell modem is present on a piksi device, this message will be send periodically to update the host on the status of the modem and its various parameters. - AT+CPIN? AT+CCID AT+CSQ AT+CREG? AT+CGREG? AT+COPS? fields: - signal_strength: type: s8 @@ -539,18 +538,7 @@ definitions: - signal_error_rate: type: float desc: BER as reported by the modem, zero translates to unknown - - sim_id: - type: string - size: 24 - desc: The unique ID of sim card installed (ICCID or other similiar) - - network_operator: - type: string - size: 28 - desc: Currently reported network operator - - sim_status: - type: string - desc: Current status of sim whether inserted, ready, etc. - - unspecified: + - reserved: type: array fill: u8 desc: Unspecified data TBD for this schema
zephyr: sample: Add flash for full.bin Previous commits added the full.bin target. Add a flash_full target to be able to flash this full image for testing.
@@ -142,6 +142,9 @@ flash_hello1: flash_hello2: $(PYOCD_FLASHTOOL) -a 0x80000 signed-hello2.bin +flash_full: + $(PYOCD_FLASHTOOL) -ce -a 0 full.bin + check: @if [ -z "$$ZEPHYR_BASE" ]; then echo "Zephyr environment not set up"; false; fi @if [ -z "$(BOARD)" ]; then echo "You must specity BOARD=<board>"; false; fi
VirtualScroller: correct lazy loading with small chats Fixes urbit/landscape#523
@@ -119,12 +119,14 @@ export default class VirtualScroller<T> extends Component<VirtualScrollerProps<T } componentDidMount() { - if(true) { + if(this.props.size < 100) { + this.loaded.top = true; + this.loaded.bottom = true; + } + this.updateVisible(0); this.resetScroll(); this.loadRows(false); - return; - } } // manipulate scrollbar manually, to dodge change detection @@ -449,9 +451,8 @@ export default class VirtualScroller<T> extends Component<VirtualScrollerProps<T const transform = isTop ? 'scale3d(1, 1, 1)' : 'scale3d(1, -1, 1)'; - const loaded = this.props.data.size > 0; - const atStart = loaded && this.props.data.peekLargest()?.[0].eq(visibleItems.peekLargest()?.[0] || bigInt.zero); + const atStart = (this.props.data.peekLargest()?.[0] ?? bigInt.zero).eq(visibleItems.peekLargest()?.[0] || bigInt.zero); const atEnd = this.loaded.top; return (
ci: test_idf_tools use system python
@@ -204,20 +204,25 @@ test_idf_py: - cd ${IDF_PATH}/tools/test_idf_py - ./test_idf_py.py +# Test for create virtualenv. It must be invoked from Python, not from virtualenv. +# Use docker image system python without any extra dependencies test_idf_tools: - extends: .host_test_template + extends: + - .host_test_template + - .before_script_minimal artifacts: when: on_failure paths: - tools/tools.new.json - tools/test_idf_tools/test_python_env_logs.txt expire_in: 1 week + image: + name: $ESP_ENV_IMAGE + entrypoint: [""] # use system python3. no extra pip package installed script: - # Remove Xtensa and ULP toolchains from the PATH, tests will expect a clean environment - - export PATH=$(p=$(echo $PATH | tr ":" "\n" | grep -v "/root/.espressif/tools\|/opt/espressif" | tr "\n" ":"); echo ${p%:}) - cd ${IDF_PATH}/tools/test_idf_tools - - ./test_idf_tools.py - # Test for create virtualenv. It must be invoked from Python, not from virtualenv. + - python3 -m pip install jsonschema + - python3 ./test_idf_tools.py - python3 ./test_idf_tools_python_env.py .test_efuse_table_on_host_template:
crypto: improve ipsecmb engine performance Type: improvement This patch improves ipsecmb engine performance by disabling safety features: SAFE_DATA, SAFE_PARAM, and SAFE_LOOKUP.
@@ -30,6 +30,9 @@ endef define ipsec-mb_build_cmds @make -C $(ipsec-mb_src_dir) -j \ SHARED=n \ + SAFE_PARAM=n \ + SAFE_LOOKUP=n \ + SAFE_DATA=n \ PREFIX=$(ipsec-mb_install_dir) \ NASM=$(ipsec-mb_install_dir)/bin/nasm \ EXTRA_CFLAGS="-g -msse4.2" > $(ipsec-mb_build_log)
Fix typo in platform name
{ "version": 1, - "platform-name": "discrete_pci3", + "platform-name": "discrete_pcie3", "description": "First generation CCI-P-based discrete PCIe Gen3 cards", "comment": [
config tool:add debug mode limitation for PMU In release mode, "GUEST_FLAG_PMU_PASSTHROUGH" is not generated for specific VM.
@@ -22,7 +22,7 @@ policies = [ GuestFlagPolicy(".//nested_virtualization_support = 'y'", "GUEST_FLAG_NVMX_ENABLED"), GuestFlagPolicy(".//security_vm = 'y'", "GUEST_FLAG_SECURITY_VM"), GuestFlagPolicy(".//vm_type = 'RTVM'", "GUEST_FLAG_RT"), - GuestFlagPolicy(".//vm_type = 'RTVM' and .//load_order = 'PRE_LAUNCHED_VM'", "GUEST_FLAG_PMU_PASSTHROUGH"), + GuestFlagPolicy(".//vm_type = 'RTVM' and .//load_order = 'PRE_LAUNCHED_VM' and //hv/BUILD_TYPE= 'debug'", "GUEST_FLAG_PMU_PASSTHROUGH"), GuestFlagPolicy(".//vm_type = 'TEE_VM'", "GUEST_FLAG_TEE"), GuestFlagPolicy(".//vm_type = 'REE_VM'", "GUEST_FLAG_REE"), ]
Docs deploy badge.
# Zephyr Mechanical Keyboard (ZMK) Firmware +[![Netlify Status](https://api.netlify.com/api/v1/badges/942d61a9-87c0-4c23-9b51-f5ed0bce495d/deploy-status)](https://app.netlify.com/sites/zmk/deploys) + This project is a complete work in progress, with absolutely nothing functioning yet. The goal is to explore a new MK firmware with a less restritive license and better BLE support, built on top of the [Zephyr Project](https://www.zephyrproject.org/)
Support flash progress at 160x120 res
@@ -38,11 +38,11 @@ struct { void draw() { if(!this->message.empty()) { screen.pen = Pen(0, 0, 0, 150); - screen.rectangle(Rect(0, 215, 320, 25)); + screen.rectangle(Rect(0, screen.bounds.h - 25, screen.bounds.w, 25)); screen.pen = Pen(255, 255, 255); - screen.text(this->message, minimal_font, Point(5, 220)); - uint32_t progress_width = ((this->value * 310) / this->total); - screen.rectangle(Rect(5, 230, progress_width, 5)); + screen.text(this->message, minimal_font, Point(5, screen.bounds.h - 20)); + uint32_t progress_width = ((this->value * (screen.bounds.w - 10)) / this->total); + screen.rectangle(Rect(5, screen.bounds.h - 10, progress_width, 5)); } } } progress;
Unclash clashing reason codes in ssl.h
@@ -2650,7 +2650,7 @@ int ERR_load_SSL_strings(void); # define SSL_R_INAPPROPRIATE_FALLBACK 373 # define SSL_R_INCONSISTENT_COMPRESSION 340 # define SSL_R_INCONSISTENT_EXTMS 104 -# define SSL_R_INVALID_ALERT 205 +# define SSL_R_INVALID_ALERT 209 # define SSL_R_INVALID_COMMAND 280 # define SSL_R_INVALID_COMPRESSION_ALGORITHM 341 # define SSL_R_INVALID_CONFIGURATION_NAME 113 @@ -2675,7 +2675,7 @@ int ERR_load_SSL_strings(void); # define SSL_R_MISSING_RSA_SIGNING_CERT 170 # define SSL_R_MISSING_SIGALGS_EXTENSION 112 # define SSL_R_MISSING_SRP_PARAM 358 -# define SSL_R_MISSING_SUPPORTED_GROUPS_EXTENSION 209 +# define SSL_R_MISSING_SUPPORTED_GROUPS_EXTENSION 214 # define SSL_R_MISSING_TMP_DH_KEY 171 # define SSL_R_MISSING_TMP_ECDH_KEY 311 # define SSL_R_NOT_ON_RECORD_BOUNDARY 182
Fix a leftover in a tutorial
@@ -291,10 +291,10 @@ Note that `errno` is set to `ETIMEDOUT` if the deadline is reached. Since we're Now note that the third connection to the greetserver is closed immediately without even given user a chance to enter their name. This is a common use case for network servers. When the server is being shut down we want it to stop accepting new connections, but we also want to give it some time to finish handling those connections that are still open. -This can be achieved by calling `hdone()` on the `dialogue()` coroutine bundle. `hdone()` waits for all the coroutines in the bundle to finish. Also, it allows to specify a deadline. We can do so immediately after exiting the loop: +This can be achieved by calling `bundle_wait()` on the `dialogue()` coroutine bundle. `bundle_wait()` waits for all the coroutines in the bundle to finish. Also, it allows to specify a deadline. We can do so immediately after exiting the loop: ```c -rc = hdone(b, now() + 10000); +rc = bundle_wait(b, now() + 10000); assert(rc == 0 || (rc < 0 && errno == ETIMEDOUT)); ```
feat(L503): fix L503 platone demo boat_platone_demo.c
@@ -53,9 +53,6 @@ __BOATSTATIC BOAT_RESULT platone_createKeypair(BCHAR *keypairName) UtilityHexToBin(binFormatKey, 32, native_demoKey, TRIMBIN_TRIM_NO, BOAT_FALSE); keypair_config.prikey_content.field_ptr = binFormatKey; keypair_config.prikey_content.field_len = 32; - /* default is internal generation */ - keypair_config.prikey_genMode = BOAT_KEYPAIR_PRIKEY_GENMODE_INTERNAL_GENERATION; - keypair_config.prikey_type = BOAT_KEYPAIR_PRIKEY_TYPE_SECP256K1; /* create platone wallet */ result = BoatKeypairCreate( &keypair_config, keypairName,BOAT_STORE_TYPE_RAM);
mesh/cfg_srv.c: Fix Vendor Model Subscription Get procedure Invalid argument was passed to bt_mesh_model_tree_walk.
@@ -1748,6 +1748,7 @@ static void mod_sub_get_vnd(struct bt_mesh_model *model, struct os_mbuf *buf) { struct os_mbuf *msg = NET_BUF_SIMPLE(BT_MESH_TX_SDU_MAX); + struct mod_sub_list_ctx visit_ctx; struct bt_mesh_model *mod; struct bt_mesh_elem *elem; u16_t company, addr, id; @@ -1789,8 +1790,10 @@ static void mod_sub_get_vnd(struct bt_mesh_model *model, net_buf_simple_add_le16(msg, company); net_buf_simple_add_le16(msg, id); + visit_ctx.msg = msg; + visit_ctx.elem_idx = mod->elem_idx; bt_mesh_model_tree_walk(bt_mesh_model_root(mod), mod_sub_list_visitor, - msg); + &visit_ctx); send_list: if (bt_mesh_model_send(model, ctx, msg, NULL, NULL)) {
[core] mark select http_kv.[ch] funcs attr nonnull
@@ -69,16 +69,24 @@ __attribute_pure__ const char *get_http_method_name(http_method_t i); #if 0 /*(unused)*/ +__attribute_nonnull__ __attribute_pure__ int get_http_version_key(const char *s, size_t slen); #endif +__attribute_nonnull__ __attribute_pure__ http_method_t get_http_method_key(const char *s, size_t slen); +__attribute_nonnull__ void http_status_append(buffer *b, int status); + +__attribute_nonnull__ void http_method_append(buffer *b, http_method_t method); + +__attribute_nonnull__ void http_version_append(buffer *b, http_version_t version); + #define http_method_get_or_head(method) ((method) <= HTTP_METHOD_HEAD) #define http_method_get_head_post(method) ((method) <= HTTP_METHOD_POST)
mcserver: clarify when flush_start is assigned on new connection Tested-by: Mark Nunberg
@@ -633,13 +633,15 @@ Server::start_errored_ctx(State next_state) return; } else { /* Not closed but don't have a current context */ - flush_start = (mcreq_flushstart_fn)server_connect; if (has_pending()) { if (!lcbio_timer_armed(io_timer)) { /* TODO: Maybe throttle reconnection attempts? */ lcbio_timer_rearm(io_timer, default_timeout()); } connect(); + } else { + // Connect once someone actually wants a connection. + flush_start = (mcreq_flushstart_fn)server_connect; } }
Added compressed disp8 calculation for MVEX instructions
@@ -2597,6 +2597,71 @@ static void ZydisSetAVXInformation(ZydisDecoderContext* context, const ZydisInstructionDefinitionMVEX* def = (const ZydisInstructionDefinitionMVEX*)definition; + // Compressed disp8 scale + info->avx.compressedDisp8Scale = 1; + switch (def->functionality) + { + case ZYDIS_MVEX_FUNC_INVALID: + case ZYDIS_MVEX_FUNC_RC: + case ZYDIS_MVEX_FUNC_SAE: + case ZYDIS_MVEX_FUNC_SWIZZLE_32: + case ZYDIS_MVEX_FUNC_SWIZZLE_64: + // Nothing to do here + break; + case ZYDIS_MVEX_FUNC_SF_32: + case ZYDIS_MVEX_FUNC_UF_32: + { + static const uint8_t lookup[8] = + { + 64, 4, 16, 32, 16, 16, 32, 32 + }; + ZYDIS_ASSERT(info->details.mvex.SSS < ZYDIS_ARRAY_SIZE(lookup)); + info->avx.compressedDisp8Scale = lookup[info->details.mvex.SSS]; + break; + } + case ZYDIS_MVEX_FUNC_SI_32: + case ZYDIS_MVEX_FUNC_UI_32: + { + static const uint8_t lookup[8] = + { + 64, 4, 16, 0, 16, 16, 32, 32 + }; + ZYDIS_ASSERT(info->details.mvex.SSS < ZYDIS_ARRAY_SIZE(lookup)); + info->avx.compressedDisp8Scale = lookup[info->details.mvex.SSS]; + break; + } + case ZYDIS_MVEX_FUNC_SF_64: + case ZYDIS_MVEX_FUNC_UF_64: + case ZYDIS_MVEX_FUNC_SI_64: + case ZYDIS_MVEX_FUNC_UI_64: + { + static const uint8_t lookup[3] = + { + 64, 8, 32 + }; + ZYDIS_ASSERT(info->details.mvex.SSS < ZYDIS_ARRAY_SIZE(lookup)); + info->avx.compressedDisp8Scale = lookup[info->details.mvex.SSS]; + break; + } + case ZYDIS_MVEX_FUNC_DF_32: + case ZYDIS_MVEX_FUNC_DI_32: + { + static const uint8_t lookup[8] = + { + 64, 0, 0, 32, 16, 16, 32, 32 + }; + ZYDIS_ASSERT(info->details.mvex.SSS < ZYDIS_ARRAY_SIZE(lookup)); + info->avx.compressedDisp8Scale = lookup[info->details.mvex.SSS]; + break; + } + case ZYDIS_MVEX_FUNC_DF_64: + case ZYDIS_MVEX_FUNC_DI_64: + info->avx.compressedDisp8Scale = 64; + break; + default: + ZYDIS_UNREACHABLE; + } + // Rounding mode, sae, swizzle, convert context->mvex.functionality = def->functionality; switch (def->functionality)
runtime: duplicate ACK detection bug fix
@@ -332,9 +332,11 @@ void tcp_rx_conn(struct trans_entry *e, struct mbuf *m) if (wraps_lt(c->pcb.snd_wl1, seq) || (c->pcb.snd_wl1 == seq && wraps_lte(c->pcb.snd_wl2, ack))) { + uint32_t old_wnd = c->pcb.snd_wnd; c->pcb.snd_wnd = win > 1 ? win - 2 : 0; // reserve 1 byte for FIN and one byte for the sequence number on an RST packet c->pcb.snd_wl1 = seq; c->pcb.snd_wl2 = ack; + if (c->pcb.snd_wnd != old_wnd) c->rep_acks = 0; } if (snd_was_full && !is_snd_full(c))
solidus escaping isn't strictly required
@@ -742,8 +742,7 @@ static void write_safe_str(FIOBJ dest, const FIOBJ str) { } while (len) { char *restrict writer = (char *)t.data; - while (len && - (src[0] > 32 && src[0] != '"' && src[0] != '\\' && src[0] != '/')) { + while (len && (src[0] > 32 && src[0] != '"' && src[0] != '\\')) { len--; writer[end++] = *(src++); }
menu: add uafind to select ua by aor toggling through a list becomes a bit cumbersome with multiple UAs with uafind you can select them by aor
@@ -403,6 +403,30 @@ static int cmd_ua_next(struct re_printf *pf, void *unused) } +static int cmd_ua_find(struct re_printf *pf, void *arg) +{ + const struct cmd_arg *carg = arg; + struct ua *ua = NULL; + + if (str_isset(carg->prm)) { + ua = uag_find_aor(carg->prm); + } + + if (!ua) { + warning("menu: ua_find failed: %s\n", carg->prm); + return ENOENT; + } + + re_hprintf(pf, "ua: %s\n", ua_aor(ua)); + + uag_current_set(ua); + + update_callstatus(); + + return 0; +} + + static int print_commands(struct re_printf *pf, void *unused) { (void)unused; @@ -456,6 +480,7 @@ static const struct cmd cmdv[] = { {NULL, KEYCODE_ESC,0, "Hangup call", cmd_hangup }, {"uanext", 'T', 0, "Toggle UAs", cmd_ua_next }, {"uanew", 0, CMD_PRM, "Create User-Agent", create_ua }, +{"uafind", 0, CMD_PRM, "Find User-Agent <aor>", cmd_ua_find }, {"ausrc", 0, CMD_IPRM, "Switch audio source", switch_audio_source }, {"auplay", 0, CMD_IPRM, "Switch audio player", switch_audio_player }, {"about", 0, 0, "About box", about_box },
Split armv7 into armv7 and armv7hf
@@ -35,7 +35,7 @@ function(printopt optName optVal optArch tgtArch) endif() endfunction() -set(VALID_ARCH aarch64 armv7 x64) +set(VALID_ARCH aarch64 armv7 armv7hf x64) set(ARCH x64 CACHE STRING "Target architecture") set_property(CACHE ARCH PROPERTY STRINGS ${VALID_ARCH}) @@ -66,8 +66,8 @@ if(${ISA_SSE2} AND ${ARCH} MATCHES "x64") endif() option(ISA_NEON "Enable builds for NEON SIMD") -printopt("NEON" ${ISA_NEON} "armv7|aarch64" ${ARCH}) -if(${ISA_NEON} AND ${ARCH} MATCHES "armv7|aarch64") +printopt("NEON" ${ISA_NEON} "armv7|armv7hf|aarch64" ${ARCH}) +if(${ISA_NEON} AND ${ARCH} MATCHES "armv7|armv7hf|aarch64") set(ANY_ISA 1) endif() @@ -110,26 +110,31 @@ endif() # or it gets overriden (this contradicts the official docs) if(${ARCH} MATCHES "aarch64") set(CMAKE_OSX_ARCHITECTURES "arm64") -elseif(${ARCH} MATCHES "armv7") +elseif(${ARCH} MATCHES "armv7|armv7hf") set(CMAKE_OSX_ARCHITECTURES "armv7") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv7-a") if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - # using Clang + # Using Clang set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon-vfpv4") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-command-line-argument") set(CMAKE_CXX_FLAGS_RELEASE "-O3") elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - # using GCC + # Using GCC + if(${ARCH} STREQUAL "armv7") # softfp for arm-linux-gnueabi-g++ - # hard for arm-linux-gnueabihf-g++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfloat-abi=softfp") - # arm-linux-gnueabi(hf)-gcc uses #pragma GCC target ("fpu=neon-fp-armv8") - # to declare more intrinsics (including vminnmq/vmaxnmq) + elseif(${ARCH} STREQUAL "armv7hf") + # hard for arm-linux-gnueabihf-g++ + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfloat-abi=hard") + endif() + + # Using fpu=neon-fp-armv8 emulates many aarch64 intrinsics set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon-fp-armv8") - # support fp16 in GCC + + # Enable fp16 support in GCC set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfp16-format=ieee") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flax-vector-conversions") - # For Source/tinyexr.h:11025 + + # Workaround for Source/tinyexr.h:11025 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-type-limits") endif() else()
chunk-trace: check return value of flb_sds_printf.
@@ -267,13 +267,19 @@ struct flb_chunk_trace *flb_chunk_trace_new(struct flb_input_chunk *chunk) return NULL; } + trace->trace_id = flb_sds_create(""); + if (flb_sds_printf(&trace->trace_id, "%s%d", trace->ctxt->trace_prefix, + trace->ctxt->trace_count++) == NULL) { + pthread_mutex_unlock(&f_ins->chunk_trace_lock); + flb_sds_destroy(trace->trace_id); + flb_free(trace); + return NULL; + } + trace->ctxt = f_ins->chunk_trace_ctxt; flb_chunk_trace_add(trace->ctxt); trace->ic = chunk; - trace->trace_id = flb_sds_create(""); - flb_sds_printf(&trace->trace_id, "%s%d", trace->ctxt->trace_prefix, - trace->ctxt->trace_count++); pthread_mutex_unlock(&f_ins->chunk_trace_lock); return trace;
Do serial setup earlier: int 14h spoils DS register on Hyper-V.
@@ -8,6 +8,11 @@ init: bits 16 org base + ;; serial setup + mov ax, 0x00e3 ; AH = 0, AL = 9600 baud, 8N1 + xor dx, dx + int 0x14 + ;; set up our data segments xor ax, ax mov ds, ax @@ -16,11 +21,6 @@ init: ;; setting a20 allows us to address all of 'extended' memory call seta20 - ;; serial setup? - mov ax, 0x00e3 ; AH = 0, AL = 9600 baud, 8N1 - xor dx, dx - int 0x14 - ;;; disable 8259 mov al, 0xff out 0xa1, al
Update galaxy table for changes committed only in jael.
0w0 :: 46, ~hex, James Torre 0w0 :: 47, ~feb, urbit.org 0wK.GoKEY.rMjfn.ZcvFQ.n4BmX :: 48, ~pyl, Michael Hartl (oldkey) - 0w0 :: 49, ~dul, Curtis Yarvin - 0w0 :: 50, ~het, Curtis Yarvin + 0w0 :: 49, ~dul, Galen Wolfe-Pauly + 0w0 :: 50, ~het, Galen Wolfe-Pauly 0w0 :: 51, ~mev, Curtis Yarvin 0w0 :: 52, ~rut, Curtis Yarvin 0w2L.M6-o5.DDTFL.R4sFL.7Zuay :: 53, ~tyl, Tlon Investor 11 (oldkey) 0w0 :: 60, ~bur, Galen Wolfe-Pauly 0w0 :: 61, ~der, Galen Wolfe-Pauly 0w0 :: 62, ~nep, Galen Wolfe-Pauly - 0w0 :: 63, ~pur, Curtis Yarvin + 0w0 :: 63, ~pur, Paul Driver 0w30.VtXvV.S~xIV.iMCL~.j9zTC :: 64, ~rys, Charlie Cummings (oldkey) 0w0 :: 65, ~reb, Curtis Yarvin 0wp.LslIa.IFSM9.mIp-z.KBIBh :: 66, ~den, Michael Hartl (oldkey)
Disable caller-saves flag for gcc >= 9.3
@@ -91,6 +91,14 @@ if(CMAKE_COMPILER_IS_GNUCXX) add_compile_options(-fvisibility=hidden) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility-inlines-hidden") + #disable gcc caller-saves flag for O2-O3 + #workaround fix for gcc 9.3+ + if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo") + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.3) + add_compile_options(-fno-caller-saves) + endif() + endif() + #default SIMD configuration uses native build flags #when packaging and x86, use sse3 so the binaries work across multiple x86 variants if(NOT DEFAULT_SIMD_FLAGS)
newlib: Move _gettimeofday_r call in clock_gettime Merges:
@@ -414,10 +414,10 @@ int clock_gettime (clockid_t clock_id, struct timespec *tp) return -1; } struct timeval tv; - _gettimeofday_r(NULL, &tv, NULL); uint64_t monotonic_time_us = 0; switch (clock_id) { case CLOCK_REALTIME: + _gettimeofday_r(NULL, &tv, NULL); tp->tv_sec = tv.tv_sec; tp->tv_nsec = tv.tv_usec * 1000L; break;
baseboard/ite_evb/baseboard.c: Format with clang-format BRANCH=none TEST=none
@@ -42,8 +42,10 @@ const struct fan_rpm fan_rpm_0 = { }; const struct fan_t fans[] = { - { .conf = &fan_conf_0, - .rpm = &fan_rpm_0, }, + { + .conf = &fan_conf_0, + .rpm = &fan_rpm_0, + }, }; BUILD_ASSERT(ARRAY_SIZE(fans) == CONFIG_FANS); @@ -123,11 +125,9 @@ __override struct keyboard_scan_config keyscan_config = { #if defined(CONFIG_SPI_FLASH_PORT) /* SPI devices */ const struct spi_device_t spi_devices[] = { - [CONFIG_SPI_FLASH_PORT] = { - .port = CONFIG_SPI_FLASH_PORT, + [CONFIG_SPI_FLASH_PORT] = { .port = CONFIG_SPI_FLASH_PORT, .div = 0, - .gpio_cs = -1 - }, + .gpio_cs = -1 }, }; const unsigned int spi_devices_used = ARRAY_SIZE(spi_devices); #endif @@ -139,9 +139,8 @@ static void board_init(void) DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); /* Wake-up pins for hibernate */ -const enum gpio_signal hibernate_wake_pins[] = { - GPIO_POWER_BUTTON_L, GPIO_LID_OPEN -}; +const enum gpio_signal hibernate_wake_pins[] = { GPIO_POWER_BUTTON_L, + GPIO_LID_OPEN }; const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins); /*
[SH2] updated camera inconsistency fix Old: 640x480 New: 512x448 This makes the camera position the same as the PS2 version for all resolutions.
@@ -347,24 +347,24 @@ void Init() //solves camera pan inconsistency for different resolutions //solves camera tilt inconsistency for different resolutions auto pattern = hook::pattern("51 E8 ? ? ? ? 89 44 24 00 DB 44 24 00 D9 1D"); //47CD30 - struct Ret640 + struct Ret512 { void operator()(injector::reg_pack& regs) { - regs.eax = 640; + regs.eax = 512; } }; - struct Ret480 + struct Ret448 { void operator()(injector::reg_pack& regs) { - regs.eax = 480; + regs.eax = 448; } }; - injector::MakeInline<Ret640>(pattern.get_first(1)); - injector::MakeInline<Ret640>(pattern.get_first(39)); - injector::MakeInline<Ret480>(pattern.get_first(20)); - injector::MakeInline<Ret480>(pattern.get_first(64)); + injector::MakeInline<Ret512>(pattern.get_first(1)); + injector::MakeInline<Ret512>(pattern.get_first(39)); + injector::MakeInline<Ret448>(pattern.get_first(20)); + injector::MakeInline<Ret448>(pattern.get_first(64)); //FMV auto FMVpattern1 = hook::pattern("A1 ? ? ? ? D9 15 ? ? ? ? D9 C2 89 15 ? ? ? ? D9 1D");
kernel elf sections are reserved from PMM # Conflicts: # src/kernel/pmm/pmm.c
@@ -162,6 +162,19 @@ void pmm_init() { //map out framebuffer pmm_reserve_mem_region(pmm, info->framebuffer.address, info->framebuffer.size); pmm_reserve_mem_region(pmm, info->initrd_start, info->initrd_size); + + // TODO(PT): Rename this boot_info field as it's an ELF section header table, not a symbol table + multiboot_elf_section_header_table_t symbol_table_info = info->symbol_table_info; + elf_section_header_t* sh = (elf_section_header_t*)symbol_table_info.addr; + uint32_t shstrtab = sh[symbol_table_info.shndx].addr; + for (uint32_t i = 0; i < symbol_table_info.num; i++) { + const char* name = (const char*)(shstrtab + sh[i].name); + printf_info("PMM reserving kernel ELF section %s", name); + pmm_reserve_mem_region(pmm, sh[i].addr, sh[i].size); + } + // map out kernel symbol table and string table from ELF image + pmm_reserve_mem_region(pmm, info->kernel_elf_symbol_table.strtab, info->kernel_elf_symbol_table.strtabsz); + pmm_reserve_mem_region(pmm, info->kernel_elf_symbol_table.symtab, info->kernel_elf_symbol_table.symtabsz); } //marks a block of physical memory as unallocatable
docs: Add note about downloading HTML schematics BRANCH=none TEST=view in gitiles
# Dragonclaw Fingerprint Development Board Schematics -The schematics are in the [HTML file] and viewable with any browser. +The schematics are in the [HTML file][schematic] and viewable with any browser. +Note that you'll need to download and save the HTML file from +[this link][schematic]; you cannot view it directly from the server. The layout file is in the [`.brd`] file. [`.brd`]: https://raw.githubusercontent.com/coreboot/chrome-ec/master/docs/schematics/dragonclaw/dragonclaw_v0.2.brd -[HTML file]: https://raw.githubusercontent.com/coreboot/chrome-ec/master/docs/schematics/dragonclaw/dragonclaw_v0.2.html +[schematic]: https://raw.githubusercontent.com/coreboot/chrome-ec/master/docs/schematics/dragonclaw/dragonclaw_v0.2.html
Make CS Loader implementation dependant of DOTNET_COMMAND.
@@ -31,20 +31,20 @@ message(STATUS "Plugin ${target} implementation") if(DOTNET_VERSION VERSION_EQUAL "2.0" OR DOTNET_VERSION VERSION_GREATER "2.0") add_custom_target(${target} ALL - COMMAND dotnet restore ${CMAKE_CURRENT_SOURCE_DIR}/source/project.csproj - COMMAND dotnet publish ${CMAKE_CURRENT_SOURCE_DIR}/source/project.csproj -o ${CMAKE_BINARY_DIR} + COMMAND ${DOTNET_COMMAND} restore ${CMAKE_CURRENT_SOURCE_DIR}/source/project.csproj + COMMAND ${DOTNET_COMMAND} publish ${CMAKE_CURRENT_SOURCE_DIR}/source/project.csproj -o ${CMAKE_BINARY_DIR} ) else() if(DOTNET_MIGRATE) add_custom_target(${target} ALL - COMMAND dotnet migrate ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json - COMMAND dotnet restore ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json - COMMAND dotnet publish ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json -o ${CMAKE_BINARY_DIR} + COMMAND ${DOTNET_COMMAND} migrate ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json + COMMAND ${DOTNET_COMMAND} restore ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json + COMMAND ${DOTNET_COMMAND} publish ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json -o ${CMAKE_BINARY_DIR} ) else() add_custom_target(${target} ALL - COMMAND dotnet restore ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json - COMMAND dotnet publish ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json -o ${CMAKE_BINARY_DIR} + COMMAND ${DOTNET_COMMAND} restore ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json + COMMAND ${DOTNET_COMMAND} publish ${CMAKE_CURRENT_SOURCE_DIR}/source/project.json -o ${CMAKE_BINARY_DIR} ) endif() endif()
Run pgindent on zstd_compression.c.
@@ -114,11 +114,12 @@ zstd_compress(PG_FUNCTION_ARGS) if (ZSTD_isError(dst_length_used)) { - if (ZSTD_getErrorCode(dst_length_used) == ZSTD_error_dstSize_tooSmall) { + if (ZSTD_getErrorCode(dst_length_used) == ZSTD_error_dstSize_tooSmall) + { /* * This error is returned when "compressed" output is bigger than - * uncompressed input. - * The caller can detect this by checking dst_used >= src_size + * uncompressed input. The caller can detect this by checking + * dst_used >= src_size */ dst_length_used = src_sz; } @@ -169,4 +170,3 @@ zstd_validator(PG_FUNCTION_ARGS) { PG_RETURN_VOID(); } -
Set last drag point based on diffs
@@ -412,15 +412,20 @@ static lv_res_t lv_rotary_signal(lv_obj_t * rotary, lv_signal_t sign, void * par lv_coord_t drag_x_diff = p.x -ext->last_press_point.x; lv_coord_t drag_y_diff = p.y -ext->last_press_point.y; + if (LV_MATH_ABS(drag_x_diff) > ext->threshold) { + if (drag_x_diff > 0) drag_x_diff = ext->threshold; + else drag_x_diff = -ext->threshold; + } + if (LV_MATH_ABS(drag_y_diff) > ext->threshold) { + if (drag_y_diff > 0) drag_x_diff = ext->threshold; + else drag_y_diff = -ext->threshold; + } + ext->last_press_point.x = ext->last_press_point.x + drag_x_diff; + ext->last_press_point.y = ext->last_press_point.y + drag_y_diff; + if (LV_MATH_ABS(drag_x_diff) > LV_MATH_ABS(drag_y_diff)) drag_diff = drag_x_diff; else drag_diff = drag_y_diff; - if (LV_MATH_ABS(drag_diff) > ext->threshold) { - if (drag_diff > 0) drag_diff = ext->threshold; - else drag_diff = -ext->threshold; - } - ext->last_drag_x = p.x; - if (ext->knob_area.y1 < p.y && p.y < ext->knob_area.y2) { if (drag_diff > 0 && p.x < ext->knob_area.x2) { if (lv_rotary_set_value(rotary, lv_rotary_get_value(rotary) + drag_diff * ext->sensitivity, LV_ANIM_ON)) {
dispatch_removelistener: make error message a bit more distinctive
@@ -375,7 +375,7 @@ dispatch_removelistener(listener *lsnr) break; if (c == MAX_LISTENERS) { /* not found?!? */ - logerr("dispatch: cannot find listener!\n"); + logerr("dispatch: cannot find listener to remove!\n"); pthread_rwlock_unlock(&listenerslock); return; }
doc: Improve readability of section in High-Level API tutorial
@@ -37,7 +37,7 @@ default = 1.1 ``` In Elektra a specification is defined through the metadata of keys in the `spec` namespace. The specification above contains metadata for -three keys the parent key (`@`), `@/mydouble` and `@/myfloatarray/#`. The `#` at the end of `myfloatarray/#` indicates that it is an array. +three keys: 1. the parent key (`@`), 2. `@/mydouble` and 3. `@/myfloatarray/#`. The `#` at the end of `myfloatarray/#` indicates that it is an array. The `mountpoint` metadata on the parent key sets the name of our application's config file (the location is defined by Elektra), it should be unique.
clear warnings for driver ens210 ccs811
#include <vfs_register.h> #include <hal/base.h> #include "common.h" -#include "hal/sensor.h" +#include "sensor.h" +#include "sensor_drv_api.h" +#include "sensor_hal.h" #define CCS811_I2C_ADDR1 (0x5A) /* When ADDR is high the 7bit I2C address is 0x5B */ #define CCS811_I2C_ADDR_TRANS(n) ((n)<<1) @@ -214,8 +216,6 @@ static int drv_voc_ams_ccs811_open(void) { int ret = 0; uint8_t value = 0x00; - uint8_t value4; - ret = sensor_i2c_read(&ccs811_ctx, CCS811_REG_STATUS, &value, I2C_DATA_LEN, I2C_OP_RETRIES); if(unlikely(ret)){ @@ -256,14 +256,13 @@ static int drv_voc_ams_ccs811_read(void *buf, size_t len) size_t size = 0; uint8_t buffer[8]; uint16_t data[2]; - uint8_t value, value1, value2, value3; - voc_data_t* pdata = (voc_data_t*)buf; + integer_data_t* pdata = (integer_data_t*)buf; if(buf == NULL){ return -1; } - size = sizeof(voc_data_t); + size = sizeof(integer_data_t); if(len < size){ return -1; } @@ -280,7 +279,7 @@ static int drv_voc_ams_ccs811_read(void *buf, size_t len) if (data[1] > 32768) data[1] = 32768; - pdata->voc = data[1]; + pdata->data = data[1]; pdata->timestamp = aos_now_ms(); return (int)size; @@ -308,7 +307,7 @@ static int drv_voc_ams_ccs811_ioctl(int cmd, unsigned long arg) info->model = "CCS811"; info->range_max = 32768; info->range_min = 0; - info->unit = ppb; + //info->unit = ppb; }break; @@ -323,9 +322,10 @@ int drv_voc_ams_ccs811_init(void) int ret = 0; sensor_obj_t sensor; + memset(&sensor, 0, sizeof(sensor)); /* fill the sensor obj parameters here */ - sensor.tag = TAG_DEV_VOC; - sensor.path = dev_voc_path; + sensor.tag = TAG_DEV_TVOC; + sensor.path = dev_tvoc_path; sensor.io_port = I2C_PORT; sensor.open = drv_voc_ams_ccs811_open; sensor.close = drv_voc_ams_ccs811_close;
[apps] Align loops to wider intruction cache lines
@@ -75,8 +75,8 @@ RISCV_LLVM_TARGET ?= --target=$(RISCV_TARGET) --sysroot=$(GCC_INSTALL_DIR)/$(RI RISCV_WARNINGS += -Wunused-variable -Wconversion -Wall -Wextra # -Werror RISCV_FLAGS_COMMON_TESTS ?= -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -I$(CURDIR)/common -static RISCV_FLAGS_COMMON ?= $(RISCV_FLAGS_COMMON_TESTS) -std=gnu99 -O3 -ffast-math -fno-common -fno-builtin-printf $(DEFINES) $(RISCV_WARNINGS) -RISCV_FLAGS_GCC ?= -mcmodel=medany -Wa,-march=$(RISCV_ARCH_AS) -falign-loops=16 -falign-jumps=16 -#RISCV_FLAGS_GCC ?= -mcmodel=medany -Wa,-march=$(RISCV_ARCH_AS) -falign-loops=16 -falign-jumps=16 -funroll-loops +RISCV_FLAGS_GCC ?= -mcmodel=medany -Wa,-march=$(RISCV_ARCH_AS) -falign-loops=32 -falign-jumps=32 +#RISCV_FLAGS_GCC ?= -mcmodel=medany -Wa,-march=$(RISCV_ARCH_AS) -falign-loops=32 -falign-jumps=32 -funroll-loops RISCV_FLAGS_LLVM ?= -mcmodel=small -mllvm -enable-misched ifeq ($(COMPILER),gcc)
admin/nagios: bump to v4.4.3
%global _hardened_build 1 Name: %{pname}%{PROJ_DELIM} -Version: 4.4.1 +Version: 4.4.3 Release: 1%{?dist} Summary: Host/service/network monitoring program Group: %{PROJ_NAME}/admin
Fixed copy amount..
@@ -429,7 +429,7 @@ LIBXSMM_API_DEFINITION libxsmm_dnn_err_t libxsmm_dnn_internal_create_conv_handle matcopyback_descriptor.m = handle->ifhp; if (handle->buffer_format == LIBXSMM_DNN_TENSOR_FORMAT_LIBXSMM) { matcopy_descriptor.n = handle->ifwp * handle->ifmblock; - matcopyback_descriptor.n = (handle->ifwp + 2*handle->desc.pad_w) * handle->ifmblock; + matcopyback_descriptor.n = handle->ifwp * handle->ifmblock; matcopy_descriptor.lda = handle->ifwp * handle->ifmblock; matcopyback_descriptor.lda = (handle->ifwp + 2*handle->desc.pad_w) * handle->ifmblock; matcopy_descriptor.ldb = (handle->ifwp + 2*handle->desc.pad_w) * handle->ifmblock; @@ -438,7 +438,7 @@ LIBXSMM_API_DEFINITION libxsmm_dnn_err_t libxsmm_dnn_internal_create_conv_handle matcopy_descriptor.n = handle->ifwp * handle->blocksifm * handle->ifmblock; matcopy_descriptor.lda = handle->ifwp * handle->blocksifm * handle->ifmblock; matcopy_descriptor.ldb = (handle->ifwp + 2*handle->desc.pad_w) * handle->blocksifm * handle->ifmblock; - matcopyback_descriptor.n = (handle->ifwp + 2*handle->desc.pad_w) * handle->blocksifm * handle->ifmblock; + matcopyback_descriptor.n = handle->ifwp * handle->blocksifm * handle->ifmblock; matcopyback_descriptor.lda = (handle->ifwp + 2*handle->desc.pad_w) * handle->blocksifm * handle->ifmblock; matcopyback_descriptor.ldb = handle->ifwp * handle->blocksifm * handle->ifmblock; }
docs: remove features merged into i3
@@ -107,7 +107,3 @@ bar { height 25 } ``` - -### Borders - -You can define a border width of each block for each individual side by sending the `border_top`, `border_left`, `border_bottom` and `border_right` keys in the i3bar JSON protocol. Each value, if absent, defaults to `1`, and a value of `0` hides the border for the specified side.
Switch entry point for Sandbox binary tasks. ISSUE:
@@ -1672,7 +1672,7 @@ module JTEST_FOR: JTEST { } module SANDBOX_TASK: PY_PROGRAM { - PY_MAIN(sandbox.sdk2.internal.cli) + PY_MAIN(sandbox.taskbox.binary) PEERDIR(sandbox/bin sandbox/sdk2) SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE api.*) SET_APPEND(NO_CHECK_IMPORTS_FOR_VALUE kernel.*)
FEATURE: Check engine configurations.
#define ACTION_BEFORE_WRITE(c, k, l) #define ACTION_AFTER_WRITE(c, r) +static EXTENSION_LOGGER_DESCRIPTOR *logger; + /* * vbucket static functions */ @@ -99,6 +101,11 @@ default_get_info(ENGINE_HANDLE* handle) return &get_handle(handle)->info.engine_info; } +static int check_configuration(struct engine_config *conf) +{ + return 0; +} + static ENGINE_ERROR_CODE initialize_configuration(struct default_engine *se, const char *cfg_str) { @@ -167,7 +174,9 @@ initialize_configuration(struct default_engine *se, const char *cfg_str) return ENGINE_FAILED; } } - + if (check_configuration(&se->config) < 0) { + return ENGINE_FAILED; + } if (se->config.vb0) { set_vbucket_state(se, 0, VBUCKET_STATE_ACTIVE); } @@ -178,6 +187,7 @@ static ENGINE_ERROR_CODE default_initialize(ENGINE_HANDLE* handle, const char* config_str) { struct default_engine* se = get_handle(handle); + logger = se->server.log->get_logger(); ENGINE_ERROR_CODE ret = initialize_configuration(se, config_str); if (ret != ENGINE_SUCCESS) {
always make tls_client_get_id available
@@ -204,11 +204,6 @@ static void tls_handle( int rc, int fd ) { int tls_client_get_id( uint8_t id[], size_t len, const char query[] ) { uint8_t hash[32]; - // Reject query if TLS client is disabled - if( g_client_enable == 0 ) { - return 0; - } - // Match dot in query, e.g. 'example.com' if( strchr( query, '.' ) ) { mbedtls_sha256_context ctx;
rmt_legacy: don't use early log in isr handler ...but use ESP_DRAM_LOGx instead Closes
@@ -817,10 +817,10 @@ static void IRAM_ATTR rmt_driver_isr_default(void *arg) BaseType_t res = xRingbufferSendFromISR(p_rmt->rx_buf, (void *)addr, item_len * 4, &HPTaskAwoken); #endif if (res == pdFALSE) { - ESP_EARLY_LOGE(TAG, "RMT RX BUFFER FULL"); + ESP_DRAM_LOGE(TAG, "RMT RX BUFFER FULL"); } } else { - ESP_EARLY_LOGE(TAG, "RMT RX BUFFER ERROR"); + ESP_DRAM_LOGE(TAG, "RMT RX BUFFER ERROR"); } #if SOC_RMT_SUPPORT_RX_PINGPONG @@ -855,7 +855,7 @@ static void IRAM_ATTR rmt_driver_isr_default(void *arg) p_rmt->rx_item_start_idx = 0; } } else { - ESP_EARLY_LOGE(TAG, "---RX buffer too small: %d", sizeof(p_rmt->rx_item_buf)); + ESP_DRAM_LOGE(TAG, "---RX buffer too small: %d", sizeof(p_rmt->rx_item_buf)); } rmt_ll_clear_interrupt_status(hal->regs, RMT_LL_EVENT_RX_THRES(channel)); } @@ -894,8 +894,8 @@ static void IRAM_ATTR rmt_driver_isr_default(void *arg) if (p_rmt) { // Reset the receiver's write/read addresses to prevent endless err interrupts. rmt_ll_rx_reset_pointer(rmt_contex.hal.regs, channel); - ESP_EARLY_LOGD(TAG, "RMT RX channel %d error", channel); - ESP_EARLY_LOGD(TAG, "status: 0x%08x", rmt_ll_rx_get_status_word(rmt_contex.hal.regs, channel)); + ESP_DRAM_LOGD(TAG, "RMT RX channel %d error", channel); + ESP_DRAM_LOGD(TAG, "status: 0x%08x", rmt_ll_rx_get_status_word(rmt_contex.hal.regs, channel)); } rmt_ll_clear_interrupt_status(hal->regs, RMT_LL_EVENT_RX_ERROR(channel)); } @@ -909,8 +909,8 @@ static void IRAM_ATTR rmt_driver_isr_default(void *arg) if (p_rmt) { // Reset the transmitter's write/read addresses to prevent endless err interrupts. rmt_ll_tx_reset_pointer(rmt_contex.hal.regs, channel); - ESP_EARLY_LOGD(TAG, "RMT TX channel %d error", channel); - ESP_EARLY_LOGD(TAG, "status: 0x%08x", rmt_ll_tx_get_status_word(rmt_contex.hal.regs, channel)); + ESP_DRAM_LOGD(TAG, "RMT TX channel %d error", channel); + ESP_DRAM_LOGD(TAG, "status: 0x%08x", rmt_ll_tx_get_status_word(rmt_contex.hal.regs, channel)); } rmt_ll_clear_interrupt_status(hal->regs, RMT_LL_EVENT_TX_ERROR(channel)); }
Alternative CSR checks in x509_csr_check when USE_PSA_CRYPTO The X509write x509_csr_check reference file depends on mbedtls_test_rnd_pseudo_rand being used to match the pre-generated data. This calls x509_crt_verifycsr() like in x509_csr_check_opaque() when MBEDTLS_USE_PSA_CRYPTO is defined. Notably using PSA_ALG_DETERMINISTIC_ECDSA() in ecdsa_sign_wrap() makes this test run without these changes.
@@ -93,6 +93,8 @@ void x509_csr_check( char * key_file, char * cert_req_check_file, int md_type, memset( &rnd_info, 0x2a, sizeof( mbedtls_test_rnd_pseudo_info ) ); + USE_PSA_INIT( ); + mbedtls_pk_init( &key ); TEST_ASSERT( mbedtls_pk_parse_keyfile( &key, key_file, NULL, mbedtls_test_rnd_std_rand, NULL ) == 0 ); @@ -117,6 +119,15 @@ void x509_csr_check( char * key_file, char * cert_req_check_file, int md_type, TEST_ASSERT( buf[buf_index] == 0 ); } +#if defined(MBEDTLS_USE_PSA_CRYPTO) + // When using PSA crypto, RNG isn't controllable, so cert_req_check_file can't be used + (void)f; + (void)olen; + (void)check_buf; + (void)cert_req_check_file; + buf[pem_len] = '\0'; + TEST_ASSERT( x509_crt_verifycsr( buf, pem_len + 1 ) == 0 ); +#else f = fopen( cert_req_check_file, "r" ); TEST_ASSERT( f != NULL ); olen = fread( check_buf, 1, sizeof( check_buf ), f ); @@ -124,6 +135,7 @@ void x509_csr_check( char * key_file, char * cert_req_check_file, int md_type, TEST_ASSERT( olen >= pem_len - 1 ); TEST_ASSERT( memcmp( buf, check_buf, pem_len - 1 ) == 0 ); +#endif der_len = mbedtls_x509write_csr_der( &req, buf, sizeof( buf ), mbedtls_test_rnd_pseudo_rand, @@ -133,13 +145,22 @@ void x509_csr_check( char * key_file, char * cert_req_check_file, int md_type, if( der_len == 0 ) goto exit; - ret = mbedtls_x509write_csr_der( &req, buf, (size_t)( der_len - 1 ), +#if defined(MBEDTLS_USE_PSA_CRYPTO) + // When using PSA crypto, RNG isn't controllable, result length isn't + // deterministic over multiple runs, removing a single byte isn't enough to + // go into the MBEDTLS_ERR_ASN1_BUF_TOO_SMALL error case + der_len /= 2; +#else + der_len -= 1; +#endif + ret = mbedtls_x509write_csr_der( &req, buf, (size_t)( der_len ), mbedtls_test_rnd_pseudo_rand, &rnd_info ); TEST_ASSERT( ret == MBEDTLS_ERR_ASN1_BUF_TOO_SMALL ); exit: mbedtls_x509write_csr_free( &req ); mbedtls_pk_free( &key ); + USE_PSA_DONE( ); } /* END_CASE */
rpi-config: Add support for CM4 host USB By default in case of CM4 IO board, the USB ports (header + built-in) are disabled. In order to enable them the DWC2 mode needs to be set to host.
@@ -204,6 +204,12 @@ do_deploy() { echo "dtoverlay=dwc2,dr_mode=peripheral" >> $CONFIG fi + # DWC2 USB host mode support + if [ "${ENABLE_DWC2_HOST}" = "1" ]; then + echo "# Enable USB host mode" >> $CONFIG + echo "dtoverlay=dwc2,dr_mode=host" >> $CONFIG + fi + # AT86RF23X support if [ "${ENABLE_AT86RF}" = "1" ]; then echo "# Enable AT86RF23X" >>$CONFIG
Warning if learning rate > 1
#include "enums.h" #include "overfitting_detector_options.h" #include <catboost/libs/logging/logging_level.h> +#include <catboost/libs/logging/logging.h> #include <util/system/types.h> namespace NCatboostOptions { @@ -65,6 +66,9 @@ namespace NCatboostOptions { } CB_ENSURE(!(ApproxOnFullHistory.GetUnchecked() && BoostingType.Get() == EBoostingType::Plain), "Can't use approx-on-full-history with Plain boosting-type"); + if (LearningRate.IsSet() && LearningRate.Get() > 1) { + MATRIXNET_WARNING_LOG << "learning rate is greater than 1. You probably need to decrease learning rate." << Endl; + } } TOption<float> LearningRate;
detail on the available examples It is not easy to find documentation on existing NVMe examples, hope this would improve a bit Thanks
@@ -148,6 +148,11 @@ through an AXI master interface. In the SNAP configuration step the existence of # NVMe support For FPGA cards with NVMe flash attached, the SNAP framework supports the integration of up to two Flash drives. Via the SNAP configuration option 'Enable NVMe' the instantiation of the NVMe host controller together with the corresponding PCIe root complexes and the required AXI interfaces can be configured. +Some HDL and HLS based examples are available. In all cases the NVME driver used requires the data to transit through the card SDRAM Please see the [NVMe main documentation page](../hardware/doc/NVMe.md) . +- Automated hardware check (read write of arbitrary data) can be performed using action [snap/actions/hdl_example](../actions/hdl_example) +- file transfers using fixed 4k blocks read writes can be performed with [snap/actions/hdl_nvme_example](../actions/hdl_nvme_example) +- generic memcopy can be performed using [snap/actions/hls_nvme_memcopy](../actions/hls_nvme_memcopy) + # Hardware debug with ILA cores In order to create an image that allows debugging the design using the Vivado Integrated Logic Analyzer (ILA) you may prepare a `.xdc` file for
Add extra tests for cls.py
@@ -354,6 +354,26 @@ def check_cls(cosmo): assert_( all_finite(ccl.angular_cl(cosmo, nc1, lens1, ell_arr)) ) assert_( all_finite(ccl.angular_cl(cosmo, nc1, lens2, ell_arr)) ) + # Check get_internal_function() + a_scl = 0.5 + a_lst = [0.2, 0.4, 0.6, 0.8, 1.] + a_arr = np.linspace(0.2, 1., 5) + assert_( all_finite(nc1.get_internal_function(cosmo, 'dndz', a_scl)) ) + assert_( all_finite(nc1.get_internal_function(cosmo, 'dndz', a_lst)) ) + assert_( all_finite(nc1.get_internal_function(cosmo, 'dndz', a_arr)) ) + + # Check that invalid options raise errors + assert_raises(KeyError, nc1.get_internal_function, cosmo, 'x', a_arr) + assert_raises(ValueError, ccl.ClTracerNumberCounts, cosmo, True, True, + n=(z,n), bias=(z,b)) + assert_raises(KeyError, ccl.ClTracer, cosmo, 'x', True, True, + n=(z,n), bias=(z,b)) + assert_raises(ValueError, ccl.ClTracerLensing, cosmo, + has_intrinsic_alignment=True, n=(z,n), bias_ia=(z,n)) + assert_no_warnings(ccl.cls._cltracer_obj, nc1) + assert_raises(TypeError, ccl.cls._cltracer_obj, None) + + def check_corr(cosmo): # Number density input
Don't define doxygen groups for CPUs and platforms in the modules.txt These will be define in new doxygen-group.txt files within the respective platform/CPU dir.
@@ -8,31 +8,6 @@ CPU, device drivers and platform code * \ingroup arch */ -/** - * \addtogroup cc2538dk The cc2538 Development Kit platform - * \ingroup platform - */ - -/** - * \addtogroup cooja COOJA network simulator node - * \ingroup platform - */ - -/** - * \addtogroup jn516x The JN516x Board - * \ingroup platform - */ - -/** - * \addtogroup native_platform Native platform - * \ingroup platform - */ - -/** - * \addtogroup nrf52dk nRF52 Development Kit - * \ingroup platform - */ - /** \defgroup net IoT networking The communication protocols @@ -93,16 +68,6 @@ Core system components such as processes and timers \ingroup arch */ -/** -* \defgroup arm ARM CPUs -* \ingroup dev -*/ - -/** -* \addtogroup nrf52832 nrf52832 SoC -* \ingroup dev -*/ - /** * \defgroup apps Application-layer protocols and profiles * \ingroup net
options/posix: Properly impl. pthread_key_delete()
@@ -156,14 +156,16 @@ struct __mlibc_key_data { frg::hash_map<int, void *, frg::hash<int>, MemoryAllocator> values; }; -int pthread_key_create(pthread_key_t *key, void (*destructor) (void *)) { +int pthread_key_create(pthread_key_t *out_key, void (*destructor) (void *)) { SCOPE_TRACE(); - - *key = frg::construct<__mlibc_key_data>(getAllocator()); + // TODO: Invoke the destructor on thread exit. + *out_key = frg::construct<__mlibc_key_data>(getAllocator()); return 0; } -int pthread_key_delete(pthread_key_t) { - mlibc::infoLogger() << "mlibc: pthread_key_delete is a no-op" << frg::endlog; + +int pthread_key_delete(pthread_key_t key) { + SCOPE_TRACE(); + frg::destruct(getAllocator(), key); return 0; }
Improve PhGetProcessWorkingSetInformation
@@ -1617,9 +1617,43 @@ NTSTATUS PhGetProcessWorkingSetInformation( ) { NTSTATUS status; - PVOID buffer; + PMEMORY_WORKING_SET_INFORMATION buffer; SIZE_T bufferSize; + ULONG attempts = 0; + + bufferSize = 0x8000; + buffer = PhAllocate(bufferSize); + + status = NtQueryVirtualMemory( + ProcessHandle, + NULL, + MemoryWorkingSetInformation, + buffer, + bufferSize, + NULL + ); + + while (status == STATUS_INFO_LENGTH_MISMATCH && attempts < 8) + { + bufferSize = UFIELD_OFFSET(MEMORY_WORKING_SET_INFORMATION, WorkingSetInfo[buffer->NumberOfEntries]); + PhFree(buffer); + buffer = PhAllocate(bufferSize); + status = NtQueryVirtualMemory( + ProcessHandle, + NULL, + MemoryWorkingSetInformation, + buffer, + bufferSize, + NULL + ); + + attempts++; + } + + if (!NT_SUCCESS(status)) + { + // Fall back to using the previous code that we've used since Windows 7 (dmex) bufferSize = 0x8000; buffer = PhAllocate(bufferSize); @@ -1641,6 +1675,7 @@ NTSTATUS PhGetProcessWorkingSetInformation( buffer = PhAllocate(bufferSize); } + } if (!NT_SUCCESS(status)) {
Travis: Install OCLint Recently OCLint was removed from the macOS build images: .
@@ -309,6 +309,8 @@ before_install: brew install yaml-cpp # Unfortunately Xerces 3.2 causes multiple problems if we translate Elektra with GCC on macOS brew install xerces-c + # OCLint complains about unknown compiler warning options, if we use GCC as compiler. + brew cask install oclint fi brew install bison brew install dbus
tree data helpers BUGFIX move iterator Refs
@@ -592,6 +592,9 @@ lyd_node_schema(const struct lyd_node *node) /* get schema node */ schema = lys_find_child(schema, mod ? mod : schema->module, LYD_NAME(iter), 0, 0, 0); } + + /* remember to move to the descendant */ + prev_iter = iter; } while (schema && (iter != node)); return schema;
Pthreads installation should be handled by CmDaB, no need to do this here.
@@ -224,15 +224,7 @@ if (NOT MSVC) endif() endif() else() - if (NOT DOWNLOAD_AND_BUILD_DEPS) find_package (PTHREADS4W CONFIG REQUIRED) - else() - find_package (PTHREADS4W CONFIG) - - if (NOT PTHREADS4W_CONFIG) - CmDaB_install (pthreads4w) - endif() - endif() endif() # # Determine if pthread_rwlock_t is available
Fix button events for Sengled E1E-G7F switch
@@ -4643,6 +4643,8 @@ void DeRestPluginPrivate::checkSensorButtonEvent(Sensor *sensor, const deCONZ::A } else if (ind.clusterId() == SENGLED_CLUSTER_ID) { + ok = false; + if (buttonMap.zclParam0 == pl0) { ok = true;