message
stringlengths
6
474
diff
stringlengths
8
5.22k
delete_dialog.c: merge `_gftp_gtk_free_del_data()` into `yesCB()`
#include "gftp-gtk.h" static void -_gftp_gtk_free_del_data (gftp_transfer * transfer, gftp_dialog_data * ddata) -{ - free_tdata (transfer); -} - - -static void -yesCB (gftp_transfer * transfer, gftp_dialog_data * ddata) +yesCB (gftp_transfer * transfer) { gftpui_callback_data * cdata; gftp_window_data * wdata; @@ -46,7 +39,7 @@ yesCB (gftp_transfer * transfer, gftp_dialog_data * ddata) gftpui_common_run_callback_function (cdata); g_free (cdata); - _gftp_gtk_free_del_data (transfer, ddata); + free_tdata (transfer); //_gftp_gtk_free_del_data (transfer); } @@ -120,7 +113,5 @@ do_delete_dialog (gpointer data) if (!ret) return; - yesCB (transfer, NULL); + yesCB (transfer); } - -
lib: add support for aws customsized error reporting logger
#include <mcheck.h> #endif +#ifdef FLB_HAVE_AWS_ERROR_REPORTER +#include <fluent-bit/aws/flb_aws_error_reporter.h> + +struct flb_aws_error_reporter *error_reporter; +#endif + /* thread initializator */ static pthread_once_t flb_lib_once = PTHREAD_ONCE_INIT; @@ -194,6 +200,12 @@ flb_ctx_t *flb_create() return NULL; } + #ifdef FLB_HAVE_AWS_ERROR_REPORTER + if (is_error_reporting_enabled()) { + error_reporter = flb_aws_error_reporter_create(); + } + #endif + return ctx; } @@ -220,6 +232,12 @@ void flb_destroy(flb_ctx_t *ctx) flb_config_exit(ctx->config); } + #ifdef FLB_HAVE_AWS_ERROR_REPORTER + if (is_error_reporting_enabled()) { + flb_aws_error_reporter_destroy(error_reporter); + } + #endif + flb_free(ctx); ctx = NULL;
fix lib jvm not found in docker bug
@@ -118,13 +118,12 @@ else $(JRE_LIB)/jrockit \ 2> /dev/null)) endif - PLJAVA_CPPFLAGS += -I"$(JDK_HOME)/include" -I"$(JDK_HOME)/include/$(JRE_INCL)" + SHLIB_LINK += -L"$(JDK_HOME)/jre/lib/$(JRE_CPU)/server" SHLIB_LINK += -L. -L"$(JVM_LIB)" -ljvm endif endif - override CPPFLAGS += $(PLJAVA_CPPFLAGS) override CFLAGS += $(PLJAVA_CFLAGS)
docs: add PlatON official websites to the list
+ [Hyperledger Fabric Docs](https://hyperledger-fabric.readthedocs.io/) + [FISCO BCOS](http://fisco-bcos.org/) + [FISCO BCOS Github](https://github.com/FISCO-BCOS) ++ [PlatON](https://www.platon.network/) # Supported Module List
DOCS: Change default max connections reserved for superuser
@@ -2734,7 +2734,7 @@ Determines the number of connection slots that are reserved for Greenplum Databa |Value Range|Default|Set Classifications| |-----------|-------|-------------------| -|integer < *max\_connections*|3|local, system, restart| +|integer < *max\_connections*|10|local, system, restart| ## <a id="tcp_keepalives_count"></a>tcp\_keepalives\_count
Update README.md Separated #build and #install Properly formatted Fixed some Arch stuff Changed "Packaging Status" to "Pre-packaged binaries" to make more sense
@@ -7,7 +7,7 @@ A modification of the Mesa Vulkan overlay. Including GUI improvements, temperatu # Installation -If you do not wish to compile anything, simply download the file under Releases, extract it, and run `./mangohud-setup.sh install` from within the extracted folder. +## Build If you wish to compile MangoHud to keep up to date with any changes - first clone this repository and cd into it: @@ -16,21 +16,44 @@ git clone --recurse-submodules https://github.com/flightlessmango/MangoHud.git cd MangoHud ``` -Then simply run the following commands: +To build it, execute: -`./build.sh build` -<br>`./build.sh package` -<br>`sudo ./build.sh install` +``` +./build.sh build +./build.sh package +``` ---- +**NOTE: If you are running an Ubuntu-based, Fedora, or Arch-based, the build script will automatically detect and prompt you to install missing build dependencies. If you run into any issues with this please report them!** + +Once done, proceed to the [installation](#source). + +## Install + +### Source + +If you have compiled MangoHud from source, to install it, execute: + +``` +sudo ./build.sh install +``` + +### Pre-packaged binaries + +#### GitHub releases -If you are running an Ubuntu-like distribution, Fedora, or Arch, the build script will automatically detect and prompt you to install missing build dependencies. If you run into any issues with this please report them! +If you do not wish to compile anything, simply download the file under [Releases](https://github.com/flightlessmango/MangoHud/releases), extract it, and run `./mangohud-setup.sh install` from within the extracted folder. -## Packaging status +#### Arch-based distributions -[Fedora](https://src.fedoraproject.org/rpms/mangohud): `sudo dnf install mangohud` +If you are using an Arch-based distribution, install [`mangohud`](https://aur.archlinux.org/packages/mangohud/) and [`lib32-mangohud`](https://aur.archlinux.org/packages/lib32-mangohud/) with your favourite AUR helper. [`mangohud-git`](https://aur.archlinux.org/packages/mangohud-git/) and [`lib32-mangohud-git`](https://aur.archlinux.org/packages/lib32-mangohud-git/) are also available on the AUR if you want the up do date version of MangoHud. -[Arch](https://aur.archlinux.org/packages/mangohud): Install `mangohud` and `lib32-mangohud` with your favourite AUR helper. `mangohud-git` is also available on the AUR. +#### Fedora + +If you are using Fedora, to install the [MangoHud](https://src.fedoraproject.org/rpms/mangohud) package, execute: + +``` +sudo dnf install mangohud +``` # Normal usage
Tests: fixed opcache detection. opcache_get_status() returns array, so square brackets should be used to access "opcache_enabled" value.
@@ -10,7 +10,8 @@ if (isset($_GET['chdir']) && $_GET['chdir'] != "") { $opcache = -1; if (function_exists('opcache_get_status')) { - $opcache = opcache_get_status()->opcache_enabled; + $status = opcache_get_status(); + $opcache = $status['opcache_enabled']; } header('X-OPcache: ' . $opcache);
filter_parser: use kv interface to query properties
#include <fluent-bit/flb_time.h> #include <fluent-bit/flb_mem.h> #include <fluent-bit/flb_pack.h> +#include <fluent-bit/flb_kv.h> #include <msgpack.h> #include <string.h> @@ -96,7 +97,7 @@ static int configure(struct filter_parser_ctx *ctx, int ret; const char *tmp; struct mk_list *head; - struct flb_config_prop *p; + struct flb_kv *kv; ctx->key_name = NULL; ctx->reserve_data = FLB_FALSE; @@ -116,12 +117,12 @@ static int configure(struct filter_parser_ctx *ctx, /* Read all Parsers */ mk_list_foreach(head, &f_ins->properties) { - p = mk_list_entry(head, struct flb_config_prop, _head); - if (strcasecmp("parser", p->key) != 0) { + kv = mk_list_entry(head, struct flb_kv, _head); + if (strcasecmp("parser", kv->key) != 0) { continue; } - ret = add_parser(p->val, ctx, config); + ret = add_parser(kv->val, ctx, config); if (ret == -1) { flb_error("[filter_parser] requested parser '%s' not found", tmp); }
Empty actorId becomes $self$ rather than player
@@ -2395,7 +2395,7 @@ class ScriptBuilder { } const { entity, scene } = this.options; const newIndex = - id === "$self$" && entity + (id === "" || id === "$self$") && entity ? getActorIndex(entity.id, scene) : getActorIndex(id, scene); return newIndex;
simplify to exit(1) on first tool with >= 1 failure.
@@ -2,20 +2,17 @@ set -e; STARTWD=$(pwd); FAILURES=0; -TEST_PASSES=0; TOOL_PASSES="" TOOL_FAILURES="" -for dir in $(ls); do - echo $dir - [ -d $dir ] || continue - echo "Testing bedtools $dir:" - (cd $dir bash && bash test-$dir.sh) || FAILURES=$(expr $FAILURES + 1); - if [ $? -eq 0 ]; then - TEST_PASSES=$((TEST_PASSES + 1)) - TOOL_PASSES="$TOOL_PASSES $dir" +for tool in $(ls); do + [ -d $tool ] || continue + echo "Testing bedtools $tool:" + (cd $tool bash && bash test-$tool.sh) || FAILURES=$(expr $FAILURES + 1); + if [ $FAILURES -eq 0 ]; then + TOOL_PASSES="$TOOL_PASSES $tool" else - failed="$failed $dir" + TOOL_FAILURES="$TOOL_FAILURES $tool" fi done @@ -25,8 +22,7 @@ echo "--------------------------" echo " Test Results " echo "--------------------------" echo "Tools passing: $TOOL_PASSES" -echo "Tools with failures: $TOOL_FAILURES" -echo "Tests failed: $FAILURES" +echo "Tools failing: $TOOL_FAILURES" if [[ $FAILURES -gt 0 ]]; then exit 1;
Add custom sig_info_set for
@@ -371,6 +371,14 @@ static int ecd_item_sign(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, return 3; } +static int ecd_sig_info_set(X509_SIG_INFO *siginf, const X509_ALGOR *alg, + const ASN1_STRING *sig) +{ + X509_SIG_INFO_set(siginf, NID_undef, NID_ED25519, X25519_SECURITY_BITS, + X509_SIG_INFO_TLS); + return 1; +} + const EVP_PKEY_ASN1_METHOD ed25519_asn1_meth = { NID_ED25519, NID_ED25519, @@ -400,7 +408,8 @@ const EVP_PKEY_ASN1_METHOD ed25519_asn1_meth = { NULL, NULL, ecd_item_verify, - ecd_item_sign + ecd_item_sign, + ecd_sig_info_set }; static int pkey_ecx_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)
slip-radio: make architecture override explicit The sky subdirectory overrides the architecture putchar(), make that explicit in the build system.
@@ -5,6 +5,9 @@ all: $(CONTIKI_PROJECT) PLATFORMS_EXCLUDE = native nrf52dk BOARDS_EXCLUDE = nrf52840/dongle +# The sky directory overrides the architecture putchar(). +CONTIKI_SOURCES_EXCLUDES_SKY += uart1-putchar.c + CONTIKI=../.. include $(CONTIKI)/Makefile.identify-target
OcCpuLib: Provide TSC frequency under Hyper-V
#include <IndustryStandard/GenericIch.h> #include <Protocol/PciIo.h> #include <Library/BaseLib.h> +#include <Library/BaseMemoryLib.h> #include <Library/DebugLib.h> #include <Library/IoLib.h> #include <Library/OcCpuLib.h> @@ -422,8 +423,13 @@ InternalCalculateVMTFrequency ( { UINT32 CpuidEax; UINT32 CpuidEbx; + UINT32 CpuidEcx; + UINT32 CpuidEdx; CPUID_VERSION_INFO_ECX CpuidVerEcx; + CHAR8 HvVendor[13]; + UINT64 Msr; + AsmCpuid ( CPUID_VERSION_INFO, NULL, @@ -459,7 +465,35 @@ InternalCalculateVMTFrequency ( // 2. [Qemu-devel] [PATCH v2 0/3] x86-kvm: Fix Mac guest timekeeping by exposi: // https://lists.gnu.org/archive/html/qemu-devel/2017-01/msg04344.html // - AsmCpuid (0x40000000, &CpuidEax, NULL, NULL, NULL); + // Hyper-V only implements MSRs for TSC and FSB frequencies in Hz. + // See https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs + // + AsmCpuid (0x40000000, &CpuidEax, &CpuidEbx, &CpuidEcx, &CpuidEdx); + + CopyMem (&HvVendor[0], &CpuidEbx, sizeof (UINT32)); + CopyMem (&HvVendor[4], &CpuidEcx, sizeof (UINT32)); + CopyMem (&HvVendor[8], &CpuidEdx, sizeof (UINT32)); + HvVendor[12] = '\0'; + + if (AsciiStrCmp (HvVendor, "Microsoft Hv") == 0) { + // + // HV_X64_MSR_APIC_FREQUENCY + // + Msr = AsmReadMsr64 (0x40000023); + if (FSBFrequency != NULL) { + *FSBFrequency = Msr; + } + + // + // HV_X64_MSR_TSC_FREQUENCY + // + Msr = AsmReadMsr64 (0x40000022); + return Msr; + } + + // + // Other hypervisors implement TSC/FSB frequency as an additional CPUID leaf. + // if (CpuidEax < 0x40000010) { return 0; }
hv: instr_emul: add `const` qualifier for some function Add `const` qualifier for is_desc_valid and vie_calculate_gla Acked-by: Eddie Dong
@@ -445,7 +445,7 @@ static int32_t vie_canonical_check(enum vm_cpu_mode cpu_mode, uint64_t gla) return ret; } -static bool is_desc_valid(struct seg_desc *desc, uint32_t prot) +static bool is_desc_valid(const struct seg_desc *desc, uint32_t prot) { bool ret = true; uint32_t type; @@ -487,7 +487,7 @@ static bool is_desc_valid(struct seg_desc *desc, uint32_t prot) *@pre prot must be PROT_READ or PROT_WRITE */ static void vie_calculate_gla(enum vm_cpu_mode cpu_mode, enum cpu_reg_name seg, - struct seg_desc *desc, uint64_t offset_arg, uint8_t addrsize, uint64_t *gla) + const struct seg_desc *desc, uint64_t offset_arg, uint8_t addrsize, uint64_t *gla) { uint64_t firstoff, segbase; uint64_t offset = offset_arg;
add rho_app_id option to build.yml of generated application
@@ -4,6 +4,9 @@ sdkversion: <%=Rhodes::VERSION%> name: <%=@app_name%> version: 1.0 vendor: rhomobile +## Note: rho_app_id send to RhoConnect server for identify application (used in multi-push configuration only) +## we recommend make it same with BundleIdentifier +rho_app_id: com.rhomobile.<%=@app_name_cleared%> build: debug applog: rholog.txt
update lv_init function name
@@ -63,7 +63,7 @@ See the [example HAL](https://github.com/littlevgl/hal) repository! * your_systick_init(); * your_disp_init(); * your_indev_init(); - * **lvgl_init()**; + * **lv_init()**; 10. To **test** create a label: `lv_obj_t * label = lv_label_create(lv_scr_act(), NULL);` 11. In the main *while(1)* call `ptask_handler();` and make a few milliseconds delay (e.g. `your_delay_ms(5);`) 12. Compile the code and load it to your embedded hardware
ames: address review
:: =< =* adult-gate . =| queued-events=(qeu queued-event) - =| cached-state=[?(%5 %~) ames-state-5] + =| cached-state=(unit [%5 ames-state-5]) :: |= [now=@da eny=@ rof=roof] =* larval-gate . ~|(%ames-larval-call-dud (mean tang.u.dud)) :: =/ update-ready=? - ?& ?=([%5 *] cached-state) + ?& ?=(^ cached-state) ?=(~ queued-events) == ?: update-ready =. ames-state.adult-gate - (state-5-to-6:load:adult-core +.cached-state) - =. -.cached-state %~ + ?> ?=(^ cached-state) + (state-5-to-6:load:adult-core +.u.cached-state) + =. cached-state ~ ~> %slog.1^leaf/"ames: metamorphosis reload" [~ adult-gate] :: %born: set .unix-duct and start draining .queued-events %take (take:adult-core [wire duct ~ sign]:+.first-event) == =/ update-ready=? - ?& ?=([%5 *] cached-state) + ?& ?=(^ cached-state) ?=(~ queued-events) == ?: update-ready =. ames-state.adult-gate - (state-5-to-6:load:adult-core +.cached-state) - =. -.cached-state %~ + ?> ?=(^ cached-state) + (state-5-to-6:load:adult-core +.u.cached-state) + =. cached-state ~ ~> %slog.1^leaf/"ames: metamorphosis reload" [moves adult-gate] :: .queued-events has been cleared; metamorphose larval-gate :: [%5 %adult *] - =. cached-state [%5 state.old] + =. cached-state `[%5 state.old] ~> %slog.1^leaf/"ames: larva reload" larval-gate :: ?. ?=(%known -.ship-state) ship-state =/ peer-state=peer-state-5 +.ship-state - =| =rift - =/ scry=(unit (unit cage)) + =/ =rift + ;; @ud + =< q.q %- need %- need (rof ~ %j `beam`[[our %rift %da now] /(scot %p ship)]) - =? rift ?=([~ ~ ^] scry) - ;;(@ud q.q:u.u.scry) =/ =^peer-state :_ +.peer-state =, -.peer-state
Improve .ppasm function.
(def sourcemap (in dasm :sourcemap)) (var last-loc [-2 -2]) (print "\n signal: " (.signal)) + (print " status: " (fiber/status (.fiber))) (print " function: " (dasm :name) " [" (in dasm :source "") "]") (when-let [constants (dasm :constants)] (printf " constants: %.4q" constants))
docs: add step to copy slurm.conf.ohpc on SMS
@@ -9,6 +9,9 @@ the corresponding compute image in a subsequent step. # Install slurm server meta-package [sms](*\#*) (*\install*) ohpc-slurm-server +# Use ohpc-provided file for starting SLURM configuration +[sms](*\#*) cp /etc/slurm/slurm.conf.ohpc /etc/slurm/slurm.conf + # Identify resource manager hostname on master host [sms](*\#*) perl -pi -e "s/ControlMachine=\S+/ControlMachine=${sms_name}/" /etc/slurm/slurm.conf \end{lstlisting}
rnn/demmio: Allow specifying chipset gen manually Add the -a option based off some copypasta from lookup.c
@@ -210,9 +210,20 @@ void doi2cw (struct cctx *cc, struct i2c_ctx *ctx, int byte) { int main(int argc, char **argv) { char *file = NULL; + char *variant = NULL; + unsigned long chip = 0; int c,use_colors=1; - while ((c = getopt (argc, argv, "f:c")) != -1) { + while ((c = getopt (argc, argv, "f:ca:")) != -1) { switch (c) { + case 'a': + chip = strtoull(optarg, NULL, 16); + if (!chip) + variant = strdup(optarg); + else { + free(variant); + variant = NULL; + } + break; case 'f':{ file = strdup(optarg); break; @@ -316,10 +327,18 @@ int main(int argc, char **argv) { cc->seq.action = SEQ_NONE; } - if (addr == 0 && !cc->chipset.chipset) { + if (!cc->chipset.chipset) { + /* The user may have manually specified this */ + if (variant) { + rnndec_varadd(cc->ctx, "chipset", variant); + } else if (chip) { + rnndec_varaddvalue(cc->ctx, "chipset", chip); + } else if (addr == 0) { parse_pmc_id(value, &cc->chipset); if (cc->chipset.chipset) - rnndec_varaddvalue(cc->ctx, "chipset", cc->chipset.chipset); + rnndec_varaddvalue(cc->ctx, "chipset", + cc->chipset.chipset); + } } else if (cc->chipset.card_type >= 0x50 && addr == 0x1700) { cc->praminbase = value << 16; } else if (cc->chipset.card_type == 0x50 && addr == 0x1704) {
chat: pad message, not daybreak Fixes urbit/landscape#475
@@ -189,7 +189,6 @@ export default class ChatMessage extends Component<ChatMessageProps> { ref={this.divRef} pt={renderSigil ? 2 : 0} pb={isLastMessage ? 4 : 2} - pr={5} className={containerClass} style={style} > @@ -199,10 +198,10 @@ export default class ChatMessage extends Component<ChatMessageProps> { {renderSigil ? ( <> <MessageAuthor pb={'2px'} {...messageProps} /> - <Message pl={5} pr={3} {...messageProps} /> + <Message pl={5} pr={4} {...messageProps} /> </> ) : ( - <Message pl={5} pr={3} timestampHover {...messageProps} /> + <Message pl={5} pr={4} timestampHover {...messageProps} /> )} <Box style={unreadContainerStyle}> {isLastRead ? (
Avoid stack overflow in self_talk_nonblocking_test Build was failing in unit tests on my machine where the stack limit is 8MB (ulimit -s 8192) Confirmed build now works with ulimit -s 512
@@ -103,7 +103,7 @@ int mock_client(int writefd, int readfd, uint8_t *expected_data, uint32_t size) result = s2n_negotiate(conn, &blocked); if (result < 0) { - _exit(1); + return 1; } /* Receive 10MB of data */ @@ -124,7 +124,7 @@ int mock_client(int writefd, int readfd, uint8_t *expected_data, uint32_t size) for (int i = 0; i < size; i++) { if (buffer[i] != expected_data[i]) { - _exit(1); + return 1; } } @@ -134,13 +134,11 @@ int mock_client(int writefd, int readfd, uint8_t *expected_data, uint32_t size) /* Give the server a chance to a void a sigpipe */ sleep(1); - _exit(0); + return 0; } int main(int argc, char **argv) { - uint8_t data[10000000]; - uint8_t *ptr = data; struct s2n_connection *conn; struct s2n_config *config; s2n_blocked_status blocked; @@ -148,7 +146,6 @@ int main(int argc, char **argv) pid_t pid; int server_to_client[2]; int client_to_server[2]; - struct s2n_blob blob = {.data = data, .size = sizeof(data)}; BEGIN_TEST(); @@ -158,7 +155,14 @@ int main(int argc, char **argv) EXPECT_SUCCESS(s2n_config_add_cert_chain_and_key(config, certificate, private_key)); EXPECT_SUCCESS(s2n_config_add_dhparams(config, dhparams)); + const uint32_t data_size = 10000000; + uint8_t *data = malloc(data_size); + EXPECT_NOT_NULL(data); + /* Get some random data to send/receive */ + struct s2n_blob blob; + blob.data = data; + blob.size = data_size; EXPECT_SUCCESS(s2n_get_urandom_data(&blob)); /* Create a pipe */ @@ -173,7 +177,10 @@ int main(int argc, char **argv) EXPECT_SUCCESS(close(server_to_client[1])); /* Run the client */ - mock_client(client_to_server[1], server_to_client[0], data, sizeof(data)); + const int client_rc = mock_client(client_to_server[1], server_to_client[0], data, data_size); + + free(data); + _exit(client_rc); } /* This is the parent */ @@ -199,7 +206,8 @@ int main(int argc, char **argv) /* Try to all 10MB of data, should be enough to fill PIPEBUF, so we'll get blocked at some point */ - uint32_t remaining = sizeof(data); + uint32_t remaining = data_size; + uint8_t *ptr = data; while (remaining) { int r = s2n_send(conn, ptr, remaining, &blocked); if (r < 0) { @@ -215,7 +223,7 @@ int main(int argc, char **argv) } /* Remaining shouldn't have progressed at all */ - EXPECT_EQUAL(remaining, sizeof(data)); + EXPECT_EQUAL(remaining, data_size); /* Wake the child process by sending it SIGCONT */ EXPECT_SUCCESS(kill(pid, SIGCONT)); @@ -244,5 +252,7 @@ int main(int argc, char **argv) EXPECT_SUCCESS(s2n_config_free(config)); END_TEST(); + free(data); + return 0; }
amdgpu: average gfx and cpu power as float
@@ -137,6 +137,7 @@ void amdgpu_get_instant_metrics(struct amdgpu_common_metrics *metrics) { } #define UPDATE_METRIC_AVERAGE(FIELD) do { int value_sum = 0; for (size_t s=0; s < METRICS_SAMPLE_COUNT; s++) { value_sum += metrics_buffer[s].FIELD; } amdgpu_common_metrics.FIELD = value_sum / METRICS_SAMPLE_COUNT; } while(0) +#define UPDATE_METRIC_AVERAGE_FLOAT(FIELD) do { float value_sum = 0; for (size_t s=0; s < METRICS_SAMPLE_COUNT; s++) { value_sum += metrics_buffer[s].FIELD; } amdgpu_common_metrics.FIELD = value_sum / METRICS_SAMPLE_COUNT; } while(0) #define UPDATE_METRIC_MAX(FIELD) do { int cur_max = metrics_buffer[0].FIELD; for (size_t s=1; s < METRICS_SAMPLE_COUNT; s++) { cur_max = MAX(cur_max, metrics_buffer[s].FIELD); }; amdgpu_common_metrics.FIELD = cur_max; } while(0) #define UPDATE_METRIC_LAST(FIELD) do { amdgpu_common_metrics.FIELD = metrics_buffer[METRICS_SAMPLE_COUNT - 1].FIELD; } while(0) @@ -171,8 +172,8 @@ void amdgpu_metrics_polling_thread() { // Copy the results from the different metrics to amdgpu_common_metrics amdgpu_common_metrics_m.lock(); UPDATE_METRIC_AVERAGE(gpu_load_percent); - UPDATE_METRIC_AVERAGE(average_gfx_power_w); - UPDATE_METRIC_AVERAGE(average_cpu_power_w); + UPDATE_METRIC_AVERAGE_FLOAT(average_gfx_power_w); + UPDATE_METRIC_AVERAGE_FLOAT(average_cpu_power_w); UPDATE_METRIC_AVERAGE(current_gfxclk_mhz); UPDATE_METRIC_AVERAGE(current_uclk_mhz); @@ -199,7 +200,6 @@ void amdgpu_get_metrics(){ gpu_info.load = amdgpu_common_metrics.gpu_load_percent; gpu_info.powerUsage = amdgpu_common_metrics.average_gfx_power_w; - gpu_info.CoreClock = amdgpu_common_metrics.current_gfxclk_mhz; gpu_info.MemClock = amdgpu_common_metrics.current_uclk_mhz;
Add tests for string.escapepattern
function suite.startswith_OnEmptyNeedle() test.istrue(string.startswith("Abcdef", "")) end + + + +-- +-- string.escapepattern() tests +-- + + function suite.escapepattern_escapes() + test.isequal("boost_filesystem%-vc140%.1%.61%.0%.0", string.escapepattern("boost_filesystem-vc140.1.61.0.0")) + test.isequal("footage/down/temp/cars_%[100%]_upper/cars_%[100%]_upper%.exr", string.escapepattern("footage/down/temp/cars_[100]_upper/cars_[100]_upper.exr")) + end + + function suite.escapepattern_doesntEscape() + local s = '<something foo="bar" />' + test.isequal(s, s:escapepattern()) + + s = 'lorem ipsum dolor sit amet' + test.isequal(s, s:escapepattern()) + + s = 'forward/slashes/foo/bar' + test.isequal(s, s:escapepattern()) + + s = '\\back\\slashes' + test.isequal(s, s:escapepattern()) + + s = 'new\nlines' + test.isequal(s, s:escapepattern()) + end
node_id address in flash doesn't need to be known by the bootloader
@@ -78,7 +78,7 @@ void LuosBootloader_SaveNodeID(void) { uint16_t node_id = Robus_GetNodeID(); - LuosHAL_SaveNodeID(SHARED_MEMORY_ADDRESS, node_id); + LuosHAL_SaveNodeID(node_id); } /****************************************************************************** @@ -88,7 +88,7 @@ void LuosBootloader_SaveNodeID(void) ******************************************************************************/ void LuosBootloader_SetNodeID(void) { - uint16_t node_id = LuosHAL_GetNodeID(SHARED_MEMORY_ADDRESS); + uint16_t node_id = LuosHAL_GetNodeID(); Robus_SetNodeID(node_id); }
hv: pci: remove some unnecessary functions We define some functions to read some fields of the CFG header registers. We could remove them since they're not necessary since calling pci_pdev_read_cfg is simple.
@@ -259,7 +259,7 @@ static inline bool is_host_bridge(const struct pci_pdev *pdev) static inline bool is_bridge(const struct pci_pdev *pdev) { - return pdev->hdr_type == PCIM_HDRTYPE_BRIDGE; + return ((pdev->hdr_type & PCIM_HDRTYPE) == PCIM_HDRTYPE_BRIDGE); } static inline uint32_t pci_bar_offset(uint32_t idx) @@ -350,31 +350,11 @@ static inline bool is_pci_vendor_valid(uint32_t vendor_id) (vendor_id == 0xFFFF0000U) || (vendor_id == 0xFFFFU)); } -static inline uint32_t read_pci_pdev_cfg_vendor(union pci_bdf pbdf) -{ - return pci_pdev_read_cfg(pbdf, PCIR_VENDOR, 2U); -} - -static inline uint8_t read_pci_pdev_cfg_headertype(union pci_bdf pbdf) -{ - return (uint8_t)pci_pdev_read_cfg(pbdf, PCIR_HDRTYPE, 1U); -} - -static inline uint8_t read_pci_pdev_cfg_secbus(union pci_bdf pbdf) -{ - return (uint8_t)pci_pdev_read_cfg(pbdf, PCIR_SECBUS_1, 1U); -} - static inline bool is_pci_cfg_multifunction(uint8_t header_type) { return ((header_type & PCIM_MFDEV) == PCIM_MFDEV); } -static inline bool is_pci_cfg_bridge(uint8_t header_type) -{ - return ((header_type & PCIM_HDRTYPE) == PCIM_HDRTYPE_BRIDGE); -} - bool is_plat_hidden_pdev(union pci_bdf bdf); bool pdev_need_bar_restore(const struct pci_pdev *pdev); void pdev_restore_bar(const struct pci_pdev *pdev);
pbio/drivebase: set default settings Still need appropriate setters like for motors, but this sets it to reasonable default while testing.
@@ -164,21 +164,21 @@ static pbio_error_t pbio_drivebase_setup(pbio_drivebase_t *db, db->log.num_values = DRIVEBASE_LOG_NUM_VALUES; // Configure heading controller - err = pbio_control_set_limits(&db->control_heading.settings, db->dif_per_deg, 45, 20); + err = pbio_control_set_limits(&db->control_heading.settings, db->dif_per_deg, 90, 180); if (err != PBIO_SUCCESS) { return err; } - err = pbio_control_set_pid_settings(&db->control_heading.settings, db->dif_per_deg, 100, 0, 5, 100, 2, 5, 5, 200); + err = pbio_control_set_pid_settings(&db->control_heading.settings, db->dif_per_deg, 200, 0, 12, 100, 2, 5, 5, 200); if (err != PBIO_SUCCESS) { return err; } // Configure distance controller - err = pbio_control_set_limits(&db->control_distance.settings, db->sum_per_mm, 100, 50); + err = pbio_control_set_limits(&db->control_distance.settings, db->sum_per_mm, 200, 400); if (err != PBIO_SUCCESS) { return err; } - err = pbio_control_set_pid_settings(&db->control_distance.settings, db->sum_per_mm, 100, 0, 5, 100, 2, 5, 5, 200); + err = pbio_control_set_pid_settings(&db->control_distance.settings, db->sum_per_mm, 200, 0, 10, 100, 2, 5, 5, 200); if (err != PBIO_SUCCESS) { return err; }
fix overlaying of resizehint windows in tiling layout
@@ -330,6 +330,9 @@ tile(Monitor *m) // client is in the master h = (m->wh - my) / (MIN(n, m->nmaster) - i); animateclient(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), framecount, 0); + if (m->nmaster == 1 && n > 1) { + mw = c->w + c->bw * 2; + } if (my + HEIGHT(c) < m->wh) my += HEIGHT(c); } else {
test SCTP security
@@ -21,14 +21,20 @@ static const char *request_tail = "User-agent: libneat\r\nConnection: close\r\n\ static char *config_property = "{\ \"transport\": [\ {\ - \"value\": \"TCP\",\ + \"value\": \"SCTP\",\ \"precedence\": 1\ }\ ],\ \"security\": {\ \"value\": true,\ \"precedence\": 2\ + },\ + \"local_ips\": [\ + { \ + \"value\": \"127.0.0.1\", \ + \"precedence\": 1 \ } \ + ] \ }";\ /* static char *config_property = "{\ @@ -144,14 +150,19 @@ int main(int argc, char *argv[]) goto cleanup; } - neat_set_property(ctx, flow, config_property); + if (neat_set_property(ctx, flow, config_property)) { + fprintf(stderr, "%s - error: neat_set_property\n", __func__); + result = EXIT_FAILURE; + goto cleanup; + } ops.on_connected = on_connected; ops.on_error = on_error; neat_set_operations(ctx, flow, &ops); + neat_log_level(ctx, NEAT_LOG_DEBUG); // wait for on_connected or on_error to be invoked - if (neat_open(ctx, flow, argv[1], 443, NULL, 0) == NEAT_OK) + if (neat_open(ctx, flow, argv[1], 23232, NULL, 0) == NEAT_OK) neat_start_event_loop(ctx, NEAT_RUN_DEFAULT); else { fprintf(stderr, "Could not open flow\n");
[chainmaker][#553]modify free location
@@ -512,7 +512,15 @@ BOAT_RESULT BoatHlchainmakerContractInvoke(BoatHlchainmakerTx *tx_ptr, char* met if (tx_response->code == SUCCESS) { transactation_info = common__transaction_info__unpack(NULL, tx_response->contract_result->result.len, tx_response->contract_result->result.data); invoke_response->gas_used = transactation_info->transaction->result->contract_result->gas_used; + if (tx_response != NULL) + { + common__tx_response__free_unpacked(tx_response, NULL); + } + if (transactation_info != NULL) + { common__transaction_info__free_unpacked(transactation_info, NULL); + } + break; } } @@ -531,10 +539,7 @@ BOAT_RESULT BoatHlchainmakerContractInvoke(BoatHlchainmakerTx *tx_ptr, char* met BoatFree(invoke_tx_id); } - if (tx_response != NULL) - { - common__tx_response__free_unpacked(tx_response, NULL); - } + return result; }
Don't allow invalid sample format
@@ -91,6 +91,7 @@ static uint32_t lovrSoundDataReadRing(SoundData* soundData, uint32_t offset, uin SoundData* lovrSoundDataCreateRaw(uint32_t frameCount, uint32_t channelCount, uint32_t sampleRate, SampleFormat format, struct Blob* blob) { + lovrAssert(format != SAMPLE_INVALID, "Invalid format"); SoundData* soundData = lovrAlloc(SoundData); soundData->format = format; soundData->sampleRate = sampleRate; @@ -112,6 +113,7 @@ SoundData* lovrSoundDataCreateRaw(uint32_t frameCount, uint32_t channelCount, ui } SoundData* lovrSoundDataCreateStream(uint32_t bufferSizeInFrames, uint32_t channels, uint32_t sampleRate, SampleFormat format) { + lovrAssert(format != SAMPLE_INVALID, "Invalid format"); SoundData* soundData = lovrAlloc(SoundData); soundData->format = format; soundData->sampleRate = sampleRate;
Remove scopeLog call avoid stack overflow with `doWrite` when log destination path is file `doWrite` | 'scopeLog' | 'logSend' | 'transportSend' | '__write_libc' | `doWrite` ... closes
@@ -2120,7 +2120,6 @@ doWrite(int fd, uint64_t initialTime, int success, const void *buf, ssize_t byte struct net_info_t *net = getNetEntry(fd); if (success) { - scopeLog(CFG_LOG_TRACE, "fd:%d %s", fd, func); if (net) { // This is a network descriptor doSetAddrs(fd);
Include all streetnames (separated using '/') in Valhalla routing results
@@ -480,8 +480,9 @@ namespace carto { std::string streetName; if (maneuver.get("street_names").is<picojson::array>()) { - const picojson::array& streetNames = maneuver.get("street_names").get<picojson::array>(); - streetName = !streetNames.empty() ? streetNames[0].get<std::string>() : std::string(""); + for (const picojson::value& name : maneuver.get("street_names").get<picojson::array>()) { + streetName += (streetName.empty() ? "" : "/") + name.get<std::string>(); + } } std::string instruction = maneuver.get("instruction").get<std::string>();
asm: do not set SDR1 on POWER9 This register does not exist in ISAv3.
@@ -655,7 +655,6 @@ cleanup_tlb: .global init_shared_sprs init_shared_sprs: li %r0,0 - mtspr SPR_SDR1, %r0 mtspr SPR_AMOR, %r0 mfspr %r3,SPR_PVR @@ -676,18 +675,21 @@ init_shared_sprs: b 9f 1: /* P7 */ + mtspr SPR_SDR1, %r0 /* TSCR: Value from pHyp */ LOAD_IMM32(%r3,0x880DE880) mtspr SPR_TSCR, %r3 b 9f 2: /* P7+ */ + mtspr SPR_SDR1, %r0 /* TSCR: Recommended value by HW folks */ LOAD_IMM32(%r3,0x88CDE880) mtspr SPR_TSCR, %r3 b 9f 3: /* P8E/P8 */ + mtspr SPR_SDR1, %r0 /* TSCR: Recommended value by HW folks */ LOAD_IMM32(%r3,0x8ACC6880) mtspr SPR_TSCR, %r3
fixed mouse cursor after alt+tab
@@ -1116,19 +1116,21 @@ void tic_sys_poll() } } -#if defined(__LINUX__) - if(lockInput) - return; -#endif - processMouse(); #if defined(TOUCH_INPUT_SUPPORT) processTouchInput(); #endif - processKeyboard(); processGamepad(); + + SCOPE(processKeyboard()) + { +#if defined(__LINUX__) + if(!lockInput) + return; +#endif + } } bool tic_sys_keyboard_text(char* text)
Pointing common.mk's SOURCE_DIR to subdirectories of fpga, to avoid circular dependency caused by pointing to fpga, which contains generated-src.
@@ -58,7 +58,7 @@ include $(base_dir)/tools/dromajo/dromajo.mk # Returns a list of files in directory $1 with file extension $2. lookup_srcs = $(shell find -L $(1)/ -name target -prune -o -iname "*.$(2)" -print 2> /dev/null) -SOURCE_DIRS = $(addprefix $(base_dir)/,generators sims/firesim/sim tools/barstools/iocell fpga) +SOURCE_DIRS = $(addprefix $(base_dir)/,generators sims/firesim/sim tools/barstools/iocell fpga/fpga-shells fpga/src) SCALA_SOURCES = $(call lookup_srcs,$(SOURCE_DIRS),scala) VLOG_SOURCES = $(call lookup_srcs,$(SOURCE_DIRS),sv) $(call lookup_srcs,$(SOURCE_DIRS),v) # This assumes no SBT meta-build sources
Updated how the uid field is initialized to account for char16->char8
@@ -2700,7 +2700,7 @@ NVM_API int nvm_get_jobs(struct job *p_jobs, const NVM_UINT32 count) UINT32 DimmCount = 0; PT_OUTPUT_PAYLOAD_FW_LONG_OP_STATUS *pLongOpStatus; int job_index = 0; - unsigned int i; + unsigned int i, j; int nvm_status = 0; struct Command CmdStub; @@ -2777,8 +2777,17 @@ NVM_API int nvm_get_jobs(struct job *p_jobs, const NVM_UINT32 count) else { p_jobs[i].status = NVM_JOB_STATUS_UNKNOWN; } - memmove(p_jobs[i].uid, pDimms[i].DimmUid, MAX_DIMM_UID_LENGTH); - memmove(p_jobs[i].affected_element, pDimms[i].DimmUid, MAX_DIMM_UID_LENGTH); + + for (j = 0; j < MAX_DIMM_UID_LENGTH; j++) + { + p_jobs[i].uid[j] = (char)pDimms[i].DimmUid[j]; + } + + for (j = 0; j < MAX_DIMM_UID_LENGTH; j++) + { + p_jobs[i].affected_element[j] = (char)pDimms[i].DimmUid[j]; + } + p_jobs[i].result = NULL; job_index++; }
Add AVX flags for clang/aocc as well
@@ -78,6 +78,10 @@ GCCMINORVERSIONGTEQ7 := $(shell expr `$(CC) -dumpversion | cut -f2 -d.` \>= 7) ifeq ($(GCCVERSIONGTEQ4)$(GCCMINORVERSIONGTEQ7), 11) CCOMMON_OPT += -mavx2 endif +else +ifeq ($(C_COMPILER), CLANG) +CCOMMON_OPT += -mavx2 +endif endif ifeq ($(F_COMPILER), GFORTRAN) # AVX2 support was added in 4.7.0
data MAINTENANCE add missing description of lyd_dup_recursive()
@@ -1677,6 +1677,13 @@ lyd_compare(const struct lyd_node *node1, const struct lyd_node *node2, int opti * @brief Duplicate a single node and connect it into @p parent (if present) or last of @p first siblings. * * Ignores LYD_DUP_WITH_PARENTS and LYD_DUP_WITH_SIBLINGS which are supposed to be handled by lyd_dup(). + * + * @param[in] node Original node to duplicate + * @param[in] parent Parent to insert into, NULL for top-level sibling. + * @param[in,out] first First sibling, NULL if no top-level sibling exist yet. Can be also NULL if @p parent is set. + * @param[in] options Bitmask of options flags, see @ref dupoptions. + * @param[out] dup_p Pointer where the created duplicated node is placed (besides connecting it int @p parent / @p first sibling). + * @return LY_ERR value */ static LY_ERR lyd_dup_recursive(const struct lyd_node *node, struct lyd_node *parent, struct lyd_node **first, int options,
update README to show portage support
@@ -176,6 +176,7 @@ The test project: [xmake-core](https://github.com/xmake-io/xmake/tree/master/cor * Apt on ubuntu/debian (apt::zlib1g-dev) * Clib (clib::clibs/[email protected]) * Dub (dub::log 0.4.3) +* Portage on Gentoo/Linux (portage::libhandy) ## Supported platforms
Make gard display show that a record is cleared When clearing gard records, Hostboot only modifies the record_id portion to be 0xFFFFFFFF. The remainder of the entry remains. Without this change it can be confusing to users to know that the record they are looking at is no longer valid.
@@ -488,11 +488,12 @@ static int do_list(struct gard_ctx *ctx, int argc, char **argv) draw_ruler('-', ruler_size); for_each_gard(ctx, pos, &gard, &rc) { - printf(" %08x | %08x | %-10s | %s\n", + printf(" %08x | %08x | %-10s | %s%s\n", be32toh(gard.record_id), be32toh(gard.errlog_eid), deconfig_reason_str(gard.error_type), - format_path(&gard.target_id, scratch)); + format_path(&gard.target_id, scratch), + gard.record_id == 0xffffffff ? " *CLEARED*" : ""); } draw_ruler('=', ruler_size); @@ -515,7 +516,7 @@ static int do_show_i(struct gard_ctx *ctx, int pos, struct gard_record *gard, vo if (be32toh(gard->record_id) == id) { unsigned int count, i; - printf("Record ID: 0x%08x\n", id); + printf("Record ID: 0x%08x%s\n", id, id == 0xffffffff ? " *CLEARED*" : ""); printf("========================\n"); printf("Error ID: 0x%08x\n", be32toh(gard->errlog_eid)); printf("Error Type: %s (0x%02x)\n",
Seed random number on each script start using time register
#include "game.h" #include "Macros.h" +UBYTE *ptr_div_reg = (UBYTE *)0xFF04; UBYTE script_ptr_bank = 0; UWORD script_ptr = 0; UWORD script_ptr_x = 0; @@ -105,8 +106,13 @@ UBYTE ScriptLastFnComplete(); void ScriptStart(BANK_PTR *events_ptr) { + UBYTE rnd; script_ptr_bank = events_ptr->bank; script_ptr = ((UWORD)bank_data_ptrs[script_ptr_bank]) + events_ptr->offset; + + rnd = *(ptr_div_reg); + initrand(rnd); + script_start_ptr = script_ptr; }
libhfuzz: make memcmp function succeed if length==0
@@ -49,6 +49,10 @@ int strcasecmp(const char *s1, const char *s2) int strncmp(const char *s1, const char *s2, size_t n) { + if (n == 0) { + return 0; + } + unsigned int v = 0; size_t i = 0; @@ -67,6 +71,10 @@ int strncmp(const char *s1, const char *s2, size_t n) int strncasecmp(const char *s1, const char *s2, size_t n) { + if (n == 0) { + return 0; + } + unsigned int v = 0; size_t i = 0; @@ -106,6 +114,10 @@ char *strcasestr(const char *haystack, const char *needle) __attribute__ ((always_inline)) static inline int _memcmp(const void *m1, const void *m2, size_t n, void *addr) { + if (n == 0) { + return 0; + } + unsigned int v = 0; const char *s1 = (const char *)m1;
docs: add an example list for esp-wrover-kit
@@ -363,6 +363,11 @@ Now to Development Please proceed to :doc:`../../get-started/index`, where Section :ref:`get-started-step-by-step` will quickly help you set up the development environment and then flash an example project onto your board. +The application examples that use some hardware specific to your ESP-WROVER-KIT can be found below. + +* On-board LCD example: :example:`peripherals/spi_master/lcd` +* SD card slot example: :example:`storage/sd_card` +* Camera connector example: https://github.com/espressif/esp32-camera Related Documents -----------------
[misc] change cmake to indicate debugable luagit when debug mode
@@ -7,6 +7,16 @@ if(NOT EXISTS ${LUAJIT_SRC_DIR}) execute_process(COMMAND git submodule update --init --force) endif() +set(LUAJIT_GIT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/luajit/.git) + +if(CMAKE_BUILD_TYPE MATCHES "Debug") + execute_process(COMMAND git submodule update) + execute_process(COMMAND git --git-dir=${LUAJIT_GIT_FILE} checkout origin/debugable) +else() + execute_process(COMMAND git submodule update) + execute_process(COMMAND git --git-dir=${LUAJIT_GIT_FILE} checkout origin/master) +endif() + set(LMDB_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/lmdb) set(LMDB_BUILD_DIR ${LMDB_SRC_DIR}/libraries/liblmdb)
Fixed pipelined request processing, broken by
@@ -1058,7 +1058,7 @@ nxt_h1p_keepalive(nxt_task_t *task, nxt_h1proto_t *h1p, nxt_conn_t *c) in->mem.pos = in->mem.start; in->mem.free = in->mem.start + size; - nxt_h1p_conn_header_parse(task, c, c->socket.data); + nxt_h1p_conn_request_init(task, c, c->socket.data); } }
Corrected minor typos in value descriptions
@@ -94,7 +94,7 @@ syscfg.defs: value: 100 SPI_0_MASTER: - description: 'Enable DA14xxx SPI Master' + description: 'Enable DA1469x SPI Master' value: 0 restrictions: - "!SPI_0_SLAVE" @@ -109,7 +109,7 @@ syscfg.defs: value: '' SPI_0_SLAVE: - description: 'Enable DA14xxx SPI Slave' + description: 'Enable DA1469x SPI Slave' value: 0 restrictions: - "!SPI_0_MASTER" @@ -127,7 +127,7 @@ syscfg.defs: value: '' SPI_1_MASTER: - description: 'Enable DA14xxx SPI2 Master' + description: 'Enable DA1469x SPI2 Master' value: 0 restrictions: - "!SPI_1_SLAVE" @@ -142,7 +142,7 @@ syscfg.defs: value: '' SPI_1_SLAVE: - description: 'Enable DA14xxx SPI2 Slave' + description: 'Enable DA1469x SPI2 Slave' value: 0 restrictions: - "!SPI_1_MASTER"
better cuda configuration
@@ -165,10 +165,10 @@ ENDIF() IF (CUDA_REQUIRED) IF(HOST_OS_LINUX) LDFLAGS("-L${CUDA_ROOT}/lib64/stubs") + EXTRALIBS(-lcuda) ELSEIF(HOST_OS_DARWIN) LDFLAGS("-F${CUDA_ROOT}/lib/stubs -framework CUDA") ENDIF() - EXTRALIBS(-lcuda) ENDIF() IF (HOST_OS_WINDOWS)
vboot: Remove unused VBOOT_HASH_SYSJUMP defines Remove unused defines BRANCH=none TEST=make buildall
@@ -30,9 +30,6 @@ struct vboot_hash_tag { uint32_t size; }; -#define VBOOT_HASH_SYSJUMP_TAG 0x5648 /* "VH" */ -#define VBOOT_HASH_SYSJUMP_VERSION 1 - #define CHUNK_SIZE 1024 /* Bytes to hash per deferred call */ #define WORK_INTERVAL_US 100 /* Delay between deferred calls */
Fix primitive restart overflow for u32 indices;
@@ -491,8 +491,8 @@ static void lovrGpuBindMesh(Mesh* mesh, Shader* shader, int divisorMultiplier) { if (mesh->indexBuffer && mesh->indexCount > 0) { lovrGpuBindBuffer(BUFFER_INDEX, mesh->indexBuffer->id); lovrBufferFlush(mesh->indexBuffer); -#ifdef LOVR_GL - uint32_t primitiveRestart = (1 << (mesh->indexSize * 8)) - 1; +#ifndef LOVR_GL + uint32_t primitiveRestart = mesh->indexSize == 4 ? 0xffffffff : 0xffff; if (state.primitiveRestart != primitiveRestart) { state.primitiveRestart = primitiveRestart; glPrimitiveRestartIndex(primitiveRestart);
comment out unimplemented function
@@ -111,8 +111,8 @@ lv_color_t lv_canvas_get_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y); * Get the image of the canvas as a pointer to an `lv_img_dsc_t` variable. * @param canvas pointer to a canvas object * @return pointer to the image descriptor. - */ lv_img_dsc_t * lv_canvas_get_img(lv_obj_t * canvas); + */ /** * Get style of a canvas.
feat(boards): Add battery sensor for Makerdiary M60 keyboard
zephyr,sram = &sram0; zephyr,flash = &flash0; zephyr,console = &cdc_acm_uart; + zmk,battery = &vbatt; }; leds { }; }; + vbatt: vbatt { + compatible = "zmk,battery-voltage-divider"; + label = "BATTERY"; + io-channels = <&adc 0>; + output-ohms = <1000000>; + full-ohms = <(1000000 + 1000000)>; + }; + }; &adc {
Use coverage analyze as default task
@@ -140,9 +140,9 @@ def do_analyze_driver_vs_reference(outcome_file, components, ignored_tests): def main(): try: parser = argparse.ArgumentParser(description=__doc__) - parser.add_argument('--outcomes', metavar='OUTCOMES.CSV', + parser.add_argument('outcomes', metavar='OUTCOMES.CSV', help='Outcome file to analyze') - parser.add_argument('--task', + parser.add_argument('--task', default='analyze_coverage', help='Analyze to be done: analyze_coverage or analyze_driver_vs_reference') parser.add_argument('--components', help='List of test components to compare. Must be exactly 2 in valid order: driver,reference. '
[CUDA] Fix issue with PTX files not being closed properly
#include "common.h" #include "pocl.h" +#include "pocl_file_util.h" #include "pocl_runtime_config.h" #include "pocl-ptx-gen.h" @@ -130,10 +131,9 @@ int pocl_ptx_gen(const char *bc_filename, llvm::legacy::PassManager passes; // Add pass to emit PTX - std::error_code ec; - llvm::raw_fd_ostream *ptx = - new llvm::raw_fd_ostream(ptx_filename, ec, llvm::sys::fs::F_Text); - if (machine->addPassesToEmitFile(passes, *ptx, + llvm::SmallVector<char, 4096> data; + llvm::raw_svector_ostream ptx_stream(data); + if (machine->addPassesToEmitFile(passes, ptx_stream, llvm::TargetMachine::CGFT_AssemblyFile)) { POCL_MSG_ERR("[CUDA] ptx-gen: failed to add passes\n"); @@ -143,7 +143,8 @@ int pocl_ptx_gen(const char *bc_filename, // Run passes passes.run(**module); - return 0; + std::string ptx = ptx_stream.str(); // flush + return pocl_write_file(ptx_filename, ptx.c_str(), ptx.size(), 0, 0); } void pocl_add_kernel_annotations(llvm::Module *module)
Added --no-backup-if-mismatch to the patchrepo and removepatch functions to avoid creating a .orig file
@@ -232,13 +232,13 @@ if [ "$AOMP_APPLY_ROCM_PATCHES" == 1 ] ; then fi if [ "$applypatch" == "yes" ] ; then echo "Applying patch $patchfile to $patchdir" - patch -p1 <$patchfile + patch -p1 --no-backup-if-mismatch <$patchfile fi fi } function removepatch(){ -if [ "$AOMP_APPLY_ROCM_PATCHES" == 1 ] && [ "AOMP_STANDALONE_BUILD != 1" ] ; then +if [ "$AOMP_APPLY_ROCM_PATCHES" == 1 ] && [ "$AOMP_STANDALONE_BUILD" != 1 ] ; then cd $patchdir echo "Testing reverse patch $patchfile to $patchdir" reversepatch="yes" @@ -250,7 +250,7 @@ if [ "$AOMP_APPLY_ROCM_PATCHES" == 1 ] && [ "AOMP_STANDALONE_BUILD != 1" ] ; the fi if [ "$reversepatch" == "yes" ] ; then echo "Reversing patch $patchfile to $patchdir" - patch -p1 -R -t <$patchfile + patch -p1 -R -t --no-backup-if-mismatch <$patchfile fi fi }
linux-cp: fix endianess for autoendian methods If an API methos is specified as "autoendian" it should use macros with _END at the end. Type: fix
@@ -94,7 +94,7 @@ vl_api_lcp_itf_pair_add_del_t_handler (vl_api_lcp_itf_pair_add_del_t *mp) } BAD_SW_IF_INDEX_LABEL; - REPLY_MACRO (VL_API_LCP_ITF_PAIR_ADD_DEL_REPLY); + REPLY_MACRO_END (VL_API_LCP_ITF_PAIR_ADD_DEL_REPLY); } static void @@ -122,7 +122,7 @@ vl_api_lcp_itf_pair_add_del_v2_t_handler (vl_api_lcp_itf_pair_add_del_v2_t *mp) } BAD_SW_IF_INDEX_LABEL; - REPLY_MACRO2 (VL_API_LCP_ITF_PAIR_ADD_DEL_V2_REPLY, + REPLY_MACRO2_END (VL_API_LCP_ITF_PAIR_ADD_DEL_V2_REPLY, { rmp->host_sw_if_index = ntohl (host_sw_if_index); }); } @@ -184,7 +184,7 @@ vl_api_lcp_default_ns_get_t_handler (vl_api_lcp_default_ns_get_t *mp) if (!reg) return; - REPLY_MACRO_DETAILS2 (VL_API_LCP_DEFAULT_NS_GET_REPLY, ({ + REPLY_MACRO_DETAILS2_END (VL_API_LCP_DEFAULT_NS_GET_REPLY, ({ ns = (char *) lcp_get_default_ns (); if (ns) clib_strncpy ((char *) rmp->netns, ns,
Need to set MSG_NOSIGNAL for some sendmsg() calls.
@@ -4566,7 +4566,11 @@ neat_write_flush(struct neat_ctx *ctx, struct neat_flow *flow) msghdr.msg_flags = 0; if (flow->socket->fd != -1) { +#ifndef MSG_NOSIGNAL rv = sendmsg(flow->socket->fd, (const struct msghdr *)&msghdr, 0); +#else + rv = sendmsg(flow->socket->fd, (const struct msghdr *)&msghdr, MSG_NOSIGNAL); +#endif } else { #if defined(USRSCTP_SUPPORT) if (neat_base_stack(flow->socket->stack) == NEAT_STACK_SCTP) { @@ -4685,7 +4689,6 @@ neat_write_to_lower_layer(struct neat_ctx *ctx, struct neat_flow *flow, size_t len; int atomic; neat_error_code code = NEAT_OK; - int flags = 0; #ifdef NEAT_SCTP_DTLS struct security_data *private = NULL; #endif @@ -4925,12 +4928,11 @@ neat_write_to_lower_layer(struct neat_ctx *ctx, struct neat_flow *flow, #endif #ifndef MSG_NOSIGNAL - flags = 0; -#else // MSG_NOSIGNAL - flags = MSG_NOSIGNAL; -#endif // MSG_NOSIGNAL + rv = sendmsg(flow->socket->fd, (const struct msghdr *)&msghdr, 0); +#else + rv = sendmsg(flow->socket->fd, (const struct msghdr *)&msghdr, MSG_NOSIGNAL); +#endif - rv = sendmsg(flow->socket->fd, (const struct msghdr *)&msghdr, flags); #ifdef NEAT_SCTP_DTLS } #endif @@ -7233,7 +7235,13 @@ neat_sctp_open_stream(struct neat_pollable_socket *socket, uint16_t sid) #endif msghdr.msg_flags = 0; + +#ifndef MSG_NOSIGNAL rv = sendmsg(socket->fd, (const struct msghdr *)&msghdr, 0); +#else + rv = sendmsg(socket->fd, (const struct msghdr *)&msghdr, MSG_NOSIGNAL); +#endif + if (rv < 0) { if (errno == EWOULDBLOCK) { //neat_log(NEAT_LOG_ERROR, "%s - NEAT_LOG_ERROR - %s", __func__, strerror(errno));
chip/stm32/hwtimer.c: Format with clang-format BRANCH=none TEST=none Tricium: disable
@@ -419,8 +419,9 @@ void IRQ_HANDLER(IRQ_WD)(void) "pop {r0,pc}\n"); } const struct irq_priority __keep IRQ_PRIORITY(IRQ_WD) - __attribute__((section(".rodata.irqprio"))) = { IRQ_WD, - 0 }; /* put the watchdog + __attribute__((section(".rodata.irqprio"))) = { + IRQ_WD, 0 + }; /* put the watchdog at the highest priority */
session BUGFIX wrong conversion msec -> sec
@@ -85,8 +85,8 @@ nc_difftimespec(struct timespec *ts1, struct timespec *ts2) void nc_addtimespec(struct timespec *ts, uint32_t msec) { - ts->tv_sec += msec / 1000000L; - ts->tv_nsec += (msec % 1000000L) * 1000000L; + ts->tv_sec += msec / 1000; + ts->tv_nsec += (msec % 1000) * 1000000L; if (ts->tv_nsec > 1000000000L) { ts->tv_sec += ts->tv_nsec / 1000000000L;
test/shlibloadtest.c: fix various errors These errors were hidden because compiling this file didn't get the macros derived from the dso_scheme attribute, and therefore, some code never got compiled.
@@ -163,10 +163,10 @@ static int test_lib(void) # define COMPATIBILITY_MASK 0xfff00000L myOpenSSL_version_num = (OpenSSL_version_num_t)symbols[1].func; if (!TEST_int_eq(myOpenSSL_version_num() & COMPATIBILITY_MASK, - OPENSSL_VERSION_NUMBER & COMPATIBILITY_MASK) + OPENSSL_VERSION_NUMBER & COMPATIBILITY_MASK)) goto end; if (!TEST_int_ge(myOpenSSL_version_num() & ~COMPATIBILITY_MASK, - OPENSSL_VERSION_NUMBER & ~COMPATIBILITY_MASK) + OPENSSL_VERSION_NUMBER & ~COMPATIBILITY_MASK)) goto end; if (test_type == DSO_REFTEST) { @@ -190,9 +190,9 @@ static int test_lib(void) { DSO *hndl; /* use known symbol from crypto module */ - if (!TEST_ptr(hndl = DSO_dsobyaddr((void (*)())ERR_get_error, 0))) + if (!TEST_ptr(hndl = myDSO_dsobyaddr((void (*)())ERR_get_error, 0))) goto end; - DSO_free(hndl); + myDSO_free(hndl); } # endif /* DSO_DLFCN */ }
Rate limited SBA to run only once per sweep pair
#include "assert.h" #include "linmath.h" +#include "math.h" #include "string.h" +#include "survive_cal.h" #include "survive_config.h" #include "survive_reproject.h" -#include "math.h" - typedef struct { survive_calibration_config calibration_config; PoserData *pdfs; @@ -442,22 +442,34 @@ static double run_sba(survive_calibration_config options, PoserDataFullScene *pd return info[1] / meas_size * 2; } +typedef struct SBAData { + int last_acode; + int last_lh; +} SBAData; + int PoserSBA(SurviveObject *so, PoserData *pd) { + if (so->PoserData == 0) { + so->PoserData = calloc(1, sizeof(SBAData)); + } + SBAData *d = so->PoserData; + SurviveContext *ctx = so->ctx; switch (pd->pt) { case POSERDATA_LIGHT: { + // No poses if calibration is ongoing + if (ctx->calptr && ctx->calptr->stage < 5) + return 0; SurviveSensorActivations *scene = &so->activations; PoserDataLight *lightData = (PoserDataLight *)pd; - /* - static int last_acode = -1; - static int last_lh = -1; - if(last_lh != lightData->lh || last_acode != lightData->acode) { - */ + + // only process sweeps + FLT error = -1; + if (d->last_lh != lightData->lh || d->last_acode != lightData->acode) { survive_calibration_config config = *survive_calibration_default_config(); - FLT error = run_sba_find_3d_structure(config, lightData, so, scene, 50, .5); - /*} - last_lh = lightData->lh; - last_acode = lightData->acode; - */ + error = run_sba_find_3d_structure(config, lightData, so, scene, 50, .5); + d->last_lh = lightData->lh; + d->last_acode = lightData->acode; + } + return 0; } case POSERDATA_FULL_SCENE: {
tcptop: Cleanup argument parsing
@@ -34,6 +34,13 @@ from subprocess import call import ctypes as ct # arguments +def range_check(string): + value = int(string) + if value < 1: + msg = "value must be stricly positive, got %d" % (value,) + raise argparse.ArgumentTypeError(msg) + return value + examples = """examples: ./tcptop # trace TCP send/recv by host ./tcptop -C # don't clear the screen @@ -49,15 +56,11 @@ parser.add_argument("-S", "--nosummary", action="store_true", help="skip system summary line") parser.add_argument("-p", "--pid", help="trace this PID only") -parser.add_argument("interval", nargs="?", default=1, +parser.add_argument("interval", nargs="?", default=1, type=range_check, help="output interval, in seconds (default 1)") -parser.add_argument("count", nargs="?", default=99999999, +parser.add_argument("count", nargs="?", default=-1, type=range_check, help="number of outputs") args = parser.parse_args() -countdown = int(args.count) -if args.interval and int(args.interval) == 0: - print("ERROR: interval 0. Exiting.") - exit() debug = 0 # linux stats @@ -204,15 +207,13 @@ ipv6_recv_bytes = b["ipv6_recv_bytes"] print('Tracing... Output every %s secs. Hit Ctrl-C to end' % args.interval) # output -exiting = 0 -while (1): +i = 0 +exiting = False +while i != args.count and not exiting: try: - if args.interval: - sleep(int(args.interval)) - else: - sleep(99999999) + sleep(args.interval) except KeyboardInterrupt: - exiting = 1 + exiting = True # header if args.noclear: @@ -282,6 +283,4 @@ while (1): ipv6_send_bytes.clear() ipv6_recv_bytes.clear() - countdown -= 1 - if exiting or countdown == 0: - exit() + i += 1
Remove unused pixel_packet_to_hexname() function
@@ -198,28 +198,6 @@ static VALUE set_dbl_option(VALUE self, const char *option, VALUE value) } -#if 0 -/** - * Convert a PixelPacket to a hex-format color name. - * - * No Ruby usage (internal function) - * - * @param pp the pixel packet - * @param name pointer to the name - * @return the name - */ -static char *pixel_packet_to_hexname(PixelPacket *pp, char *name) -{ - MagickPixel mpp; - - rm_init_magickpixel(NULL, &mpp); - rm_set_magick_pixel_packet(pp, &mpp); - GetColorTuple(&mpp, MagickTrue, name); - return name; -} -#endif - - /** * Get antialias value * @@ -502,11 +480,10 @@ VALUE Info_background_color_eq(VALUE self, VALUE bc_arg) { Info *info; - //char colorname[MaxTextExtent]; Data_Get_Struct(self, Info, info); Color_to_PixelColor(&info->background_color, bc_arg); - //SetImageOption(info, "background", pixel_packet_to_hexname(&info->background_color, colorname)); + return bc_arg; } @@ -535,11 +512,10 @@ VALUE Info_border_color_eq(VALUE self, VALUE bc_arg) { Info *info; - //char colorname[MaxTextExtent]; Data_Get_Struct(self, Info, info); Color_to_PixelColor(&info->border_color, bc_arg); - //SetImageOption(info, "bordercolor", pixel_packet_to_hexname(&info->border_color, colorname)); + return bc_arg; } @@ -1571,11 +1547,10 @@ VALUE Info_matte_color_eq(VALUE self, VALUE matte_arg) { Info *info; - //char colorname[MaxTextExtent]; Data_Get_Struct(self, Info, info); Color_to_PixelColor(&info->matte_color, matte_arg); - //SetImageOption(info, "mattecolor", pixel_packet_to_hexname(&info->matte_color, colorname)); + return matte_arg; } @@ -2196,11 +2171,10 @@ VALUE Info_transparent_color_eq(VALUE self, VALUE tc_arg) { Info *info; - //char colorname[MaxTextExtent]; Data_Get_Struct(self, Info, info); Color_to_PixelColor(&info->transparent_color, tc_arg); - //SetImageOption(info, "transparent", pixel_packet_to_hexname(&info->transparent_color, colorname)); + return tc_arg; }
extern C only applies C-style naming conventions, not C-style calling converntions. Applying the CDECL macro consistently.
@@ -20,7 +20,7 @@ extern "C" { // TODO: expose struct LogConfiguration as a second parameter // TODO: allow the customer to specify their module name // - bool aria_initialize(const char* token) + bool ARIASDK_LIBABI_CDECL aria_initialize(const char* token) { if (!is_inited.exchange(true)) { @@ -48,7 +48,7 @@ extern "C" { // // Marashal C struct tro Aria C++ API // - void aria_logevent(aria_prop* evt) + void ARIASDK_LIBABI_CDECL aria_logevent(aria_prop* evt) { EventProperties props; props.unpack(evt); @@ -69,27 +69,27 @@ extern "C" { logger->LogEvent(props); } - void aria_teardown() + void ARIASDK_LIBABI_CDECL aria_teardown() { LogManagerC::FlushAndTeardown(); } - void aria_pause() + void ARIASDK_LIBABI_CDECL aria_pause() { LogManagerC::PauseTransmission(); } - void aria_resume() + void ARIASDK_LIBABI_CDECL aria_resume() { LogManagerC::ResumeTransmission(); } - void aria_upload() + void ARIASDK_LIBABI_CDECL aria_upload() { LogManagerC::UploadNow(); } - void aria_flush() + void ARIASDK_LIBABI_CDECL aria_flush() { LogManagerC::Flush(); }
use %{lustre_name} again for package name
@@ -138,7 +138,7 @@ BuildRequires: kernel-devel = %{centos_kernel} %endif Summary: Lustre File System -Name: %{lustre_name}%{PROJ_DELIM} +Name: %{lustre_name} Version: %{version} Release: 1%{?dist} License: GPL @@ -329,8 +329,8 @@ make install DESTDIR=$RPM_BUILD_ROOT # kernel_module_path macro. # [email protected] (3/23/17) - use %{name} for basemodpath -# basemodpath=$RPM_BUILD_ROOT%{modules_fs_path}/%{lustre_name} -basemodpath=$RPM_BUILD_ROOT%{modules_fs_path}/%{name} +basemodpath=$RPM_BUILD_ROOT%{modules_fs_path}/%{lustre_name} +#basemodpath=$RPM_BUILD_ROOT%{modules_fs_path}/%{name} %if %{with ldiskfs} mkdir -p $basemodpath-osd-ldiskfs/fs mv $basemodpath/fs/osd_ldiskfs.ko $basemodpath-osd-ldiskfs/fs/osd_ldiskfs.ko
Fix default padding regression against 3.0.0 FIPS provider
@@ -105,6 +105,8 @@ CEKAlg=id-aes128-wrap Ctrl = dh_pad:1 SharedSecret=89A249DF4EE9033B89C2B4E52072A736D94F51143A1ED5C8F1E91FCBEBE09654 +# FIPS(3.0.0): allows the padding to be set, later versions do not #17859 +FIPSversion = >3.0.0 Derive=ffdhe2048-2 PeerKey=ffdhe2048-1-pub KDFType=X942KDF-ASN1
StatusBar: update for new design
@@ -67,9 +67,7 @@ export const Content = (props) => { path="/~profile" render={ p => ( <Profile - ship={this.ship} - api={this.api} - {...state} + {...props} /> )} />
super_rsu: add configuration argument Add a "--configuration" argument to the tool that can be used when a manifest file is not given and it needs to look for a file.
@@ -1079,7 +1079,7 @@ def sighandler(signum, frame): raise KeyboardInterrupt('interrupt signal received') -def find_config(program='super-rsu'): +def find_config(program='super-rsu', configuration=None): candidates = [] for root, dirs, files in os.walk('/usr/share/opae'): for f in glob.glob(os.path.join(root, '*.json')): @@ -1089,6 +1089,7 @@ def find_config(program='super-rsu'): cfg_pgm = data.get('program') cfg_vid = int(data.get('vendor', '0'), 0) cfg_did = int(data.get('device', '0'), 0) + cfg_cfg = data.get('configuration') except IOError: LOG.warn('could not open file: %s', f) except ValueError as err: @@ -1103,6 +1104,7 @@ def find_config(program='super-rsu'): if fpga_device.enum([{'pci_node.vendor_id': cfg_vid, 'pci_node.device_id': cfg_did}]): LOG.debug('found possible config: %s', f) + if configuration is None or (cfg_cfg == configuration): candidates.append(f) if len(candidates) == 1: @@ -1128,6 +1130,8 @@ def main(): parser.add_argument('--program', default='super-rsu', help=('program to look for in rsu config. ' 'Default is "super-rsu"')) + parser.add_argument('--configuration', + help='configuration to look for in rsu config.') parser.add_argument('--bus', help=argparse.SUPPRESS) parser.add_argument('-n', '--dry-run', @@ -1203,7 +1207,7 @@ def main(): sys_exit(os.EX_NOPERM) if args.rsu_config is None: - args.rsu_config = find_config(args.program) + args.rsu_config = find_config(args.program, args.configuration) try: rsu_config = json.load(args.rsu_config)
srtp: fix uninitialized value Type: fix Fixes:
@@ -227,7 +227,7 @@ srtp_ctx_write (srtp_tc_t *ctx, session_t *app_session, { u32 n_wrote = 0, to_deq, dgram_sz; session_dgram_pre_hdr_t hdr; - app_session_transport_t at; + app_session_transport_t at = {}; svm_msg_q_t *mq; session_t *us; u8 buf[2000];
move rvc in model
@@ -173,6 +173,12 @@ static struct noir_op_s* noir_init(const long dims[DIMS], const complex float* m const struct nlop_s* nlw2 = nlop_from_linop(data->weights); data->nl = nlop_chain2_FF(nlw2, 0, nlw1, 1); + if (conf->rvc) { + + const struct nlop_s* nlop_zreal = nlop_from_linop_F(linop_zreal_create(DIMS, data->imgs_dims)); + data->nl = nlop_chain2_swap_FF(nlop_zreal, 0, data->nl, 0); + } + const struct nlop_s* frw = nlop_from_linop(data->frw); data->nl2 = nlop_chain2(data->nl, 0, frw, 0); @@ -314,8 +320,6 @@ static void noir_adjA(const nlop_data_t* _data, unsigned int o, unsigned int i, linop_adjoint(der1, DIMS, data->imgs_dims, img, DIMS, data->data_dims, src); - if (data->conf.rvc) - md_zreal(DIMS, data->imgs_dims, img, img); } static void noir_adjB(const nlop_data_t* _data, unsigned int o, unsigned int i, complex float* coils, const complex float* src) @@ -418,7 +422,6 @@ struct noir_s noir_create3(const long dims[DIMS], const complex float* mask, con struct noir_s noir_create2(const long dims[DIMS], const complex float* mask, const complex float* psf, const struct noir_model_conf_s* conf) { assert(!conf->noncart); - assert(!conf->rvc); struct noir_op_s* data = noir_init(dims, mask, psf, conf); struct nlop_s* nlop = data->nl2;
Only build-depend on fail with ancient GHC
@@ -103,7 +103,6 @@ library , bytestring >= 0.10.2 && < 0.11 , containers >= 0.5 && < 0.7 , exceptions >= 0.8 && < 0.11 - , fail >= 4.9 && < 5 , mtl >= 2.2 && < 2.3 , text >= 1.0 && < 1.3 hs-source-dirs: src @@ -189,6 +188,8 @@ library if flag(hardcode-reg-keys) cpp-options: -DHARDCODE_REG_KEYS + if !impl(ghc >= 8.0) + build-depends: fail >= 4.9 && < 5 test-suite test-hslua type: exitcode-stdio-1.0 @@ -213,7 +214,6 @@ test-suite test-hslua , bytestring >= 0.10.2 && < 0.11 , containers >= 0.5 && < 0.7 , exceptions >= 0.8 && < 0.11 - , fail >= 4.9 && < 5 , mtl >= 2.2 && < 2.3 , text >= 1.0 && < 1.3 -- for testing @@ -224,6 +224,9 @@ test-suite test-hslua , tasty-hunit >= 0.9 , tasty-quickcheck >= 0.8 + if !impl(ghc >= 8.0) + build-depends: fail >= 4.9 && < 5 + benchmark benchmark-hslua type: exitcode-stdio-1.0 main-is: benchmark-hslua.hs
mactime: fix handle_get_mactime fcn prototype Type: fix
#include <vlib/unix/plugin.h> static int -handle_get_mactime (u8 * request, http_session_t * hs) +handle_get_mactime (http_builtin_method_type_t reqtype, + u8 * request, http_session_t * hs) { mactime_main_t *mm = &mactime_main; mactime_device_t *dp; @@ -24,9 +25,9 @@ handle_get_mactime (u8 * request, http_session_t * hs) vec_reset_length (mm->arp_cache_copy); pool = ip4_neighbors_pool (); - pool_foreach (n, pool, ( - { - vec_add1 (mm->arp_cache_copy, n[0]);})); + /* *INDENT-OFF* */ + pool_foreach (n, pool, ({ vec_add1 (mm->arp_cache_copy, n[0]);})); + /* *INDENT-ON* */ now = clib_timebase_now (&mm->timebase);
Fix calico link The previous link we were using is now invalid, and so we must switch to using GitHub instead.
@@ -126,7 +126,7 @@ Vagrant.configure("2") do |config| kubectl taint nodes --all node-role.kubernetes.io/control-plane- # Install CNI - kubectl create -f https://docs.projectcalico.org/manifests/tigera-operator.yaml + kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.24.0/manifests/tigera-operator.yaml kubectl apply -f /vagrant/hack/ci/flatcar-cni-plugin.yaml SHELL end
[readme] update keybinds, note about TZ
@@ -129,9 +129,9 @@ A partial list of parameters are below. See the config file for a complete list. | `position=` | Location of the hud: `top-left` (default), `top-right`, `bottom-left`, `bottom-right`, `top-center` | | `offset_x` `offset_y` | Hud position offsets | | `no_display` | Hide the hud by default | -| `toggle_hud=`<br>`toggle_logging=` | Modifiable toggle hotkeys. Default are F12 and F2, respectively. | +| `toggle_hud=`<br>`toggle_logging=` | Modifiable toggle hotkeys. Default are `Shift_R+F12` and `Shift_L+F2`, respectively. | | `reload_cfg=` | Change keybind for reloading the config. Default = `Shift_L+F4` | -| `time`<br>`time_format=%T` | Displays local time. See [std::put_time](https://en.cppreference.com/w/cpp/io/manip/put_time) for formatting help. | +| `time`<br>`time_format=%T` | Displays local time. See [std::put_time](https://en.cppreference.com/w/cpp/io/manip/put_time) for formatting help. NOTE: Sometimes apps (or AMDVLK) may set `TZ` environment variable to `GMT+0` | | `gpu_color`<br>`gpu_color`<br>`vram_color`<br>`ram_color`<br>`io_color`<br>`engine_color`<br>`frametime_color`<br>`background_color`<br>`text_color`<br>`media_player_color` | Change default colors: `gpu_color=RRGGBB`| | `alpha` | Set the opacity of all text and frametime graph `0.0-1.0` | | `background_alpha` | Set the opacity of the background `0.0-1.0` | @@ -181,7 +181,7 @@ All vulkan vsync options might not be supported on your device, you can check wh ## MangoHud FPS logging -When you toggle logging (using the keybind `F2`), a file is created with your chosen name (using `output_file`) plus a date & timestamp. +When you toggle logging (using the keybind `Shift_L+F2`), a file is created with your chosen name (using `output_file`) plus a date & timestamp. This file can be uploaded to [Flightlessmango.com](https://flightlessmango.com/games/user_benchmarks) to create graphs automatically. you can share the created page with others, just link it.
Enumerating the legacy provider's cipher algorithms
@@ -52,6 +52,32 @@ The OpenSSL legacy provider supports these operations and algorithms: =back +=head2 Symmetric Ciphers + +Not all of these symmetric cipher algorithms are enabled by default. + +=over 4 + +=item Blowfish + +=item CAST + +=item DES + +=item IDEA + +=item RC2 + +=item RC4 + +=item RC5 + +Disabled by default. Use I<enable-rc5> config option to enable. + +=item SEED + +=back + =begin comment When algorithms for other operations start appearing, the
hdata_to_dt: Add PVR overrides to the usage text Save us a few headaches in the future.
@@ -272,7 +272,14 @@ int main(int argc, char *argv[]) " -q Quiet mode\n" " -b Keep blobs in the output\n" "\n" - "Pipe to 'dtc -I dtb -O dts' for human readable\n"); + " -7 Force PVR to POWER7\n" + " -8 Force PVR to POWER8\n" + " -8E Force PVR to POWER8E\n" + " -9 Force PVR to POWER9 (nimbus)\n" + "\n" + "When no PVR is specified -7 is assumed" + "\n" + "Pipe to 'dtc -I dtb -O dts' for human readable output\n"); } phys_map_init();
Fix reading vendor names for Paulmann and Paul Neuhaus lights
@@ -5140,7 +5140,7 @@ bool DeRestPluginPrivate::processZclAttributes(LightNode *lightNode) if (lightNode->mustRead(READ_VENDOR_NAME) && tNow > lightNode->nextReadTime(READ_VENDOR_NAME)) { - if (!lightNode->manufacturer().isEmpty()) + if (!lightNode->manufacturer().isEmpty() && lightNode->manufacturer() != QLatin1String("Unknown")) { lightNode->clearRead(READ_VENDOR_NAME); processed++;
Add TODO to describe more keywords.
@@ -12,7 +12,7 @@ be enclosed by curly `{}`s. There is no 'dangling else' ambiguity. ## Keywords -The Puffs language has 24 keywords. 7 of those introduce top-level concepts: +7 keywords introduce top-level concepts: - `const` - `error` @@ -57,6 +57,8 @@ The Puffs language has 24 keywords. 7 of those introduce top-level concepts: - `limit` +TODO: categorize and, or, not, as, false, true, in, out, this, u8, u16, etc. + ## Operators
Ensure that replication slots are still active after rebalance.
@@ -12,6 +12,7 @@ Feature: Replication Slots When the user runs "gprecoverseg -ra" Then gprecoverseg should return a return code of 0 + And the primaries and mirrors should be replicating using replication slots When a mirror has crashed And I fully recover a mirror
Use better terminology for marking items to be excluded from Xcode build.
node.isResource = xcode.isItemResource(prj, node) -- assign build IDs to buildable files - if xcode.getbuildcategory(node) and not node.nobuild then + if xcode.getbuildcategory(node) and not node.excludefrombuild then node.buildid = xcode.newid(node.name, "build", node.path) end -- don't link the dependency if it's a dependency only if build == false then - node.nobuild = true + node.excludefrombuild = true end end
Ruby: Exclude 2.3 from windows-latest
@@ -238,6 +238,9 @@ jobs: matrix: os: [windows-latest, macos-latest] ruby: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1'] + exclude: + - os: windows-latest + ruby-version: 2.3 steps: - uses: actions/checkout@v3
IDFDUT: seperate into different classes The DUT should be created as the correct sub classes. This can be done in the config file (UT_xxx_x.yml) Filter
@@ -122,7 +122,7 @@ def _uses_esptool(func): settings = self.port_inst.get_settings() try: - rom = esptool.ESP32ROM(self.port_inst) + rom = self._get_rom()(self.port_inst) rom.connect('hard_reset') esp = rom.run_stub() @@ -159,6 +159,10 @@ class IDFDUT(DUT.SerialDUT): self.exceptions = _queue.Queue() self.performance_items = _queue.Queue() + @classmethod + def _get_rom(cls): + raise NotImplementedError("This is an abstraction class, method not defined.") + @classmethod def get_mac(cls, app, port): """ @@ -169,7 +173,7 @@ class IDFDUT(DUT.SerialDUT): :return: MAC address or None """ try: - esp = esptool.ESP32ROM(port) + esp = cls._get_rom()(port) esp.connect() return esp.read_mac() except RuntimeError: @@ -181,7 +185,18 @@ class IDFDUT(DUT.SerialDUT): @classmethod def confirm_dut(cls, port, app, **kwargs): - return cls.get_mac(app, port) is not None + try: + # TODO: check whether 8266 works with this logic + # Otherwise overwrite it in ESP8266DUT + inst = esptool.ESPLoader.detect_chip(port) + if type(inst) != cls._get_rom(): + raise RuntimeError("Target not expected") + return inst.read_mac() is not None + except(esptool.FatalError, RuntimeError): + return False + finally: + if inst: + inst._port.close() @_uses_esptool def _try_flash(self, esp, erase_nvs, baud_rate): @@ -389,3 +404,21 @@ class IDFDUT(DUT.SerialDUT): if not self.allow_dut_exception and self.get_exceptions(): Utility.console_log("DUT exception detected on {}".format(self), color="red") raise IDFDUTException() + + +class ESP32DUT(IDFDUT): + @classmethod + def _get_rom(cls): + return esptool.ESP32ROM + + +class ESP32S2DUT(IDFDUT): + @classmethod + def _get_rom(cls): + return esptool.ESP32S2ROM + + +class ESP8266DUT(IDFDUT): + @classmethod + def _get_rom(cls): + return esptool.ESP8266ROM
CLEANUP: refactored do_item_get() function.
@@ -1140,31 +1140,32 @@ static void do_item_stats_sizes(struct default_engine *engine, ADD_STAT add_stat static hash_item *do_item_get(struct default_engine *engine, const char *key, const size_t nkey, bool do_update) { - rel_time_t current_time = engine->server.core->get_current_time(); + hash_item *it; const char *hkey = (nkey > MAX_HKEY_LEN) ? key+(nkey-MAX_HKEY_LEN) : key; const size_t hnkey = (nkey > MAX_HKEY_LEN) ? MAX_HKEY_LEN : nkey; - hash_item *it = assoc_find(engine, engine->server.core->hash(hkey, hnkey, 0), key, nkey); - if (it != NULL) { - if (do_item_isvalid(engine, it, current_time)==false) { - do_item_unlink(engine, it, ITEM_UNLINK_INVALID); - it = NULL; - } - } - if (it != NULL) { + it = assoc_find(engine, engine->server.core->hash(hkey, hnkey, 0), key, nkey); + if (it) { + rel_time_t current_time = engine->server.core->get_current_time(); + if (do_item_isvalid(engine, it, current_time)) { ITEM_REFCOUNT_INCR(it); DEBUG_REFCNT(it, '+'); - if (do_update) + if (do_update) { do_item_update(engine, it); } + } else { + do_item_unlink(engine, it, ITEM_UNLINK_INVALID); + it = NULL; + } + } if (engine->config.verbose > 2) { - if (it == NULL) { - logger->log(EXTENSION_LOG_INFO, NULL, "> NOT FOUND %s\n", - key); - } else { + if (it) { logger->log(EXTENSION_LOG_INFO, NULL, "> FOUND KEY %s\n", (const char*)item_get_key(it)); + } else { + logger->log(EXTENSION_LOG_INFO, NULL, "> NOT FOUND %s\n", + key); } } return it;
Correct system guessing for solaris64-x86_64-* targets Previously the system guessing script was choosing a target that did not exist for these platforms. Fixes
@@ -704,13 +704,16 @@ EOF my $KERNEL_BITS = $ENV{KERNEL_BITS}; my $ISA64 = `isainfo 2>/dev/null | grep amd64`; my $KB = $KERNEL_BITS // '64'; - return { target => "solaris64-x86_64" } - if $ISA64 ne "" && $KB eq '64'; + if ($ISA64 ne "" && $KB eq '64') { + return { target => "solaris64-x86_64-gcc" } if $CCVENDOR eq "gnu"; + return { target => "solaris64-x86_64-cc" }; + } my $REL = uname('-r'); $REL =~ s/5\.//; my @tmp_disable = (); push @tmp_disable, 'sse2' if int($REL) < 10; - return { target => "solaris-x86", + #There is no solaris-x86-cc target + return { target => "solaris-x86-gcc", disable => [ @tmp_disable ] }; } ],
Fix record_element_start_handler() to use XML_Char correctly
@@ -4870,7 +4870,7 @@ record_element_start_handler(void *userData, const XML_Char *name, const XML_Char **UNUSED_P(atts)) { - CharData_AppendString((CharData *)userData, name); + CharData_AppendXMLChars((CharData *)userData, name, xcstrlen(name)); } START_TEST(test_nested_groups)
h2olog: add -dd option to print BPF program
@@ -183,7 +183,7 @@ int main(int argc, char **argv) init_http_tracer(&tracer); } - bool debug = false; + int debug = 0; const char *out_file = nullptr; std::vector<std::string> event_type_filters; std::vector<std::string> response_header_filters; @@ -204,7 +204,7 @@ int main(int argc, char **argv) out_file = optarg; break; case 'd': - debug = true; + debug++; break; case 'h': usage(); @@ -251,6 +251,18 @@ int main(int argc, char **argv) cflags.push_back(generate_header_filter_cflag(response_header_filters)); } + if (debug >= 2) { + fprintf(stderr, "cflags="); + for (size_t i = 0; i < cflags.size(); i++) { + if (i > 0) { + fprintf(stderr, " "); + } + fprintf(stderr, "%s", cflags[i].c_str()); + } + fprintf(stderr, "\n"); + fprintf(stderr, "<BPF>\n%s\n</BPF>\n", tracer.bpf_text().c_str()); + } + ebpf::BPF *bpf = new ebpf::BPF(); std::vector<ebpf::USDT> probes = tracer.init_usdt_probes(h2o_pid);
rowan: change battery profile to 2 cell Rowan use 2 cell battery. TEST=manual load into rowan and see if EC complains about battery low. BRANCH=none
#define SB_SHUTDOWN_DATA 0xC574 static const struct battery_info info = { - .voltage_max = 13200, - .voltage_normal = 11550, - .voltage_min = 9100, + .voltage_max = 8800, + .voltage_normal = 7600, + .voltage_min = 6000, /* Pre-charge values. */ .precharge_current = 256, /* mA */ .start_charging_min_c = 0, .start_charging_max_c = 50, .charging_min_c = 0, - .charging_max_c = 60, + .charging_max_c = 50, .discharging_min_c = 0, .discharging_max_c = 60, };
quote pick from Derek
@@ -19,17 +19,7 @@ configuration options. These tips are highlighted via the following format: \begin{center} \begin{tcolorbox}[] \small -\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true] - ________________________________ -/ Simplicity is prerequisite for \ -\ reliability. / - -------------------------------- - \ ^__^ - \ (oo)\_______ - (__)\ )\/\ - ||----w | - || || -\end{lstlisting} +Anyone who has never made a mistake has never tried anything new. --Albert Einstein \end{tcolorbox} \end{center}
[ArgoUI] 0.1.4
Pod::Spec.new do |s| s.name = 'ArgoUI' - s.version = '0.1.3' + s.version = '0.1.4' s.summary = 'A lib of Momo Lua UI.' # This description is used to generate tags and improve search results.
Fix to Nordic
@@ -211,19 +211,22 @@ static void conn_params_error_handler( uint32_t nrf_error ) void prvUartEventHandler( app_uart_evt_t * pxEvent ) { - uint8_t ucRxByte = 0; + /* Declared as static so it can be pushed into the queue from the ISR. */ + static volatile uint8_t ucRxByte = 0; INPUTMessage_t xInputMessage; - + BaseType_t xHigherPriorityTaskWoken; switch( pxEvent->evt_type ) { case APP_UART_DATA_READY: app_uart_get( &ucRxByte ); app_uart_put( ucRxByte ); - xInputMessage.pcData = (uint8_t *)pvPortMalloc(sizeof(uint8_t)); + xInputMessage.pcData = &ucRxByte; xInputMessage.xDataSize = 1; - xQueueSend(UARTqueue, (void * )&xInputMessage, (portTickType)portMAX_DELAY); + xQueueSendFromISR(UARTqueue, (void * )&xInputMessage, &xHigherPriorityTaskWoken); + /* Now the buffer is empty we can switch context if necessary. */ + //portYIELD_FROM_ISR (xHigherPriorityTaskWoken); break; @@ -383,13 +386,16 @@ int main( void ) BaseType_t getUserMessage( INPUTMessage_t * pxINPUTmessage, TickType_t xAuthTimeout ) { BaseType_t xReturnMessage = pdFALSE; + INPUTMessage_t xTmpINPUTmessage; - pxINPUTmessage->pcData = (uint8_t *)pvPortMalloc(sizeof(char)); + pxINPUTmessage->pcData = (uint8_t *)pvPortMalloc(sizeof(uint8_t)); pxINPUTmessage->xDataSize = 1; if(pxINPUTmessage->pcData != NULL) { - if (xQueueReceive(UARTqueue, (void * )pxINPUTmessage, (portTickType) xAuthTimeout )) + if (xQueueReceive(UARTqueue, (void * )&xTmpINPUTmessage, (portTickType) xAuthTimeout )) { + *pxINPUTmessage->pcData = *xTmpINPUTmessage.pcData; + pxINPUTmessage->xDataSize = xTmpINPUTmessage.xDataSize; xReturnMessage = pdTRUE; } }
Docs: Document Zero key hotkey alias for Escape
@@ -3343,10 +3343,16 @@ the default boot entry choice will remain changed until the next manual reconfig \emph{Note 1}: The \texttt{KeySupport}, \texttt{OpenUsbKbDxe}, or similar drivers are required for key handling. However, not all of the key handling functions can be implemented on several types of firmware. - \emph{Note 2}: In addition to \texttt{OPT}, OpenCore supports using the \texttt{Escape} key to display - the OpenCore picker when \texttt{ShowPicker} is disabled. This key exists for the \texttt{Apple} picker - mode as well as for firmware that fail to report held \texttt{OPT} keys on PS/2 keyboards, requiring - multiple presses of the \texttt{Escape} key to access the OpenCore picker. + \emph{Note 2}: In addition to \texttt{OPT}, OpenCore supports using both the \texttt{Escape} + and \texttt{Zero} keys to enter the OpenCore picker when \texttt{ShowPicker} is disabled. + \texttt{Escape} exists to support co-existence with the Apple picker (including OpenCore \texttt{Apple} + picker mode) and to support firmware that fails to report held \texttt{OPT} key, as on some PS/2 keyboards. + In addition, \texttt{Zero} is provided to support systems on which \texttt{Escape} is already assigned to + some other pre-boot firmware feature. In systems which do not require \texttt{KeySupport}, pressing and + holding one of these keys from after power on until the picker appears should always be successful. The + same should apply when using \texttt{KeySupport} mode if it is correctly configured for the system, i.e. + with a long enough \texttt{KeyForgetThreshold}. If pressing and holding the key is not successful to reliably + enter the picker, multiple repeated keypresses may be tried instead. \emph{Note 3}: On Macs with problematic GOP, it may be difficult to access the Apple picker. The \texttt{BootKicker} utility can be blessed to workaround this problem even without loading
Update Kconfig Change I2C configuration hierarchy
@@ -95,13 +95,12 @@ if RT_USING_I2C config RT_USING_I2C_BITOPS bool "Use GPIO to simulate I2C" default y -endif - if RT_USING_I2C_BITOPS config RT_I2C_BITOPS_DEBUG bool "Use simulate I2C debug message" default n endif +endif config RT_USING_PIN bool "Using generic GPIO device drivers"
cmake: stack-protector-strong only supported on gcc 4.9+
@@ -113,10 +113,13 @@ if(LNX_BUILD) -D_GNU_SOURCE -D__LINUX__ ) - + if(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_GREATER 4.8) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector-strong") + endif() + if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.8) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong") endif() +endif() #---------------------------------------------------------------------------------------------------- # OS driver interface library
change option name to --skipCopy; begin to add logic for including .repo file
@@ -22,7 +22,7 @@ sub usage { print "\n"; print "Usage: mk_dist [OPTIONS]\n\n"; print "OPTIONS:\n"; - print " --skip-assembly skip reassembly of repo tarball\n"; + print " --skip-copy skip copying of repo data (for debug only)\n"; print " --help generate help message and exit\n"; print "\n"; exit 0; @@ -32,10 +32,10 @@ sub usage { $| = 1; # Command-line parsing -my $skipAssembly = 0; +my $skipCopy = 0; my $help = 0; -GetOptions('skip-assembly' => \$skipAssembly, +GetOptions('skip-copy' => \$skipCopy, "h" => \$help, "help" => \$help); @@ -64,12 +64,12 @@ print "--> Overwrite existing dists = $overwrite\n"; my ($major, $minor, $micro) = split(/\./, $release); my $base_release = "$major.$minor"; -if( !$skipAssembly) { - # stage repo in tmp print "\nStaging dist creation in $tmp_dir...\n"; die "Unable to create $tmp_dir: $!\n" unless(mkdir $tmp_dir); +if( !$skipCopy) { + # copy base repo contents print "\nCopying base repo contents from OBS...\n"; unless(dircopy("$base_repo_path/$base_release", $tmp_dir)) { @@ -86,6 +86,7 @@ if( !$skipAssembly) { ("$base_repo_path/$base_release:/Update$micro/*", "$tmp_dir/updates") || die "Unable to copy update repo: $!"; } +} # build dist + TODO: md5s @@ -149,6 +150,20 @@ if( !$skipAssembly) { } $tar_args .= "--exclude $tmp_dir/$distro/iso \\\n"; $tar_args .= " $tmp_dir/$distro"; + + # add .repo file(s) + + print "Adding [base] repofile contents\n"; + copy("repo.base.in","$tmp_dir/$distro/OpenHPC.local.repo") || die "Unable to copy repo.base.in\n"; + if($micro) { + print "Adding [update] repofile contents\n"; + open (BASE, ">>","$tmp_dir/$distro/OpenHPC.local.repo") || die "Unable to append to repo file\n"; + open (UPDATE,"<","repo.update.in") || die "Unable to access repo.update.in\n"; + print BASE <UPDATE>; + close BASE; + close UPDATE; + } + print "dist for $distro:src -- \n"; system("tar $tar_args"); @@ -168,8 +183,4 @@ if( !$skipAssembly) { die "Unable to remove $tmp_dir: $!\n"; } -# TODO: write sed script for repo files - -} - # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
BugID:18505596: Clean CLI macro reference for ulog
bool log_init = false; -#ifdef CONFIG_AOS_CLI +#ifdef AOS_COMP_CLI #ifdef ULOG_CONFIG_ASYNC @@ -86,7 +86,7 @@ static struct cli_command ulog_cmd[] = { #endif }; -#endif /*CONFIG_AOS_CLI*/ +#endif /* AOS_COMP_CLI */ void ulog_init(const uint8_t host_name[8]) { @@ -95,7 +95,7 @@ void ulog_init(const uint8_t host_name[8]) #ifdef ULOG_CONFIG_ASYNC ulog_async_init(host_name); #endif -#ifdef CONFIG_AOS_CLI +#ifdef AOS_COMP_CLI aos_cli_register_commands(&ulog_cmd[0], sizeof(ulog_cmd)/sizeof(struct cli_command)); #endif log_init = true;
OcAcpiLib: Only print RSDP normalization message if modified
@@ -1156,8 +1156,9 @@ AcpiNormalizeHeaders ( EFI_ACPI_COMMON_HEADER *NewTable; UINT32 TablePrintSignature; - AcpiNormalizeRsdp (Context->Rsdp, Context->Xsdt != NULL); + if (AcpiNormalizeRsdp (Context->Rsdp, Context->Xsdt != NULL)) { DEBUG ((DEBUG_INFO, "OCA: Normalized RSDP\n")); + } if (Context->Xsdt != NULL) { if (!AcpiIsTableWritable ((EFI_ACPI_COMMON_HEADER *) Context->Xsdt)) {
in_proc: use new api for time management
* limitations under the License. */ +#include <fluent-bit/flb_info.h> +#include <fluent-bit/flb_config.h> +#include <fluent-bit/flb_utils.h> +#include <fluent-bit/flb_pack.h> +#include <msgpack.h> + #include <stdio.h> #include <string.h> #include <sys/types.h> #include <limits.h> #include <dirent.h> -#include <msgpack.h> -#include <fluent-bit/flb_info.h> -#include <fluent-bit/flb_config.h> -#include <fluent-bit/flb_utils.h> - #include "in_proc.h" struct flb_in_proc_mem_offset mem_linux[] = { @@ -257,7 +258,7 @@ static int generate_record_linux(struct flb_input_instance *i_ins, flb_input_buf_write_start(i_ins); msgpack_pack_array(&i_ins->mp_pck, 2); - msgpack_pack_uint64(&i_ins->mp_pck, time(NULL)); + flb_pack_time_now(&i_ins->mp_pck); /* 3 = alive, proc_name, pid */ msgpack_pack_map(&i_ins->mp_pck, map_num);
OcAppleKernelLib: Fix typo in pm log
@@ -753,7 +753,7 @@ PatchThirdPartyDriveSupport ( if (RETURN_ERROR (Status)) { DEBUG ((DEBUG_INFO, "OCAK: Failed to apply patch com.apple.iokit.IOAHCIBlockStorage V1 - %r\n", Status)); } else { - DEBUG ((DEBUG_INFO, "OCAK: Patch success com.apple.iokit.IOAHCIBlockStorage V2\n")); + DEBUG ((DEBUG_INFO, "OCAK: Patch success com.apple.iokit.IOAHCIBlockStorage V1\n")); } Status = PatcherApplyGenericPatch (&Patcher, &mIOAHCIBlockStoragePatchV2);
Enable breakpoints for ARM8M (e.g. cortex-m33)
#define _MESS_FAILED() do {} while (0) #endif -// Halt CPU (breakpoint) when hitting error, only apply for Cortex M3, M4, M7 -#if defined(__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__) +// Halt CPU (breakpoint) when hitting error, only apply for Cortex M3, M4, M7, M33 +#if defined(__ARM_ARCH_7M__) || defined (__ARM_ARCH_7EM__) || defined(__ARM_ARCH_8M_MAIN__) #define TU_BREAKPOINT() do \ { \ volatile uint32_t* ARM_CM_DHCSR = ((volatile uint32_t*) 0xE000EDF0UL); /* Cortex M CoreDebug->DHCSR */ \
peview: Fix regression/crash for image load config
@@ -151,9 +151,12 @@ VOID PvpAddPeEnclaveConfig( PIMAGE_LOAD_CONFIG_DIRECTORY32 imageConfig32 = ImageConfig; PIMAGE_ENCLAVE_CONFIG32 enclaveConfig; - enclaveConfig = PhMappedImageRvaToVa( + if (!RTL_CONTAINS_FIELD(imageConfig32, imageConfig32->Size, EnclaveConfigurationPointer)) + return; + + enclaveConfig = PhMappedImageVaToVa( &PvMappedImage, - PtrToUlong(PTR_SUB_OFFSET(imageConfig32->EnclaveConfigurationPointer, PvMappedImage.NtHeaders32->OptionalHeader.ImageBase)), + (ULONG)imageConfig32->EnclaveConfigurationPointer, NULL ); @@ -176,9 +179,12 @@ VOID PvpAddPeEnclaveConfig( PIMAGE_LOAD_CONFIG_DIRECTORY64 imageConfig64 = ImageConfig; PIMAGE_ENCLAVE_CONFIG64 enclaveConfig; - enclaveConfig = PhMappedImageRvaToVa( + if (!RTL_CONTAINS_FIELD(imageConfig64, imageConfig64->Size, EnclaveConfigurationPointer)) + return; + + enclaveConfig = PhMappedImageVaToVa( &PvMappedImage, - PtrToUlong(PTR_SUB_OFFSET(imageConfig64->EnclaveConfigurationPointer, PvMappedImage.NtHeaders->OptionalHeader.ImageBase)), + (ULONG)imageConfig64->EnclaveConfigurationPointer, NULL );