Index | Thread | Search

From:
Kirill A. Korinsky <kirill@korins.ky>
Subject:
Re: sys/octeon: add em to GENERIC and RAMDISK kernels
To:
Visa Hankala <visa@hankala.org>
Cc:
tech@openbsd.org
Date:
Fri, 19 Jun 2026 20:43:10 +0200

Download raw body.

Thread
On Fri, 19 Jun 2026 18:37:39 +0200,
Visa Hankala <visa@hankala.org> wrote:
> 
> On Fri, Jun 19, 2026 at 05:13:25PM +0200, Kirill A. Korinsky wrote:
> > tech@,
> > 
> > I'd like em driver to both GENERIC and RAMDISK kernel.
> > 
> > I almost sure that octeon device with e1000 do not exists, but it is very
> > useful for emulation in QEMU for example.
> > 
> > Implement Octeon's NIC is tricky, but reuse e1000 seems a nice shortcut.
> 
> I do not see the point of adding this for QEMU. Currently, QEMU does
> not seem able to emulate an actual OCTEON system. There is no emulation
> for the central interrupt unit, for example.
>

Well, out of the box QEMU hasn't got that, indeed.

Here old and hacky patch for QEMU 1.0.1 which implements some Octeon support
and it has a a minimal CIU/CIU3
https://github.com/amir-mehmood/QEMU-Octeon-MIPS64/

I had reworked that diff into something that actually boots installer with
U-Boot and I was able to install OpenBSD inside Qemu.

Why? Mainly for port works. Yes, it is slow, but it is a way to have test
and build ports on mips64.

Work in progress QEMU tree with very hacky code is here:
https://github.com/catap/qemu/tree/octeon

Used toolchain was sent for ports@ here:
https://marc.info/?l=openbsd-ports&m=178174538942055&w=2

> > Index: sys/arch/octeon/conf/GENERIC
> > ===================================================================
> > RCS file: /home/cvs/src/sys/arch/octeon/conf/GENERIC,v
> > diff -u -p -r1.62 GENERIC
> > --- sys/arch/octeon/conf/GENERIC	16 May 2025 16:35:12 -0000	1.62
> > +++ sys/arch/octeon/conf/GENERIC	19 Jun 2026 11:45:04 -0000
> > @@ -51,6 +51,9 @@ pci*		at pcibus?
> >  ppb*		at pci?		# PCI-PCI bridges
> >  pci*		at ppb?
> >  
> > +# PCI Ethernet
> > +em*		at pci?		# Intel Pro/1000 ethernet
> > +
> >  octsmi*		at fdt?		# MDIO controller
> >  com*		at fdt_octeon?
> >  octcib*		at fdt?		# Interrupt controller
> > Index: sys/arch/octeon/conf/RAMDISK
> > ===================================================================
> > RCS file: /home/cvs/src/sys/arch/octeon/conf/RAMDISK,v
> > diff -u -p -r1.47 RAMDISK
> > --- sys/arch/octeon/conf/RAMDISK	11 Jan 2023 03:28:42 -0000	1.47
> > +++ sys/arch/octeon/conf/RAMDISK	19 Jun 2026 12:53:43 -0000
> > @@ -49,6 +49,9 @@ pci*		at pcibus?
> >  ppb*		at pci?
> >  pci*		at ppb?
> >  
> > +# PCI Ethernet
> > +em*		at pci?		# Intel Pro/1000 ethernet
> > +
> >  octsmi*		at fdt?		# MDIO controller
> >  com*		at fdt_octeon?
> >  octcib*		at fdt?		# Interrupt controller
> > 
> > -- 
> > wbr, Kirill
> > 

-- 
wbr, Kirill