Re: [edk2-devel] [edk2-libc Patch 2 1/1] ek2-libc: wrmsr function available in edk2module is not working as expected

2024-04-19 Thread Jayaprakash, N
Thanks Mike as suggested made the logic simpler. Sent the updated v3 patch for review. Regards, JP -Original Message- From: Kinney, Michael D Sent: Friday, April 19, 2024 2:35 AM To: Jayaprakash, N ; devel@edk2.groups.io Cc: Rebecca Cran ; Kinney, Michael D Subject: RE: [edk2-libc

Re: [edk2-devel] [edk2-libc Patch 2 1/1] ek2-libc: wrmsr function available in edk2module is not working as expected

2024-04-18 Thread Michael D Kinney
The use of BitFieldOr64() is really only required when updating a portion of a 32-bit or 64-bit value that are not aligned on a 32-bit boundary and do not have a 32-bit aligned width. Since this use case is setting the lower 32-bits, simpler logic should be used. data = LShiftU64(vedx, 32) |

[edk2-devel] [edk2-libc Patch 2 1/1] ek2-libc: wrmsr function available in edk2module is not working as expected

2024-04-18 Thread Jayaprakash, N
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4745 This commit fixes the issue reported in the BZ4745. The wrmsr was always writing 0 to the higher 32 bits of the msr register. This was due to a logical flaw in the code, where the input variable of type unsigned int was left shitted by 32