Date: Thu, 22 Jul 2021 09:05:43 +0000 From: "dsl_mcusim.org (Dmitry Salychev)" <phabric-noreply@FreeBSD.org> To: freebsd-arm@freebsd.org Subject: [Differential] D31267: Parse named nodes from IORT ACPI on arm64 Message-ID: <479fff3d782baa3bf06f082e57c2d721@localhost.localdomain> In-Reply-To: <differential-rev-PHID-DREV-oq76npafhgjmziyg7wtl-req@reviews.freebsd.org> References: <differential-rev-PHID-DREV-oq76npafhgjmziyg7wtl-req@reviews.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--b1_479fff3d782baa3bf06f082e57c2d721 Content-Type: text/plain; charset = "utf-8" Content-Transfer-Encoding: base64 ZHNsX21jdXNpbS5vcmcgY3JlYXRlZCB0aGlzIHJldmlzaW9uLgpkc2xfbWN1c2ltLm9yZyBhZGRl ZCBhIHJldmlld2VyOiBmcmVlYnNkLWFybS1saXN0LgpIZXJhbGQgYWRkZWQgc3Vic2NyaWJlcnM6 IGVtYXN0ZSwgYW5kcmV3LgpIZXJhbGQgYWRkZWQgYSByZXZpZXdlcjogbWFudS4KZHNsX21jdXNp bS5vcmcgcmVxdWVzdGVkIHJldmlldyBvZiB0aGlzIHJldmlzaW9uLgoKUkVWSVNJT04gU1VNTUFS WQogIER1cmluZyBteSB3b3JrIG9uIGEgZHJpdmVyIGZvciBEUEFBMiAoTlhQJ3MgbmV0d29yayBm ZWF0dXJlIGF2YWlsYWJsZSBpbiBzZXZlcmFsIG9mIHRoZWlyIFNvQ3MpIGZpcm13YXJlIGJ1cywg SSBkaXNjb3ZlcmVkIHRoYXQgaXQgaXNuJ3QgcG9zc2libGUgdG8gbWFwIGEgbmFtZWQgY29tcG9u ZW50IG1lbnRpb25lZCBpbiBJT1JUIHRvIGl0cyBTTU1VIG9yIElUUyBub2RlIGluIG9yZGVyIHRv IHNldHVwIGludGVycnVwdHMuIEl0J3MgcG9zc2libGUgdG8gZmluZCBhIG5hbWVkIG5vZGUgYnkg aXRzIG5hbWVzIChhcyBhIHN1YnN0cmluZykgYW5kIGEgcmVzb3VyY2UgSUQgKGlzb2xhdGlvbiBj b250ZXh0IElEIGluIGNhc2Ugb2YgRFBBQTIpIHNpbWlsYXIgdG8gUENJIG5vZGVzIHdpdGggdGhp cyBwYXRjaC4KClRFU1QgUExBTgogIDEuIENsb25lIG15IGZvcmsgd2l0aCBEUEFBMiB3b3JrLWlu LXByb2dyZXNzIGZyb20gaHR0cHM6Ly9naXRodWIuY29tL21jdXNpbS9mcmVlYnNkLXNyYy4KICAy LiBCdWlsZCBhbmQgYm9vdCB0byB0aGUga2VybmVsIG9uIFNvbGlkUnVuJ3MgSG9uZXlDb21iIGJv YXJkLgogIDMuIEJ1aWxkIGFuZCBsb2FkIEtMRCBmcm9tIHN5cy9tb2R1bGVzL2RwYWEyLgogIDQu IEZpbmQgImRwYWEyX3JjMDogTVNJIGFsbG9jYXRlZDogaXJxPS4uLiIgaW4gZG1lc2cKClJFVklT SU9OIERFVEFJTAogIGh0dHBzOi8vcmV2aWV3cy5mcmVlYnNkLm9yZy9EMzEyNjcKCkFGRkVDVEVE IEZJTEVTCiAgc3lzL2FybTY0L2FjcGljYS9hY3BpX2lvcnQuYwogIHN5cy9kZXYvYWNwaWNhL2Fj cGl2YXIuaAoKRU1BSUwgUFJFRkVSRU5DRVMKICBodHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcv c2V0dGluZ3MvcGFuZWwvZW1haWxwcmVmZXJlbmNlcy8KClRvOiBkc2xfbWN1c2ltLm9yZywgZnJl ZWJzZC1hcm0tbGlzdCwgbWFudQpDYzogYW5kcmV3LCBmcmVlYnNkLWFybS1saXN0LCBlbWFzdGUK --b1_479fff3d782baa3bf06f082e57c2d721 Content-Type: text/x-patch; charset=utf-8; name="D31267.92616.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="D31267.92616.patch" ZGlmZiAtLWdpdCBhL3N5cy9kZXYvYWNwaWNhL2FjcGl2YXIuaCBiL3N5cy9kZXYvYWNwaWNhL2Fj cG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GQgYmUg YW4gSVRTIG5vZGUgKi8KKwlLQVNTRVJUKG5vZGUtPnR5cGUgPT0gQUNQSV9JT1JUX05PREVfSVRT X0dST1VQLCAoImJhZCBncm91cCIpKTsKKworCS8qIFJldHVybiBmaXJzdCBub2RlLCB3ZSBkb24n dCBoYW5kbGUgbW9yZSB0aGFuIHRoYXQgbm93LiAqLworCSp4cmVmID0gbm9kZS0+ZW50cmllcy5p dHNbMF0ueHJlZjsKKwlyZXR1cm4gKDApOworfQorCitpbnQKK2FjcGlfaW9ydF9tYXBfbmFtZWRf c21tdXYzKGNvbnN0IGNoYXIgKmRldm5hbWUsIHVfaW50IHJpZCwgdV9pbnQgKnhyZWYsCisgICAg dV9pbnQgKmRldmlkKQoreworCUFDUElfSU9SVF9TTU1VX1YzICpzbW11OworCXN0cnVjdCBpb3J0 X25vZGUgKm5vZGU7CisKKwlub2RlID0gaW9ydF9uYW1lZF9jb21wX21hcChkZXZuYW1lLCByaWQs IEFDUElfSU9SVF9OT0RFX1NNTVVfVjMsIGRldmlkKTsKKwlpZiAobm9kZSA9PSBOVUxMKQorCQly ZXR1cm4gKEVOT0VOVCk7CisKKwkvKiBUaGlzIHNob3VsZCBiZSBhbiBTTU1VIG5vZGUuICovCisJ S0FTU0VSVChub2RlLT50eXBlID09IEFDUElfSU9SVF9OT0RFX1NNTVVfVjMsICgiYmFkIG5vZGUi KSk7CisKKwlzbW11ID0gKEFDUElfSU9SVF9TTU1VX1YzICopJm5vZGUtPmRhdGEuc21tdV92MzsK KwkqeHJlZiA9IHNtbXUtPkJhc2VBZGRyZXNzOworCisJcmV0dXJuICgwKTsKK30KCg== --b1_479fff3d782baa3bf06f082e57c2d721--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?479fff3d782baa3bf06f082e57c2d721>