9boot: limit read size to 4K for efi simple file system protocol
copying files from the uefi shell works, reading plan9.ini works, loading the kernel by calling Read to read in the DATA section of the kernel *FAILS*. my guess is that uefi filesystem driver or nvme driver tries to allocate a temporary buffer and hasnt got the space. limiting the read size fixes it.
This commit is contained in:
parent
87274893d8
commit
a9b4126468
1 changed files with 1 additions and 1 deletions
|
@ -71,7 +71,7 @@ fsread(void *f, void *data, int len)
|
|||
{
|
||||
UINTN size;
|
||||
|
||||
size = len;
|
||||
size = len > 4096 ? 4096 : len;
|
||||
if(eficall(((EFI_FILE_PROTOCOL*)f)->Read, f, &size, data))
|
||||
return 0;
|
||||
return (int)size;
|
||||
|
|
Loading…
Reference in a new issue