NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-evbarm/54554 (Booting via U-Boot fails due to buffer misalignment)



The following reply was made to PR port-evbarm/54554; it has been noted by GNATS.

From: Simon South <simon%simonsouth.net@localhost>
To: Jared McNeill <jmcneill%invisible.ca@localhost>, gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: port-evbarm/54554 (Booting via U-Boot fails due to buffer
 misalignment)
Date: Thu, 19 Sep 2019 07:43:52 -0400

 On 2019-09-19 6:50 a.m., Jared McNeill wrote:
 > There's a bit of code duplication here, maybe we should break this out 
 > into a separate function?
 
 I had the same thought but resisted doing this, only because
 
 1. The original code was also duplicated in each spot, and as I'm new to 
 NetBSD I'm trying to change as little as possible; and
 
 2. The resulting function signature seems a bit ugly, something along 
 the lines of
 
         static void *
         efi_block_allocate_device_buffer(struct efi_block_dev *bdev, 
 UINTN size, void **buffer_start)
 
     since we need to return a pointer both to the "base" buffer as well 
 as to its first aligned element.
 
 Does that seem reasonable, though? I'm happy to make this change as well 
 but you would have a better feel for it than me at this point.
 
 -- 
 Simon South
 simon%simonsouth.net@localhost
 



Home | Main Index | Thread Index | Old Index