Skip to content

Commit

Permalink
[uaccess] Formalise the uaccess API
Browse files Browse the repository at this point in the history
The userptr_t is now the fundamental type that gets used for conversions.
For example, virt_to_phys() is implemented in terms of virt_to_user() and
user_to_phys().
  • Loading branch information
Michael Brown committed Oct 13, 2008
1 parent 667819b commit 6554b79
Show file tree
Hide file tree
Showing 21 changed files with 569 additions and 760 deletions.
2 changes: 1 addition & 1 deletion src/arch/i386/core/gdbidt.S
Expand Up @@ -2,7 +2,7 @@
* Interrupt Descriptor Table (IDT) setup and interrupt handlers for GDB stub.
*/

#include <virtaddr.h>
#include <librm.h>

#define SIZEOF_I386_REGS 32
#define SIZEOF_I386_FLAGS 4
Expand Down
2 changes: 1 addition & 1 deletion src/arch/i386/core/gdbmach.c
Expand Up @@ -19,7 +19,7 @@
#include <stddef.h>
#include <stdio.h>
#include <assert.h>
#include <virtaddr.h>
#include <gpxe/uaccess.h>
#include <gpxe/gdbstub.h>
#include <gdbmach.h>

Expand Down
1 change: 1 addition & 0 deletions src/arch/i386/core/pic8259.c
Expand Up @@ -16,6 +16,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#include <gpxe/io.h>
#include <pic8259.h>

/** @file
Expand Down
325 changes: 0 additions & 325 deletions src/arch/i386/core/start32.S

This file was deleted.

2 changes: 1 addition & 1 deletion src/arch/i386/core/virtaddr.S
Expand Up @@ -4,7 +4,7 @@
*
*/

#include "virtaddr.h"
#include "librm.h"

.arch i386
.text
Expand Down
6 changes: 2 additions & 4 deletions src/arch/i386/core/x86_io.c
Expand Up @@ -65,10 +65,8 @@ static void x86_writeq ( uint64_t data, volatile uint64_t *io_addr ) {
: : "A" ( data ), "r" ( io_addr ) );
}

PROVIDE_IOAPI_INLINE ( x86, virt_to_phys );
PROVIDE_IOAPI_INLINE ( x86, phys_to_virt );
PROVIDE_IOAPI_INLINE ( x86, virt_to_bus );
PROVIDE_IOAPI_INLINE ( x86, bus_to_virt );
PROVIDE_IOAPI_INLINE ( x86, phys_to_bus );
PROVIDE_IOAPI_INLINE ( x86, bus_to_phys );
PROVIDE_IOAPI_INLINE ( x86, ioremap );
PROVIDE_IOAPI_INLINE ( x86, iounmap );
PROVIDE_IOAPI_INLINE ( x86, io_to_bus );
Expand Down
1 change: 1 addition & 0 deletions src/arch/i386/drivers/net/undinet.c
Expand Up @@ -23,6 +23,7 @@
#include <biosint.h>
#include <pnpbios.h>
#include <basemem_packet.h>
#include <gpxe/io.h>
#include <gpxe/iobuf.h>
#include <gpxe/netdevice.h>
#include <gpxe/if_ether.h>
Expand Down
1 change: 1 addition & 0 deletions src/arch/i386/firmware/pcbios/gateA20.c
@@ -1,6 +1,7 @@
#include <stdio.h>
#include <realmode.h>
#include <bios.h>
#include <gpxe/io.h>
#include <gpxe/timer.h>

#define K_RDWR 0x60 /* keyboard data & cmds (read/write) */
Expand Down

0 comments on commit 6554b79

Please sign in to comment.