On Sat, May 26, 2018 at 06:53:40PM -0600, Simon Glass wrote:
> Hi Ivan,
>
> On 25 May 2018 at 16:00, Ivan Gorinov wrote:
> > Add __weak prefix to the following functions to allow override:
> > misc_init_r(), checkcpu(), print_cpuinfo().
> >
> > Signed-off-by: Iv
Save efi_main() arguments in the startup code on x86_64;
use EFI calling convention for _relocate() on x86_64;
remove unused _relocate() arguments;
consistently use EFI calling convention for efi_main() everywhere.
Signed-off-by: Ivan Gorinov
---
arch/x86/lib/crt0_x86_64_efi.S | 21
Add setjmp/longjmp functions for x86_64,
based on existing 32-bit implementation.
Signed-off-by: Ivan Gorinov
---
arch/x86/cpu/x86_64/setjmp.S | 56 +++
arch/x86/cpu/x86_64/setjmp.c | 19 ---
arch/x86/include/asm/setjmp.h | 17
convention for efi_main() everywhere.
v3:
Updated patch description.
v2:
Added EFIABI to _relocate() declaration.
Ivan Gorinov (1):
x86: use EFI calling convention for efi_main on x86_64
arch/x86/lib/crt0_x86_64_efi.S | 21 ++---
arch/x86/lib/reloc_x86_64_efi.c | 3
convention for efi_main() everywhere.
Signed-off-by: Ivan Gorinov
---
arch/x86/lib/crt0_x86_64_efi.S | 21 ++---
arch/x86/lib/reloc_x86_64_efi.c | 3 +--
lib/efi/efi_app.c | 3 ++-
lib/efi/efi_stub.c | 3 ++-
4 files changed, 15 insertions(+), 15
On Thu, May 31, 2018 at 11:26:50AM +0300, Andy Shevchenko wrote:
> > Save efi_main() arguments in the startup code on x86_64;
> > use EFI calling convention for _relocate() on x86_64;
> > remove unused _relocate() arguments;
> > consistently use EFI calling convention for efi_main() everywhere.
>
On Sun, Jun 03, 2018 at 02:06:47PM +0200, Alexander Graf wrote:
> On 02.06.18 20:44, Heinrich Schuchardt wrote:
> > On 05/31/2018 12:50 AM, Ivan Gorinov wrote:
> >> Add setjmp/longjmp functions for x86_64,
> >> based on existing 32-bit implementation.
> >
&
Add setjmp/longjmp functions for x86_64.
The FPU control word and MXCSR control bits are preserved across calls.
v2:
Added the FPU control word and MXCSR to jmp_buf;
Using ENTRY/ENDPROC macros.
Ivan Gorinov (1):
x86: Add 64-bit setjmp/longjmp implementation
arch/x86/cpu/x86_64/setjmp.S
Add setjmp/longjmp functions for x86_64.
The FPU control word and MXCSR control bits are preserved across calls.
Signed-off-by: Ivan Gorinov
---
arch/x86/cpu/x86_64/setjmp.S | 66 +++
arch/x86/cpu/x86_64/setjmp.c | 19 -
arch/x86/include/asm
convention for efi_main() everywhere.
v4:
Keeping .exit label in x86_64 startup code;
Also removed the unused _relocate() arguments for arm, x86, riscv.
v3:
Updated patch description.
v2:
Added EFIABI to _relocate() declaration.
Ivan Gorinov (4):
x86: use EFI calling convention for
convention for efi_main() everywhere.
Signed-off-by: Ivan Gorinov
---
arch/x86/lib/crt0_x86_64_efi.S | 21 ++---
arch/x86/lib/reloc_x86_64_efi.c | 3 +--
lib/efi/efi_app.c | 3 ++-
lib/efi/efi_stub.c | 3 ++-
4 files changed, 15 insertions(+), 15
EFI image handle and system table are not used in _relocate().
Signed-off-by: Ivan Gorinov
---
arch/arm/lib/crt0_aarch64_efi.S | 2 --
arch/arm/lib/crt0_arm_efi.S | 2 --
arch/arm/lib/reloc_aarch64_efi.c | 3 +--
arch/arm/lib/reloc_arm_efi.c | 3 +--
4 files changed, 2 insertions
EFI image handle and system table are not used in _relocate().
Signed-off-by: Ivan Gorinov
---
arch/x86/lib/reloc_ia32_efi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/lib/reloc_ia32_efi.c b/arch/x86/lib/reloc_ia32_efi.c
index e838af3..49a0b94 100644
--- a
EFI image handle and system table are not used in _relocate().
Signed-off-by: Ivan Gorinov
---
arch/riscv/lib/reloc_riscv_efi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/riscv/lib/reloc_riscv_efi.c b/arch/riscv/lib/reloc_riscv_efi.c
index 8b4b2b1..51b7520 100644
:
Keeping .exit label in x86_64 startup code;
Also removed the unused _relocate() arguments for arm, x86, riscv.
v3:
Updated patch description.
v2:
Added EFIABI to _relocate() declaration.
Ivan Gorinov (1):
x86: use EFI calling convention for efi_main on x86_64
arch/x86/lib/crt0_x86_64_efi.S
calling convention in lib/efi.
Save efi_main() arguments in the startup code on x86_64;
use EFI calling convention for _relocate() on x86_64;
consistently use EFI calling convention for efi_main() everywhere.
Signed-off-by: Ivan Gorinov
---
arch/x86/lib/crt0_x86_64_efi.S | 24
On Tue, Jun 12, 2018 at 05:57:34PM +0200, Heinrich Schuchardt wrote:
> On 06/06/2018 08:28 PM, Ivan Gorinov wrote:
> > Add setjmp/longjmp functions for x86_64.
> > The FPU control word and MXCSR control bits are preserved across calls.
>
> With this patch
>
>
On Wed, Jun 13, 2018 at 05:36:26PM -0700, Ivan Gorinov wrote:
> > But bootefi selftest with your patch leads to an immediate reset of the
> > qemu-x86_64 board.
>
> Reproduced the qemu-x86_64 reset.
> The "info registers" command shows CR0.MP = 0.
> Setting it i
Device Tree, use the same data block for the other processors.
v2:
Corrected the order of included header files
Ivan Gorinov (1):
x86: Use microcode update from device tree for all processors
arch/x86/cpu/i386/cpu.c | 3 ++-
arch/x86/cpu/intel_common/car.S | 2 ++
arch
Device Tree, use the same data block for the other processors.
Signed-off-by: Ivan Gorinov
---
arch/x86/cpu/i386/cpu.c | 3 ++-
arch/x86/cpu/intel_common/car.S | 2 ++
arch/x86/cpu/intel_common/microcode.c | 10 +++---
arch/x86/include/asm/microcode.h | 1 +
arch
Add setjmp/longjmp functions for x86_64.
Signed-off-by: Ivan Gorinov
---
arch/x86/cpu/x86_64/setjmp.S | 49 +++
arch/x86/cpu/x86_64/setjmp.c | 19 -
arch/x86/include/asm/setjmp.h | 17 +++
3 files changed, 66 insertions
Add setjmp/longjmp functions for x86_64.
v3:
Removed the FPU control word and MXCSR;
Corrected SPDX License Identifier.
v2:
Added the FPU control word and MXCSR to jmp_buf;
Using ENTRY/ENDPROC macros.
Ivan Gorinov (1):
x86: Add 64-bit setjmp/longjmp implementation
arch/x86/cpu
Commit 2407183f98cf130b008125ef1718ccf89a192998 breaks
the qemu-x86 and edison builds.
Move ucode_base and ucode_size into common startup code,
except for configs with FSP.
Signed-off-by: Ivan Gorinov
---
arch/x86/cpu/intel_common/car.S | 10 --
arch/x86/cpu/start.S| 10
EFI image handle and system table are not used in _relocate().
v2:
Separated the changes in efi_main() arguments and calling convention.
Ivan Gorinov (3):
x86: Remove unused _relocate arguments
arm: Remove unused _relocate arguments
riscv: Remove unused _relocate arguments
arch/arm/lib
EFI image handle and system table are not used in _relocate().
Signed-off-by: Ivan Gorinov
---
arch/x86/lib/crt0_x86_64_efi.S | 3 ---
arch/x86/lib/reloc_ia32_efi.c | 3 +--
arch/x86/lib/reloc_x86_64_efi.c | 3 +--
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/arch/x86/lib
EFI image handle and system table are not used in _relocate().
Signed-off-by: Ivan Gorinov
---
arch/riscv/lib/reloc_riscv_efi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/riscv/lib/reloc_riscv_efi.c b/arch/riscv/lib/reloc_riscv_efi.c
index 8b4b2b1..2fbbfcb 100644
EFI image handle and system table are not used in _relocate().
Signed-off-by: Ivan Gorinov
---
arch/arm/lib/crt0_aarch64_efi.S | 2 --
arch/arm/lib/crt0_arm_efi.S | 2 --
arch/arm/lib/reloc_aarch64_efi.c | 3 +--
arch/arm/lib/reloc_arm_efi.c | 3 +--
4 files changed, 2 insertions
EFI image handle and system table are not used in _relocate().
v3:
Rebased on u-boot/master
v2:
Separated the changes in efi_main() arguments and calling convention.
Ivan Gorinov (3):
x86: Remove unused _relocate arguments
arm: Remove unused _relocate arguments
riscv: Remove unused
EFI image handle and system table are not used in _relocate().
Signed-off-by: Ivan Gorinov
---
arch/arm/lib/crt0_aarch64_efi.S | 2 --
arch/arm/lib/crt0_arm_efi.S | 2 --
arch/arm/lib/reloc_aarch64_efi.c | 3 +--
arch/arm/lib/reloc_arm_efi.c | 3 +--
4 files changed, 2 insertions
EFI image handle and system table are not used in _relocate().
Signed-off-by: Ivan Gorinov
---
arch/x86/lib/crt0_x86_64_efi.S | 3 ---
arch/x86/lib/reloc_ia32_efi.c | 3 +--
arch/x86/lib/reloc_x86_64_efi.c | 3 +--
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/arch/x86/lib
EFI image handle and system table are not used in _relocate().
Signed-off-by: Ivan Gorinov
---
arch/riscv/lib/reloc_riscv_efi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/riscv/lib/reloc_riscv_efi.c b/arch/riscv/lib/reloc_riscv_efi.c
index 8b4b2b1..2fbbfcb 100644
On Tue, Jun 26, 2018 at 03:47:49PM +0800, Bin Meng wrote:
> Hi Ivan,
>
> On Fri, Jun 22, 2018 at 12:13 PM, Bin Meng wrote:
> > Hi Ivan,
> >
> > On Fri, Jun 22, 2018 at 12:16 PM, Bin Meng wrote:
> >> From: Ivan Gorinov
> >>
> >> Built withou
On Thu, Jun 28, 2018 at 03:57:24PM +0800, Bin Meng wrote:
> Hi Ivan,
>
> On Wed, Jun 27, 2018 at 11:41 PM, Ivan Gorinov wrote:
> > EFI image handle and system table are not used in _relocate().
> >
> > v3:
> > Rebased on u-boot/master
> >
> >
EFI image handle and system table are not used in _relocate().
v4:
Consistently use EFIABI for _relocate() everywhere.
v3:
Use EFIABI for _relocate() on x86;
Rebased on u-boot/master.
v2:
Separated the changes in efi_main() arguments and calling convention.
Ivan Gorinov (3):
x86
EFI image handle and system table are not used in _relocate().
Signed-off-by: Ivan Gorinov
---
arch/x86/lib/crt0_x86_64_efi.S | 3 ---
arch/x86/lib/reloc_ia32_efi.c | 3 +--
arch/x86/lib/reloc_x86_64_efi.c | 3 +--
3 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/arch/x86/lib
EFI image handle and system table are not used in _relocate().
Signed-off-by: Ivan Gorinov
---
arch/arm/lib/crt0_aarch64_efi.S | 2 --
arch/arm/lib/crt0_arm_efi.S | 2 --
arch/arm/lib/reloc_aarch64_efi.c | 3 +--
arch/arm/lib/reloc_arm_efi.c | 3 +--
4 files changed, 2 insertions
EFI image handle and system table are not used in _relocate().
Signed-off-by: Ivan Gorinov
---
arch/riscv/lib/reloc_riscv_efi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/riscv/lib/reloc_riscv_efi.c b/arch/riscv/lib/reloc_riscv_efi.c
index 8b4b2b1..c1039dd 100644
Current implementation of Blt() in EFI_GRAPHICS_OUTPUT_PROTOCOL
assumes the memory buffer stride (number of bytes in a row)
always matches the rectangle Width, ignoring non-zero Delta.
Signed-off-by: Ivan Gorinov
---
lib/efi_loader/efi_gop.c | 10 --
1 file changed, 8 insertions(+), 2
On Wed, 2018-03-14 at 18:21 +0100, Heinrich Schuchardt wrote:
@@ -87,7 +93,7 @@ efi_status_t EFIAPI gop_blt(struct efi_gop *this, void
> > *buffer,
> > for (i = 0; i < height; i++) {
> > u32 *dest = fb + ((i + dy) * line_len32) +
> >
On Thu, 2018-03-15 at 11:19 +0100, Alexander Graf wrote:
> In the Blt service of the EFI_GRAPHICS_OUTPUT_PROTOCOL the parameter delta
> > is measured in bytes and not in pixels.
> >
> > The coding only supports delta being a multiple of four. The UEFI
> > specification does not explicitly require
Make a copy of DTB data with setup_data header and insert new item
into the the setup data linked list.
Signed-off-by: Ivan Gorinov
---
arch/x86/include/asm/bootparam.h | 1 +
arch/x86/lib/zimage.c| 32
2 files changed, 33 insertions(+)
diff --git
On x86 platforms, U-Boot does not provide Device Tree data to the kernel.
This prevents the kernel from using the same hardware description.
Make a copy of DTB data with setup_data header and insert new item
into the the setup data linked list.
Signed-off-by: Ivan Gorinov
---
arch/x86/include
On Fri, 2018-03-16 at 19:52 +0200, Andy Shevchenko wrote:
> On x86 platforms, U-Boot does not provide Device Tree data to the
> > kernel.
> > This prevents the kernel from using the same hardware description.
> >
> > Make a copy of DTB data with setup_data header and insert new item
> > into the t
On x86 platforms, U-Boot does not provide Device Tree data to the kernel.
This prevents the kernel from using the same hardware description.
Make a copy of DTB data with setup_data header and insert new item
into the the setup data linked list.
Signed-off-by: Ivan Gorinov
---
arch/x86/include
On x86 platforms, U-Boot does not pass Device Tree data to the kernel.
This prevents the kernel from using FDT loaded by U-Boot.
Read the working FDT address from the "fdtaddr" environment variable
and add a copy of the FDT data to the kernel setup_data list.
Signed-off-by: Iv
the tick timer in the Device Tree "chosen" node:
/include/ "hpet.dtsi"
chosen {
tick-timer = "/hpet0";
};
Signed-off-by: Ivan Gorinov
---
arch/Kconfig | 2 +-
arch/x86/dts/hpet.dtsi | 7 ++
drivers/timer/Kconfig | 6 ++
dr
On Thu, Mar 29, 2018 at 01:52:10PM +0300, Andy Shevchenko wrote:
> On Wed, 2018-03-28 at 17:58 -0700, Ivan Gorinov wrote:
> > Adding HPET as an alternative timer for x86 (default is TSC).
> > HPET main counter has constant clock frequency, calibration is not
> > required.
Adding HPET as an alternative timer for x86 (default is TSC).
HPET counter has constant frequency and does not need calibration.
This change also makes TSC timer driver optional on x86.
If X86_TSC is disabled, early timer functions are provided by HPET.
Signed-off-by: Ivan Gorinov
---
arch
On Fri, Mar 30, 2018 at 10:42:57PM +0300, Andy Shevchenko wrote:
> On Fri, Mar 30, 2018 at 1:39 AM, Simon Glass wrote:
> > On 29 March 2018 at 18:52, Andy Shevchenko
> > wrote:
>
> >> First question is how this will work in case of Broadwell and Ivybridge
> >> that have something to do with HPET
On Fri, Mar 30, 2018 at 10:46:40PM +0300, Andy Shevchenko wrote:
> > + writel(0, regs + HPET_MAIN_COUNT_L);
> > + writel(0, regs + HPET_MAIN_COUNT_H);
>
> Can we use writeq() here?
I don't see readq/writeq defined for x86, even x86_64.
> > + tl = readl(regs + HPET_MAIN
-specific configuration.
v2:
Moved duplicated code to static functions.
Ivan Gorinov (1):
timer: Add High Precision Event Timers (HPET) support
arch/Kconfig | 2 +-
arch/x86/Kconfig | 21 +
arch/x86/dts/hpet.dtsi | 7 ++
drivers/timer/Kconfig | 9
the Device Tree "chosen" node:
/include/ "hpet.dtsi"
...
chosen {
tick-timer = "/hpet";
};
Signed-off-by: Ivan Gorinov
---
arch/Kconfig | 2 +-
arch/x86/Kconfig | 21 +
arch/x86/dts/hpet.dtsi | 7 ++
dr
On Sat, Mar 31, 2018 at 06:31:03AM -0600, Andy Shevchenko wrote:
> >> > + tl = readl(regs + HPET_MAIN_COUNT_L);
> >> > + th = readl(regs + HPET_MAIN_COUNT_H);
> >>
> >> Ditto.
> >
> > If readq() is defined as two read operations in 32-bit code, main counter
> > rollover
On Tue, Apr 03, 2018 at 06:17:42AM -0600, Andy Shevchenko wrote:
> >> > If readq() is defined as two read operations in 32-bit code, main counter
> >> > rollover (low part overflow, high part increment) can happen between
> >> > them.
> >> And how this contradicts ther current code?
> > It just do
On Wed, Apr 04, 2018 at 12:15:24PM +0800, Bin Meng wrote:
> > Doesn't readX/writeX imply a single I/O operation?
> > It may be misleading to define it as two.
> >
> > Assuming MMX or SSE2 to be supported by all x86 processors, 64-bit I/O
> > registers can be accessed as a single operation even in 3
Check FileHeader.Machine to make sure the EFI executable image is built
for the same architecture. After this change, 32-bit U-Boot on x86 will
print an error message instead of loading an x86_64 image and crashing.
Signed-off-by: Ivan Gorinov
---
include/pe.h | 1 +
lib
The microcode update data block encoded in Device Tree is used by
the bootstrap processor (BSP) but not passed to the other CPUs (AP).
If the bootstrap processor successfully performs a microcode update
from Device Tree, use the same data block for the other processors.
Signed-off-by: Ivan
Check FileHeader.Machine to make sure the EFI executable image is built
for the same architecture. For example, 32-bit U-Boot on x86 will print
an error message instead of loading an x86_64 image and crashing.
Signed-off-by: Ivan Gorinov
---
include/pe.h | 24
Check FileHeader.Machine to make sure the EFI executable image is built
for the same architecture. For example, 32-bit U-Boot on x86 will print
an error message instead of loading an x86_64 image and crashing.
Signed-off-by: Ivan Gorinov
---
include/pe.h | 4 +++
lib
access.
v3:
Added early timer choice in x86-specific configuration.
v2:
Moved duplicated code to static functions.
Ivan Gorinov (1):
timer: Add High Precision Event Timers (HPET) support
arch/Kconfig | 2 +-
arch/x86/Kconfig | 21 ++
arch/x86/dts/hpet.dtsi
the Device Tree "chosen" node:
/include/ "hpet.dtsi"
...
chosen {
tick-timer = "/hpet";
};
Signed-off-by: Ivan Gorinov
---
arch/Kconfig | 2 +-
arch/x86/Kconfig | 21 ++
arch/x86/dts/hpet.dtsi | 7 ++
dr
() definitions.
v4:
Using 64-bit pointer for main counter access.
v3:
Added early timer choice in x86-specific configuration.
v2:
Moved duplicated code to static functions.
Ivan Gorinov (2):
x86: Add 64-bit memory-mapped I/O functions
timer: Add High Precision Event Timers (HPET) support
Add readq() and writeq() definitions for x86.
Please note: in 32-bit code readq/writeq will generate two 32-bit
memory access instructions instead of one atomic 64-bit operation.
Signed-off-by: Ivan Gorinov
---
arch/x86/include/asm/io.h | 16 ++--
1 file changed, 10 insertions
the Device Tree "chosen" node:
/include/ "hpet.dtsi"
...
chosen {
tick-timer = "/hpet";
};
Signed-off-by: Ivan Gorinov
---
arch/Kconfig | 2 +-
arch/x86/Kconfig | 21 ++
arch/x86/dts/hpet.dtsi | 7 ++
dr
Add readq() and writeq() definitions for x86.
Please note: in 32-bit code readq/writeq will generate two 32-bit
memory access instructions instead of one atomic 64-bit operation.
Signed-off-by: Ivan Gorinov
---
arch/x86/include/asm/io.h | 4
1 file changed, 4 insertions(+)
diff --git a
to use instead of early timer
in the code that specifically needs TSC.
v5:
Using readq() and writeq() for main counter access.
v3:
Added early timer choice in x86 Kconfig.
Ivan Gorinov (2):
x86: Add TSC-specific timer functions
timer: Add High Precision Event Timers (HPET) support
"hpet.dtsi"
...
chosen {
tick-timer = "/hpet";
};
Signed-off-by: Ivan Gorinov
---
arch/Kconfig | 1 +
arch/x86/Kconfig | 21 +
arch/x86/dts/hpet.dtsi | 7 ++
common/Kconfig | 1 +
drivers/timer/Kconfig |
.
Signed-off-by: Ivan Gorinov
---
arch/x86/cpu/coreboot/timestamp.c | 2 +-
arch/x86/cpu/quark/mrc_util.c | 13 ++---
arch/x86/include/asm/u-boot-x86.h | 2 +-
drivers/timer/tsc_timer.c | 33 -
4 files changed, 32 insertions(+), 18 deletions(-)
diff
On Thu, Apr 05, 2018 at 09:31:34AM -0600, Bin Meng wrote:
> > The microcode update data block encoded in Device Tree is used by
> > the bootstrap processor (BSP) but not passed to the other CPUs (AP).
>
> I don't understand what the bug is here. The AP microcode update is
> done in sipi_vector.S.
Hi Bin,
On Wed, Apr 18, 2018 at 06:48:59AM -0600, Bin Meng wrote:
> >> I don't understand what the bug is here. The AP microcode update is
> >> done in sipi_vector.S.
> >
> > I have found how it works. When a ROM image is built, the binman tool
> > looks for symbol '_dt_ucode_base_size' and update
Hi Bin,
On Wed, Apr 18, 2018 at 07:05:28PM -0600, Bin Meng wrote:
> >> >
> >> > If there is no ROM image, ucode_base and ucode_size are not initialized
> >> > and
> >> > the microcode update data from DTB applied by microcode_update_intel()
> >> > to the
> >> > bootstrap CPU is not used by the m
On Fri, Apr 20, 2018 at 06:25:08AM -0600, Andy Shevchenko wrote:
> > Coreboot timestamp functions and Quark memory reference code use
> > get_tbclk() to get TSC frequency. This will not work if another
> > early timer is selected.
> >
> > Add tsc_rate_mhz() function and use it in the code that spe
ntly selected early timer.
> >
> > Signed-off-by: Ivan Gorinov
> > ---
> > arch/x86/cpu/coreboot/timestamp.c | 2 +-
> > arch/x86/cpu/quark/mrc_util.c | 13 ++---
> > arch/x86/include/asm/u-boot-x86.h | 2 +-
> > drivers/timer/tsc_timer.c
Instead of difference between preferred and actual image base, the
actual base is added to the fields specified in the .reloc section.
Use ImageBase from PE optional header to compute the delta,
exit early if the image is loaded at the preferred address.
Signed-off-by: Ivan Gorinov
---
lib
efi_get_variable() always stores an extra zero byte after the output data.
When the returned data size matches the output buffer size, the extra zero
byte is stored past the end of the output buffer.
Signed-off-by: Ivan Gorinov
---
lib/efi_loader/efi_variable.c | 4 ++--
1 file changed, 2
efi_get_variable() always stores an extra zero byte after the output data.
When the returned data size matches the output buffer size, the extra zero
byte is stored past the end of the output buffer.
Signed-off-by: Ivan Gorinov
---
lib/efi_loader/efi_variable.c | 64
efi_get_variable() always stores an extra zero byte after the output data.
When the returned data size matches the output buffer size, the extra zero
byte is stored past the end of the output buffer.
Signed-off-by: Ivan Gorinov
---
lib/efi_loader/efi_variable.c | 40
On Fri, May 11, 2018 at 08:18:27PM +0200, Heinrich Schuchardt wrote:
> On 05/11/2018 07:54 PM, Ivan Gorinov wrote:
> > efi_get_variable() always stores an extra zero byte after the output data.
> > When the returned data size matches the output buffer size, the extra zero
> >
efi_get_variable() always stores an extra zero byte after the output data.
When the returned data size matches the output buffer size, the extra zero
byte is stored past the end of the output buffer.
Signed-off-by: Ivan Gorinov
---
lib/efi_loader/efi_variable.c | 40
Check if GetVariable writes past the end of the output data buffer.
Signed-off-by: Ivan Gorinov
---
lib/efi_selftest/efi_selftest_variables.c | 16
1 file changed, 16 insertions(+)
diff --git a/lib/efi_selftest/efi_selftest_variables.c
b/lib/efi_selftest
Allocate a buffer on the stack instead of an array of uninitialized
pointers; check if GetVariable writes past the end of the buffer.
Signed-off-by: Ivan Gorinov
---
lib/efi_selftest/efi_selftest_variables.c | 18 +-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a
Save the arguments passed in %rcx and %rdx for efi_main() on x86_64;
consistently use EFI calling convention for efi_main().
Signed-off-by: Ivan Gorinov
---
arch/x86/lib/crt0_x86_64_efi.S | 8
lib/efi/efi_app.c | 3 ++-
lib/efi/efi_stub.c | 3 ++-
3 files
Add __weak prefix to the following functions to allow override:
misc_init_r(), checkcpu(), print_cpuinfo().
Signed-off-by: Ivan Gorinov
---
arch/x86/cpu/x86_64/cpu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/cpu/x86_64/cpu.c b/arch/x86/cpu/x86_64/cpu.c
83 matches
Mail list logo