Add support for xHCI USB controllers.
The code is based on seabios implementation, but has been heavily
modified to match grubs internals.
Changes done in version 2:
* Code cleanup
* Code style fixes
* Don't leak memory buffers
* Compile without warnings
* Add more defines
* Add more helper functi
Tested on Intel PCH C246, the USB3 hub can be configured by grub.
Issues:
* USB3 devices connected behind that hub are sometimes not detected.
Signed-off-by: Patrick Rudolph
---
grub-core/bus/usb/usbhub.c | 40 --
include/grub/usbdesc.h | 1 +
include/gr
Set the maximum packet size to 512 for SuperSpeed devices.
Signed-off-by: Patrick Rudolph
---
grub-core/bus/usb/usbtrans.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/grub-core/bus/usb/usbtrans.c b/grub-core/bus/usb/usbtrans.c
index 85f081fff..72eb9b598 100644
--- a/
The xHCI code needs to be called for attaching or detaching a device.
Introduce two functions pointers and call it from the USB hub code.
Will be used in future commits, currently this doesn't change any functionality.
Signed-off-by: Patrick Rudolph
---
grub-core/bus/usb/ehci.c | 2 ++
grub-
Store the root port number, the route, consisting out of the port ID
in each nibble, and a pointer to driver private data.
Signed-off-by: Patrick Rudolph
---
grub-core/bus/usb/usbhub.c | 14 ++
include/grub/usb.h | 5 +
2 files changed, 15 insertions(+), 4 deletions(-)
Will be used in future patches.
Signed-off-by: Patrick Rudolph
---
include/grub/usb.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/grub/usb.h b/include/grub/usb.h
index 0527a3e2b..f65ac4f5d 100644
--- a/include/grub/usb.h
+++ b/include/grub/usb.h
@@ -47,7 +47,8 @
Parse the SS_ENDPOINT_COMPANION descriptor, which is only present on USB 3.0
capable devices and xHCI controllers. Make the descendp an array of pointers
to the endpoint descriptor as it's no longer an continous array.
Signed-off-by: Patrick Rudolph
---
grub-core/bus/usb/serial/common.c | 2 +-
Add basic support for xHCI USB controllers and non root xHCI hubs.
The motivation is to use this code on platforms that do not provide
user input by runtime services (like BIOS or UEFI platform) do.
This is the case when GRUB is used as coreboot payload for example.
The code is based on seabios im
Hi,
The Open Source Firmware, BMC and Bootloader devroom will take place
on Sunday, 7th February 2021 at FOSDEM, virtual.
Call for Participation
--
We are opening the call for participation to our devroom, with the deadline
for talk proposals set to Sunday, 20th December 2020
On Fri, Dec 04, 2020 at 10:43:46AM -0600, Glenn Washburn wrote:
> Reviewed-by: Daniel Kiper
> Signed-off-by: Glenn Washburn
> ---
> grub-core/disk/luks2.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/grub-core/disk/luks2.c b/grub-core/disk/luks2.c
> index 2335ded77
On Fri, Dec 04, 2020 at 10:43:44AM -0600, Glenn Washburn wrote:
> This patch is similiar to commit 9dab2f51e (sparc: Enable __clzsi2() and
> __clzdi2()) but for MIPS target and __clzdi2 only, __clzsi2 was already
> enabled.
>
> Suggested-by: Daniel Kiper
> Signed-off-by: Glenn Washburn
I'm not
On Fri, Dec 04, 2020 at 10:43:42AM -0600, Glenn Washburn wrote:
> Reviewed-by: Daniel Kiper
> Signed-off-by: Glenn Washburn
Reviewed-by: Patrick Steinhardt
> ---
> grub-core/disk/luks2.c | 11 +++
> 1 file changed, 11 insertions(+)
>
> diff --git a/grub-core/disk/luks2.c b/grub-core/
On Fri, Dec 04, 2020 at 10:43:41AM -0600, Glenn Washburn wrote:
> First, check to make sure that source disk has a known size. If not, print
> debug message and return error. There are 4 cases where
> GRUB_DISK_SIZE_UNKNOWN is set (biosdisk, obdisk, ofdisk, and uboot), and in
> all those cases proc
On Fri, Dec 04, 2020 at 10:43:40AM -0600, Glenn Washburn wrote:
> By default, dm-crypt internally uses an IV that corresponds to 512-byte
> sectors, even when a larger sector size is specified. What this means is
> that when using a larger sector size, the IV is incremented every sector.
> However,
On Fri, Dec 04, 2020 at 10:43:29AM -0600, Glenn Washburn wrote:
> This patch series is an update to reflect changes suggested in v6. Of note,
> there are a few new patches: 01, 02, and 04.
>
> 01: Daniel suggested to renae grub_disk_get_size to grub_disk_native_sectors
> 02: Make ALIGN_UP and
On Fri, Dec 04, 2020 at 10:43:45AM -0600, Glenn Washburn wrote:
> Reviewed-by: Daniel Kiper
> Signed-off-by: Glenn Washburn
Reviewed-by: Patrick Steinhardt
> ---
> include/grub/misc.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/include/grub/misc.h b/include/grub/misc.h
> inde
On Fri, Dec 04, 2020 at 10:43:43AM -0600, Glenn Washburn wrote:
> Reviewed-by: Daniel Kiper
> Signed-off-by: Glenn Washburn
Reviewed-by: Patrick Steinhardt
> ---
> grub-core/disk/luks2.c | 8
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/grub-core/disk/luks2.c b
On Fri, Dec 04, 2020 at 10:43:36AM -0600, Glenn Washburn wrote:
> This allows error messages to be more easily distinguishable between indexes
> and slot keys. The former include the string "index" in the error/debug
> string, and the later are surrounded in quotes.
>
> Signed-off-by: Glenn Washbu
On Fri, Dec 04, 2020 at 10:43:39AM -0600, Glenn Washburn wrote:
> We need to convert the sectors from the size of the underlying device to the
> cryptodisk sector size; segment.size is in bytes which need to be converted
> to cryptodisk sectors as well.
>
> Also, removed an empty statement.
>
> R
On Fri, Dec 04, 2020 at 10:43:38AM -0600, Glenn Washburn wrote:
> Add GRUB_TYPE_U_MAX/MIN(type) macros to get the max/min values for an
> unsigned number with size of type.
>
> Signed-off-by: Glenn Washburn
> ---
> grub-core/disk/cryptodisk.c | 8
> include/grub/types.h| 7 +
On Fri, Dec 04, 2020 at 10:43:35AM -0600, Glenn Washburn wrote:
> Use the slot key name in the json array rather than the 0 based index in the
> json array for keyslots, segments, and digests. This is less confusing for
> the end user. For example, say you have a LUKS2 device with a key in slot 1
>
On Fri, Dec 04, 2020 at 10:43:37AM -0600, Glenn Washburn wrote:
> The new macro GRUB_TYPE_BITS(type) returns the number of bits allocated for
> type.
>
> Signed-off-by: Glenn Washburn
Reviewed-by: Patrick Steinhardt
> ---
> grub-core/disk/cryptodisk.c | 7 ---
> include/grub/types.h
On Fri, Dec 04, 2020 at 10:43:34AM -0600, Glenn Washburn wrote:
> This allows code using these structs to know the named key associated with
> these json data structures. In the future we can use these to provide better
> error messages to the user.
>
> Get rid of idx variable in luks2_get_keyslot
On Fri, Dec 04, 2020 at 10:43:33AM -0600, Glenn Washburn wrote:
> We should assume that the output argument "out" is uninitialized and could
> have random data. So, make sure to initialize the segments and keyslots bit
> fields because potentially not all bits of those fields are written to.
> Othe
On Fri, Dec 04, 2020 at 10:43:32AM -0600, Glenn Washburn wrote:
> Reviewed-by: Daniel Kiper
> Signed-off-by: Glenn Washburn
Reviewed-by: Patrick Steinhardt
> ---
> grub-core/disk/luks2.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/grub-core/disk/luks2.c b/g
On Fri, Dec 04, 2020 at 10:43:31AM -0600, Glenn Washburn wrote:
> This ensures that expected order of operations is preserved when arguments
> are expressions.
>
> Signed-off-by: Glenn Washburn
Reviewed-by: Patrick Steinhardt
> ---
> include/grub/misc.h | 4 ++--
> 1 file changed, 2 insertion
On Fri, Dec 04, 2020 at 10:43:30AM -0600, Glenn Washburn wrote:
> The function grub_disk_get_size is confusingly named because it actually
> returns a sector count where the sectors are sized in the grub native sector
> size. Rename to something more appropriate.
>
> Suggested-by: Daniel Kiper
>
Dear GRUB folks,
Setting the GRUB timeout to 0
`GRUB_TIMEOUT=0`
is it possible to interrupt the boot somehow for example by holding a
key done? There are some posts on the WWW claiming it was once possible
using the shift key [1], but it didn’t work in my tests with Debian
bullseye/test
28 matches
Mail list logo