Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46409
b: refs/heads/master
c: 59fa850
h: refs/heads/master
i:
  46407: 0df0d42
v: v3
  • Loading branch information
Bob Moore authored and Len Brown committed Feb 3, 2007
1 parent b7ef094 commit cd1c411
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 130 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ff40c8a3f258e9a54b0b94b92d5e2d9d88a39954
refs/heads/master: 59fa85057e12ff135df54266722b2064c418fc05
10 changes: 5 additions & 5 deletions trunk/drivers/acpi/events/evgpeblk.c
Original file line number Diff line number Diff line change
Expand Up @@ -796,12 +796,12 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)
(u8) (gpe_block->block_base_number +
(i * ACPI_GPE_REGISTER_WIDTH));

ACPI_STORE_ADDRESS(this_register->status_address.address,
(gpe_block->block_address.address + i));
this_register->status_address.address =
gpe_block->block_address.address + i;

ACPI_STORE_ADDRESS(this_register->enable_address.address,
(gpe_block->block_address.address
+ i + gpe_block->register_count));
this_register->enable_address.address =
gpe_block->block_address.address + i +
gpe_block->register_count;

this_register->status_address.space_id =
gpe_block->block_address.space_id;
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/acpi/executer/exoparg1.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ acpi_status acpi_ex_opcode_0A_0T_1R(struct acpi_walk_state *walk_state)
status = AE_NO_MEMORY;
goto cleanup;
}
#if ACPI_MACHINE_WIDTH != 16
return_desc->integer.value = acpi_os_get_timer();
#endif
break;

default: /* Unknown opcode */
Expand Down
5 changes: 1 addition & 4 deletions trunk/drivers/acpi/executer/exregion.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,10 @@ acpi_ex_system_memory_space_handler(u32 function,
*value = (acpi_integer) ACPI_GET32(logical_addr_ptr);
break;

#if ACPI_MACHINE_WIDTH != 16
case 64:
*value = (acpi_integer) ACPI_GET64(logical_addr_ptr);
break;
#endif

default:
/* bit_width was already validated */
break;
Expand All @@ -235,11 +234,9 @@ acpi_ex_system_memory_space_handler(u32 function,
ACPI_SET32(logical_addr_ptr) = (u32) * value;
break;

#if ACPI_MACHINE_WIDTH != 16
case 64:
ACPI_SET64(logical_addr_ptr) = (u64) * value;
break;
#endif

default:
/* bit_width was already validated */
Expand Down
14 changes: 6 additions & 8 deletions trunk/drivers/acpi/hardware/hwregs.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,8 +788,8 @@ acpi_hw_low_level_read(u32 width, u32 * value, struct acpi_generic_address *reg)

case ACPI_ADR_SPACE_SYSTEM_IO:

status = acpi_os_read_port((acpi_io_address) address,
value, width);
status =
acpi_os_read_port((acpi_io_address) address, value, width);
break;

default:
Expand All @@ -800,8 +800,7 @@ acpi_hw_low_level_read(u32 width, u32 * value, struct acpi_generic_address *reg)

ACPI_DEBUG_PRINT((ACPI_DB_IO,
"Read: %8.8X width %2d from %8.8X%8.8X (%s)\n",
*value, width,
ACPI_FORMAT_UINT64(address),
*value, width, ACPI_FORMAT_UINT64(address),
acpi_ut_get_region_name(reg->space_id)));

return (status);
Expand Down Expand Up @@ -858,8 +857,8 @@ acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address * reg)

case ACPI_ADR_SPACE_SYSTEM_IO:

status = acpi_os_write_port((acpi_io_address) address,
value, width);
status = acpi_os_write_port((acpi_io_address) address, value,
width);
break;

default:
Expand All @@ -870,8 +869,7 @@ acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address * reg)

ACPI_DEBUG_PRINT((ACPI_DB_IO,
"Wrote: %8.8X width %2d to %8.8X%8.8X (%s)\n",
value, width,
ACPI_FORMAT_UINT64(address),
value, width, ACPI_FORMAT_UINT64(address),
acpi_ut_get_region_name(reg->space_id)));

return (status);
Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/acpi/tables/tbxfroot.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ static acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp)
return (AE_OK);
}

#if ACPI_MACHINE_WIDTH != 16

/*******************************************************************************
*
* FUNCTION: acpi_tb_find_rsdp
Expand Down Expand Up @@ -275,5 +273,3 @@ static u8 *acpi_tb_scan_memory_for_rsdp(u8 * start_address, u32 length)
start_address));
return_PTR(NULL);
}

#endif
68 changes: 1 addition & 67 deletions trunk/include/acpi/acmacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,43 +61,20 @@

#define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0]))

#if ACPI_MACHINE_WIDTH == 16

/*
* For 16-bit addresses, we have to assume that the upper 32 bits
* (out of 64) are zero.
*/
#define ACPI_LODWORD(l) ((u32)(l))
#define ACPI_HIDWORD(l) ((u32)(0))

#define ACPI_GET_ADDRESS(a) ((a).lo)
#define ACPI_STORE_ADDRESS(a,b) {(a).hi=0;(a).lo=(u32)(b);}
#define ACPI_VALID_ADDRESS(a) ((a).hi | (a).lo)

#else
#ifdef ACPI_NO_INTEGER64_SUPPORT
/*
* acpi_integer is 32-bits, no 64-bit support on this platform
*/
#define ACPI_LODWORD(l) ((u32)(l))
#define ACPI_HIDWORD(l) ((u32)(0))

#define ACPI_GET_ADDRESS(a) (a)
#define ACPI_STORE_ADDRESS(a,b) ((a)=(b))
#define ACPI_VALID_ADDRESS(a) (a)

#else

/*
* Full 64-bit address/integer on both 32-bit and 64-bit platforms
*/
#define ACPI_LODWORD(l) ((u32)(u64)(l))
#define ACPI_HIDWORD(l) ((u32)(((*(struct uint64_struct *)(void *)(&l))).hi))

#define ACPI_GET_ADDRESS(a) (a)
#define ACPI_STORE_ADDRESS(a,b) ((a)=(acpi_physical_address)(b))
#define ACPI_VALID_ADDRESS(a) (a)
#endif
#endif

/*
Expand Down Expand Up @@ -135,15 +112,8 @@
#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void,(void *) NULL,(acpi_native_uint) i)
#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL)
#define ACPI_OFFSET(d,f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL)

#if ACPI_MACHINE_WIDTH == 16
#define ACPI_STORE_POINTER(d,s) ACPI_MOVE_32_TO_32(d,s)
#define ACPI_PHYSADDR_TO_PTR(i) (void *)(i)
#define ACPI_PTR_TO_PHYSADDR(i) (u32) ACPI_CAST_PTR (u8,(i))
#else
#define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i)
#define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i)
#endif

#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32,(a)) == *ACPI_CAST_PTR (u32,(b)))
Expand Down Expand Up @@ -224,28 +194,6 @@

/* The hardware supports unaligned transfers, just do the little-endian move */

#if ACPI_MACHINE_WIDTH == 16

/* No 64-bit integers */
/* 16-bit source, 16/32/64 destination */

#define ACPI_MOVE_16_TO_16(d,s) *(u16 *)(void *)(d) = *(u16 *)(void *)(s)
#define ACPI_MOVE_16_TO_32(d,s) *(u32 *)(void *)(d) = *(u16 *)(void *)(s)
#define ACPI_MOVE_16_TO_64(d,s) ACPI_MOVE_16_TO_32(d,s)

/* 32-bit source, 16/32/64 destination */

#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_32_TO_32(d,s) *(u32 *)(void *)(d) = *(u32 *)(void *)(s)
#define ACPI_MOVE_32_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s)

/* 64-bit source, 16/32/64 destination */

#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
#define ACPI_MOVE_64_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s)

#else
/* 16-bit source, 16/32/64 destination */

#define ACPI_MOVE_16_TO_16(d,s) *(u16 *)(void *)(d) = *(u16 *)(void *)(s)
Expand All @@ -263,7 +211,6 @@
#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
#define ACPI_MOVE_64_TO_64(d,s) *(u64 *)(void *)(d) = *(u64 *)(void *)(s)
#endif

#else
/*
Expand Down Expand Up @@ -308,10 +255,7 @@

/* Macros based on machine integer width */

#if ACPI_MACHINE_WIDTH == 16
#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s)

#elif ACPI_MACHINE_WIDTH == 32
#if ACPI_MACHINE_WIDTH == 32
#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_32_TO_16(d,s)

#elif ACPI_MACHINE_WIDTH == 64
Expand Down Expand Up @@ -696,16 +640,6 @@
#define ACPI_DEBUGGER_EXEC(a)
#endif

/*
* For 16-bit code, we want to shrink some things even though
* we are using ACPI_DEBUG_OUTPUT to get the debug output
*/
#if ACPI_MACHINE_WIDTH == 16
#undef ACPI_DEBUG_ONLY_MEMBERS
#undef _VERBOSE_STRUCTURES
#define ACPI_DEBUG_ONLY_MEMBERS(a)
#endif

#ifdef ACPI_DEBUG_OUTPUT
/*
* 1) Set name to blanks
Expand Down
40 changes: 1 addition & 39 deletions trunk/include/acpi/actypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,12 @@ typedef int INT32;
typedef u64 acpi_native_uint;
typedef s64 acpi_native_int;

typedef u64 acpi_table_ptr;
typedef u64 acpi_io_address;
typedef u64 acpi_physical_address;

#define ACPI_MAX_PTR ACPI_UINT64_MAX
#define ACPI_SIZE_MAX ACPI_UINT64_MAX

#define ACPI_NATIVE_BOUNDARY 8
#define ACPI_USE_NATIVE_DIVIDE /* Has native 64-bit integer support */

/*
Expand Down Expand Up @@ -190,51 +188,15 @@ typedef int INT32;
typedef u32 acpi_native_uint;
typedef s32 acpi_native_int;

typedef u64 acpi_table_ptr;
typedef u32 acpi_io_address;
typedef u32 acpi_physical_address;

#define ACPI_MAX_PTR ACPI_UINT32_MAX
#define ACPI_SIZE_MAX ACPI_UINT32_MAX

#define ACPI_NATIVE_BOUNDARY 4

/*******************************************************************************
*
* Types specific to 16-bit targets
*
******************************************************************************/

#elif ACPI_MACHINE_WIDTH == 16

/*! [Begin] no source code translation (keep the typedefs as-is) */

typedef unsigned long UINT32;
typedef short INT16;
typedef long INT32;

/*! [End] no source code translation !*/

typedef u16 acpi_native_uint;
typedef s16 acpi_native_int;

typedef u32 acpi_table_ptr;
typedef u32 acpi_io_address;
typedef char *acpi_physical_address;

#define ACPI_MAX_PTR ACPI_UINT16_MAX
#define ACPI_SIZE_MAX ACPI_UINT16_MAX

#define ACPI_NATIVE_BOUNDARY 2
#define ACPI_USE_NATIVE_DIVIDE /* No 64-bit integers, ok to use native divide */

/* 64-bit integers cannot be supported */

#define ACPI_NO_INTEGER64_SUPPORT

#else

/* ACPI_MACHINE_WIDTH must be either 64, 32, or 16 */
/* ACPI_MACHINE_WIDTH must be either 64 or 32 */

#error unknown ACPI_MACHINE_WIDTH
#endif
Expand Down

0 comments on commit cd1c411

Please sign in to comment.