build: create output dirs in do-kconfig

Unbreaks parallel builds.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
build: explicitly set ROM size

Add a config option to specify the rom size wanted.  Default is zero,
which will automatically figure the needed size.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Rename fields of 'struct chs_s' and use in floppy lba2chs().

Rename the fields of 'struct chs_s' so that it can be used both to
describe a drive and to describe a particular sector on a drive.

Update floppy.c:lba2chs() to return a 'struct chs_s' instead of
passing the results via pointers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Rearrange stack_hop_back() call in wait_irq, check_irqs, and _farcall16.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Minor - move call16 assembler in romlayout.S.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Make __call16 use C calling convention and support two passed parameters.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Update _farcall16() to pass segment of callregs explicitly.

Don't use implicit passing of %es for the segment of the callregs pointer.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Support call16() calls after entering 32bit mode from call32().

When transitioning to 32bit via call32() track the stack segment
register and support restoring it on call16() requests.  This permits
call16() to work properly.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Run ahci code entirely in 32bit mode.

The ahci driver needs to jump into 32bit mode in order to access
portions of the ahci controllers PCI config space.  Instead of jumping
into 32bit mode just to toggle the ahci registers, jump into 32bit
mode for all of the driver interactions.  This shrinks the size of the
overall code and can lead to further cleanups.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>